How to install and configure server on digital ocean step by step

This tutorial will show how to configure new server on digital ocean from the start. You can create and customize new virtual server for your needs for different php projects.

Server Details:
OS: Ubuntu 16.04
PHP Version: 7.0
Mysql Version: 5.7

Step 1: Creating new Droplet

Droplet is so called VPN on Digital Ocean. You can look here to understand more: “How To Create Your First Digital Ocean Droplet Virtual Server”

Register on digital Ocean

Create DropletCreate Droplet On Digital Ocean
Choose The Price and A Size

Choose Size On Digital Ocean

Choose your Location

Choose Rigion On Digital Ocean

Add name
Choose Host Name on Digital Ocean
Choose Host Name on Digital Ocean
And wait

Results Digital Ocean

Check Your Email

After Creation of new Droplet on Digital Ocean, you will receive SSH root password and your new ip in your email inbox

Step 2: Connect to your New Droplet

You can connect to your new VPN server via putty or other SSH telnet client.

After First connection you will be required to change your first password

Changing password for root.
(current) UNIX password: 
Enter new UNIX password: 
Retype new UNIX password:

Step 3: Configure Server Defaults

Update Ubuntu Server 

run in your SSH Client:

sudo apt-get update
Update Date Time ZONE

run in your SSH Client:

sudo dpkg-reconfigure tzdata

Choose your date time location of your new serve

Step 4: Install Apache

run in your SSH Client:

sudo apt-get install apache2

Each time when you install new service on your Ubuntu Server you will ask the question:

Do you want to continue? [Y/n] Y

To check successful installation, you can open your browser with your ip. You will see that:

Step 5: Apache enable Rewrite rule

This rule will permit you to use .htaccess file each project

run in your SSH Client:

sudo a2enmod rewrite

sudo service apache2 restart

Step 6: Install MYSQL Last Version

run in your SSH Client:

sudo apt-get install mysql-server mysql-client

You will required to enter twice your new password for Mysql Client. Please do not forget your password

Step 7: Install PHP 7.0

run in your SSH Client:

sudo apt-get install libapache2-mod-php7.0 php7.0-mysql php7.0-curl php7.0-zip

than run:

sudo service apache2 restart

Step 8: Install PhpMyadmin

It is  software tool to mange mysql DB.


run in your SSH Client:

sudo apt-get install phpmyadmin

choose apache2 and click on “OK”

press “yes”

 insert you root password of MYSQL DB


sudo service apache2 restart

Step 9: Check Your Server Installations


sudo echo "<?php phpinfo();?>" > /var/www/html/test.php

run in your browser: http://{YOUR_IP}/test.php

you will get:

to test phpmyadmin,run in your browser http://{YOUR_IP}/phpmyadmin and enter your username and password for your mysql service


Please, leave in comments witch problems did you have flowing current documentation. Thanks!


How To Set Up Apache Virtual Hosts on Ubuntu 16.04

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.