rocket.chat安装部署
2018-02-28 10:20
429 查看
1.环境
centos6.5node4.8(之前使用6版本的启动的时候起不起来。)
meteor
git
mongodb
2.环境初始化
2.1安装node
###下载node安装包 [root@bgs-4p103-linan server]# cd /opt/ [root@bgs-4p103-linan opt]# wget http://mirror.baifendian.com/node/node-v4.8.4.tar.gz ###解压缩tar包 [root@bgs-4p103-linan opt]# tar xf node-v4.8.4.tar.gz -C /opt ###创建软连接 [root@bgs-4p103-linan opt]# ln -s /opt/node-v4.8.4 /opt/node ###配置环境变量 [root@bgs-4p103-linan opt]# vi /etc/profile export NODE_HOME=/opt/node export PATH=${NODE_HOME}/bin:${PATH} [root@bgs-4p103-linan opt]# source /etc/profile ###检查安装版本 [root@bgs-4p103-linan opt] node -v v4.8.4 [root@bgs-4p103-linan opt] npm -v 2.15.11 #安装GraphicsMagick(1.3.25)(如果升级了gcc-c++,这里就不用执行) [root@bgs-4p103-linan opt]# yum install GraphicsMagick gcc-c++ -y [root@bgs-4p103-linan opt]# npm install -g inherits n #安装git [root@bgs-4p103-linan opt]# yum install git -y
2.2mongodb单机模式安装
[root@bgs-4p103-linan opt]# wget http://mirror.baifendian.com/mongodb/mongodb-linux-x86_64-3.4.6.tgz [root@bgs-4p103-linan opt]# tar xf mongodb-linux-x86_64-3.4.6.tgz [root@bgs-4p103-linan opt]# ln -s mongodb-linux-x86_64-3.4.6 mongodb [root@bgs-4p103-linan opt]# chown -R sys:sys mongodb mongodb-linux-x86_64-3.4.6 [root@bgs-4p103-linan opt]# cd mongodb [root@bgs-4p103-linan opt]# ls bin GNU-AGPL-3.0 MPL-2 README THIRD-PARTY-NOTICES [root@bgs-4p103-linan opt]# su - sys [sys@bgs-4p103-linan opt]# cd /opt/mongodb [sys@bgs-4p103-linan mongodb]# mkdir data log conf [sys@bgs-4p103-linan mongodb]# bin/mongod --port=27017 --bind_ip=172.24.4.103 --dbpath=data/ --logpath=log/mongodb.log --logappend & [sys@bgs-4p103-linan mongodb]# ps -ef | grep mongodb [sys@bgs-4p103-linan mongodb]# netstat -tulnp | grep 27017 [sys@bgs-4p103-linan opt]# exit [root@bgs-4p103-linan opt]# ln -s /opt/mongodb/bin/mongo /usr/local/bin/ [root@bgs-4p103-linan opt]# mongo 172.24.4.103:27017 MongoDB shell version v3.4.6 connecting to: 172.24.4.103:27017 MongoDB server version: 3.4.6 Welcome to the MongoDB shell. For interactive help, type "help". For more comprehensive documentation, see http://docs.mongodb.org/ Questions? Try the support group http://groups.google.com/group/mongodb-user Server has startup warnings: 2018-02-27T15:51:46.388+0800 I STORAGE [initandlisten] 2018-02-27T15:51:46.388+0800 I STORAGE [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine 2018-02-27T15:51:46.388+0800 I STORAGE [initandlisten] ** See http://dochub.mongodb.org/core/prodnotes-filesystem 2018-02-27T15:51:46.594+0800 I CONTROL [initandlisten] 2018-02-27T15:51:46.594+0800 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database. 2018-02-27T15:51:46.594+0800 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted. 2018-02-27T15:51:46.594+0800 I CONTROL [initandlisten] > show dbs admin 0.000GB local 0.000GB > db test > bye [root@bgs-4p103-linan opt]#
3.安装RocketChat
[root@bgs-4p103-linan ~]# wget http://mirror.baifendian.com/rocket.chat/Rocket.Chat-0.59.0-rc.4.zip [root@bgs-4p103-linan opt]# unzip Rocket.Chat-0.59.0-rc.4.zip -C /opt [root@bgs-4p103-linan opt]# wget http://mirror.baifendian.com/rocket.chat/meteor_install_update.sh #这里面使用的是公司的准备的源,所以可以制作自定义源,修改地址。 [root@bgs-4p103-linan opt]# sh +x meteor_install_update.sh [root@bgs-4p103-linan opt]# cd /opt [root@bgs-4p103-linan opt]# chown -R sys:sys Rocket.Chat/ -R [root@bgs-4p103-linan opt]# su - sys [sys@bgs-4p103-linan ~]$ cd /opt/Rocket.Chat [sys@bgs-4p103-linan Rocket.Chat]$ meteor npm start I20170822-11:35:55.445(8)? Using GridFS for custom emoji storage I20180228-09:35:57.815(8)? ➔ System ➔ startup I20180228-09:35:57.820(8)? ➔ +-----------------------------------------------+ I20180228-09:35:57.822(8)? ➔ | SERVER RUNNING | I20180228-09:35:57.824(8)? ➔ +-----------------------------------------------+ I20180228-09:35:57.826(8)? ➔ | | I20180228-09:35:57.830(8)? ➔ | Rocket.Chat Version: 0.59.0-rc.4 | I20180228-09:35:57.832(8)? ➔ | NodeJS Version: 4.8.4 - x64 | I20180228-09:35:57.835(8)? ➔ | Platform: linux | I20180228-09:35:57.838(8)? ➔ | Process Port: 20742 | I20180228-09:35:57.840(8)? ➔ | Site URL: http://localhost:3000/ | I20180228-09:35:57.842(8)? ➔ | ReplicaSet OpLog: Enabled | I20180228-09:35:57.844(8)? ➔ | Commit Hash: 2b79fa1b2f | I20180228-09:35:57.846(8)? ➔ | Commit Branch: develop | I20180228-09:35:57.849(8)? ➔ | | I20180228-09:35:57.851(8)? ➔ +-----------------------------------------------+ => Started your app. => App running at: http://localhost:3000/ #如果上述指令执行报错了,有一个提示说使用该指令:meteor npm i && meteor [sys@bgs-4p103-linan Rocket.Chat]$ mkdir logs [sys@bgs-4p103-linan Rocket.Chat]$ vim rocketchat.sh #创建启动脚本,添加如下内容 #!/bin/bash run_date=`date +"%Y-%m-%d"` export PORT=3000 export ROOT_URL=http://172.24.4.103:3000 export MONGO_URL=mongodb://172.24.4.103:27017/rocketchat /opt/node/bin/node ./.meteor/local/build/main.js >> /opt/Rocket.Chat/logs/Rocket.Chat.log.$run_date 2>&1 [sys@bgs-4p103-linan Rocket.Chat]$ [sys@bgs-4p103-linan Rocket.Chat]$ nohup sh rocketchat.sh & [sys@bgs-4p103-linan Rocket.Chat]$ tail -f logs/Rocket.Chat.log.2017-02-28 [sys@bgs-4p103-linan Rocket.Chat]$ tail -f logs/Rocket.Chat.log.2018-02-28 ➔ +-------------------------------------------------+ ➔ | | ➔ | Rocket.Chat Version: 0.59.0-rc.4 | ➔ | NodeJS Version: 4.8.4 - x64 | ➔ | Platform: linux | ➔ | Process Port: 3000 | ➔ | Site URL: http://172.24.4.103:3000 | ➔ | ReplicaSet OpLog: Disabled | ➔ | | ➔ +-------------------------------------------------+
相关文章推荐
- rocket.chat安装部署
- rocket.chat安装部署
- rocket.chat安装部署
- rocket.chat安装部署
- rocket.chat安装部署
- rocket.chat安装部署
- rocket.chat安装部署
- rocket.chat安装部署
- 在Ubuntu上安装、配置和部署Rocket.Chat
- rocket.chat安装部署
- rocket.chat安装部署
- rocket.chat安装部署
- rocket.chat安装部署
- rocket.chat安装部署
- rocket.chat安装部署
- rocket.chat安装部署
- rocket.chat安装部署
- rocket.chat安装部署
- rocket.chat安装部署
- rocket.chat安装部署