Offline Manual Setup

15 mins

V6 ProV6 MSP

Overview

rConfig has many package dependencies from setup and installation to core software updates, we strongly recommend, installing using the automated scripts we provide. Its fast, easy and you will be up and running in under 15 minutes. Once up and running, you may absolutely take your server offline for added protection and security. We understand of course that some customers operate highly secure environments and offline server builds and installations is a must. The script below details the required steps to install rConfig on a CentOS, RHEL, or Rocky Linux 8.0 or later server. The script is provided as a guide only and details in terms of packages locations etc.. is your responsibility.

OS Setup

  1. Check OS Version for Offline installation is CentOS, RHEL, or Rocky Linux 8.0 or later
  2. Disable SELinux & reboot the system (advanced users can skip this step)
  3. Recommend updating the system to the latest version and packages
  4. Install the following packages:
    • yum-utils
    • vim
    • telnet
    • zip
    • unzip
    • wget
    • curl
    • openssl-devel openssl mod_ssl
    • supervisord
    • Redis
    • apache 2.4+
    • mariadb 10.3+/ Mysql5.7+
    • php 8.1+
    • Following PHP extensions:
    • php php-cli php-gd php-curl php-mysql php-ldap php-zip php-fileinfo php-pear php-mbstring php-common php-pdo php-ldap php-gmp
  5. chown -R apache:apache /var/www/html
  6. Start and enable the following services:
    • httpd
    • mariadb
    • redis
    • supervisord
  7. If Firewall is enabled, open the following ports:
    • 80
    • 443
  8. Verify that the following services are running and versions are correct;
    • httpd 2.4+
    • mariadb 10.3+/ Mysql5.7+
    • redis 5.0+
    • php 8.1+
    • supervisord 4.0+
  9. Run the Mysql secure installation script:
    • mysql_secure_installation
    • configure your mysql root password

Manually Install rConfig

Make sure to follow the installation steps for new installations ONLY. Updates, see the update section below.

  1. Download the latest rConfig Zip file from the rConfig website (replace APITOKEN with your API token)
     curl -sw '%{http_code}' -o rconfig6-latest-full.zip -d '{"api_token":"APITOKEN"}' -H "Content-Type: application/json" -X POST https://www.rconfig.com/api/download6-full?=$(date +%s)
    
  2. Create the following directories:
    currentReleaseDir=$(date '+%Y%m%d')
    mkdir /var/www/html/rconfig6
    mkdir /var/www/html/rconfig6/releases
    mkdir /var/www/html/rconfig6/releases/$currentReleaseDir
    mkdir /var/www/html/rconfig6/persistentData
    
  3. If required, copy the previously downloaded zip file to the offline server. Unzip the file to /var/www/html/rconfig6/releases/$currentReleaseDir
    unzip rconfig6-latest-full.zip -d /var/www/html/rconfig6/releases/$currentReleaseDir/
    cd /var/www/html/rconfig6/releases/$currentReleaseDir/
    mv rconfig6-main/{,.[^.]}* .
    
  4. From the newly created releases directory copy the following files:
    cp /var/www/html/rconfig6/releases/$currentReleaseDir/.env.example  /var/www/html/rconfig6/persistentData/.env
    cp /var/www/html/rconfig6/releases/$currentReleaseDir/horizon_supervisor.ini  /var/www/html/rconfig6/persistentData/horizon_supervisor.ini
    cp /var/www/html/rconfig6/releases/$currentReleaseDir/rconfig-vhost.conf  /var/www/html/rconfig6/persistentData/rconfig-vhost.conf
    
  5. Delete the zip file
        cd /var/www/html/
        rm -f rconfig6-latest-full.zip
    
  6. Create a symlink to the current release directory
      ln -s /var/www/html/rconfig6/releases/$currentReleaseDir /var/www/html/rconfig6/current
    
  7. Create a symlink to the persistentData directory
        ln -s /var/www/html/rconfig6/current/storage /var/www/html/rconfig6/persistentData
    
  8. Create symlink for .env file
        ln -s /var/www/html/rconfig6/persistentData/.env /var/www/html/rconfig6/current/.env
    
  9. Create a new database in mysql
    mysql -u root -p
    create database rconfig;
    exit
    
  10. change to current directory
        cd /var/www/html/rconfig6/current
    
  11. Edit the .env file and replace the follow placeholder text with the correct values for each of the following:
        vim .env
    
        ENVOY_HOSTNAME
        ENVOY_APP_DEBUG=false
        ENVOY_APP_URL=https://YOUHOSTNAME.COM
        ENVOY_DBHOST=localhost (if local)
        ENVOY_DBPORT=3306
        ENVOY_DBNAME=rconfig
        ENVOY_DBUSER
        ENVOY_DBPASS
        ENVOY_RCONFIG_API_TOKEN
    
  12. Edit the supervisor config file (persistentData/horizon_supervisor.ini) and replace the follow placeholder text with the correct values for each of the following:
        vi /var/www/html/rconfig6/persistentData/horizon_supervisor.ini
    
        ENVOY_ARTISAN = /var/www/html/rconfig6/current/artisan
        ENVOY_STORAGE = /var/www/html/rconfig6/current/storage
    
  13. Link the supervisor config file to the supervisor config directory
        ln -s /var/www/html/rconfig6/persistentData/horizon_supervisor.ini /etc/supervisord.d/horizon_supervisor.ini
    
  14. Setup apache to use the rconfig.conf file
        cp /var/www/html/rconfig6/persistentData/rconfig-vhost.conf /etc/httpd/conf.d/rconfig-vhost.conf
    
  15. Edit the apache config file (rconfig-vhost.conf) and replace the follow placeholder text with the correct values for each of the following:
        vim /etc/httpd/conf.d/rconfig-vhost.conf
    
        ENVOY_SERVERNAME=YOUHOSTNAME.COM
        ENVOY_SERVERALIAS=YOUHOSTNAME.COM
        ENVOY_DOCROOT= /var/www/html/rconfig6
    
  16. Add the laravel Cron Job
        crontab -e
        * * * * *  php /var/www/html/rconfig6/current/artisan schedule:run >> /dev/null 2>&1
        # save and exit
        # verify cron with 'crontab -l'
    
  17. Reset dir permissions
        chown -R apache:apache /var/www/html/rconfig6
        chmod -R 775 /var/www/html/rconfig6/current/storage
    
  18. Migrate the DB files. If any errors here, check your DB credentials in the .env file
        cd /var/www/html/rconfig6/current
        php artisan migrate
    
  19. Run the following setup commands for laravel horizon
        php artisan config:clear
        php artisan key:generate
        php artisan passport:install
        php artisan rconfig:sync-tasks
        php artisan rconfig:sync-search
        php artisan rconfig:clear-all
    
  20. Restart the following services:
    - httpd
    - mariadb
    - supervisord
    
  21. Verify that the following services are running and versions are correct;
    • httpd 2.4+
    • mariadb 10.3+/ Mysql5.7+
    • redis 5.0+
    • php 8.1+
    • supervisord 4.0+
  22. Verify that the following ports are open:
    • 80
    • 443
  23. Check the install has completed, by open the rConfig web interface in a browser and login with the default credentials:

Manually Update rConfig

Please backup your server always, before updating rConfig. To manually update rConfig, follow the steps below:

  1. Download the latest rConfig Zip file from the rConfig website (replace APITOKEN with your API token)
     curl -sw '%{http_code}' -o rconfig6-latest-full.zip -d '{"api_token":"APITOKEN"}' -H "Content-Type: application/json" -X POST https://www.rconfig.com/api/download6-full?=$(date +%s)
    
  2. Create the following directories:
    currentReleaseDir=$(date '+%Y%m%d%H%M%S')
    mkdir /var/www/html/rconfig6/releases/$currentReleaseDir
    
  3. If required, copy the previously downloaded zip file to the offline server. Unzip the file to /var/www/html/rconfig6/releases/$currentReleaseDir
    unzip rconfig6-latest-full.zip -d /var/www/html/rconfig6/releases/$currentReleaseDir/
    cd /var/www/html/rconfig6/releases/$currentReleaseDir/
    mv rconfig6-main/{,.[^.]}* .
    
  4. Unlink the current symlink
    cd /var/www/html/rconfig6
    unlink /var/www/html/rconfig6/current
    
  5. Create a symlink to the current release directory
      ln -s /var/www/html/rconfig6/releases/$currentReleaseDir /var/www/html/rconfig6/current
    
  6. Create a symlink to the persistentData directory
        ln -s /var/www/html/rconfig6/current/storage /var/www/html/rconfig6/current/persistentData
    
  7. Create symlink for .env file
        ln -s /var/www/html/rconfig6/persistentData/.env /var/www/html/rconfig6/current/.env
    
  8. Change to current directory
        cd /var/www/html/rconfig6/current
    
  9. Restart apache, MariaDB, Redis, and supervisord
        systemctl restart httpd
        systemctl restart mariadb
        systemctl restart redis
        systemctl restart supervisord