PHP MySQL pagination is used to partition the data from the database to navigate the webpage easier and faster....
Virtual servers are widely used to host websites due to the great features they provide and the cheap costs....
By having a PHP database connection for your program, it will be easy to append and retrieve records and save the statuses of your program....
Learn how to use the properties and methods in the object oriented code and how to call the methods from inside and outside the mother object....
In the previous article, we discussed how to buy your own VPS server and how to deploy the Linux environment and get it ready to use. In this article, we will explain in clear details how to use VPS servers and connect to your Linux environment via the terminal using the important Linux commands without the need of any panel or interface to use. You will use the VPS hosting company control panel just to reset your Linux operating system password in case you forgot it or to power on your server after you power it off.
After deploying your Linux operating system, you will receive the root password immediately via your email in case you didn't select the SSH keys option to login for first time. Below is the email which has just been received after deploying a new droplet.
If you are using Windows Machine, then install PuTTY for Windows, it is very light and easy, open it after the download and add the IP address in the "Host Name" field and make sure that you have the same configuration as marked in the red squares. Click on open (in green square) to establish the connection with the server.
For Linux/Mac machines, we don't need PuTTY as their operating systems have a built-in terminal which allows you to connect to servers remotely. Open the terminal and login to server via the command:
Once you establish the connection with the server for the first time (from Windows machine or Linux/Mac machine), you will get a security alert to indicate that your server key is not cached in the registry. Click on "Yes".
After you confirm and click on "Yes", you will be prompted to enter the username and the password for your VPS which has been received in the email. Enter root as a username then hit "Enter" key. Now for the password, if you are using PuTTY, then copy it from the email then paste it by a single mouse right click (you will not see anything when you enter the password).
After entering the correct username and password, you will be prompted to change the default password you received in the email. First, enter the default (current) password.
After you enter the current password, you will be prompted to enter your new password twice. Your new password must not be simple, the new distributions of Linux operating system don't allow simple password to secure your server, it is better to have a combination of lower/upper case characters with numbers. Hit "Enter" when you finish and you are done!
Next time you connect to your VPS server, you will not get the security alert and also will not be prompted to change the password, hence dealing with the VPS server will be easier.
To view the root directories of your server, you will need to use the command ls which stands for "list" as below.
You can view the sub directories by indicating their names after the slash. Let's now view the content of the subdirectory etc, you will see lot of folders and files inside! Notice that the white color indicates a file while the blue color indicates a folder that might contain folders and files.
Creating directories is simple, it is done via the command mkdir which stands for make directory. You can create directories inside directories but you need first to be inside the parent directory which you plan to create a child directory inside it, for this purpose, we will use the command cd which stands for change directory.
Let's now go into the directory home which is located on the root and then create the directory innerDirectory1 inside it.
To enter the home directory, use the command cd followed by the directory name as below:
Let's now create our new directory inside the home directory:
We can verify that our directory has been created by using the ls command to see our directory in blue color inside the home directory.
We can enter inside the new directory same way as we did with the home directory.
To leave a directory, we also use the command cd. To go back to the previous directory, add space followed by .. after cd as below:
The above command will return us back to the home directory (we went back only for one level).
If you want to leave all nested directories at once, you can use the pure command cd without any prefix as below:
Notice that we returned back to the root directory (base directory).
You can easily reboot or power-off your server via the commands:
Notice that when you power-off your server, you need to go to Digital Ocean website to power it on again by clicking on the button Power On inside the green square as seen below.
If you are able to apply all the steps mentioned above, then you know how to use VPS servers correctly, i.e. you got the important skills to access and manage your new server. In the next articles, you will gain more advance skills that you will use to add/remove programs and modules and manage the whole Linux operating system.