Installation rocket.chat Centos7
Below a very simple way to install the free alternative to Slack or rocket.chat system Centos7
Installation is simple and make it in a few minutes.
For starters make system updates, and run packages EPEL
1 | yum -y install epel-release nano && yum -y update |
We create a repository MongoDB
1 | nano /etc/yum.repos.d/mongodb.repo |
The content:
1 2 3 4 5 | [mongodb] name=MongoDB Repository baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/ gpgcheck=0 enabled=1 |
Then we make the necessary installation packages:
1 | yum install -y nodejs curl GraphicsMagick npm mongodb-org-server mongodb-org gcc-c++ |
The next step is to install above sea level
1 | npm install -g inherits n |
By default, the altitude version is installed 2.9. Rocket.chat version needs a minimum 8. We make the installation command:
1 | n 8.9.3 |
Installation Rocket.Chat
Go to the / opt directory
1 | cd /opt |
Grab the latest version available rocket.chat and unpack it.
1 | curl -L https://releases.rocket.chat/latest/download -o rocket.chat.tar.gz |
1 | tar zxvf rocket.chat.tar.gz |
We move files and make installation rocket.chat
1 | mv bundle Rocket.Chat |
1 | cd Rocket.Chat/programs/server |
1 | npm install |
1 | cd ../.. |
The next step is to configure mongodb spend command as below:
1 2 3 | export PORT=3000 export ROOT_URL=http://NASZA DOMENA BĄDŹ ADRES IP:3000/ export MONGO_URL=mongodb://localhost:27017/rocketchat |
introduce changes:
1 | chkconfig mongod on |
We start command mongodb:
1 | systemctl start mongod |
Now we can go to run command rocket.chat:
1 | node main.js |
If everything is ok in the console log we should see similar to the one below:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ➔ System ➔ startup ➔ +---------------------------------------------------+ ➔ | SERVER RUNNING | ➔ +---------------------------------------------------+ ➔ | | ➔ | Rocket.Chat Version: 0.66.0 | ➔ | NodeJS Version: 8.9.3 - x64 | ➔ | Platform: linux | ➔ | Process Port: 3000 | ➔ | Site URL: http://NASZ ADRES IP:3000/ | ➔ | ReplicaSet OpLog: Disabled | ➔ | Commit Hash: 5aa08cba32 | ➔ | Commit Branch: HEAD | ➔ | | ➔ +---------------------------------------------------+ |
Now, by using the browser: http://OUR IP ADDRESS:3000/ you should see the first registration form you make.
If the page is not displayed verify that the firewall does not block port us:3000
Clean the CentOS firewall system can be the following commands:
1 2 3 4 5 6 7 8 9 | iptables -F iptables -X iptables -t nat -F iptables -t nat -X iptables -t mangle -F iptables -t mangle -X iptables -P INPUT ACCEPT iptables -P FORWARD ACCEPT iptables -P OUTPUT ACCEPT |
Virtually all, Configuration is done from the browser and does not need to be specially somehow describe the rocket.chat is in Polish.
We will create a script auto-start in the event as if there was a server restart.
create a file:
1 | nano /usr/lib/systemd/system/rocketchat.service |
The content:
1 2 3 4 5 6 7 8 9 10 11 12 | [Unit] Description=The Rocket.Chat server After=network.target remote-fs.target nss-lookup.target nginx.target mongod.target [Service] ExecStart=/usr/local/bin/node /opt/Rocket.Chat/main.js StandardOutput=syslog StandardError=syslog SyslogIdentifier=rocketchat User=root Environment=MONGO_URL=mongodb://localhost:27017/rocketchat ROOT_URL=http://NASZA DOMENA BĄDŹ ADRES IP:3000/ PORT=3000 [Install] WantedBy=multi-user.target |
We make its launch:
1 2 | systemctl enable rocketchat.service systemctl start rocketchat.service |
That's all.
nearly work, I come to the point where it executes the command node and main.js after its execution have something like Meteor Node requires v8.0.0 or later. How to fix it to work properly?
By default, the altitude version is installed 2.9. Rocket.chat version needs a minimum 8. We make the installation command:
n 8.9.3