Install LiteSpeed Web Server on Centos

Posted: 0p in Linux
Tags:

LiteSpeed Web Server

LiteSpeed Web Server is the leading high-performance, high-scalability web server. It is completely Apache interchangeable so LiteSpeed Web Server can quickly replace a major bottleneck in your existing web delivery platform. With its comprehensive range of features and easy-to-use web administration console, LiteSpeed Web Server can help you conquer the challenges of deploying an effective web serving architecture.

LiteSpeed Web Server has superior performance in terms of both raw speed and scalability. Our benchmarks demonstrate that it is more than 6 times faster than Apache. When serving static content, LiteSpeed surpasses well-respected content accelerators including thttpd, boa and TUX. When it comes to dynamic content, LiteSpeed is more than 50% faster in PHP content delivery than Apache with mod_php. Don’t just take our word for it. Download the LiteSpeed free or trial version and experience it for yourself.

Install atomic repository, it will install latest package.
[# wget -q -O – http://www.atomicorp.com/installers/atomic | sh

yum –y install libxml2-devel openssl-devel bzip2-devel curl-devel db4-devel libjpeg-devel libpng-devel libXpm-devel freetype freetype-devel gmp-devel libc-client-devel openldap-devel libmcrypt-devel libmhash-devel freetds-devel libz-devel mysql-devel ncurses-devel pcre-devel unixODBC-devel postgresql-devel sqlite-devel aspell-devel readline-devel recode-devel net-snmp-devel libtidy-devel libxslt-devel t1lib-devel

yum -y remove httpd php mysql

Install the latest version modules using “yum” / otherwise you can install it from source.

cd /usr/src/
wget ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-1.4.11.tar.gz
tar -zxvf gnupg-1.4.11.tar.gz
cd gnupg-1.4.11
./configure
make
make install
cd..

wget http://ftp.gnu.org/gnu/libidn/libidn-1.9.tar.gz
tar -zxvf libidn-1.9.tar.gz
cd libidn-1.9
./configure
make
make install
ln -s /usr/local/lib/libidn* /usr/lib
cd..

wget http://curl.haxx.se/download/curl-7.21.4.tar.gz
tar -zxvf curl-7.21.4.tar.gz
cd curl-7.21.4
[# ./configure –with-openssl –with-libidn –enable-ipv6
make
make install
ln -s /usr/local/lib/libcurl* /usr/lib
cd..

wget ftp://xmlsoft.org/libxml2/libxml2-2.7.8.tar.gz
tar -zxvf libxml2-2.7.8.tar.gz
cd libxml2-2.7.8
./configure
make
make install
rm -rf /usr/lib/libxml2*
ln -s /usr/local/lib/libxml2* /usr/lib
cd..

wget ftp://xmlsoft.org/libxml2/libxslt-1.1.26.tar.gz
tar -zxvf libxslt-1.1.26.tar.gz
cd libxslt-1.1.26
./configure
make
make install
rm -rf /usr/lib/libxslt* /usr/lib/libexslt*
ln -s /usr/local/lib/libxslt* /usr/lib
ln -s /usr/local/lib/libexslt* /usr/lib
cd..

Install MySQL

yum install mysql
yum install mysql-server
yum install mysql-client
yum install mysql-embedded
yum install mysql-shared
yum install mysql-libs

MySQL configuration

There are 5 default MySQL configuration:

my-small.cnf
choose one of those configurations depending on your needs, move to “/etc/” directory and rename it to “my.cnf”.

cp /usr/share/mysql/my-small.cnf /etc/my.cnf

vim /etc/my.cnf
add the following lines to “[mysqld]” section

default-storage-engine=MyISAM
skip-innodb

Now start MySQL, create system tables.

/etc/init.d/mysqld start
/usr/bin/mysql_install_db
mysql_secure_installation
/etc/init.d/mysqld stop
chkconfig –add mysqld
chkconfig mysqld on

Install LiteSpeed

wget http://www.litespeedtech.com/packages/4.0/lsws-4.0.20-std-i386-linux.tar.gz
tar -zxvf lsws-4.0.20-std-i386-linux.tar.gz
cd lsws-4.0.20
chmod +x install.sh
./install.sh

Do you agree with above license: Yes
Destination: /usr/local/lsws (my preferred LiteSpeed directory)
Username: your preferred username for administration panel
Password: your preferred password for administration panel
Email addresses: your email address
User: nobody
Group: nobody
HTTP port: 80
Admin HTTP port: choose any port above 2000
Setup PHP: Y
Suffix for PHP script: php
Install AWStats Add-on modul: N
LiteSpeed restart automatically when server restarts: Y
Would you like to start it now: Y

Compiling PHP 5.3.5 with required modules

Login to your LiteSpeed administration panel
– Open: http://yourip:youradminport
– Go to Action – Compile PHP, select PHP 5.3.5 and push next button
Extra PATH environment: Leave this empty
Install Path Prefix: /usr/local/lsws/lsphp5
Configure Parameters:

[# –prefix=/lsphp5 –with-litespeed –enable-cli –with-mcrypt –enable-mbstring –with-openssl –with-mysql=/usr/bin –with-mysqli –with-mysql-sock=/var/lib/mysql/mysql.sock –with-pdo-mysql –with-gd –with-zlib –with-sqlite –enable-pdo –with-libdir=lib –with-xpm-dir=/usr/lib –with-freetype-dir=/usr/include/freetype2 –with-ttf=/usr/include/freetype2 –libdir=/usr/lib –enable-gd-native-ttf –enable-fileinfo –with-bz2 –with-curl –with-curlwrappers –with-gettext –with-pcre-regex –with-imap –with-imap-ssl=/usr/lib –enable-exif –enable-ftp –enable-magic-quotes –enable-sockets –enable-ucd-snmp-hack –enable-memory-limit –enable-dbx –with-mime-magic –enable-soap –enable-zip –with-mhash –enable-mbregex

Add-on Modules: Check only XCache or eAccelerator for PHP Opcode Cacher module, we will install Suhosin extension later.
– Push build button and wait until configure process has finished or check the status until**PREPARE_DONE**
– After finished, click next button and run the following command from your ssh (root)

/usr/local/lsws/phpbuild/buildphp_manual_run.sh
wait about 5 – 10 minutes until the process finished (it will shown **COMPLETE** status)
– Apply changes and Graceful restart

Check your PHP installation status
# /usr/local/lsws/fcgi-bin/lsphp5 -v
PHP 5.3.5 (litespeed) (built: Dec 8 2012 15:08:51)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

Install IonCube Loader
# wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz
# tar -xvf ioncube_loaders_lin_x86.tar.gz
# mv ioncube/ioncube_loader_lin_5.3.so /usr/lib/extensions/no-debug-non-zts-20090626/

Install Suhosin Extension

# wget http://download.suhosin.org/suhosin-0.9.32.1.tar.gz
# tar -zxvf suhosin-0.9.32.1.tar.gz
# cd suhosin-0.9.32.1
[# /usr/local/lsws/lsphp5/bin/phpize
#./configure –enable-suhosin –with-php-config=/usr/local/lsws/lsphp5/bin/php-config
# make
# make install

Copy php.ini to lib directory
# cp /usr/local/lsws/php/php.ini /usr/lib
declare the installed extensions to php.ini (IonCube, eAccelerator, Suhosin)

vim /usr/lib/php.ini

zend_extension=”/usr/lib/extensions/no-debug-non-zts-20090626/ioncube_loader_lin_5.3.so”
zend_extension=”/usr/lib/extensions/no-debug-non-zts-20090626/xcache.so”
extension=”/usr/lib/extensions/no-debug-non-zts-20090626/suhosin.so”

Restart LiteSpeed
/usr/local/lsws/bin/lswsctrl restart

check PHP 5.3.5 and other modules
# /usr/local/lsws/fcgi-bin/lsphp5 -v
PHP 5.3.5 (litespeed) (built: Dec 8 2012 15:08:51)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with the ionCube PHP Loader v4.2.2, Copyright (c) 2002-2012, by ionCube Ltd., and
with XCache v1.3.1, Copyright (c) 2005-2010, by mOo
with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH

Now let’s create and configure Virtual Host.

Install PureFTPD
# wget http://download.pureftpd.org/pure-ftpd/releases/pure-ftpd-1.0.30.tar.gz
# tar -xvf pure-ftpd-1.0.30.tar.gz
# cd pure-ftpd-1.0.30
# ./configure
# make install-strip
# echo “/usr/local/sbin/pure-ftpd &” >> /etc/rc.d/rc.local

start PureFTPD
/usr/local/sbin/pure-ftpd &

Create domain root directory
useradd domain.com
passwd domain.com
mkdir /home/domain.com/public_html /home/domain.com/cgi-bin /home/domain.com/logs
chown -R domain.com:domain.com /home/domain.com

Configure domain virtual host

– Open: http://yourip:youradminport
– Go to Configuration – Virtual Host Templates, choose PHP_SuEXEC (i prefer phpsuexec)
– Go to General tab and edit Template Settings
Virtual Host Root: /home/$VH_NAME/
Config File: $SERVER_ROOT/conf/$VH_NAME.xml
Max Keep-Alive Requests: leave this empty
Smart Keep-Alive: Yes
Document Root: $VH_ROOT/public_html/
Enable GZIP Compression: Yes
Enable IP GeoLocation: Not Set
Administrator Email: your email
– Save and Graceful Restart
Add domain
– Go to Configuration – Virtual Host Templates, choose PHP_SuEXEC
– Go to Template tab and add Member Virtual Hosts
Virtual Host Name: domain.com
Domain: domain.com
Aliases: domain.com
Virtual Host Root: /home/domain.com/
– Save and Graceful Restart

*you might get the following error:
Input error detected. Please resolve the error(s).
*path /home/domain.com/ is not readable

Solution:
chmod 755 -R /home/domain.com

Now create phpinfo.php
Vim /home/domain/public_html/phpinfo.php
======================================================================>
Reference:
http://www.litespeedtech.com
http://www.litespeedtech.com/support/wiki/doku.php?id=litespeed_wiki:php:lsapi:troubleshoot

Advertisements
Comments
  1. It is not my first time to pay a quick visit this web site, i am visiting
    this web site dailly and take pleasant information from here daily.

  2. You could certainly see your expertise within the work you write. The sector hopes for even more passionate writers such as you who are not afraid to say how they believe. Always go after your heart.

  3. Great items from you, man. I’ve be mindful your stuff prior to and you are just extremely wonderful. I actually like what you have received here, really like what you are saying and the best way by which you are saying it. You make it entertaining and you continue to take care of to stay it smart. I cant wait to learn much more from you. This is really a great website.

  4. click this says:

    Woah great article. The exact thing I needed for this coursework I’m working on. Cheers!

  5. Poorya says:

    It was very useful article.
    But I’m getting an error during the installation of suhosin. after I enter ./configure command. I’m getting the bellow error :

    configure: WARNING: you should use –build, –host, –target
    configure: error: invalid variable name: .with-php-config

    • Admin says:

      Hi Poorya,

      Could you please use ./configure –enable-suhosin –with-php-config=/usr/local/lsws/lsphp5/bin/php-config ( please note use double minus for –enable –with )

      Also check the file /usr/local/lsws/lsphp5/bin/php-config config. Please let me know the issue still persist.

  6. It’s an amazing post in favor of all the internet visitors; they will get benefit from it I am sure.

  7. An interesting discussion is worth comment. There’s no doubt that that you should publish more on this topic, it might not be a taboo subject but typically people don’t speak about such subjects.
    To the next! Many thanks!!

  8. Its like you read my mind! You appear to know so much about this, like you wrote the book in it or
    something. I think that you could do with some pics to
    drive the message home a bit, but other than that, this is wonderful blog.
    A fantastic read. I will certainly be back.

  9. Thanks in favor of sharing such a pleasant idea, post is fastidious,
    thats why i have read it fully

  10. I like it when individuals come together and share views.
    Great site, keep it up!

  11. Hi, I do think this is an excellent site. I stumbledupon it
    😉 I’m going to revisit yet again since I bookmarked it. Money and freedom is the best way to change, may you be rich and continue to guide other people.

  12. Hi, every time i used to check website posts here in the early hours in the morning,
    as i love to find out more and more.

  13. I blog frequently and I genuinely thank you for your content.
    Your article has truly peaked my interest. I will
    bookmark your website and keep checking for new
    details about once per week. I subscribed to
    your RSS feed too.

  14. I couldn’t resist commenting. Very well written!

  15. 3月 2nd says:

    I am not sure where you’re getting your information, but great topic. I needs to spend some time learning more or understanding more. Thanks for excellent info I was looking for this info for my mission.

  16. play casino says:

    Hmm it appears like your site ate my first comment (it was super long) so I guess I’ll just sum it up what I had
    written and say, I’m thoroughly enjoying your blog.

    I too am an aspiring blog blogger but I’m still new to the whole thing.
    Do you have any suggestions for rookie blog writers?
    I’d genuinely appreciate it.

  17. Hallie Audia says:

    I’m impressed, I must say. Essentially

  18. bcHGc6SoQZ says:

    Thorn of Girl

    Excellent details is usually identified on this website weblog.

  19. Robt Patin says:

    Thanks Getty! We will not wait around to acquire begun!

  20. bookmarked!!, I really like your site!

  21. Juanita says:

    It’s very straightforward to find out any matter on web as compared to textbooks, as I found this article at this site.

  22. Gabrielle says:

    Can I just say what a relief to find someone who genuinely knows
    what they are talking about over the internet. You certainly realize
    how to bring a problem to light and make it important. More and more people must look at this and understand this side of the story.
    I was surprised you’re not more popular since you certainly have the gift.

  23. This is my first time go to see at here and i am truly impressed to read all at single place.

  24. It’s really a cool and useful piece of info. I am happy that you simply shared this
    helpful information with us. Please stay us up to date like this.

    Thanks for sharing.

  25. Wonderful work! This is the type of information that
    are supposed to be shared across the internet. Shame on the search engines for now not positioning this put up
    upper! Come on over and consult with my site .
    Thanks =)

  26. Hi there, You have done a great job. I will definitely digg it and personally suggest to my friends.
    I’m confident they will be benefited from this website.

  27. We are a gaggle of volunteers and opening a brand new scheme in our community.
    Your site offered us with helpful info to
    work on. You’ve performed an impressive process and our entire community will probably be grateful to you.

  28. Hello there, I found your website by the use of Google at the same time
    as searching for a similar subject, your website got here
    up, it seems to be good. I’ve bookmarked it in my google
    bookmarks.
    Hi there, simply changed into alert to your
    weblog via Google, and found that it is truly informative.
    I am gonna be careful for brussels. I’ll appreciate if you proceed this in future.
    A lot of folks shall be benefited out of your writing.
    Cheers!

  29. What’s Happening i am new to this, I stumbled upon this
    I’ve found It positively useful and it has aided me out loads.

    I am hoping to give a contribution & assist other customers like its helped me.
    Great job.

  30. I’m more than happy to uncover this site. I need to to thank you for your time for
    this fantastic read!! I definitely appreciated every bit of it
    and i also have you saved to fav to check out new information on your site.

  31. fantastic submit, very informative. I’m wondering why the other specialists
    of this sector don’t notice this. You must continue your writing.
    I’m confident, you have a great readers’ base already!

  32. กรดTCA says:

    Hi there, just became aware of your blog through Google, and found that it is
    truly informative. I am going to watch out for
    brussels. I will be grateful if you continue this in future.
    Many people will be benefited from your writing.
    Cheers!

  33. It’s harɗd to find expеrienced people on this subject, but you sound like уou know what you’re talking
    about! Thanks

  34. What’s up, yeah this paragraph is actually pleasant and I have learned lot
    of things from it on the topic of blogging. thanks.

  35. portal says:

    It’s remarkable to pay a quick visit this website and reading the views of all colleagues about this article, while I
    am also eager of getting knowledge.

  36. This post gives clear idea for the new viewers of blogging, that really how to
    do blogging.

  37. Hello there, I discovered your website by means of Google whilst looking for a similar matter, your site got here up, it looks great.

    I have bookmarked it in my google bookmarks.
    Hello there, just turned into alert to your weblog thru Google,
    and located that it is truly informative. I’m gonna watch out for brussels.
    I’ll be grateful when you proceed this in future.
    Many other people might be benefited out of your writing.

    Cheers!

  38. Florence says:

    I appreciate, lead to I found just what I was taking a look for.
    You have ended my four day long hunt! God Bless you
    man. Have a great day. Bye

  39. Magnificent items from you, man. I’ve take note your stuff prior to and you’re simply too excellent.
    I really like what you have received here, certainly like what you are saying
    and the way wherein you say it. You are making it enjoyable
    and you continue to care for to stay it sensible.

    I can not wait to learn much more from you. This is actually
    a terrific site.

  40. Excellent blog here! Also your website loads up fast! What host are you using?
    Can I get your affiliate link to your host? I wish my
    site loaded up as quickly as yours lol

  41. I am actually grateful to the owner of this site
    who has shared this great post at here.

  42. Hello, every time i used to check web site posts here early in the morning, as
    i enjoy to gain knowledge of more and more.

  43. I’ve learn several excellent stuff here. Definitely price bookmarking
    for revisiting. I surprise how a lot effort you place to create the sort of fantastic informative site.

  44. Simply want to say your article is as astonishing. The clarity in your post is
    simply spectacular and i could assume you are an expert
    on this subject. Fine with your permission let me to grab your RSS feed
    to keep up to date with forthcoming post. Thanks a million and please continue the
    rewarding work.

  45. adsense help says:

    Ӏt’s гemаrkable in favοr of mme tо have a site, which is valuable in favօr of
    my knowledɡe.thanks aɗmin

  46. tinyurl.com says:

    Great weblog here! Additionally your web site quite a bit up very
    fast! What host are you the use of? Can I get your affiliate link to your host?
    I desire my site loaded up as fast as yours lol

  47. My family all thee time say that I am killing my time here at net, except I
    know I am getting know-how all the time byy reading such
    good articles.

  48. Renjith Raju says:

    Thank you all for encouraging me. I will definitely come up with new stuffs.

  49. I could not refrain from commenting. Exceptionally well written!

  50. My family every time say that I am wasting my time
    here at web, but I know I am getting familiarity daily by reading such pleasant articles or reviews.

  51. Right away I am going away to do my breakfast, later than having my breakfast coming again to
    read other news.

  52. An outstanding share! I’ve just forwarded this onto a friend who has been conducting a little homework on this.

    And he in fact ordered me breakfast simply because I found it
    for him… lol. So allow me to reword this…. Thanks for the meal!!

    But yeah, thanks for spending time to discuss
    this topic here on your web page.

  53. Asking questions are actually nice thing if you are not understanding something
    totally, but this article presents pleasant understanding even.

  54. Valuable info. Fortunate me I found your site accidentally, and
    I’m shocked why this coincidence didn’t came about earlier!

    I bookmarked it.

  55. los sims says:

    Hey There. I found your blog using msn. This
    is a really well written article. I will be sure to bookmark it and return to read more of your useful
    info. Thanks for the post. I will definitely return.

  56. Good web site you have here.. It’s difficult to find
    quality writing like yours nowadays. I truly appreciate individuals
    like you! Take care!!

  57. continuously i used to read smaller posts that as well
    clear their motive, and that is also happening with this post which I
    am reading here.

  58. Howdy! I could have sworn I’ve visited this blog before but after looking at a few of the posts I realized it’s new to me.
    Anyways, I’m definitely pleased I stumbled upon it and I’ll be book-marking it and checking
    back regularly!

  59. You can certainly see your expertise in the article you write.
    The arena hopes for even more passionate writers like you
    who are not afraid to mention how they believe. At all times follow your heart.

  60. That is a very good tip particularly to those new to the blogosphere. Brief but very precise info¡­ Thanks for sharing this one. A must read post!

  61. Thanks on your marvelous posting! I truly enjoyed reading
    it, you are a great author.I will be sure to bookmark your blog and will eventually come back in the future.
    I want to encourage one to continue your great writing, have a nice weekend!

  62. Heya i am for the first time here. I came across this
    board and I find It truly useful & it helped me out a lot.
    I am hoping to present something again and help others
    like you helped me.

  63. Hello i am kavin, its my first occasion to commenting anywhere, when i
    read this paragraph i thought i could also make comment
    due to this good post.

  64. Ahaa, its good conversation concerning this piece of
    writing here at this weblog, I have read all that, so now me
    also commenting here.

  65. visit site says:

    I blog often and I genuinely thank you for your information. The article has truly peaked my interest.

    I will take a note of your blog and keep checking for new information about once a week.
    I subscribed to your Feed too. visit site

  66. Darby says:

    You are so cool! I do not think I have read something like that before.
    So good to discover someone with some genuine thoughts on this subject matter.
    Really.. thank you for starting this up. This website is one thing that’s needed on the internet, someone
    with a bit of originality!

  67. home designs says:

    Excellent site you have got here.. It’s difficult to
    find high quality writing like yours nowadays. I really appreciate individuals like you!
    Take care!!

  68. I think the admin of this web page is in fact working hard for his site, because here every material is quality based
    information.

  69. I have been browsing online more than 2 hours today, yet
    I never found any interesting article like yours. It is pretty
    worth enough for me. Personally, if all web owners and bloggers made good content as you did, the internet will be much more useful than ever before.

  70. I blog quite often and I seriously thank you for
    your information. Your article has really peaked my interest.
    I’m going to bookmark your blog and keep checking
    for new information about once a week. I subscribed to your Feed
    as well.

  71. Greetings from Carolina! I’m bored to death at work so I decided to browse your blog on my iphone during lunch break.

    I love the information you present here and can’t wait to take a look when I get home.
    I’m surprised at how fast your blog loaded on my phone ..
    I’m not even using WIFI, just 3G .. Anyhow, fantastic
    site!

  72. Beverly says:

    I am truly happy to read this webpage posts which contains lots of valuable facts,
    thanks for providing these information.

  73. Wow, wonderful weblog structure! How lengthy have
    you been running a blog for? you made running a blog look easy.

    The toltal gglance oof your website is great, as smartly
    as the content material!

  74. Tom says:

    Very good post! We are linking to this particularly great content on our site.
    Keep up the great writing.

  75. Hi, yup this piece of writing is in fact nice and I have learned lot of things from it regarding blogging.
    thanks.

  76. If some one needs expert view about runnin a blog after that i recommend him/her to
    pay a quick visit this weblog, Keepp up the pleasant work.

  77. Hurrah! In the end I got a webpage from where I be capable of
    in fact take valuable information concerning my study and knowledge.

  78. Fine way of telling, and nice article to obtain information concerning my presentation subject, which i
    am going to deliver in college.

  79. This site was… how do you say it? Relevant!! Finally I’ve found
    something that helped me. Kudos!

  80. Useful info. Fortunate me I found your site unintentionally, and I’m stunned why this twist
    of fate didn’t took place earlier! I bookmarked it.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s