Server Installation


Introduction

We are strongly any VPS Server with ubuntu OS. Because it is quite easy to setup and maintain.

  • Minimum Server Requirements
    • Any VPS server with UBUNTU Preferred
    • 4 GB Ram
    • 30 GB Storage
    • vCPU 2 cores

Installation Instructions

  1. Create an Instance OR Droplets
  2. Add Security groups/Enable Ports
  3. Install Apache
  4. Install PHP7.2 & above
  5. Install mysql
  6. Install phpmyadmin
  7. Install composer
  8. Install Jenkins
  9. Install Nodejs & Pm2
  10. Setup Laravel Supervisor
  11. Install EMQX server

1. Create an Instance/Droplets

2. Add Security groups & enable the below port numbers

* 1883,3000,3001,443,80,8080

3. Install Apache

  • Open the ssh terminal using pemfile of your aws instance

  • Run "sudo apt install apache2" to install an apache2

  • Run "sudo apt update"

  • Run "sudo nano /etc/apache2/sites-available/000-default.conf" to edit the config follow next step.

  • <Directory /var/www/html>

            Options -Indexes
            AllowOverride All
            Require all granted
            ErrorDocument 403 "You Don't have a permission to access this URL"
            ErrorDocument 404 "Requesting Page not Found. Contact admin for further details"
      </Directory>
  • Run "sudo service apache2 restart" to restart the apache2.

  • Reference Link : https://www.digitalocean.com/community/tutorials/how-to-install-the-apache-web-server-on-ubuntu-20-04

4.Install PHP7.2 & above

Please follow the instrctions from the reference link below. And Install the php extensions below. bcmath,bz2,intl,gd,mbstring,mysql,zip,fpm,curl,xml

Reference Link : https://computingforgeeks.com/how-to-install-php-on-ubuntu/

5.Install mysql

Run the below commands one by one

  • sudo apt-get update
  • sudo apt-get install mysql-server
  • mysql_secure_installation
  • sudo service mysql restart

To create a new user for mysql

  • sudo mysql -u root
  • use mysql;
  • GRANT ALL ON . TO 'taxi_user'@'%' IDENTIFIED BY 'TaxiUser@123' WITH GRANT OPTION;
  • FLUSH PRIVILEGES;

Reference Link : https://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-ubuntu-20-04

6. Install phpmyadmin

Open the path "var/www/html". and dowonload the phpmyadmin package using below command.

"sudo wget https://files.phpmyadmin.net/phpMyAdmin/5.0.1/phpMyAdmin-5.0.1-all-languages.zip"

Unzip the downloaded package and rename it to "pma".

7. Install composer

Please follow the instructions from the reference link below.

Reference Link: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-composer-on-ubuntu-20-04

8.Install Jenkins (Optional)

  • jenkins is used to upload the backend app code to the server via git repo.

  • To install jenkins you need to install JAVA. to install java run this command "sudo apt install openjdk-8-jdk ".

Follow the instructions from the reference link below. and skip the firewal setup.

Reference Link: https://www.digitalocean.com/community/tutorials/how-to-install-jenkins-on-ubuntu-16-04

9.Install Nodejs & Pm2

Follow the instructions from the reference link below. install nodejs & npm as well.

Reference Link: https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-20-04

10.Laravel supervisor setup

Follow the instructions from the reference link below.

Reference Link: https://laravel.com/docs/8.x/queues#supervisor-configuration

11.Install EMQX server

Follow the instructions below & from the reference link.

  1. Download emqx-ubuntu20.04-5.0-beta.1-amd64.zip

  2. Install the file

    • unzip emqx-ubuntu20.04-5.0-beta.1-amd64.zip
  3. Run the server by below command

    • ./bin/emqx start

Reference Link: https://www.emqx.com/en/downloads?product=broker