buy tb500

How to Install LiteSpeed on a WHM / cPanel Server

How to Install LiteSpeed on a WHM/cPanel Server

– Go buy a license from LiteSpeed and note down the license key. (They also do a free 14 day trial).

– Login to SSH as ‘root’ on the server running cPanel.

– Copy/paste the following command and hit enter:

cd /usr/src; wget http://www.litespeedtech.com/packages/cpanel/lsws_whm_plugin_install.sh; chmod 700 lsws_whm_plugin_install.sh; ./lsws_whm_plugin_install.sh; rm -f lsws_whm_plugin_install.sh

– Login to WHM and click the ‘LiteSpeed Web Server’ button.

– Click ‘Install LiteSpeed’ and let it run through the installation procedure, this is completely automated.

– Enter your license information & assign an administrator password (Don’t tick the box to start LiteSpeed immediately!)

– Click ‘Build matching PHP Binary’ – this will take 10-20mins (Apache will stay running)

– Click ‘Switch to LiteSpeed’

– Click ‘Admin Web Console’ and login with the details you setup in step 5.

Final stages of setup (Most of which is in LiteSpeed admin)

– Configuration > General > Index Files > Edit

Set the following:

Index Files: index.html, index.php, index.php5, index.htm

Auto Index: Yes

Auto Index URI => /_autoindex/default.php

Hit ‘Save’

In SSH Type:

ln -sf /usr/local/lib/php/autoindex /usr/local/lsws/share/autoindex

Now back to LiteSpeed Admin:

– Configuration > Log > Server Log > Edit

Set the following:

Log Level: Info

Debug Level: None

Hit ‘Save’

Now click ‘Actions > Graceful Restart’ to make these changes permanent.

Optional LiteSpeed Installation Procedures

Want your users to be able to have their own PHP.INI file?

In LiteSpeed Admin:

– Configuration > External App – then hit ‘Edit’ next to ‘LSAPI App / lsphp5 / uds://tmp/lshttpd/lsphp5.sock’ if you’re running PHP5 (or the one for lsphp4 if running PHP4)

In ‘Environment’ add the following line:

PHPRC=$VH_ROOT/

Then hit ‘Save’

Now click ‘Actions > Graceful Restart’ to make these changes permanent.

This will allow them to have their very own php.ini in the root folder of their hosting account which overrides the /usr/local/lib/php.ini file, this is a security risk though so be careful.

Want your users to be able to use Frontpage Extensions?

Run this command from SSH:

sed -rie ‘s/(safe_)?chmod\(( )?0600,( )?(“\$\{myuid\}”,)?( )?”\$(\{)?homedir(\})?\/public_html\$\{subweb\}\/_vti_pvt\/service.pwd”( )?\);/\1chmod(\20644,\3\4\5?$\6homedir\7\/public_html${subweb}\/_vti_pvt\/service.pwd”\8);/’ /scripts/fp-auth /usr/local/frontpage/version5.0/apache-fp/fp-auth /usr/local/cpanel/bin/convertfppassthrough /scripts/fixfrontpageperm

Then run this command from SSH:

/scripts/fixfrontpageperm

Forgot your LiteSpeed admin pass?

Run this within SSH to reset your LiteSpeed Admin Pass: /usr/local/lsws/admin/misc/admpass.sh

References

http://www.evohosting.co.uk/blog/web-development/how-to-install-litespeed-on-a-whm-cpanel-server/

Leave a Reply