5 Simple Steps to Deploy Your Own Web Server on Linux Running PHP and MySQL

There are many ways to deploy a web server on cloud, and cloud brokers like Bitnami make it easier to deploy preconfigured web servers. However, I prefer to start with a fresh Linux installation, and I would like to share my steps to configure that image into a web server. Here is a simple guide to install Apache, PHP, MySQL, and phpmyadmin on your fresh Ubuntu installation.

1 Don't forget to do:

sudo apt-get update
sudo apt-get upgrade

2 Let's start with Apache Web Server:

sudo apt-get install apache2

3 Install MySQL server and client:

sudo apt-get install mysql-server mysql-client

4 Install PHP:

sudo apt-get install php5 libapache2-mod-php5

5 Last step: Easily manage your MySQL database through browser with phpmyadmin

sudo apt-get install phpmyadmin

(When asked for, don't forget to mark apache2 Web Server)

Now you have a Web server you can reach through: (if port 80 is allowed through your firewall)

http://[ip address of your server]

You can reach phpmyadmin management console through:

http://[ip address of your server]/phpmyadmin

(username will most likely be root)

Leave your comments below, and stay tuned or subscribe for another post on how to secure this simple web server.

Kerem Kayabay

Read more posts by this author.

Ankara/Turkey

Subscribe to Pseudo Factory

Get the latest posts delivered right to your inbox.

or subscribe via RSS with Feedly!