Deploy with CentOS
    • Dark
      Light
    • PDF

    Deploy with CentOS

    • Dark
      Light
    • PDF

    Article summary

    The recommended deployment methods are Docker, AWS, and Kubernetes.

    This document guides you through the process of deploying a QuickMeet.Chat workspace on CentOS.

    Prerequisites

    Depending on the version of QuickMeet.Chat you want to install, check the releases to see the supported engine versions for MongoDB and NodeJs, and install as recommended.

    For example, to install the 1.38.5 version with Shell, use the following command:

    curl -fsSL https://deno.land/install.sh | sh -s v1.38.5

    When deploying MongoDB, it is crucial to secure MongoDB instances and close all MongoDB ports from public access. Unsecured instances can lead to significant security vulnerabilities. Your vigilance in these practices is essential for maintaining the integrity and safety of your systems.

    Step 1: Set up MongoDB

    1. Once MongoDB is installed, you need to set up the storage engine, enable replication, and specify the replica set name. To do this, enter the following commands:

    sudo sed -i "s/^#  engine:/  engine: mmapv1/"  /etc/mongod.conf
    sudo sed -i "s/^#replication:/replication:\n  replSetName: rs01/" /etc/mongod.conf

    In this case, we are naming the replica set as rs01.

    1. Open the MongoDB configuration file (/etc/mongod.conf) by running the following command:

    sudo nano /etc/mongod.conf

    The MongoDB configuration file should look something like this:

    # mongod.conf
    
    # Where and how to store data.
    storage:
      dbPath: /var/lib/mongodb
    
    # where to write logging data.
    systemLog:
      destination: file
      logAppend: true
      path: /var/log/mongodb/mongod.log
    
    # network interfaces
    net:
      port: 27017
      bindIp: <bind-ip> # Replace with your IP address
    
    
    # how the process runs
    processManagement:
      timeZoneInfo: /usr/share/zoneinfo
    
    # Replication settings
    replication:
      replSetName: rs01

    Refer to the MongoDB configuration documentation for additional details.

    1. Enable and start MongoDB with the following command:

    sudo systemctl enable mongod && sudo systemctl start mongod
    1. Initialize the replica set using the following command:

    mongo --eval "printjson(rs.initiate())"
    1. To ensure that MongoDB is running successfully, enter the following command:

    sudo systemctl status mongod

    You should see something like this:

    Step 2: Install QuickMeet.Chat on CentOS

    1. Start by installing the required dependency packages:

    sudo dnf install epel-release
    sudo dnf install GraphicsMagick
    1. Check the QuickMeet.Chat releases to deploy the version you need. For stability and compatibility, we recommend downloading a specific version. For example, to download version 6.13.0, run this command:

    curl -L https://releases.quickmeet.chat/6.13.0/download -o /tmp/quickmeet.chat.tgz

    Alternatively, if you prefer to download the latest version, you can use the following command (note that using latest is not recommended for production purposes):

    curl -L https://releases.quickmeet.chat/latest/download -o /tmp/quickmeet.chat.tgz
    1. Extract the QuickMeet.Chat server files using the following command:

    tar -xzf /tmp/quickmeet.chat.tgz -C /tmp

    This command extracts the contents of the downloaded quickmeet.chat.tgz compressed tar archive located in the /tmp directory and places the extracted files into the same /tmp directory.

    1. Next, run the following command to change the current directory and install the necessary production dependencies.

    cd /tmp/bundle/programs/server && npm install

    When executing npm install, it is recommended to operate using a non-root account. Alternatively, you can utilize the npm install --unsafe-perm command. This approach eliminates the necessity for building libc or upgrading the host system.

    1. Move the extracted files to the /opt directory:

    sudo mv /tmp/bundle /opt/QuickMeet.Chat

    This guide uses the /opt directory. However, you can choose your preferred directory.

    Step 3: Configure the QuickMeet.Chat service

    1. Add the QuickMeet.Chat user and set the proper permissions on the QuickMeet.Chat folder:

    sudo useradd -M rocketchat && sudo usermod -L rocketchat
    sudo chown -R rocketchat:rocketchat /opt/QuickMeet.Chat
    1. We need the NodeJS binary path to create the QuickMeet.Chat service file. Depending on how you install NodeJS, the binary path may be different. Save the path to a variable as follows:

    NODE_PATH=$(which node)
    1. Now, we will create a barebone service file, which the system will use to start your QuickMeet.Chat daemon/process. Create the QuickMeet.Chat service file as follows:

    cat << EOF |sudo tee -a /lib/systemd/system/rocketchat.service
    [Unit]
    Description=The QuickMeet.Chat server
    After=network.target remote-fs.target nss-lookup.target nginx.service mongod.service
    [Service]
    ExecStart=$NODE_PATH /opt/QuickMeet.Chat/main.js
    StandardOutput=syslog
    StandardError=syslog
    SyslogIdentifier=rocketchat
    User=rocketchat
    Environment=MONGO_URL=mongodb://localhost:27017/rocketchat?replicaSet=rs01 MONGO_OPLOG_URL=mongodb://localhost:27017/local?replicaSet=rs01 ROOT_URL=http://localhost:3000/ PORT=3000
    [Install]
    WantedBy=multi-user.target
    EOF

    Alternatively, if you don’t want to use the NODE_PATH variable in the service file, save the path to the variable, and then print it to find the path as follows:

    NODE_PATH=$(which node)
    echo NODE_PATH=$(which node)

    You will get a path like this:

    /usr/bin/node

    Replace this path for the ExecStart variable in the service file:

    ExecStart=/usr/bin/node /opt/QuickMeet.Chat/main.js

    Step 4: Pass environment variables

    Running the QuickMeet.Chat daemon requires passing some environment variables. See QuickMeet.Chat environment variables for more details.

    1. Open the QuickMeet.Chat service file we created in the last step by running:

    sudo nano /lib/systemd/system/rocketchat.service
    1. Update the file with the following information according to your configuration and save it:

    [Service]
    Environment=ROOT_URL=http://localhost:3000
    Environment=PORT=3000
    Environment=MONGO_URL=mongodb://localhost:27017/rocketchat?replicaSet=rs01
    Environment=MONGO_OPLOG_URL=mongodb://localhost:27017/local?replicaSet=rs01

    Additional steps for installing 6.10 release

    If you’re installing version 6.10, run these additional commands:

    mkdir -p /home/rocketchat/.cache
    
    cd PATH_TO_ROCKETCHAT_INSTALLATION/programs/server/npm/node_modules/@quickmeet.chat/apps-engine
    
    export DENO_DIR=/home/rocketchat/.cache/deno
    
    npm install --production
    
    npm run postinstall
    
    chown -R rocketchat:rocketchat /home/rocketchat
    1. Now start the QuickMeet.Chat service using the following command:

    sudo systemctl enable --now rocketchat

    If you edit your QuickMeet.Chat configuration file, make sure to reload the daemon and restart the QuickMeet.Chat process by running the following commands:

    sudo systemctl daemon-reload
    sudo systemctl restart rocketchat
    1. Check the status of the QuickMeet.Chat process with this command:

    sudo systemctl status rocketchat

    You should see something like this:

    Step 5: Configure your QuickMeet.Chat workspace

    To access your QuickMeet.Chat workspace, open a web browser, and navigate to the specified root URL (http://your-host-name.com:3000). Follow the configuration prompts to configure your workspace. During the configuration steps, your workspace and email are registered to the QuickMeet.Chat Cloud portal. You can manage your workspace and subscriptions from the cloud portal.

    Next steps

    Great! You’ve successfully created your QuickMeet.Chat workspace and logged in. Next, check out the following documents to get started:

    • User Guides: Learn the basics of your QuickMeet.Chat account, the types of rooms, and how to communicate with your workspace users.

    • Workspace Administration: Administrators and owners can set and manage various configurations.

    • Marketplace: Explore the available apps to enhance your workspace.

    You can also apply the following additional configuration to your QuickMeet.Chat setup for enhanced security and performance:

    Update your workspace version

    Each QuickMeet.Chat version is supported for six months post-release. Keep your workspaces updated to enjoy the benefits of new features and fixes.

    Follow these steps to update your workspace version:

    1. Stop the QuickMeet.Chat service with this command:

    sudo systemctl stop rocketchat
    1. Remove the installation folder, usually in /opt:

    sudo rm -rf /opt/QuickMeet.Chat
    1. Make sure that you have the supported node version and MongoDB versions by checking the releases.

    2. Download the version of QuickMeet.Chat that you need:

    curl -L https://releases.quickmeet.chat/7.0.0/download -o /tmp/quickmeet.chat.tgz

    Note that using latest instead of the version number is not recommended.

    1. Extract the QuickMeet.Chat server files using the following command:

    tar -xzf /tmp/quickmeet.chat.tgz -C /tmp
    1. Next, run the following command to change the current directory and install the necessary production dependencies:

    cd /tmp/bundle/programs/server && npm insUpdating QuickMeet.Chat FAQtall
    1. Move the extracted files to the /opt directory:

    sudo mv /tmp/bundle /opt/QuickMeet.Chat
    1. Start the QuickMeet.Chat service:

    sudo systemctl start rocketchat

    If you edit your QuickMeet.Chat configuration file, make sure to reload the daemon and restart the QuickMeet.Chat process by running the following commands:

    sudo systemctl daemon-reload
    sudo systemctl restart rocketchat

    Check the status of the QuickMeet.Chat process with this command:

    sudo systemctl status rocketchat

    If you have any concerns or issues with updating QuickMeet.Chat, see the Updating QuickMeet.Chat FAQ. See MongoDB version support for details on supported MongoDB versions for QuickMeet.Chat releases.


    Was this article helpful?