How to setup a vps without a control panel for dummies

Status
Not open for further replies.

mRAza

Active Member
1,149
2009
338
90
I see often people ask me 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/~sgtatham/putty/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
http://screensnapr.com/v/zXBvJx.png

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:
Code:
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
Code:
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 like
Code:
http://YOUR_SERVER_IP/
and it will show you nginx forbidden page.


To host sites just use this command:
Code:
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, let me know if you have any question.
Best Regards
 
30 comments
Wow. Is it really so simple? At least it looks simple. I will buy a cheap VPS to try it out.
One thing man, if I buy a VPS that gives like 128 or 256 MB RAM, will it be enough to host a website? I won't install cPanel. Just the script. Sorry if that's a nooby question, I'm not much knowledgeable about Linux VPS's.
 
Wow. Is it really so simple? At least it looks simple. I will buy a cheap VPS to try it out.
One thing man, if I buy a VPS that gives like 128 or 256 MB RAM, will it be enough to host a website? I won't install cPanel. Just the script. Sorry if that's a nooby question, I'm not much knowledgeable about Linux VPS's.
yes its that simple, and about RAM i used to host a site using IPB Forum with 10k u/v a day on 256MB Ram.
 
thanks mRaza... i was desperately in need for this but nobody helps me that time... i learn my own by search, search & trying trying trying trying...
 
thanks a lot dude i was looking for this..

a question: can install this on centos 5 or any recommended OS ?
 
Last edited:
Hello,

one purchase's a VPS and receives an IP, root and password. So is this a tutorial on how to setup a website on a VPS without a control panel?


I'm a little confused with the title.


Sorry


cowboyup910
 
Hello,

one purchase's a VPS and receives an IP, root and password. So is this a tutorial on how to setup a website on a VPS without a control panel?


I'm a little confused with the title.


Sorry


cowboyup910

Yes this tutorial will install the necessary packages for you to run a website(s) without the use of a control panel such as cPanel or DirectAdmin.
 
Would you mind telling us how to taking full/sql site backup using ssh ? and also how to restore them again ?

it would be great learning i hope :)

to make backup in ssh type this and enter:
Code:
mysqldump DATABASE_NAME > BACKUP_FILE_NAME.sql
change " DATABASE_NAME" with database name u wants to backup and "BACKUP_FILE_NAME" whatever u like.

it will save a file named "BACKUP_FILE_NAME.sql" in ur current directory.

to restore backup ( make sure u are in same directory where DATABSE_BACKUP_FILE_NAME.sql exists or give full path) :
Code:
mysql -uUSERNAME -pPASSWORD DATABSE_NAME < DATABSE_BACKUP_FILE_NAME.sql;

example:
mysql -uroot -p123456 mydatabase < BACKUP_FILE_NAME.sql;
 
I have a doubt, where can we control Mysql data, like creating databases, passwords and other stuff.. i mean we should have phpmyadmin or something like that. And does this work as Cpanel?
 
I have a doubt, where can we control Mysql data, like creating databases, passwords and other stuff.. i mean we should have phpmyadmin or something like that. And does this work as Cpanel?
the whole point of this tutorial is to mange all via command line, so you can create databases , change passwords, add users etc all via SSH, cPanel is a conrtol panel, which works via browser.

You can also install phpmyadmin if you like to manage databases via browser, just download phpmyadmin and upload to /var/www/html/phpmyadmin then visit in ur browser htt:///YOURIP/phpmyadmin and follow instructions . .
Make sure to secure it.
 
Last edited:
I have a doubt, where can we control Mysql data, like creating databases, passwords and other stuff.. i mean we should have phpmyadmin or something like that. And does this work as Cpanel?

You can control Mysql via commandline without any problems, you just need to know how and it really isn't that difficult. Google is full of infos about that. This one for example: http://library.linode.com/databases/mysql/centos-5

If you can't live without an interface for Mysql, try adminer, it is only one small php file and will only be used when needed, unlike phpmyadmin, which is always stealing ressources.
 
Sorry for asking a silly questions.

once we setup VPS... how do we move our site into the new VPS server.

is it really simple like just using the CuteFTP for Uploading files. and how to use backup MYSQL DB :)
 
Status
Not open for further replies.
Back
Top