Server installation - Inno-SVQ/RedOps GitHub Wiki

RedOps server is made in Laravel 5.8, so it is multiplatform. You can install it on Linux or Windows. In this page we will show how to install the platform on Devian server using nginx.

  1. First of all you need all of the following dependencies installed:
  1. When you have all of these dependencies installed you need to create a SQL user and database:
$ CREATE DATABASE redops;
$ CREATE USER 'redops'@'localhost' IDENTIFIED BY 'db_password';
$ GRANT ALL PRIVILEGES ON redops.* TO 'redops'@'localhost';
  1. Then clone the project:
$ cd /var/www
$ git clone https://github.com/Inno-SVQ/RedOps.git
$ cd RedOps
  1. Create the .env file. You can copy the .env.example added in the repository:
$ cd server
$ mv .env.example .env
$ vim (nano or whatever) .env
  1. And then edit the details with your credentials:
  • DB_HOST: The host where MySQL is located, localhost (hopefully)
  • DB_PORT: The port where MySQL is running on host
  • DB_DATABASE: Database name set in the previous steps
  • DB_USERNAME: Username created for RedOps
  • BD_PASSWORD: Password for username of RedOps
  • WS_NAME: Random string
  • PUSHER_APP_ID: Whatever (use 12345 for example)
  • PUSHER_APP_KEY: Random, but remember that, you will need this string to configure nginx.
  • PUSHER_APP_SECRET: Whatever (Not used, only is used the library but not the Pusher service)
  • PUSHER_APP_CLUSTER: Whatever (Not used, only is used the library but not the Pusher service) Use mt1 for example.
  • APP_KEY: Ignore, in the next step will be replaced
APP_ENV=local
APP_DEBUG=true
APP_KEY=base64:XXXXXXXXXXXX
APP_URL=http://localhost

DB_CONNECTION=mysql
DB_HOST=127.0.0.1   
DB_PORT=3306        
DB_DATABASE=redops      
DB_USERNAME=redops      
DB_PASSWORD=db_password 

BROADCAST_DRIVER=pusher
QUEUE_CONNECTION=sync
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

WS_NAME=XXXXXXXXXXXX
PUSHER_APP_ID=12345
PUSHER_APP_KEY=abcdefghijklm
PUSHER_APP_SECRET=abcdefghijklm
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
  1. Install the PHP and Laravel dependencies:
composer install
  1. Generate the key and create the tables on database
php artisan key:generate
php artisan migrate
  1. Configure Nginx to run the webpage. Inside /etc/nginx/sites-enabled you need to write a config file to enable the site. For example you can name it with the name of your domain. Please, take care with the comments in the next example:
server {
        root /var/www/RedOps/server/public;
        index index.php index.html index.htm;

        server_name domain.com; # HERE YOUR DOMAIN OR IP

        add_header X-Frame-Options "SAMEORIGIN";
        add_header X-XSS-Protection "1; mode=block";
        add_header X-Content-Type-Options "nosniff";

        location / {
                try_files $uri $uri/ /index.php?$query_string;
        }
        location ~ /\.ht {
                deny all;
        }
        location ~ \.php$ {
                fastcgi_pass unix:/var/run/php/php7.x-fpm.sock; # REPLACE x with your PHP-ext version, see step 1
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
                include fastcgi_params;
        }
        location /app/abcdefghijklm { # Replace PUSHER_APP_KEY with your string you put in step 6. In the example would be abcdefghijklm
                proxy_pass             http://127.0.0.1:6001;
                proxy_set_header Host  $host;
                proxy_read_timeout     60;
                proxy_connect_timeout  60;
                proxy_redirect         off;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection 'upgrade';
                proxy_set_header Host $host;
                proxy_cache_bypass $http_upgrade;
        }
        location ~ /\.ht {
                deny all;
        }
}