Requirements
A VPS or dedicated server
OS: CentOS (I'll be using 6.5)
Specs: +256mb RAM 1core
Putty
WinSCP (Not needed but uselful)
A domain
Process
Step 1:
First of all, logging into your Server with Putty.
After that, let's start by typing a few things
yum update; yum install httpd;
The semicolons are to execute one command after the other. On this case, it'll run "yum update" and then "yum install httpd"
You can also include "-y" at the end to automatically say yes when it's asked by the command you ran.
This will take a while
Example:
yum update -y; yum install httpd -y;
Step 2:
Let's start our webserver by typing the following:
service httpd start; service iptables stop;
I'm completely shutting down the iptables service, but you can just open the 80 port and it'll be fine.
After this, we'll be able to see our website by just typing the Server address to any webbrowser.
Step 3: Linking the Domain to the server
I'll be using https://freenom.com
On the config of the domain, you need to use the websites DNS and put your Server's IP next to that.
This is the config you need on Freenom
This is on namecheap
Once you set up your domain, you'll just need to wait upto 24h to see it working because of the DNS.
Additional info
You can install PHP by typing:
yum install php -y;
MySQL:
yum install mysql mysql-server;
To modify your files, open Winscp, logging to your server and go to the following directory:
/var/www/html
That's where all your website files are stored
Hi! I am a robot. I just upvoted you! I found similar content that readers might be interested in:
http://thebot.net/threads/tut-using-a-vps-to-host-your-website-centos.393453/
Yes I found it on this site