Setup unmanaged VPS with Litespeed Php and mySQL

Setup unmanaged VPS with Litespeed Php and mySQL

Here’s how to quickly install and setup litespeed webserver on unmanaged VPS (centOS) without cpanel. This include how to setup virtual host in litespeed and create user account to access it from ftp client. Shortly, after these step complete, you can use your VPS to host multiple domains

First, login to your server with root user

1st Step : install mysql

# yum install mysql-server mysql mysql-devel

# service mysqld start

# /usr/bin/mysql_secure_installation

answer “Y” when asked to remove anonymous user

answer “n” when asked to disallow remote login

answer “Y” when asked to remove test database

answer “Y” when asked to reload priveleged tables now

2nd Step : install litespeed web server

Download litespeed tar file and install it :

# cd /opt

# wget http://www.litespeedtech.com/packages/4.0/lsws-4.0.10-std-i386-linux.tar.gz

# tar xvf lsws-4.0.10-std-i386-linux.tar.gz

# cd lsws-4.0.10

# chmod +x install.sh

# ./install.sh

Then follow instruction on screen. When you’re asked to enter new password, remember it use keyboard stroke, you wouldn’t see the character you type.

NOTICE : enter port 80 as HTTP PORT, not 8080. and better choose other port than 7080 as Admin HTTP PORT for security purpose. Enter any port over 1024. and don’t use any regular port like 2802, 2806, 8080, 1000 etc. I choose port 8090 as example

install_litespeed

Continue installing …….. If nothing wrong, litespeed will installed and running in the next minutes, test it by enter your server IP in browser

install_litespeed_succes

now you can login to litespeed admin panel at http://yourserverIPaddress:8090 using username and password you entered on setup process

litespeed admin panel

3rd Step : Compiling PHP

install dependencies that (maybe) needed first

# yum install curl* gcc* gd* autoconf patch libxml2 libxml2-devel libxslt libxslt-dev libpng-devel

Now on litespeed admin panel go to Action – Compile PHP

Select a PHP version : PHP5.2.10

php5.2.10

Click on Suhosin patch and eAccelerator to give more security and performance

configure php

Enter this configure Configure Parameters :

–with-mysqli –with-mysql=/usr/include/mysql –with-mysql-sock=/var/lib/mysql/mysql.sock –with-zlib –with-gd –enable-shmop –enable-track-vars –enable-libxml –with-libxml-dir=/usr/xml2 –with-libxml-dir=/opt/xml2/ –enable-sockets –enable-sysvsem –enable-sysvshm –enable-magic-quotes –enable-mbstring –with-iconv –enable-ftp –with-curl=/usr/bin/curl –with-curlwrappers –with-jpeg-dir=/usr/lib/ –with-png-dir=/usr/lib

This’s standard parameters, enough to host a website. Hit Build PHP 5.2.10 and follow instruction in the screen. if no error ocured, php compiling will complete in approximately 10 minutes. If error occured, use error reporting to fix it, but in my experience, because this’s standard configuration, error rarely ocured.

after PHP compiling is done, do a Graceful restart – Actions – Graceful Restart and see your PHP version now by entering http://yourserverIPaddress/phpinfo.php on web browser

You webserver with mySQL PHP and Litespeed is running.

Now countinue to create ftp server, add virtual host ( adding multiple domains ) and create user in each virtual host that created.

6 Comments »

  1. avatar comment-top

    Nicetutz dudt.. i luv u…. nungging pliss…

    would you like to see my page..  

    comment-bottom
  2. avatar comment-top

    hi there.
    thanks for writing informative articles.

    looking forward to read more info regarding VPS administration.

    hopefully u can write step by step (but complete) guides.

    gonna give a try someday :)   

    comment-bottom
  3. avatar comment-top

    gak ada bahasa jawa nih om??bad linggis:(  

    comment-bottom
  4. avatar comment-top

    Thank you so much for such a detail article i was searching for this article but did not find on the litespeed website. thank you once again.  

    comment-bottom
  5. avatar comment-top

    Sekarang gantian gw yang mumet.. konak ke VPS gw susahnya minta ampun, udah gitu install LiteSpeed ga beres2.. arrrrgh!  

    comment-bottom
  6. avatar comment-top

    om pusing :(

    masa error d compile php nya mulu .. pdhl dah yum install libxml , dll ..tapi pas mau d compile, selalu error –enable-libxml , dll :(

    akhirnya pk default aja d, cm d tambah curl .. hehehe …  

    comment-bottom

RSS feed for comments on this post. TrackBack URL

Leave a comment