If an individual decides to setup a VPS to host a website, then he should know how to setup VPS hosting. Here everything is covered which a person is required to do. It includes Apache, PHP, Perl/CGI, and MySQL.
Steps required to Setup VPS Hosting
- The very first step an individual needs to take is to select a VPS hosting provider. In choosing a right web hosting provider, a person should not go to free hosting providers because they usually sleep after offering their services. An individual needs a good host that has reliable support, as well as a person, needs it at an affordable price. For a reasonable cost, a person should not compromise with services. As soon as an individual sign up and pay the required amount to the web hosting provider, VPS built forthwith.
- Next step is to login in the account. SSH as the user ‘root’ to the IP address is furnished. Now an individual needs to change his IP address & root password. It is important to do because of security reasons.
- Next, an individual should go ahead and update his operating system. For doing this, a program called ‘yum’ is used. Yum is the default package manager for RedHat Linux and CentOS utilized by all.
- Next step an individual needs to do is install a web server (Apache), code interpreters (PHP & Perl/CGI) and Database Server (MySQL) in his system. He can do this with only one command using yum. It is yum which is required to install HTTPd PHP PHP-MySQL Perl MySQL MySQL-server.
Various other Requirements
If an individual is hosting one site, then he can store his files in /var/www and call it a day, but there is no need to waste the power of VPS. An individual can easily set up multiple websites on the same VPS by using Apache Virtual Hosts. He needs to create a user per site and then host the files for that website in the users ‘public_html’ folder inside his home folder. It makes it easy to keep track and offers additional security. It should not impact the others. Firstly an individual needs to create a user called ‘example,’ then he needs to create their ‘public_html’ folder, and give them permissions to login into it. By allow all & then save and exit the file, then he needs to start apache. Lastly, an individual needs to be sure that he set it to start on boot.
Next step is to configure MYSQL
MySQL has a root account that is different from the system root account. It has a separate password which an individual should set. First, he needs to start Mysql and make sure it is set to start automatically on boot. Then he needs to connect to the MySQL server and set his root password.
Next an individual needs to create a MySQL user and give that user access to their database for each site he wants to build; it requires a database. Again an individual needs to be sure to change ‘example’ and ‘new password’ to give to his new username and password. He needs to remember this password. He needs it at the time of setting up his website. Likewise, an individual needs to configure PHP & Perl or CGI, whatever he wants to be in his system.
Leave a Reply