- How to set up VPS on Linux – Introduction
- How to set up VPS on Linux – Initial Setup
-
Deploying a Linux Distribution
First step in doing initial setup on VPS is deploying the linux on the server, For this tutorial i will be working with Ubuntu 14.04 LTS.
- Login to your VPS Console
- Find the option to deploy the server, location can vary from provider to provider. I will be working with Linode
- Select the distribution mine is Ubuntu 14.04 LTS you can also work with Ubuntu 12.04 LTS.
- Enter the deployment Size(Disk Size), keep default if you don’t know much about it.
- Select the Swap Disk Size. i recommend to keep the default.
- Enter your Root password. keep a strong password for security
- click Rebuild/Build/Deploy
-
Boot The Server
After deployment the next step is to Booting up the Server(on your VPS Provider it may boot automatically after deployment).
- login to Linode Manager
- Click the Linodes tab
- Select your Linode.
- Click the Boot
-
Connecting to Server first time
when you connect the server first time, you need to find the server’s IP address.
- Finding the IP Address – this process may vary from provider to provider . i will be telling the process for linode
- Log-in to your Linode Console.
- Click on Linode Tab.
- Select your Linode.
- Click on Remote Access Tab.
- Here you can see the IP-Address of your server. something like thisĀ public ip
123.456.78.90/ 255.255.255.0
- Logging in for the First Time
- Choose your ssh client. i will be using putty
- open the ssh client and enter the ssh Address. replace 123.456.78.90 with your server IP
ssh root@123.456.78.90
for putty see the below screenshot.
- you will receive prompt warning similar to below, say yes and hit enter
The authenticity of host '123.456.78.90 (123.456.78.90)' can't be established. RSA key fingerprint is 11:eb:57:f3:a5:c3:e0:77:47:c4:15:3a:3c:df:6c:d2. Are you sure you want to continue connecting (yes/no)?
- enter your credential.
- If server IP is correct and credentials are ok you will be logged into your server
- Finding the IP Address – this process may vary from provider to provider . i will be telling the process for linode
-
Setting the Hostname
enter the following command to set the host-name.replace “plato” with hostname of your choice. Same hostname will be user wherever we mention the hostname in later steps.echo "plato" > /etc/hostname hostname -F /etc/hostname
check the hostname by entering below command
hostname
-
Update hosts file
Next step is to update the host file with your server IP-Address and the hostname
- open the hosts file in edit mode using command:
sudo nano /etc/hosts
- Replace ubuntu with your hostname
- Add the below line to the file, where replace your-ip by your server’s IP-Address
Your-serverip yourhostname.yourdomainname e.g. 123.456.78.90 plato.example.com
- Save file using Control-X, then Y and hit enter.
- open the hosts file in edit mode using command:
-
Setting the Timezone
Use the below command to set the Timezone.dpkg-reconfigure tzdata