In this Document, we will set up a web server so we can host backend.
We will use 68.232.175.197 as IP address with root user.
This is a Clean Ubuntu 16.x Operating system.
STEP 1
log in to the server using root password using any SSH client like PUTTY.
Update server
apt update -y
Install APACHE + VIM + WGET + FTPserver
apt-get install apache2 vim wget vsftpd zip -y
You can see working Apache2 Ubuntu Default Page at http://68.232.175.197/
STEP 2
Install PHP7
--- below commands are to add php7 into Ubuntu 16 if you are using ubuntu 18 you may not need this you can skip to step 3---
apt-get install software-properties-common python-software-properties
add-apt-repository -y ppa:ondrej/php
apt-get update
STEP 3
Install php7 and required extensions
apt-get install php7.2
apt-get install php-pear php7.2-curl php7.2-dev php7.2-mbstring php7.2-zip php7.2-mysql php7.2-xml
You can check PHP Version by php -v
STEP 4
Install MySQL server you need to enter root Password for SQL make sure you note your password
apt-get install mysql-server -y
Enter the password for ROOT MYSQL user that you can use to login to PHPMYADMIN
STEP 5
Install phpMyAdmin
apt-get install phpmyadmin -y
-- You will see popup choose
apache2 in popup 1
select YES in popup 2
enter a password for phpmyadmin ( you can enter the same password you entered in step 4)/
confirm password and hit Enter.
-- PHPMyAdmin cannot be accessed by default you need to edit
vim /etc/apache2/apache2.conf
at the end of apache2.conf add below line ( at the end of the file)
Include /etc/phpmyadmin/apache.conf
NOW RESTART APACHE ( systemctl restart apache2 )
Now you can access phpmyadmin at http://68.232.175.197/phpmyadmin/
STEP 6
Enable Symblink , SSL mod rewrite .
edit 000-default.conf and make some changes as shown below.
vim /etc/apache2/sites-available/000-default.conf
Delete line Document root (line 12) it will be under email ServerAdmin webmaster@localhost
and paste below code and then restart apache.
<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
------------ Enable SSL ------------
a2enmod ssl
-------- Enable modrewrite -------
a2enmod rewrite
--- Now restart apache ---
systemctl restart apache2
=
You server is now ready to hostBookMyCab backend you can install this on ROOT and point your domain on your VPS.
--------------------------------------------------------
STEP 7
Create MYSQL User, Database.
Login to PHPMyAdmin at http://68.232.175.197/phpmyadmin/
You have to use your IP e.g http://your-ip/phpmyadmin
Login with user ROOT and password you created in step 5
After logging click on User Accounts
Click on Create New Account.
Fill the field select localhost for Host Name and choose a username and password
Check } Create a database with the same name and grant all privileges.
and CHECK ALL for Global privileges.
Click on Go -
We will use the same database details in installation.
Now in the next article, we will setup composer -
Go to INSTALL COMPOSER documentation