Setting up a VPS for a domain[Part 1] 06-10-2015, 06:50 AM
#1
This more of an educational thread rather than a tutorial.
First head over to linode or digital ocean or whatever vps hoster you so choose to go with and get a vps using the latest ubuntu.
Next you'll want to set a secure password for the root user. If you don't know how to ssh into your server I'll make a thread for that as well. Just post below
So what we need to install on our new server is a service called "LAMP" this is so you can host your domain etc. Not going to to go into detail.
Now what we need to do is install Apache.
For this you need to run these two commands
Once that is install goto your vps server ip address and see if it worked.
You should see this page:![[Image: default_apache.png]](https://assets.digitalocean.com/articles/lamp_1404/default_apache.png)
Now you need to install MYSQL
Run this command [/code]
Then this command
[/code]
And then this command [/code]
Now to install PHP [/code]
Next run this command[/code]
And move index.php to the front of index.html so it's looking for a php index first instead of html. After you've done that hit CTRL-X , Y, ENTER
Then restart apache by running[/code]
Now to install phpMyAdmin by running
After installed add phpmyadmin to the apache configurationThen add the phpmyadmin config to the file
Restart apache
And now to point your domain to your VPS Server and so much installation and reading and etc.
You'll need to get your vps' dns servers and add them to your domain provider. You can find them from the vps hoster.
After done login using sftp with filezilla and navigate over to /var/www/html and this should be where your root directory for your site. If I forgot anything except security wise as I'm sure I did let me know below.
First head over to linode or digital ocean or whatever vps hoster you so choose to go with and get a vps using the latest ubuntu.
Next you'll want to set a secure password for the root user. If you don't know how to ssh into your server I'll make a thread for that as well. Just post below

So what we need to install on our new server is a service called "LAMP" this is so you can host your domain etc. Not going to to go into detail.
Now what we need to do is install Apache.
For this you need to run these two commands
Code:
[code]sudo apt-get update
sudo apt-get install apache2 [/code]Once that is install goto your vps server ip address and see if it worked.
You should see this page:
![[Image: default_apache.png]](https://assets.digitalocean.com/articles/lamp_1404/default_apache.png)
Now you need to install MYSQL
Run this command
Code:
[code]sudo apt-get install mysql-server php5-mysqlThen this command
Code:
[code]sudo mysql_install_db[/code]
And then this command
Code:
[code]sudo mysql_secure_installationNow to install PHP
Code:
[code]sudo apt-get install php5 libapache2-mod-php5 php5-mcryptNext run this command
Code:
[code]sudo nano /etc/apache2/mods-enabled/dir.confAnd move index.php to the front of index.html so it's looking for a php index first instead of html. After you've done that hit CTRL-X , Y, ENTER
Then restart apache by running
Code:
[code]sudo service apache2 restartNow to install phpMyAdmin by running
Code:
sudo apt-get install phpmyadmin apache2-utilsAfter installed add phpmyadmin to the apache configuration
Code:
sudo nano /etc/apache2/apache2.confCode:
Include /etc/phpmyadmin/apache.confRestart apache
And now to point your domain to your VPS Server and so much installation and reading and etc.
You'll need to get your vps' dns servers and add them to your domain provider. You can find them from the vps hoster.
After done login using sftp with filezilla and navigate over to /var/www/html and this should be where your root directory for your site. If I forgot anything except security wise as I'm sure I did let me know below.



![[+]](https://sinister.li/images/modern/collapse_collapsed.png)
