Install Rocket Chat on Centos 7with Jitsi Video Conferencing

Add the epel repository and update everything.

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

Populate the yum repo with the mongodb-org repository

nano /etc/yum.repos.d/mongodb-org.repo

Paste this into the new file:

[mongodb-org]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.6/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.6.asc

To write and save do:

CTRL-O, CTRL-X

Now we need to install our dependencies from yum:

yum install -y nodejs curl GraphicsMagick npm mongodb-org-server mongodb-org gcc-c++

Now that we have Node.js and npm installed, we need to install a few more dependencies:

npm install -g inherits n

The recommended Node.js version for using Rocket.Chat is 8.9.3. Using n we are going to install that version:

n 8.9.3

Installing Rocket.Chat

Now we download and install Rocket.Chat

cd /opt
curl -L https://releases.rocket.chat/latest/download -o rocket.chat.tar.gz
tar zxvf rocket.chat.tar.gz
mv bundle Rocket.Chat
cd Rocket.Chat/programs/server
npm install
cd ../..

You can set PORT, ROOT_URL and MONGO_URL:

export PORT=3000
export ROOT_URL=http://your-host-name.com-as-accessed-from-internet:3000/
export MONGO_URL=mongodb://localhost:27017/rocketchat

Replace 3000, with the port of your choosing.

If you choose to use port 80 you will need to run Rocket.Chat as root.

If you don’t have DNS configured use your IP in place of the hostname. You can change it later in the admin menu.

First let’s enable Mongodb to start with the host using:

chkconfig mongod on

Now we need to start mongo:

systemctl start mongod

or for CentOs 6.X

/etc/init.d/mongod start

Try install out

Now lets do a quick test and see if everything is working before we continue:

node main.js

Browse to your new rocket-chat instance by opening your favorite web browser and entering the url

http://your-host-name.com-as-accessed-from-internet:3000/

Replace your-host-name.com-as-accessed-from-internet with the ip address or DNS hostname of your server you set above in the ROOT_URL

Now that you’re connected:

  • Click “register a new account”
  • Enter the admin’s name, email and password twice. For my instance I entered:name = Admin
  • email = admin@.com
  • password = test1234

Click SUBMIT. You will be prompted to select a username. I selected admin. Click USE THIS USERNAME to continue. You should now be logged in as an administrator on your new Rocket.Chat installation.
Hit Ctrl + c in your terminal to stop Rocket.Chat.

Auto Start Rocket.Chat

Now that we have all of the dependencies installed, and have verified that Rocket.Chat works. We need to configure Rocket.Chat to start as a service.

First we create the service file:

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

In it write:

[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://your-host-name.com-as-accessed-from-internet:3000/ PORT=3000
[Install]
WantedBy=multi-user.target

Note: Replace the values in Environment with the values you used above. Now you can enable this service by running:

systemctl enable rocketchat.service

And finally start it by running:

systemctl start rocketchat.service

Install Jitsi Meetup

Prerequisites:

  • Ubuntu 18.04 server
  • Root privileges
  • A domain or sub-domain – meet.hakase-labs.io

Step 1 – Install Java OpenJDK
The first step we need to do before deploying jitsi meet to our server is by installing java OpenJDK to the system. At least, we need to get the java version 1.8 for jitsi applications installation, and we will install the Java OpenJDK packages from the PPA repository.

Add the OpenJDK PPA repository and install the Java OpenJDK using the apt command below.

sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt install openjdk-8-jre-headless -y

Now check the Java OpenJDK version when all installation is complete.

java -version

And you will get the java OpenJDK 1.8 installed on the Ubuntu 18.04 server.

Step 2 – Install Nginx
In this tutorial, the Nginx web server will be used as a reverse proxy for the jitsi meet application.

Install Nginx web server using the apt command below.

sudo apt install nginx -y

Now start the nginx service and enable it to launch every time on system boot.

systemctl start nginx
systemctl enable nginx

The Nginx web server installation has been completed – it’s running on default HTTP port 80.

Step 3 – Install Jitsi Meet
In this step, we will install jitsi meet packages from the official jitsi repository. We will be using a domain named ‘meet.hakase-labs.io’ for our installation.

Add jitsi key and repository to the system using the command below.

sudo wget -qO - https://download.jitsi.org/jitsi-key.gpg.key | apt-key add - 
sudo echo 'deb https://download.jitsi.org stable/' >> /etc/apt/sources.list.d/jitsi-stable.list

Now update the repository and install jitsi meet packages.

sudo apt update
sudo apt install jitsi-meet -y

Through the jitsi meet installation, you will be asked about two things:

jitsi videobridge domain name – type the domain name for jitsi installation ‘meet.hakase-labs.io’.

SSL certificate for jitsi meet instance – Chose the ‘generate a new self-signed certificate’.

Now we’re done for the jitsi meet installation. All packages including jitsi videobridge, jicofo, and nginx virtual host have been automatically installed and setup.

Step 4 – Generate Letsencrypt SSL Certificate
Jitsi meet provides an automatic script for SSL Letsencrypt installation and configuration. Run the letsencrypt script provided by jitsi meet.

/usr/share/jitsi-meet/scripts/install-letsencrypt-cert.sh

The script will install the letsencrypt tool on the server, generate SSL certificates for the jitsi meet domain name ‘meet.hakase-labs.io’ etc. you need to enter an email address for the Letsencrypt expired notification.

And it will generate all SSL certificates for the jitsi meet domain name in the ‘/etc/letsencrypt/live’ directory.

Step 5 – Setup UFW Firewall
In this step, we will configure the UFW firewall for the jitsi meet installation. We will open the SSH, HTTP, HTTPS service ports, and open the other range port that needed by jitsi meet 10000/20000 UDP port.

Open those ports by running UFW commands.

ufw allow ssh
ufw allow http
ufw allow https
ufw allow in 10000:20000/udp

Now enable the UFW firewall and reload all configuration.

ufw enable
ufw status

The UFW firewall configuration is complete.

Step 6 – Testing
We will do two testing through the web browser and an android application that can be downloaded from Google Play.

Test from the web browser.
Open the jitsi meet installation domain name meet.hakase-labs.io and you can see the jitsi meet default home page.

  1. Type the room name you want to create and click the ‘GO’ blue button.
  2. And your browser will ask you for the microphone and camera use permission.
  3. Click ‘Allow’.

Now you’ve already joined to the room.

Another screenshot: the Desktop sharing between all members.

Test from Android Device
Download the jitsi meet application from Google Play and join the room.

Following is jitsi meet on android.

Jitsi Meet installation with Nginx web server on Ubuntu 18.04 has been completed successfully.

Src:
https://www.howtoforge.com/tutorial/how-to-create-your-own-video-conference-using-jitsi-meet-on-ubuntu-1804/

https://rocket.chat/docs/installation/manual-installation/centos/

Share

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.