Learn How To Install LAMP Stack, Apache, MySQL, PHP PhpMyadmin On Ubuntu 16.04 Or 18.04 And Create Free Website On Remote Server (VPS)

This is part 1 of the blog series to learn how to create free website or blog. All the steps one have to follow step by step of to create a website. Read, follow, run all instructions and commands.

1. Install Ubuntu 16.04 or 18.04 LTS to your computer with minimum resources of 1 GB RAM, 1 GB swap space, 20 GB SSD or HHD, 1 CPU core, and a dedicated Ip address. You can increase this as per your requirement. This is always good and cheap if buy a remote server (VPS) on rent and install your website on that server.

There are many companies providing this service. You can search on the internet or click the below links.

InterServer

UK Web Hosting

Start Your Own Online Store

Contabo Germany

Now connect to your server via putty, get access to the terminal, and log in with root/password.

2. Install Apache. Run the below-mentioned command.

sudo apt update && sudo apt install apache2

3. Install Nano.

sudo apt install nano

4. Install Zip Unzip.

sudo apt-get install zip unzip

5. Install UFW. Run below-mentioned commands one by one.

sudo apt install ufw

sudo ufw allow OpenSSH

sudo ufw allow in "Apache Full"

sudo ufw enable

sudo ufw status

6. Add a user. Give any user name of your choice.

adduser username

7. Give rights to your user name.

usermod -aG sudo username

8. Edit sshd config file and change PermitRootLogin yes to no. Press ctrl +x, y, and enter to save the file. Run the below-mentioned command.

nano /etc/ssh/sshd_config

9. Reload the SSH Service for changes to take effect.

sudo systemctl reload sshd

10. Install MySQL

sudo apt update && sudo apt install mysql-server

11. Check MySQL status and press q to exit.

sudo service mysql status

12. Configure MySQL Security & Enter Y Y Y Y

sudo mysql_secure_installation

13. Check Mysql Version

sudo mysqladmin -p -u root version

14. Install PHP

sudo apt update && sudo apt install php libapache2-mod-php php-mysql

15. Check PHP Version

php -version

16. Install PhpMyAdmin

sudo apt update && sudo apt install phpmyadmin

17. Create MySQL User. Run the below-mentioned commands. Make sure you change ‘pmuser’ and ‘password_here’ with your own. Note and remember the same. Run commands.

sudo mysql -p -u root

CREATE USER 'pmauser'@'%' IDENTIFIED BY 'password_here';

GRANT ALL PRIVILEGES ON . TO 'pmauser'@'%' WITH GRANT OPTION;

exit

18. Edit and secure PhpMyAdmin.config file. Change the Alias from /PHPMyAdmin to whatever you want. Press ctrl+x, y, and enter save the file. Login to PhpMyAdmin by typing your server’s IP address followed by the alias you just have changed as a URL into your windows browser (Ex. Chrome). If you did not change the alias then type your server’s IP address followed by PHPMyAdmin.

(Ex. http://192.168.01.188/phpmyadmin). After logging in to PhpMyAdmin create a new database in which we will Install WordPress. Run the below-mentioned command.

sudo nano /etc/apache2/conf-available/phpmyadmin.conf

19. Reload and restart Apache 2

sudo service apache2 reload

sudo service apache2 restart

19. Allow .htaccess Override and Add AllowOverride All underneath DirectoryIndex index.php

sudo nano /etc/apache2/conf-available/phpmyadmin.conf

20. Enable .htaacess.

sudo apt-get update

sudo a2enmod rewrite

sudo service apache2 restart

21. Edit 000-default.conf file. Paste and Save the below-mentioned lines beneath Documentroot. Press ctrl+x, y, and enter save the file.

<Directory "/var/www/html">
  AllowOverride All
</Directory>

sudo nano /etc/apache2/sites-enabled/000-default.conf

22. Configure Apache File. Find the below-mentioned coding and change AllowOverride None to AllowOverride All

<Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
</Directory>

sudo nano /etc/apache2/apache2.conf

23. Copy and paste the below-mentioned lines just beneath the above lines you edited.

<Directory /var/www/html>
   Options -Indexes
</Directory>

24. Copy and paste the below-mentioned lines at the end of the file. Press ctrl+x, y, and enter save the file.

ServerSignature Off
ServerTokens Prod

25. Install CURL. Check your PHP version and type the same in the command.

sudo apt-get update

sudo apt-get install curl

sudo service apache2 restart

sudo apt-get install php7.0-curl

sudo service apache2 restart

Now done with this part of the series. In the next part, you will learn how to configure and encrypt SSL certificates free for Apache on Ubuntu 16.04 or 18.04 LTS. Do remember that to create a WordPress-free website or blog you need to follow each step of each part. Click Here and continue to the next part.

The best and cheap web hosting service is Contabo. Click Here to know more.

7 Replies to “Learn How To Install LAMP Stack, Apache, MySQL, PHP PhpMyadmin On Ubuntu 16.04 Or 18.04 And Create Free Website On Remote Server (VPS)”

  1. you are truly a good webmaster. The site loading velocity is incredible.
    It seems that you are doing any unique trick.
    Furthermore, The contents are masterwork. you have performed a wonderful activity on this topic!

  2. Hi! I know this is kind of off topic but I was wondering
    if you knew where I could get a captcha plugin for my comment form?
    I’m using the same blog platform as yours and I’m having difficulty finding one?
    Thanks a lot!

  3. Pingback: Drug Rehab Centers Near Me
  4. This website truly has all the information and facts I needed concerning this subject and didn’t know who to ask.

    Keep up the good work!

  5. Hey I know this is off topic but I was wondering if you knew of any
    widgets I could add to my blog that automatically tweet
    my newest twitter updates. I’ve been looking for a plug-in like this for quite some time and
    was hoping maybe you would have some experience with something like this.
    Please let me know if you run into anything. I truly enjoy reading your blog and I look
    forward to your new updates.

    Keep up the good work!

  6. Best Corporate Video Production Company in Bangalore and top , 3d, 2d Animation Video Makers in Chennai.
    An interesting post it’s really very useful for us. Thanks for sharing this wonderful post with us.

  7. Now, picture your baby clicking on a link that has the cartoon character’s name
    in its URL nevertheless it then seems to be an internet site with pornographic content material.
    This known as creating your profile, where you may even submit a cute picture of your self!
    Updating many times day-after-day with contemporary new smut from a protracted record of niches followers take
    pleasure in, if you examine again right here every single day by bookmarking the site you may always be capable
    to get your eyes on sexy new sluts, unique videos you have by no means seen before and
    also you may even end up increasing your personal sexual horizons by exploring
    a complete new set of sexual fantasies that deliver you a brand new dimension of carnal satisfaction. In reality, based on the American Academy of Pediatrics webpage,
    children within the US spend roughly four hours day by day watching
    Television. An hour here or there each day interacting with folks
    as a substitute of wasting that point viewing online pornography could have massive impacts
    on different individuals.

Leave a Reply

Your email address will not be published. Required fields are marked *