frame

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Register

Rocket.Chat installation in CentOS 7

ValentineValentine Administrator
edited May 2017 in Web Applications

Rocket.Chat is a Web Chat Server, developed in JavaScript, using the Meteor fullstack framework as an Slack alternative

It is a great solution for communities and companies wanting to privately host their own chat service or for developers looking forward to build and evolve their own chat platforms.

The tutorial was prepared with our "CentOS 7" template and is meant to work on our self-managed virtual private servers.

0. Preliminary requirements:
"CentOS 7" template installed on server;
Removed Apache (yum remove httpd -y).

1. Installation of dependencies

First thing we need to do is to install epel repository. For this enter command:

yum install epel-release nano -y && yum update -y

Now we need to add MongoDB repository. Create new file "mongodb.repo" and paste repository info in it:

nano /etc/yum.repos.d/mongodb.repo
[mongodb]
name=MongoDB Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
gpgcheck=0
enabled=1
We are now ready to install all necessary dependencies:

yum install nodejs GraphicsMagick npm mongodb-org-server mongodb-org -y

npm install -g inherits n

n 4.5

2. Rocket.Chat installation

Following commands will download and install latest Rocket.Chat instance:

cd /opt

curl -L https://rocket.chat/releases/latest/download -o rocket.chat.tgz

tar zxvf rocket.chat.tgz

mv bundle Rocket.Chat

cd Rocket.Chat/programs/server

npm install

3. Creating auto start

We don't want for server restart to intervene with our Rocket.Chat accessibility. For that we have to enable Rocket.Chat auto start. Just create service file:

nano /usr/lib/systemd/system/rocketchat.service

With a text:
[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://server-hostname/ PORT=80
[Install]
WantedBy=multi-user.target
NOTE: do not forget to change server-hostname with your server hostname.

And enable this service by running:

systemctl enable rocketchat.service

4. Launching Rocket.Chat

We are finally ready to launch our Rocket:

systemctl start rocketchat.service

Open http://server-hostname with your favorite browser and register a new account:


For Rocket.Chat user guides please visit - https://rocket.chat/docs/user-guides/

Comments

  • I did all steps and the Rocketchat service is active (running). I also changed the hostname but on my domain I only see the Apache test website. Any ideas?
  • ValentineValentine Administrator
    badboxer said:
    I did all steps and the Rocketchat service is active (running). I also changed the hostname but on my domain I only see the Apache test website. Any ideas?
    Make sure you have removed Apache (step 0). Also in step 3 server-hostname should be the domain you are going to use.
  • badboxerbadboxer Member
    edited March 2017
    Valentine said:
    badboxer said:
    I did all steps and the Rocketchat service is active (running). I also changed the hostname but on my domain I only see the Apache test website. Any ideas?
    Make sure you have removed Apache (step 0). Also in step 3 server-hostname should be the domain you are going to use.
    Yes, I overlooked step 0.

    Thank you for your very fast response!
  • Hey Valentine.

    Can you explain how to add TLS (using Certbot / Let's Encrypt) for this tutorial?
Sign In or Register to comment.

Learn how to install a web and database server, email, FTP client or other applications. Discover and share information on server security or optimization recommendations.
Feel free to join our constantly expanding community, participate in discussions, strengthen your knowledge on Linux and Windows server management!
© 2013 - 2018 Time4VPS. All rights reserved.

Get In Touch