[caption id="attachment_385" align="alignright" width="212" caption="setup vps"]setup vps[/caption]

I see often people asking how to setup vps for them so here I am going to include steps which can help you to install neccessary component to run a website or use any php based script with minimal server resources usage.

 

 

 



 

 

Required Software:
Putty ( Download from http://www.chiark.greenend.org.uk/~s.../download.html )

What will be installed

  • nginx

  • php-fpm

  • mysql


*[For newbies - skip if u know how to login in putty]
When you purchase a vps hosting you will be given an IP and password from service provider and your username will always be root.

Open putty and give ur server IP like below:
root@YOUR_SERVER_IP

[caption id="attachment_4343" align="aligncenter" width="451" caption="enter ip"]Enter your server ip in box[/caption]

When it connect you will be asked for password. Now in putty you can not copy paste using CTRL+V, you can either type by hand or copy your password to clipboard using CTRL+C keys and click on putty screen where it is asking you to add password and then RIGHT CLICK , it will work as CTRL+V ( note it will not show you your password pasted) and hit enter, Now hopefully you are logged in.

Now run these commands one by one:


yum update
wget http://freevps.us/downloads/nginx-centos.sh -O - |bash



(Those freevps guys did a very good job by creating above script)

Now wait for it to finish, it usually takes few seconds and your server is ready to use. if you like to use php command line run this later
yum install php-cli --enablerepo=webtatic

After installation is complete your server should be ready to host sites or your scripts. to make sure all is working visit your server IP via browser lik


http://YOUR_SERVER_IP/



and it will show you nginx forbidden page.

To host sites just use this command:


setup-vhost yoursite.com



and it will create a folder where you can upload all your site content inside /var/www/yoursite.com and its configuration file is located in /etc/nginx/conf.d/yoursite.com.conf

you can add multiple sites using above method. ( setup-vhost youOtherrSite.com )

you can use same login password to login via sFTP and upload site content in there respective folders.

Hope it will help someone.

0 comments:

Post a Comment