1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

first time vps

Discussion in 'Web Hosting' started by Mutikasa, Nov 1, 2011.

  1. Mutikasa

    Mutikasa Power Member

    Joined:
    May 23, 2011
    Messages:
    575
    Likes Received:
    212
    Hi,
    i got my first VPS.
    The guy asked me what to install and I confidently said whatever he thinks is the best.
    So, now I only know how to connect via putty or linux terminal to my first Debian VPS. That's all I know. I know it's debian but no what version and I don't know if I have control panel or whatever.
    I tried searching for beginners guide to VPS but they stop at this point.

    Where can I find guides what to do after login as root?
    and which debian i have and what control panel if any?
    Thanks
     
  2. StOn3D

    StOn3D Newbie

    Joined:
    Jun 6, 2011
    Messages:
    21
    Likes Received:
    14
    Home Page:
    What's your plan about this VPS?

    What are you going to do with it?

    You can see which version is your OS by executing the following command:

    Code:
    lsb_release -a
     
  3. extremephp

    extremephp BANNED BANNED

    Joined:
    Oct 19, 2010
    Messages:
    1,293
    Likes Received:
    1,272
    For hosting your websites? For running tools?

    If its for hosting websites, Install kloxo and go on. If its for running tools, I cant help, as I dont know. :D
     
  4. lelando

    lelando Junior Member

    Joined:
    May 13, 2011
    Messages:
    151
    Likes Received:
    61
    Hi

    as to what the person above said I would also vouch for kloxo/lxadmin you can google that and visit their website for a complete guide on how to install it on you're vps.
    If you struggle you can pm me and I can help you setup you're kloxo panel/firewall etc..

    Regards
    Lelando
     
  5. criticalmess

    criticalmess Regular Member

    Joined:
    Feb 7, 2009
    Messages:
    237
    Likes Received:
    210
    If you are in "learning mode" why didn't you install that on a normal PC? that way you wouldn't have to pay for it...
     
  6. scarer

    scarer BANNED BANNED

    Joined:
    Oct 23, 2011
    Messages:
    193
    Likes Received:
    78
    is windows hosting better or Linux hosting. I want to use eBay, Scrapebox and firefox
     
  7. Peripheral

    Peripheral Newbie

    Joined:
    May 3, 2011
    Messages:
    13
    Likes Received:
    0
    as far as I know, scrapebox only works on windows. A linux version would be great though :D
     
  8. Xyz01

    Xyz01 Regular Member Premium Member

    Joined:
    Aug 8, 2011
    Messages:
    300
    Likes Received:
    126
    Here is a basic guide I had wrote quite a while ago but never published:

    Moving away from Shared Hosting is always a good decision. Here is how to setup a VPS and set everything up to get your website online. I personally moved away from shared hosting (Dreamhost) in 2007 to VPS's, and have never looked back.

    Why should I move away from Shared Hosting?
    You should move away from Shared Hosting when your site has overcome to initial stage, or if your hosting provider isn't very good - many shared hosts "oversell" which means that you have thousands of users per server each having their website. This is bad for your site in terms of SEO (as Google usually considers shared IP Addresses to be a*bad thing) and in terms of speed - with many users on the same machine your performance usually takes a nose dive.

    If your blog is getting a large influx of visitors, or your provider is complaining that your script is taking up too many resources, this is also a key that you should move to a VPS.

    But how much will this cost me?
    The VPS price range is quite reasonable, with providers such as Linode, Slicehost, *etc all have good entry level plans to get you started. Alternatively you can also get a "cloud" server which is pretty much exactly the same as a VPS from a company such as Amazon EC2, or from Rackspace (I love Rackspace!).

    You can expect to pay between $10-20 a month for a VPS. Burstnet currently has a deal for a $5 a month VPS, which may be a good alternative for you as well. Beware low cost VPSs as these usually perform horribly and not worth the cost.

    So how do I get started?
    Usually you just need to sign *up for a provider, and they will email you your SSH details. SSH is a method that you use to connect to the server securely and set things up. You use a program called PuTTY, which is a program that lets you remotely connect to Linux servers from Windows. Using a Mac or a Linux computer - you can just open up terminal and type in "ssh myserver.com" .

    For this example, I am using a Rackspace 512MB "Cloud Server" which is just a current fad marketing term for a VPS. You can however use any host you like. This is $21 a month. I'm also going to be using Ubuntu 10.04 which is the current Ubuntu LTS which means it will be supported until April 2015.

    What will this get me?
    This will get you the following:

    nginx 1.0.x - our webserver.
    Varnish 3.x - our reverse proxy.
    MySQL 5.x - our database server.
    PHP 5.3.x
    Memcached
    APC

    This will then be used like the following:
    Varnish (port80) -> nginx (port81) -> website

    We will also be installing APC which is a op-code cache that drastically improves PHP performance. This is neccessary as it really does speed up your website.

    We will then be installing Memcached which is a Key-value data cache which allows many PHP CMS's/CMF's to cache it's commonly accessed data to lower database load - meaning that your Wordpress/Drupal/Joomla site will now FLY. This is one of the biggest improvements you can do to your site if your site is database-driven.

    -Step 1: SSH
    After your server is provisioned with your hosting company, you should be given an IP Address, and a username and password to connect to this server. Usually the username is root, however this could also be a normal user account.

    First, you will need to download a program called PuTTY to connect to your server, which you can find at http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html.
    Now, run this and the following window should appear:
    You will need to type in the IP Address given to you by your provider, and then press enter.
    A window will then appear, which you will need to type in your username and password. Please note that the password will not show anything as a security feature.
    Now, you should see the following window. As you can see, my server is running Ubuntu 10.04. You can see that it's named testing. If your server is not 10.04 LTS or newer (10.10 or 11.04), I highly recommend asking your host to upgrade.

    Step 2: Updating and upgrading the base system.
    Now, it's a good idea to update and upgrade our system to the latest version before we do anything. So, type in the following:
    apt-get update

    At the end, it should say:
    Fetched 12.2MB in 7s (1708kB/s)
    Reading package lists... Done
    Now we should upgrade our packages. This can be done by typing:
    apt-get upgrade

    And then typing y when it asks us if we would like to upgrade our system.

    Now, I usually reboot at this stage as this is generally the last reboot I make for many months. This can be done by typing "reboot".

    Wait another minute and reconnect to your server as you did before.

    Step 3: Installing everything.
    I have a fork of a script created by VladGH, which installs everything you need to get running. My script also installs Varnish (a caching server), which is highly recommended if you are going to be hosting a large number of static sites. This installs Varnish + NGINX + mY
    You can simply run it by doing the following:
    sudo agt-get install git-core screen

    Then typing:
    mkdir ~/setup-files
    git clone https://github.com/seoexpress/lemp-setup.git ~/setup-files
    cd ~/setup-files
    sudo chmod 777 install.sh
    sudo ./install.sh

    Now leave it for a bit and it will do it's own thing. This may take anywhere from 5-10 minutes to a few hours depending on your server specifications. Usually this takes me ~30 minutes with a 512MB Virtual Machine - but your mileage may vary.

    After this has been completed, you will need to setup the bare minimum.

    By default, nginx is facing the world. I suggest setting up all your sites then changing the ports so that nginx runs through Varnish and starts caching everything - otherwise you may have caching issues when testing your websites!

    So now if you access http://yourhostip you should be able to see the PHP info page - this tells you that:
    1) NGINX was installed.
    2) PHP was installed.
    3) You can check for APC/Memcached/MySQL as well.

    Step 4: Website Configuration


    Now let's say that you have 3 websites:
    - example.com
    - subdomain.example.com
    - third.example.com

    This can be either subdomains or "main domains", so you can also have foobar.com or example.org as well. You can have as many websites as you like.

    Now you need to change directory to the nginx configuration folder, this can be done via:
    cd /etc/nginx/sites-enabled

    Now you need to either:
    a) Delete the default.
    b) Create a new folder.

    There is more configuration files out there for nginx than you can shake a stick at - I suggest using the following if you are going to be using WP+permalinks (or any site really):

    server
    {
    listen 80;
    server_name example.com;
    server_tokens off;
    root /var/www/example;
    index index.php;
    access_log /var/log/nginx/example.access.log;
    error_log /var/log/nginx/example.error.log;
    if (-f $request_filename) {
    break;
    }

    # all other requests go to WordPress
    if (!-e $request_filename) {
    rewrite . /index.php last;
    }
    if (!-e $request_filename) {
    rewrite ^.*$ /index.php last;
    }

    location /
    {
    try_files $uri $uri/ index.php;
    }
    location ~ \.php$ {
    try_files $uri $uri/ index.php;

    include /etc/nginx/fastcgi.conf;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    }

    location = /favicon.ico
    {
    log_not_found off;
    access_log off;
    }
    location ~ \..*/.*\.php$
    {
    return 403;
    }
    location ~* \.(js|css|png|jpg|jpeg|gif|ico)$
    {
    expires max;
    log_not_found off;
    }
    }
     
    • Thanks Thanks x 2
  9. Black.Star

    Black.Star Junior Member

    Joined:
    Oct 4, 2011
    Messages:
    185
    Likes Received:
    1,028
    Occupation:
    IT security specialist
    Location:
    Europe
    Nothing new for me but maybe you should think about creating your own thread for that. Amazing detailed tutorial. Rep and thanks even if I don´t need it, it will help alot of people!

    Thank you in the name of every newb :)
     
  10. Xyz01

    Xyz01 Regular Member Premium Member

    Joined:
    Aug 8, 2011
    Messages:
    300
    Likes Received:
    126
  11. Mutikasa

    Mutikasa Power Member

    Joined:
    May 23, 2011
    Messages:
    575
    Likes Received:
    212
    Well, I will have website and also, i will be downloading and uploading so i'll need some kind of script or be able to install jdownloader or something.
    Also, i want to make simple youtube videos and upload them directly from server.
    I guess I'll need GUI and remote access for that.

    One thing that I don't understand is:
    how do u connect to control panel?
    I'm not sure if ISPmanager lite is installed or not. how to check that?

    Does Kloxo run on Debian? it says only CentOS supported