What is a VPS server?A server is a set of tangible and intangible resources linked to a network in order to share data between several users. It is composed of a storage space, a processor, a random access memory, an operating system and a software environment making it possible to carry out operations responding to requests made by remote computers.
Traditionally, hosting providers provide physical servers, either dedicated to a single user, or shared between several. Reserved for a single owner, dedicated servers have the advantage of continuously guaranteeing a minimum of resources, thus avoiding outages and slowdowns caused by other users, as with a shared server. The disadvantage of a dedicated server comes from its relatively high cost, induced in particular by the mobilization of material resources such as the hard disk, exclusively allocated to a single user.
Thanks to new virtualization technologies, hosting companies now offer a third hosting solution: the virtual private server, or "Virtual Private Server" (VPS). Reconciling the independence and performance of the dedicated server at the competitive price of a shared server, VPS offers an optimal compromise for developers and CIOs. Thanks to the power of virtualization software, a single computer can deploy multiple VPSs sharing the same physical environment. The storage space, the processor and the RAM are thus allocated to one or more VPS, which operate independently of each other, and thus offer high guarantees of performance, stability and security. In addition, like dedicated physical servers, VPSs give users a lot of management and configuration freedom. Unlike shared servers, their scalability allows you to support the development of your project throughout its implementation.
If the flexibility of the VPS is an advantage, the condition to get the most out of it is to master its configuration. In this article, we will explain how a VPS works, how to configure it and how to deploy it autonomously.
How a VPS works ?
As explained before, a virtual private server operates from hardware resources. Thus, the hosts offer various VPS solutions whose level of performance depends on:
- allocated storage space and hard drive technology (HDD, SSD, SSHD)
- processor power
- availability: a VPS functioning thanks to data stored on a hard disk, this one must be in continuous operation
- bandwidth (loading time, management of activity peaks).
To ensure the best quality of service, the location of the server is also taken into account, knowing that the VPS must be geographically located as close as possible to the target audience.
Once the VPS has been ordered from the selected host, an email will be sent to you containing the URL of the virtual server, along with a username and password. To administer and configure your VPS, you must first install server software, including the package necessary for its operation: server application, PHP programming platform, MySQL database. Download and then install an SSH connection console, essential for configuring your VPS at the root. In addition to the server software and the SSH program, the control of your VPS can be optimized by installing other modules such as a content management system, a database application or an FTP client.
How to set up a VPS?
Once you have your VPS credentials, download and install server software compatible with your operating system. Thus, the software suites WAMP ("W" for Windows), MAMP ("M" for Mac OS) and LAMP ("L" for Linux) directly integrate the 3 main operating modules of a VPS (like their acronym "AMP "Indicates):
- Apache, the benchmark application that responds to requests from VPS users, and therefore ensures the ultimate function of the server
- MySQL, the central VPS database
- PHP, the programming module to edit static and dynamic data
In order to be able to configure your VPS, you must first access its root and have administrator rights. For this, it is necessary to install an SSH client. This program allows both remote access to the VPS in a secure manner and to be able to configure it.
If you are working under Windows, install and run an SSH client (eg PuTTY). Fill in the IP address of the VPS in the “Host Name” field on the main configuration page, checking that the access port is 22, then click “Open”. This command runs a console in which you must enter your username ("root" by default) and the password provided by your host. Then go back to the main client configuration page and click “Save”.
If you are working under Mac OS or Linux, open Terminal directly, then enter the command “ssh root @
- After establishing the connection with your VPS, check if the server software applications are up to date. To do this, open the configuration console (by clicking on "Open" from PuTTY if you are operating under Windows or by opening the terminal directly if your operating system is Mac Os or Linux), then enter the "apt update" command, then "apt dist-upgrade" if updates are available.
- To add users to the VPS, open your system console and enter the command "$ adduser X", replacing "X" with the name of the user concerned. To add a super user with full administrative privileges, type "$ usermod -aG sudo X", again replacing "X" with the name of the super user.
- By default, the IP address of your virtual server is public, so that users can access it through the Internet. However, it corresponds to a series of numbers, which you can rename by creating a domain name, in order to ensure the visibility and therefore the accessibility of your content. To do this, go to the site of a DNS registrar, provide the IP address of your server, as well as the desired domain name. In order for your VPS to point to your new domain name, enter it in the dedicated section of the server software.
- The configuration relating to monitoring, security (firewall) and backup plans is the responsibility of your host. If your VPS package doesn't include automatic backups, you can use free storage platforms like Dropbox and Seafile.
- Now that your VPS is configured, you can install the complementary applications to your server software. In addition, an FTP client like FileZilla (compatible with any operating system) gives the possibility of easily transferring files and folders from your host system to your virtual server, notably by presenting an interface similar to that of standard Windows Explorer. . To link the FTP client to your virtual server, open the FTP application and fill in the details of your VPS (IP, username, password). Set the connection port to "21" and connect. Also, installing a database manager like PHPMyAdmin and a content management system (eg Wordpress) will allow you to easily interact with the other modules of your VPS virtual server.
- How to deploy your VPS servers yourself ?
- At higher integration level, you have the option of deploying your own VPS virtual server yourself from the hardware resources of your personal computer. This amounts to internalizing the function of the hosts, who deploy virtual machines on their own resources upstream of the provision of VPS. This alternative presents an operational advantage, in particular within the framework of programming projects and computer tests, the independent execution of which makes it possible not to destabilize the host system.
Thanks to virtualization technologies, the same computer can thus deploy, via a virtual machine, several VPSs operating on different operating systems, and allocate part of its resources to each of them. Similar to traditional hard drive partitioning, storage space and computing power are divided and then allocated to each VPS. In the event of a failure, the virtual server does not affect the operation of the host system and other guest VPSs in any way. Replica of a full-fledged computer, the virtual machine on which the virtual server is installed has its own operating system and independent programs, including the VPS to which it is generally entirely dedicated. It runs like a regular application in an independent window on the interface of the host operating system.
- Create a virtual machine and a server environment
- So, to deploy your VPS server yourself, you must first create a virtual machine using virtualization software, or "hypervisor". The most used are Parallels Desktop, VMware Workstation Player and Oracle VM Virtual Box, compatible with all operating systems. First, download virtualization software. Next, download an .iso disk image of its operating system, available on the OS publisher's official website. Hypervisors support all Linux and Windows distributions, and most Mac OS environments. Some solutions developed by Linux constitute both virtual machine operating systems and server software. Developed by Linux, Ubuntu, CentOS and Debian are the 3 most popular server oriented operating systems.
After downloading the two files essential for the deployment of your VPS server and its virtual base:
- Run the virtualization software installation wizard
- Follow the preliminary creation instructions for the virtual machine
- Indicate the chosen operating system (Linux, Windows, Mac OS)
- Define the share of CPU and RAM of the host computer allocated to the virtual machine
- Create a virtual hard disk by assigning a fixed storage space (vs. dynamic)
- Finalize the creation of the machine by following the instructions of the installation wizard
- Once the virtual machine has been created, click on its dedicated start button or access its configuration section. You can then upload the disk image of its operating system
- Install the selected operating system by following the instructions of the installation wizard.
- Install VPS components
- Once the virtual machine is operational, you can install the VPS server applications on it. To do this, open the hypervisor terminal and enter the following command lines one after the other:
sudo apt-get install apache2
sudo apt-get install php5 libapache2-mod-php5
sudo apt-get install mysql-server
sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
sudo /etc/init.d/apache2 restart
Now, as when configuring a VPS rented from a host, you have a complete software suite to develop and share your content: Apache server application, PHP programming platform, MySQL database. You can install as many programs as you want by entering the corresponding command lines in the terminal of the virtualization software.
In order to be able to access your server from the host computer and remote workstations, all you have to do is configure your virtual machine network. To do this, access the “Network” menu of the hypervisor (“Interface” and “DHCP server” sections), activate the server and enter the details of your VPS. By specifying a fixed IP for one of the network cards, the VPS always becomes accessible from the same URL address. Finally, the hypervisor gives you the ability to configure shared folders, easily exchange files with the host machine, and manage different groups of users.