How to Install Jitsi on Debian 10

This guide will walk you through the process of installing Jitsi on your Linux server running Debian 10. Jitsi is a collection of free and open-source multi-platform voice, videoconferencing and instant messaging applications for the web platform, Windows, Linux, Mac OS X, and Android.

Prerequisites:

Linux Server Running Debian 10

Step-by-Step:

1) The first thing we’ll do is setup a swap file for out server to utilize in order to avoid memory starvation. The following collection of commands will create and setup this swap space. If your server has more than 2GB of memory, this likely won’t be necessary.

sudo dd if=/dev/zero of=/swapfile count=2048 bs=1M
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile   none    swap    sw    0   0' | sudo tee -a /etc/fstab

Now, just run the free -m command to check whether our swap space is listed:

free -m

2) If you plan to use HTTPS in order to access your video conferencing rooms over Jitsi, it’s important to set up a proper fully qualified domain name. The following commands will set the hostname and fully qualified domain name for the server. In our example, we’ll use jitsi.server.com as the fully qualified domain name, and jitsiserver as the hostname. Be sure to replace these values with your own.

sudo hostnamectl set-hostname jitsiserver
sudo sed -i 's/^127.0.1.1.*$/127.0.1.1 jitsi.server.com jitsiserver/g' /etc/hosts

After this is done,  run the following command to ensure we see the proper hostnames set.

hostname

3) Now we need to configure our firewall to allow traffic over OpenSSH, http, https, and other ports required for Jitsi to operate. The following commands will open these ports, and save the changes:

iptables -I INPUT -p tcp --dport 80 -j ACCEPT
iptables -I INPUT -p tcp --dport 443 -j ACCEPT
iptables -I INPUT -p udp --dport 20000 -j ACCEPT
iptables -I INPUT -p udp --dport 10000 -j ACCEPT

4) Next, we need to install OpenJDK 8, to do this we’ll enable the AdoptOpenJDK repository, which will provide us the OpenJDK packages. We’ll start by updating the packages list and installing the dependencies necessary to add a new repository:

sudo apt update
sudo apt install apt-transport-https ca-certificates wget dirmngr gnupg software-properties-common

5) Now we’ll import the repository’s GPG key using the following commands:

wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add -
sudo add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/

6) Once the new repository is enabled, update apt sources and install Java 8 using the following commands:

sudo apt update
sudo apt install adoptopenjdk-8-hotspot

7) Finally, we can check to ensure you installed it successfully by looking at the output from the following command:

java -version

8) Our next step is to install Nginx, which is the web service that will operate as the front end for our Jitsi application. The collection of commands will install, start, and set Nginx to start on boot:

sudo apt install -y nginx
sudo systemctl start nginx.service
sudo systemctl enable nginx.service

9) Now we’re ready to install Jitsi itself. Let’s be sure we’re backed out of any subdirectories before we download and install the software by running the following:

cd

Next, we’ll issue the following commands to add our Jitsi repository to our sources.list, and then download Jitsi and start the service:

wget -qO - https://download.jitsi.org/jitsi-key.gpg.key | sudo apt-key add -
sudo sh -c "echo 'deb https://download.jitsi.org stable/' > /etc/apt/sources.list.d/jitsi-stable.list"
sudo apt update -y
sudo apt install -y jitsi-meet

10) When we first do ‘apt install -y’ for Jitsi-Meet we’ll be prompted to enter our fully qualified domain name. This should be the same domain name we entered on step 2.

After pressing ENTER you are asked about an SSL certificate. For this guide, we’ll be choosing “Generate a new self-signed certificate (You will later get a chance to obtain a Let’s Encrypt certificate)”.

Once you’ve finished going through the install, if you want to proceed with obtaining a certificate from Let’s Encrypt, you can use the following script provided by Jitsi:

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

It will prompt you for an email address when you run it, then it will automatically handle the remaining work related to the Let’s Encrypt SSL certificate.

11) Finally, you’re ready to point your DNS over to the Jitsi server. Once you’ve done this, navigate to the URL you direct to the server will present you with the front-end of the Jitsi application. Pressing ‘GO’ will create a video conference room for you.

For any further assistance with Jitsi, or questions you may have, check out their Community Forum.

How to Install Mattermost on Fedora 31

This article will cover the installation of Mattermost on an Fedora 31 Linux server. Mattermost is an open-source, self-hostable online chat service with file sharing, search, and integrations. It is designed to be used as an internal chat for organizations and companies and could be considered an open-source alternative to Slack and Microsoft Teams.

Prerequisites:

Access to a Linux server running Fedora 31

Step-by-Step:

This part of the article will walk you through installing Mattermost and it’s dependencies.

Part One: Installing the MySQL Database

1) Log into your Fedora 31 server as root or a sudo user

2) Run the following command to install MySQL:

sudo dnf install mariadb mariadb-server

3) Now we need to log into MySQL as root using the following:

sudo mysql

4) Once you see ‘mysql>’ in the prompt, you’ve entered the database. Now we need to create a user and password. Execute the following commands, but replace mmuser and mmuser-password with unique identifiers:

create user 'mmuser'@'%' identified by 'mmuser-password';

Also, it’s worth noting that the % indicates that this user can connect from a device with any IP address. If you know the IP this user will be connecting from, it’s more secure to change the % to that IP address.

5) While we’re still in the MySQL prompt, we need to create a database and grant permissions to that database for our new user. The commands below will accomplish this:

create database mattermost;
grant all privileges on mattermost.* to 'mmuser'@'%';

6) Now that we’ve installed and set up our database, we can exit MySQL to get back to the Linux command prompt by running the command below:

exit

Part Two: Installing Mattermost

1) Download the latest version of the Mattermost Server. Navigating to this URL and scrolling down should display a URL just below the ‘GET DOWNLOAD’ button. Copy this URL and within your server’s terminal execute the following command:

wget https://releases.mattermost.com/X.X.X/mattermost-X.X.X-linux-amd64.tar.gz

In our example, we’ve replaced version numbers with X’s, but the URL you copied should contain these version numbers.

2) Now we need to extract the files we’ve downloaded using the following:

tar -xvzf mattermost*.gz

3) Once we’ve extracted the files, we need to move them to the /opt directory using the command below:

sudo mv mattermost /opt

4) Next, we need to make the directory where we’ll store the files:

sudo mkdir /opt/mattermost/data

5) We’ll need to create a user dedicated to the Mattermost service, which will be the one running Mattermost and owner of the related files and directories. The following commands will create the user, group, and set the permissions:

sudo useradd --system --user-group mattermost

sudo chown -R mattermost:mattermost /opt/mattermost

sudo chmod -R g+w /opt/mattermost

6) Next, we’ll have to set up the database driver in the file /opt/mattermost/config/config.json by making some changes to its contents. Open the file in your preferred text editor and then look for and adjust the following values:

  • Set “DriverName” to “mysql”
  • Set “DataSource” to the following value “mmuser:mmuser-password@tcp(:3306)/mattermost?charset=utf8mb4,utf8&readTimeout=30s&writeTimeout=30s”
  • Set “SiteURL” to the full URL you plan to use for your Mattermost site. You need to include http:// or https://

Be sure on the “DataSource” edit that you only change the to the public IP of your server if the database is remote to the server where Mattermost is installed. If they live on the same server, then set it to localhost:3306

7) Now we’ll test out our Mattermost application. Navigate to the following directory:

cd /opt/mattermost

    And run the following command to start Mattermost:

sudo -u mattermost ./bin/mattermost

    When the server starts, it shows some log information and the text Server is listening on :8065. You can stop the server by pressing CTRL+C in the terminal window.

8) Now that we’ve confirmed the server starts without issue, we need to configure Mattermost to use systemd for starting and stopping. First, we’ll create a new systemd unit file using the following command:

sudo touch /lib/systemd/system/mattermost.service

9) Now open that file in your text editor and paste the following into the file. Once you’ve made the change, save the file and exit:

[Unit]
Description=Mattermost
After=network.target
After=mysqld.service
Requires=mysqld.service

[Service]
Type=notify
ExecStart=/opt/mattermost/bin/mattermost
TimeoutStartSec=3600
Restart=always
RestartSec=10
WorkingDirectory=/opt/mattermost
User=mattermost
Group=mattermost
LimitNOFILE=49152

[Install]
WantedBy=mysqld.service

10) Now we need to make systemd load the new unit and we’ll use systemctl to test our new unit file:

sudo systemctl daemon-reload

sudo systemctl status mattermost.service

You should see an output similar to the following:

● mattermost.service - Mattermost
  Loaded: loaded (/lib/systemd/system/mattermost.service; disabled; vendor preset: enabled)
  Active: inactive (dead)

11) If you receive the expected response, we can start the service:

sudo systemctl start mattermost.service

12) Now, test and see whether the service is running:

curl http://localhost:8065

You should see the HTML that’s returned by the Mattermost server.

13) Finally, we can set Mattermost to start on boot:

sudo systemctl enable mattermost.service

From here on, most of the configuration will be handled within the browser on the Mattermost site itself and it’s provided panel. You can navigate to http://your-url-for-mattermost:8056 and follow the prompts to configure your first Mattermost user, which will be granted administrator privileges. You can continue using the Mattermost panel to configure Mattermost for your team’s needs. This is where you’ll be able to set up things like users, email notifications, image and file storage location, and assigning administrators for Mattermost. For further reading on Mattermost, please refer to their official knowledge base.

How to Install Jitsi on Ubuntu 18.04

This guide will walk you through the process of installing Jitsi on your Linux server running Ubuntu 18.04. Jitsi is a collection of free and open-source multi-platform voice, videoconferencing and instant messaging applications for the web platform, Windows, Linux, Mac OS X, and Android.

Prerequisites:

Linux Server Running Ubuntu 18.04

Step-by-Step:

1) The first thing we’ll do is setup a swap file for out server to utilize in order to avoid memory starvation. The following collection of commands will create and setup this swap space. If your server has more than 2GB of memory, this likely won’t be necessary.

sudo dd if=/dev/zero of=/swapfile count=2048 bs=1M
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile   none    swap    sw    0   0' | sudo tee -a /etc/fstab

Now, just run the free -m command to check whether our swap space is listed:

free -m

2) If you plan to use HTTPS in order to access your video conferencing rooms over Jitsi, it’s important to set up a proper fully qualified domain name. The following commands will set the hostname and fully qualified domain name for the server. In our example, we’ll use jitsi.server.com as the fully qualified domain name, and jitsiserver as the hostname. Be sure to replace these values with your own.

sudo hostnamectl set-hostname jitsiserver
sudo sed -i 's/^127.0.1.1.*$/127.0.1.1 jitsi.server.com jitsiserver/g' /etc/hosts

After this is done,  run the following command to ensure we see the proper hostnames set.

hostname

3) Now we need to configure our firewall to allow traffic over OpenSSH, http, https, and other ports required for Jitsi to operate. The following commands will open these ports, and save the changes:

sudo ufw allow OpenSSH
sudo ufw allow http
sudo ufw allow https
sudo ufw allow in 10000:20000/udp
sudo ufw enable

4) Now it’s time to install the applications Jitsi needs in order to function. First, it’s a good idea to update our repositories to ensure we’re downloading the latest available packages:

sudo apt update

5) Next, we’ll install the OpenJDK Java Runtime Environment  with the following command:

sudo apt install -y openjdk-8-jre-headless

You can check to ensure you installed it successfully by looking at the output from the following command:

java -version

6) Our next step is to install Nginx, which is the web service that will operate as the front end for our Jitsi application. The collection of commands will install, start, and set Nginx to start on boot:

sudo apt install -y nginx
sudo systemctl start nginx.service
sudo systemctl enable nginx.service

7) Now we’re ready to install Jitsi itself. Let’s be sure we’re backed out of any subdirectories before we download and install the software by running the following:

cd

Next, we’ll issue the following commands to add our Jitsi repository to our sources.list, and then download Jitsi and start the service:

wget -qO - https://download.jitsi.org/jitsi-key.gpg.key | sudo apt-key add -
sudo sh -c "echo 'deb https://download.jitsi.org stable/' > /etc/apt/sources.list.d/jitsi-stable.list"
sudo apt update -y
sudo apt install -y jitsi-meet
service jitsi-meet start

8) When we first start Jitsi-Meet we’ll be prompted to enter our fully qualified domain name. This should be the same domain name we entered on step 2.

After pressing ENTER you are asked about an SSL certificate. For this guide, we’ll be choosing “Generate a new self-signed certificate (You will later get a chance to obtain a Let’s Encrypt certificate)”.

Once you’ve finished going through the install, if you want to proceed with obtaining a certificate from Let’s Encrypt, you can use the following script provided by Jitsi:

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

It will prompt you for an email address when you run it, then it will automatically handle the remaining work related to the Let’s Encrypt SSL certificate.

9) Finally, you’re ready to point your DNS over to the Jitsi server. Once you’ve done this, navigate to the URL you direct to the server will present you with the front-end of the Jitsi application. Pressing ‘GO’ will create a video conference room for you.

For any further assistance with Jitsi, or questions you may have, check out their Community Forum.

How to Install Mattermost on Debian 10

This article will cover the installation of Mattermost on an Debian 10 Linux server. Mattermost is an open-source, self-hostable online chat service with file sharing, search, and integrations. It is designed to be used as an internal chat for organizations and companies and could be considered an open-source alternative to Slack and Microsoft Teams.

Prerequisites:

Access to a Linux server running Debian 10

Step-by-Step:

This part of the article will walk you through installing Mattermost and it’s dependencies.

Part One: Installing the MySQL Database

1) Log into your Debian 10 server as root or a sudo user

2) Run the following command to install MySQL:

# sudo apt install mariadb-server mariadb-client

3) Execute the command below to go through the Secure Installation. Follow the prompts provided by the wizard:

# sudo mysql_secure_installation

4) Now we need to log into MySQL as root using the following:

#sudo mysql

5) Once you see ‘mysql>’ in the prompt, you’ve entered the database. Now we need to create a user and password. Execute the following commands, but replace mmuser and mmuser-password with unique identifiers:

create user 'mmuser'@'%' identified by 'mmuser-password';

Also, it’s worth noting that the % indicates that this user can connect from a device with any IP address. If you know the IP this user will be connecting from, it’s more secure to change the % to that IP address.

6) While we’re still in the MySQL prompt, we need to create a database and grant permissions to that database for our new user. The commands below will accomplish this:

create database mattermost;
grant all privileges on mattermost.* to 'mmuser'@'%';

7) Now that we’ve installed and set up our database, we can exit MySQL to get back to the Linux command prompt by running the command below:

exit

Part Two: Installing Mattermost

1) Download the latest version of the Mattermost Server. Navigating to this URL and scrolling down should display a URL just below the ‘GET DOWNLOAD’ button. Copy this URL and within your server’s terminal execute the following command:

wget https://releases.mattermost.com/X.X.X/mattermost-X.X.X-linux-amd64.tar.gz

In our example, we’ve replaced version numbers with X’s, but the URL you copied should contain these version numbers.

2) Now we need to extract the files we’ve downloaded using the following:

tar -xvzf mattermost*.gz

3) Once we’ve extracted the files, we need to move them to the /opt directory using the command below:

sudo mv mattermost /opt

4) Next, we need to make the directory where we’ll store the files:

sudo mkdir /opt/mattermost/data

5) We’ll need to create a user dedicated to the Mattermost service, which will be the one running Mattermost and owner of the related files and directories. The following commands will create the user, group, and set the permissions:

sudo useradd --system --user-group mattermost

sudo chown -R mattermost:mattermost /opt/mattermost

sudo chmod -R g+w /opt/mattermost

6) Next, we’ll have to set up the database driver in the file /opt/mattermost/config/config.json by making some changes to its contents. Open the file in your preferred text editor and then look for and adjust the following values:

  • Set “DriverName” to “mysql”
  • Set “DataSource” to the following value “mmuser:mmuser-password@tcp(:3306)/mattermost?charset=utf8mb4,utf8&readTimeout=30s&writeTimeout=30s”
  • Set “SiteURL” to the full URL you plan to use for your Mattermost site. You need to include http:// or https://

Be sure on the “DataSource” edit that you only change the to the public IP of your server if the database is remote to the server where Mattermost is installed. If they live on the same server, then set it to localhost:3306

7) Now we’ll test out our Mattermost application. Navigate to the following directory:

cd /opt/mattermost

    And run the following command to start Mattermost:

sudo -u mattermost ./bin/mattermost

    When the server starts, it shows some log information and the text Server is listening on :8065. You can stop the server by pressing CTRL+C in the terminal window.

8) Now that we’ve confirmed the server starts without issue, we need to configure Mattermost to use systemd for starting and stopping. First, we’ll create a new systemd unit file using the following command:

sudo touch /lib/systemd/system/mattermost.service

9) Now open that file in your text editor and paste the following into the file. Once you’ve made the change, save the file and exit:

[Unit]
Description=Mattermost
After=network.target
After=mysql.service
Requires=mysql.service

[Service]
Type=notify
ExecStart=/opt/mattermost/bin/mattermost
TimeoutStartSec=3600
Restart=always
RestartSec=10
WorkingDirectory=/opt/mattermost
User=mattermost
Group=mattermost
LimitNOFILE=49152

[Install]
WantedBy=mysql.service

10) Now we need to make systemd load the new unit and we’ll use systemctl to test our new unit file:

sudo systemctl daemon-reload

sudo systemctl status mattermost.service

You should see an output similar to the following:

● mattermost.service - Mattermost
  Loaded: loaded (/lib/systemd/system/mattermost.service; disabled; vendor preset: enabled)
  Active: inactive (dead)

11) If you receive the expected response, we can start the service:

sudo systemctl start mattermost.service

12) Now, test and see whether the service is running:

curl http://localhost:8065

You should see the HTML that’s returned by the Mattermost server.

13) Finally, we can set Mattermost to start on boot:

sudo systemctl enable mattermost.service

From here on, most of the configuration will be handled within the browser on the Mattermost site itself and it’s provided panel. You can navigate to http://your-url-for-mattermost:8056 and follow the prompts to configure your first Mattermost user, which will be granted administrator privileges. You can continue using the Mattermost panel to configure Mattermost for your team’s needs. This is where you’ll be able to set up things like users, email notifications, image and file storage location, and assigning administrators for Mattermost. For further reading on Mattermost, please refer to their official knowledge base.

How to Install Mattermost on CentOS 8

This article will cover the installation of Mattermost on an CentOS 8 Linux server. Mattermost is an open-source, self-hostable online chat service with file sharing, search, and integrations. It is designed to be used as an internal chat for organizations and companies and could be considered an open-source alternative to Slack and Microsoft Teams.

Prerequisites:

Access to a Linux server running CentOS 8

Step-by-Step:

This part of the article will walk you through installing Mattermost and it’s dependencies.

Part One: Installing the MySQL Database

1) Log into your CentOS 8 server as root or a sudo user

2) Run the following command to install MySQL:

# sudo dnf install @mysql:8.0

3) Execute the command below to start MySQL:

# sudo systemctl enable --now mysqld

4) Now we need to log into MySQL as root using the following:

#sudo mysql

5) Once you see ‘mysql>’ in the prompt, you’ve entered the database. Now we need to create a user and password. Execute the following commands, but replace mmuser and mmuser-password with unique identifiers:

create user 'mmuser'@'%' identified by 'mmuser-password';

Also, it’s worth noting that the % indicates that this user can connect from a device with any IP address. If you know the IP this user will be connecting from, it’s more secure to change the % to that IP address.

6) While we’re still in the MySQL prompt, we need to create a database and grant permissions to that database for our new user. The commands below will accomplish this:

create database mattermost;
grant all privileges on mattermost.* to 'mmuser'@'%';

7) Now that we’ve installed and set up our database, we can exit MySQL to get back to the Linux command prompt by running the command below:

exit

Part Two: Installing Mattermost

1) Download the latest version of the Mattermost Server. Navigating to this URL and scrolling down should display a URL just below the ‘GET DOWNLOAD’ button. Copy this URL and within your server’s terminal execute the following command:

wget https://releases.mattermost.com/X.X.X/mattermost-X.X.X-linux-amd64.tar.gz

In our example, we’ve replaced version numbers with X’s, but the URL you copied should contain these version numbers.

2) Now we need to extract the files we’ve downloaded using the following:

tar -xvzf mattermost*.gz

3) Once we’ve extracted the files, we need to move them to the /opt directory using the command below:

sudo mv mattermost /opt

4) Next, we need to make the directory where we’ll store the files:

sudo mkdir /opt/mattermost/data

5) We’ll need to create a user dedicated to the Mattermost service, which will be the one running Mattermost and owner of the related files and directories. The following commands will create the user, group, and set the permissions:

sudo useradd --system --user-group mattermost

sudo chown -R mattermost:mattermost /opt/mattermost

sudo chmod -R g+w /opt/mattermost

6) Next, we’ll have to set up the database driver in the file /opt/mattermost/config/config.json by making some changes to its contents. Open the file in your preferred text editor and then look for and adjust the following values:

  • Set “DriverName” to “mysql”
  • Set “DataSource” to the following value “mmuser:mmuser-password@tcp(:3306)/mattermost?charset=utf8mb4,utf8&readTimeout=30s&writeTimeout=30s”
  • Set “SiteURL” to the full URL you plan to use for your Mattermost site. You need to include http:// or https://

Be sure on the “DataSource” edit that you only change the to the public IP of your server if the database is remote to the server where Mattermost is installed. If they live on the same server, then set it to localhost:3306

7) Now we’ll test out our Mattermost application. Navigate to the following directory:

cd /opt/mattermost

    And run the following command to start Mattermost:

sudo -u mattermost ./bin/mattermost

    When the server starts, it shows some log information and the text Server is listening on :8065. You can stop the server by pressing CTRL+C in the terminal window.

8) Now that we’ve confirmed the server starts without issue, we need to configure Mattermost to use systemd for starting and stopping. First, we’ll create a new systemd unit file using the following command:

sudo touch /lib/systemd/system/mattermost.service

9) Now open that file in your text editor and paste the following into the file. Once you’ve made the change, save the file and exit:

[Unit]
Description=Mattermost
After=network.target
After=mysqld.service
Requires=mysqld.service

[Service]
Type=notify
ExecStart=/opt/mattermost/bin/mattermost
TimeoutStartSec=3600
Restart=always
RestartSec=10
WorkingDirectory=/opt/mattermost
User=mattermost
Group=mattermost
LimitNOFILE=49152

[Install]
WantedBy=mysqld.service

10) Now we need to make systemd load the new unit and we’ll use systemctl to test our new unit file:

sudo systemctl daemon-reload

sudo systemctl status mattermost.service

You should see an output similar to the following:

● mattermost.service - Mattermost
  Loaded: loaded (/lib/systemd/system/mattermost.service; disabled; vendor preset: enabled)
  Active: inactive (dead)

11) If you receive the expected response, we can start the service:

sudo systemctl start mattermost.service

12) Now, test and see whether the service is running:

curl http://localhost:8065

You should see the HTML that’s returned by the Mattermost server.

13) Finally, we can set Mattermost to start on boot:

sudo systemctl enable mattermost.service

From here on, most of the configuration will be handled within the browser on the Mattermost site itself and it’s provided panel. You can navigate to http://your-url-for-mattermost:8056 and follow the prompts to configure your first Mattermost user, which will be granted administrator privileges. You can continue using the Mattermost panel to configure Mattermost for your team’s needs. This is where you’ll be able to set up things like users, email notifications, image and file storage location, and assigning administrators for Mattermost. For further reading on Mattermost, please refer to their official knowledge base.

How to Install Mattermost on Ubuntu 18.04

This article will cover the installation of Mattermost on an Ubuntu 18.04 Linux server. Mattermost is an open-source, self-hostable online chat service with file sharing, search, and integrations. It is designed to be used as an internal chat for organizations and companies and could be considered an open-source alternative to Slack and Microsoft Teams.

Prerequisites:

Access to a Linux server running Ubuntu 18.04

Step-by-Step:

This part of the article will walk you through installing Mattermost and it’s dependencies.

Part One: Installing the MySQL Database

1) Log into your Ubuntu 18.04 server as root or a sudo user

2) Run the following command to install MySQL:

# sudo apt install mysql-server

3) Execute the command below to go through the Secure Installation. Follow the prompts provided by the wizard:

# sudo mysql_secure_installation

4) Now we need to log into MySQL as root using the following:

#sudo mysql

5) Once you see ‘mysql>’ in the prompt, you’ve entered the database. Now we need to create a user and password. Execute the following commands, but replace mmuser and mmuser-password with unique identifiers:

create user 'mmuser'@'%' identified by 'mmuser-password';

Also, it’s worth noting that the % indicates that this user can connect from a device with any IP address. If you know the IP this user will be connecting from, it’s more secure to change the % to that IP address.

6) While we’re still in the MySQL prompt, we need to create a database and grant permissions to that database for our new user. The commands below will accomplish this:

create database mattermost;
grant all privileges on mattermost.* to 'mmuser'@'%';

7) Now that we’ve installed and set up our database, we can exit MySQL to get back to the Linux command prompt by running the command below:

exit

Part Two: Installing Mattermost

1) Download the latest version of the Mattermost Server. Navigating to this URL and scrolling down should display a URL just below the ‘GET DOWNLOAD’ button. Copy this URL and within your server’s terminal execute the following command:

wget https://releases.mattermost.com/X.X.X/mattermost-X.X.X-linux-amd64.tar.gz

In our example, we’ve replaced version numbers with X’s, but the URL you copied should contain these version numbers.

2) Now we need to extract the files we’ve downloaded using the following:

tar -xvzf mattermost*.gz

3) Once we’ve extracted the files, we need to move them to the /opt directory using the command below:

sudo mv mattermost /opt

4) Next, we need to make the directory where we’ll store the files:

sudo mkdir /opt/mattermost/data

5) We’ll need to create a user dedicated to the Mattermost service, which will be the one running Mattermost and owner of the related files and directories. The following commands will create the user, group, and set the permissions:

sudo useradd --system --user-group mattermost

sudo chown -R mattermost:mattermost /opt/mattermost

sudo chmod -R g+w /opt/mattermost

6) Next, we’ll have to set up the database driver in the file /opt/mattermost/config/config.json by making some changes to its contents. Open the file in your preferred text editor and then look for and adjust the following values:

  • Set “DriverName” to “mysql”
  • Set “DataSource” to the following value “mmuser:mmuser-password@tcp(:3306)/mattermost?charset=utf8mb4,utf8&readTimeout=30s&writeTimeout=30s”
  • Set “SiteURL” to the full URL you plan to use for your Mattermost site. You need to include http:// or https://

Be sure on the “DataSource” edit that you only change the to the public IP of your server if the database is remote to the server where Mattermost is installed. If they live on the same server, then set it to localhost:3306

7) Now we’ll test out our Mattermost application. Navigate to the following directory:

cd /opt/mattermost

    And run the following command to start Mattermost:

sudo -u mattermost ./bin/mattermost

    When the server starts, it shows some log information and the text Server is listening on :8065. You can stop the server by pressing CTRL+C in the terminal window.

8) Now that we’ve confirmed the server starts without issue, we need to configure Mattermost to use systemd for starting and stopping. First, we’ll create a new systemd unit file using the following command:

sudo touch /lib/systemd/system/mattermost.service

9) Now open that file in your text editor and paste the following into the file. Once you’ve made the change, save the file and exit:

[Unit]
Description=Mattermost
After=network.target
After=mysql.service
Requires=mysql.service

[Service]
Type=notify
ExecStart=/opt/mattermost/bin/mattermost
TimeoutStartSec=3600
Restart=always
RestartSec=10
WorkingDirectory=/opt/mattermost
User=mattermost
Group=mattermost
LimitNOFILE=49152

[Install]
WantedBy=mysql.service

10) Now we need to make systemd load the new unit and we’ll use systemctl to test our new unit file:

sudo systemctl daemon-reload

sudo systemctl status mattermost.service

You should see an output similar to the following:

● mattermost.service - Mattermost
  Loaded: loaded (/lib/systemd/system/mattermost.service; disabled; vendor preset: enabled)
  Active: inactive (dead)

11) If you receive the expected response, we can start the service:

sudo systemctl start mattermost.service

12) Now, test and see whether the service is running:

curl http://localhost:8065

You should see the HTML that’s returned by the Mattermost server.

13) Finally, we can set Mattermost to start on boot:

sudo systemctl enable mattermost.service

From here on, most of the configuration will be handled within the browser on the Mattermost site itself and it’s provided panel. You can navigate to http://your-url-for-mattermost:8056 and follow the prompts to configure your first Mattermost user, which will be granted administrator privileges. You can continue using the Mattermost panel to configure Mattermost for your team’s needs. This is where you’ll be able to set up things like users, email notifications, image and file storage location, and assigning administrators for Mattermost. For further reading on Mattermost, please refer to their official knowledge base.

Install Rocket.Chat on Debian 10

Rocket.Chat is a free and open source self hosted chat server that allows you to easily keep in contact with friends, family, colleagues, or customers. In this guide, we’ll be installing Rocket.Chat on a Debian 10 Cloud Server using the Snap package.

Prerequisites

A Cloud Server running Debian 10

Access to the root or admin user

Install Rocket.Chat snap

As Debian does not include snapd out of the box, we’ll first have to install it with apt.

sudo apt install snapd

Install Rocket.Chat with snapd.

sudo snap install rocketchat-server

Configure Rocket.Chat

Next, we’ll configure Rocket.Chat in the web interface.

SSH Tunnel

Rocket.Chat requires you to access your server from the local network for initial setup. We can get around this with an SSH tunnel. If your local machine is a Mac or Linux-based, create the tunnel by running this command from your local machine’s terminal, replacing with your cloud server’s IP address:

ssh root@ -L 8888:localhost:3000

If you are running Windows, the most popular way to run SSH is using the free PuTTY tool which can be downloaded here.

Configure Rocket.Chat

Once you have your ssh tunnel in place, navigate to http://localhost:8888 in your local web browser.

Go through the prompts to create your account and register with Rocket.Chat if you choose.

Once done, you can access your Rocket.Chat instance at http://:3000 or via one of the Rocket.Chat clients found here.

Install Rocket.Chat on Ubuntu 18.04

Rocket.Chat is a free and open source self hosted chat server that allows you to easily keep in contact with friends, family, colleagues, or customers. In this guide, we’ll be installing Rocket.Chat on a Ubuntu 18.04 Cloud Server using the Snap package.

Prerequisites

A Cloud Server running Ubuntu 18.04

Access to the root or admin user

Install Rocket.Chat snap

Install Rocket.Chat with snapd.

sudo snap install rocketchat-server

Configure Rocket.Chat

Next, we’ll configure Rocket.Chat in the web interface.

SSH Tunnel

Rocket.Chat requires you to access your server from the local network for initial setup. We can get around this with an SSH tunnel. If your local machine is a Mac or Linux-based, create the tunnel by running this command from your local machine’s terminal, replacing with your cloud server’s IP address:

ssh root@ -L 8888:localhost:3000

If you are running Windows, the most popular way to run SSH is using the free PuTTY tool which can be downloaded here.

Configure Rocket.Chat

Once you have your ssh tunnel in place, navigate to http://localhost:8888 in your local web browser.

Go through the prompts to create your account and register with Rocket.Chat if you choose.

Once done, you can access your Rocket.Chat instance at http://:3000 or via one of the Rocket.Chat clients found here.

Install Rocket.Chat on Fedora 31

Rocket.Chat is a free and open source self hosted chat server that allows you to easily keep in contact with friends, family, colleagues, or customers. In this guide, we’ll be installing Rocket.Chat on a Fedora 31 Cloud Server using the Snap package.

Prerequisites

A Cloud Server running Fedora 31

Access to the root or admin user

Install Rocket.Chat snap

As Fedora does not include snapd out of the box, we’ll first have to install it with dnf.

dnf install snapd

Enable snapd.

systemctl enable snapd

Start snapd.

systemctl start snapd

Install Rocket.Chat with snapd.

snap install rocketchat-server

Open tcp port 3000.

firewall-cmd --permanent --add-port=3000/tcp

Reload firewalld.

firewall-cmd --reload

Configure Rocket.Chat

Next, we’ll configure Rocket.Chat in the web interface.

SSH Tunnel

Rocket.Chat requires you to access your server from the local network for initial setup. We can get around this with an SSH tunnel. If your local machine is a Mac or Linux-based, create the tunnel by running this command from your local machine’s terminal, replacing with your cloud server’s IP address:

ssh root@ -L 8888:localhost:3000

If you are running Windows, the most popular way to run SSH is using the free PuTTY tool which can be downloaded here.

Configure Rocket.Chat

Once you have your ssh tunnel in place, navigate to http://localhost:8888 in your local web browser.

Go through the prompts to create your account and register with Rocket.Chat if you choose.

Once done, you can access your Rocket.Chat instance at http://:3000 or via one of the Rocket.Chat clients found here.

Install Rocket.Chat on CentOS 8

Rocket.Chat is a free and open source self hosted chat server that allows you to easily keep in contact with friends, family, colleagues, or customers. In this guide, we’ll be installing Rocket.Chat on a CentOS 8 Cloud Server using the Snap package.

Prerequisites

A Cloud Server running CentOS 8

Access to the root or admin user

Install Rocket.Chat snap

As CentOS does not include snapd out of the box, we’ll first have to install it with dnf.

dnf install snapd

Enable snapd.

systemctl enable snapd

Start snapd.

systemctl start snapd

Install Rocket.Chat with snapd.

snap install rocketchat-server

Open tcp port 3000.

firewall-cmd --permanent --add-port=3000/tcp

Reload firewalld.

firewall-cmd --reload

Configure Rocket.Chat

Next, we’ll configure Rocket.Chat in the web interface.

SSH Tunnel

Rocket.Chat requires you to access your server from the local network for initial setup. We can get around this with an SSH tunnel. If your local machine is a Mac or Linux-based, create the tunnel by running this command from your local machine’s terminal, replacing with your cloud server’s IP address:

ssh root@ -L 8888:localhost:3000

If you are running Windows, the most popular way to run SSH is using the free PuTTY tool which can be downloaded here.

Configure Rocket.Chat

Once you have your ssh tunnel in place, navigate to http://localhost:8888 in your local web browser.

Go through the prompts to create your account and register with Rocket.Chat if you choose.

Once done, you can access your Rocket.Chat instance at http://:3000 or via one of the Rocket.Chat clients found here.