paascloud-master
:https://github.com/paascloud/... paascloud-master
官方環境搭建:http://blog.paascloud.net/201... yum install lrzsz
yum install -y unzip zip
yum -y install vim*
tar.gz
包安裝,參考:https://www.cnblogs.com/chy12... rpm
包安裝,參考:https://www.cnblogs.com/zengh... 下載地址:https://dev.mysql.com/downloads/file/?id=470281
上面下載後,
yum localinstall mysql57-community-release-el7-11.noarch.rpm vim /etc/yum.repos.d/mysql-community.repo # 肯定使用的版本,enable設爲1 yum install -y mysql-community-server
systemctl status mysqld.service systemctl start mysqld.service
cat /etc/my.cnf # log-error=/var/log/mysqld.log # pid-file=/var/run/mysqld/mysqld.pid cat /var/log/mysqld.log | grep password
mysql -u root -p
mysql> set global validate_password_policy=0; mysql> set global validate_password_length=6;
mysql> alter user 'root'@'localhost' identified by '123456';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION; mysql> flush privileges;
crontab
命令:https://www.cnblogs.com/kensh... 很是慢
,不推薦。html
依次執行下面命令
yum remove docker docker-common docker-selinux docker-engine yum install -y yum-utils device-mapper-persistent-data lvm2 yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo yum-config-manager --enable docker-ce-edge yum-config-manager --enable docker-ce-test yum-config-manager --disable docker-ce-edge yum makecache fast yum -y install docker-ce systemctl start docker docker run hello-world docker images REPOSITORY TAG IMAGE ID CREATED SIZE hello-world latest 1815c82652c0 2 months ago 1.84kB
從官方安裝包下載:docker-ce-17.06.0.ce-1.el7.centos.x86_64.rpm
。java
yum install /usr/local/src/tool/docker-ce-17.06.0.ce-1.el7.centos.x86_64.rpm -y
systemctl start docker
docker -v
# systemctl enable docker Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
yum list installed|grep docker
yum –y remove docker.x86_64.XXX
rm -rf /var/lib/docker
wget http://download.redis.io/releases/redis-4.0.2.tar.gz tar xzf redis-4.0.2.tar.gz cd redis-4.0.2 make
src
目錄下,經過下面的命令啓動 Redis
服務:src/redis-server
redis-cli
進行使用:# src/redis-cli redis> set foo bar OK redis> get foo "bar"
# 第一種:殺死進程PID,kill -9 PID ps aux|grep redis # 第二種 src/redis-cli shutdown
yum install epel-release yum install redis systemctl start redis.service redis-server /etc/redis.conf systemctl enable redis
vi /usr/local/redis-4.0.2/redis.conf requirepass paasword #配置密碼 # bind 127.0.0.1 #容許遠程訪問 daemonize yes #後臺啓動
src/redis-server ../redis.conf src/redis-cli -a paasword
參考博客:http://blog.paascloud.net/201...mysql
docker run -d -p 6379:6379 redis:4.0.8 --requirepass "123456"
wget http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
rpm -ivh nginx-release-centos-7-0.el7.ngx.noarch.rpm
yum -y install nginx
systemctl start nginx
nginx -v
nginx version: nginx/1.14.1
/etc/nginx/nginx.conf
主要是搭建集羣環境
參考博客:http://blog.paascloud.net/201...linux
參考博客:https://blog.csdn.net/weixin_... nginx
注意:若是 broker
啓動失敗,多是 runbroker.sh
、runserver.sh
裏的內存大小設置默認過大。git
rocketmq
提供多種管理方式,命令行和界面等,apache
提供一個開源的擴展項目: https://github.com/apache/roc... 裏面包含一個子項目 rocketmq-console
,配置下,打個包就能夠用了。github
或者能夠百度搜索一下
rocketmq-console.war
。
具體安裝參考博客:https://www.jianshu.com/p/e5b...redis
/etc/init.d/rabbitmq-server start # 或 service rabbitmq-service start
# 啓動 rabbitmq-server -detached # 關閉 rabbitmqctl stop # 查看狀態 rabbitmqctl status
用戶名/密碼:
guest/guest
rabbitmq-plugins enable rabbitmq_management
http://192.168.241.101:15672/
根據上面參考博客1
搭建的僞集羣,由於配置文件在一個機器上的zookeeper
目錄下,因此啓動時對應不一樣的配置文件。
zookeeper
的 conf
目錄下cd /root/software/zookeeper-3.4.9/conf
# 添加了環境變量 zkServer.sh start zoo1.cfg zkServer.sh start zoo2.cfg zkServer.sh start zoo3.cfg
zkServer.sh status zoo1.cfg zkServer.sh status zoo2.cfg zkServer.sh status zoo3.cfg
zookeeper
圖形化的客戶端工具--ZooInspector
,具體使用參考博客:https://blog.csdn.net/qq_2685...。sql
啓動zookeeper
集羣后,運行ZooInspector
jar 包,當paascloud
項目啓動後,出現下面效果
根據上面
rocketmq集羣 目錄下的第一個參考博客來啓動。
2m-2s-sync
。
NameServer A 192.168.241.101
nohup sh /usr/local/rocketmq/bin/mqnamesrv &
NameServer A 192.168.241.102
nohup sh /usr/local/rocketmq/bin/mqnamesrv &
BrokerServer A-master 192.168.241.101
nohup sh mqbroker -c /usr/local/rocketmq/conf/2m-2s-sync/broker-a.properties&
BrokerServer A-slave 192.168.241.101
nohup sh mqbroker -c /usr/local/rocketmq/conf/2m-2s-sync/broker-a-s.properties&
BrokerServer B-master 192.168.241.102
nohup sh mqbroker -c /usr/local/rocketmq/conf/2m-2s-sync/broker-b.properties&
啓動BrokerServer B-slave 192.168.241.102
nohup sh mqbroker -c /usr/local/rocketmq/conf/2m-2s-sync/broker-b-s.properties&
netstat -ntlp jps tail -f -n 500 /usr/local/rocketmq/logs/rocketmqlogs/broker.log tail -f -n 500 /usr/local/rocketmq/logs/rocketmqlogs/namesrv.log
sh /usr/local/rocketmq/bin/mqshutdown namesrv sh /usr/local/rocketmq/bin/mqshutdown broker
rm -rf /usr/local/rocketmq/data/master rm -rf /usr/local/rocketmq/data/slave mkdir -p /usr/local/rocketmq/data/master/store/commitlog mkdir -p /usr/local/rocketmq/data/slave/store/commitlog mkdir -p /usr/local/rocketmq/data/master/store/consumequeue mkdir -p /usr/local/rocketmq/data/slave/store/consumequeue mkdir -p /usr/local/rocketmq/data/master/store/index mkdir -p /usr/local/rocketmq/data/slave/store/index
rocketmq
集羣控制檯啓動
解壓在tomcat目錄,
./tomcat/bin/startup.sh
啓動便可。
訪問地址: http://192.168.0.110:8080/roc...