{"id":6654,"date":"2022-03-13T02:41:57","date_gmt":"2022-03-12T21:11:57","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=6654"},"modified":"2022-05-09T23:24:26","modified_gmt":"2022-05-09T17:54:26","slug":"how-to-install-openlitespeed-on-ubuntu-18-04-20-04-server","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/how-to-install-openlitespeed-on-ubuntu-18-04-20-04-server\/","title":{"rendered":"How to install OpenLiteSpeed on Ubuntu 18.04 \/ 20.04\u00a0 Server"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Login to the Ubuntu server &amp; follow the below steps&nbsp; to install openlitespeed&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Step 1:Add OpenLiteSpeed Repository to Ubuntu<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">$ wget -O &#8211; http:\/\/rpms.litespeedtech.com\/debian\/enable_lst_debian_repo.sh | sudo bash<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Step 2: Update the server before installing a new package<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">$ sudo apt update<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Step 3: Install openlitespeed&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">$ sudo apt install openlitespeed<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Step 4: Install PHP on Ubuntu&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The commonly used PHP version in openlitespeed is 7.4.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">$ sudo apt-get install lsphp74<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Step 5: Install soft link to&nbsp; direct OpenLiteSpeed to use the installed PHP.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">$ sudo ln -sf \/usr\/local\/lsws\/lsphp74\/bin\/lsphp \/usr\/local\/lsws\/fcgi-bin\/lsphp5<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Step 6: Start the server&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">$ sudo \/usr\/local\/lsws\/bin\/lswsctrl start<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The output should be&nbsp; \u201cOK\u201d as mentioned below.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Output:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">[OK] Send SIGUSR1 to 94667<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Step 7: Set the Administrative username &amp; Password<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">$ sudo \/usr\/local\/lsws\/admin\/misc\/admpass.sh<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Step 8: Access OpenLiteSpeed Web Admin onUbuntu with the default port 7080 on browser&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use the URL as mentioned <a href=\"http:\/\/your-server-ip:7080\"><em>http:\/\/your-server-ip:7080<\/em><\/a><em> &amp; <\/em>provide the username &amp; password as per&nbsp; in step 7<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Step 9: Create a new Test Virtual Host on OpenLiteSpeed<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">From the interface, click on the \u201c<em>Virtual Hosts<\/em>\u201d tab and click on + symbol then fill the details accordingly and click on the save icon.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Step 10: Check openlitespeed virtual host on browser<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By default, the OpenLiteSpeed virtual host accepts connections on port 8088. Check the browser with the below URL<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp;&nbsp;<a href=\"http:\/\/your-server-ip:7080\"><em>http:\/\/your-server-ip:8088<\/em><\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Step 11: Create sample PHP file on Ubuntu&nbsp; to check functionality of web server<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Create&nbsp; a new file with the favorite text editor in &nbsp; \/usr\/local\/lsws\/Example\/html&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">$ sudo vim \/usr\/local\/lsws\/Example\/html\/test.php<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Copy &amp; paste the following content then save &amp;&nbsp; exit the file<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&lt;html&gt;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&lt;head&gt;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&lt;?php<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">echo &#8216;&lt;title&gt;Sample PHP Script&lt;\/title&gt;&#8217;;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">?&gt;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&lt;\/head&gt;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&lt;body&gt;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;?php<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo &#8216;&lt;p&gt;This is to confirm that our PHP is working&lt;\/p&gt;&#8217;;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;?&gt;&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;h1&gt;OpenLiteSpeed&lt;\/h1&gt;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;p&gt;OpenLiteSpeed is a high-performance, lightweight, open source HTTP<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;server edition of LiteSpeed Web Server Enterprise&lt;\/p&gt;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&lt;\/body&gt;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&lt;\/html&gt;&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Step 12: Check the functionality of openlitespeed on browser with the below URL<br><a href=\"http:\/\/your-server-ip:8088\/test.php\">http:\/\/your-server-ip:8088\/test.php<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Step 13: Change the Virtual Host Listening Port from 8088 to 80<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">From the openlitespeed interface,Click on Listeners  &gt;&gt; View . On that&nbsp; page, click on the edit icon to alter with the defaults then save the configuration by clicking the save icon.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Step 14: Restart the openlitespeed web server by clicking on the grace restart icon on the interface<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Login to the Ubuntu server &amp; follow the below steps&nbsp; to install openlitespeed&nbsp; Step 1:Add OpenLiteSpeed Repository to Ubuntu $ [&hellip;]<\/p>\n","protected":false},"author":495,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1022],"tags":[949],"class_list":["post-6654","post","type-post","status-publish","format-standard","hentry","category-web-architecture","tag-openlitespeed","psol-cat-web-architecture"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-1Jk","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/6654","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/495"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=6654"}],"version-history":[{"count":0,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/6654\/revisions"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=6654"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=6654"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=6654"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}