{"id":6991,"date":"2018-10-09T14:10:24","date_gmt":"2018-10-09T11:10:24","guid":{"rendered":"https:\/\/www.howtoforge.com\/tutorial\/how-to-install-and-configure-openlitespeed-server-on-ubuntu-1804-along-with-mariadb\/"},"modified":"2018-10-09T14:10:24","modified_gmt":"2018-10-09T11:10:24","slug":"how-to-install-and-configure-openlitespeed-server-on-ubuntu-18-04-along-with-mariadb","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/how-to-install-and-configure-openlitespeed-server-on-ubuntu-18-04-along-with-mariadb\/","title":{"rendered":"How to Install and Configure OpenLiteSpeed Server on Ubuntu 18.04 along with MariaDB"},"content":{"rendered":"<p>OpenLiteSpeed is a lightweight and open source version of the popular LiteSpeed Server. It comes with its WebGUI based Administration panel which makes it different from other web servers as you can configure pretty much everything from the panel itself.\u00a0<\/p>\n<p>In this tutorial, we will learn about how to Install OpenLiteSpeed Server on Ubuntu 18.04 along with PHP 7.2 and MariaDB server.<\/p>\n<h2 id=\"prerequisite\">Prerequisite<\/h2>\n<ul>\n<li>Ubuntu 18.04 based Server<\/li>\n<li>User Account with Root Privileges<\/li>\n<\/ul>\n<h2 id=\"step-install-openlitespeed\">Step 1 &#8211; Install OpenLiteSpeed<\/h2>\n<h3 id=\"switch-to-sudo-user\">Switch to Sudo User<\/h3>\n<p>Run the following command to switch to sudo user so that we can run our first command to add and update the OpenLiteSpeed repository.<\/p>\n<p class=\"command\">sudo\u00a0-i<\/p>\n<p>The following command will add the necessary repository for Install OpenLiteSpeed server.<\/p>\n<p class=\"command\">wget -O &#8211; http:\/\/rpms.litespeedtech.com\/debian\/enable_lst_debain_repo.sh | bash<\/p>\n<p>Type <em>&#8216;exit&#8217;<\/em> to switch back to the normal user.<\/p>\n<p>This command will download and run the bash script to add and update the OpenLiteSpeed repository. Run the following command to install the latest version of the server.<\/p>\n<p class=\"command\">sudo apt install openlitespeed<\/p>\n<p>To check whether the server has been successfully installed, open your browser and visit `http:\/\/yourdomainname:8088` If the installation was successful, you should see the following webpage.<\/p>\n<p><a class=\"fancybox\" id=\"img-Screenshot_from_2018-10-08_02-01-25\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_openlitespeed_server_on_ubuntu_1804_along_with_mariadb\/big\/Screenshot_from_2018-10-08_02-01-25.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/10\/how-to-install-and-configure-openlitespeed-server-on-ubuntu-18-04-along-with-mariadb.png\" alt=\"OpenLitespeed server successfully installed\" width=\"550\" height=\"321\" title=\"\"><\/a><\/p>\n<p><strong>Note:<\/strong> OpenLiteSpeed server runs by default on port 8088 which can be later changed in the settings panel.<\/p>\n<p>The default installation of OpenLiteSpeed comes with PHP 5.6.x version included. But we don&#8217;t want that. We will install our own copy of PHP 7.2 later on in this tutorial. So our next step would be to install PHP 7.2.<\/p>\n<h2 id=\"step-install-php\">Step 2 &#8211; Install PHP<\/h2>\n<p>To install PHP, we need to install a package called lsphp\u00a0which is basically PHP compiled to work with the OpenLiteSpeed Server.\u00a0Run the following command to install PHP and several of its modules.<\/p>\n<p class=\"command\">sudo apt install lsphp72 lsphp72-curl lsphp72-imap lsphp72-mysql lsphp72-intl lsphp72-pgsql lsphp72-sqlite3 lsphp72-tidy lsphp72-snmp<\/p>\n<p>There are few more PHP packages available. Should you want, you can list all the available PHP packages by using the following command<\/p>\n<p class=\"command\">apt-cache search lsphp72<\/p>\n<p>You can pick and select the ones you want to install.<\/p>\n<h2 id=\"step-install-mariadb-server\">Step 3 &#8211; Install MariaDB Server<\/h2>\n<p>MariaDB is a drop-in replacement for MySQL which means commands to run and operate MariaDB are same as those for MySQL. To install MariaDB issue the following command<\/p>\n<p class=\"command\">sudo apt install mariadb-server<\/p>\n<p>Run the following command to perform default configuration such as giving a root password, removing anonymous users, disallowing root login remotely and dropping test tables. Press yes for everything and choose a strong root password.<\/p>\n<p class=\"command\">sudo mysql_secure_installation<\/p>\n<p>There is a caveat with setting up the root password. MariaDB by default allows system root users to log in to MariaDB without a password. But if you are going to use a 3rd party application to access via root, a password is a must otherwise apps such as PHPMyAdmin will fail. For this, you need to disable the plugin based authentication which is the default option on MariaDB.<\/p>\n<p>To disable plugin authentication, enter the MySQL prompt first by using the following command<\/p>\n<p class=\"command\">sudo mysql -u root<\/p>\n<p>Now enter the following commands to disable the plugin authentication.<\/p>\n<p class=\"command\">use mysql;<br \/>update user set plugin=&#8221; where User=&#8217;root&#8217;;<br \/>flush privileges;<br \/>exit<\/p>\n<p>After this restart your MariaDB service.<\/p>\n<p class=\"command\">sudo systemctl restart mariadb.service<\/p>\n<p>That&#8217;s it. Next time you want to login to MySQL, use the following command<\/p>\n<p class=\"command\">sudo mysql -u root -p<\/p>\n<p>And you will be asked for your root password which you had set initially.<\/p>\n<h2 id=\"step-configure-openlitespeed\">Step 4 &#8211; Configure OpenLiteSpeed<\/h2>\n<p>It&#8217;s time to configure the server. To access the admin panel, visit\u00a0 <em>http:\/\/yourdomainname:7080\/.<\/em>\u00a0And yes, that means admin panel resides at port <strong>7080<\/strong> by default. The default username is <strong>admin<\/strong> and the default password is <strong>123456<\/strong>.<\/p>\n<p>On logging in, you will be greeted by the following screen.<\/p>\n<p><a class=\"fancybox\" id=\"img-Screenshot_from_2018-10-08_02-11-21\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_openlitespeed_server_on_ubuntu_1804_along_with_mariadb\/big\/Screenshot_from_2018-10-08_02-11-21.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/10\/how-to-install-and-configure-openlitespeed-server-on-ubuntu-18-04-along-with-mariadb-1.png\" alt=\"Configure OpenLiteSpeed\" width=\"550\" height=\"280\" title=\"\"><\/a><\/p>\n<p>The first thing we need to change is the default ports.<\/p>\n<p>Visit <strong>Listeners<\/strong> category and click View button against Default. On the next page under <strong>Listener Default &gt; General page<\/strong>, click Edit icon on the right and change the port from 8080 to 80. Click Save and then perform a Graceful restart.<\/p>\n<p><a class=\"fancybox\" id=\"img-Screenshot_from_2018-10-08_02-06-48\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_openlitespeed_server_on_ubuntu_1804_along_with_mariadb\/big\/Screenshot_from_2018-10-08_02-06-48.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/10\/how-to-install-and-configure-openlitespeed-server-on-ubuntu-18-04-along-with-mariadb-2.png\" alt=\"Configure Listeners\" width=\"550\" height=\"391\" title=\"\"><\/a><\/p>\n<p>If you want to change the port\u00a0of the administration panel, visit <strong>WebAdmin Settings &gt;&gt; Listeners section<\/strong> and Click the view button against <strong>adminListener<\/strong>. Click Edit button on the next page and you can choose a port of your choice here. Click Save and Graceful restart on completion.<\/p>\n<p>You should also change the default password for the Administration Panel. To do that, visit <strong>WebAdmin Settings<\/strong> section and Click the <strong>Users tab<\/strong>. Click edit button listed against admin and change the password. Click Save and then Graceful restart to make the change.<\/p>\n<p><a class=\"fancybox\" id=\"img-Screenshot_from_2018-10-08_02-09-30\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_openlitespeed_server_on_ubuntu_1804_along_with_mariadb\/big\/Screenshot_from_2018-10-08_02-09-30.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/10\/how-to-install-and-configure-openlitespeed-server-on-ubuntu-18-04-along-with-mariadb-3.png\" alt=\"WebAdmin Settings\" width=\"550\" height=\"246\" title=\"\"><\/a><\/p>\n<p>In case you forget the administration password, you can reset by running the following command<\/p>\n<p class=\"command\">sudo \/usr\/local\/lsws\/admin\/misc\/admpass.sh<\/p>\n<p>This script allows you to use a new administration id and password.<\/p>\n<p>OpenLiteSpeed by default ships with PHP 5.6 which we definitely don&#8217;t want so we will have to make the switch manually to PHP 7.2 which is the latest at the time of writing this tutorial.<\/p>\n<p>Go to <strong>Server Configuration<\/strong> Section and click the External App tab. Under it, you will find <strong>LiteSpeed SAPI<\/strong> app named lsphp. Click the edit button on the right(middle button) and a new page will open. Make the following changes<\/p>\n<pre>- Name: lsphp72<br\/>- Address: uds:\/\/tmp\/lshttpd\/lsphp.sock<br\/>- Max Connections: 35<br\/>- Environment:<br\/>- PHP_LSAPI_MAX_REQUESTS=500<br\/>- PHP_LSAPI_MAX_REQUESTS=500<br\/>- Command: $SERVER_ROOT\/lsphp72\/bin\/lsphp<\/pre>\n<p><a class=\"fancybox\" id=\"img-Screenshot_from_2018-10-08_02-04-26\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_openlitespeed_server_on_ubuntu_1804_along_with_mariadb\/big\/Screenshot_from_2018-10-08_02-04-26.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/10\/how-to-install-and-configure-openlitespeed-server-on-ubuntu-18-04-along-with-mariadb-4.png\" alt=\"PHP Server Configuration\" width=\"550\" height=\"512\" title=\"\"><\/a><\/p>\n<p>Leave everything else as default. Now switch to the Script Handler tab and click Edit against <strong>LiteSpeed SAPI<\/strong> and make the following change<\/p>\n<pre>- Handler Name: lsphp72<\/pre>\n<p><a class=\"fancybox\" id=\"img-Screenshot_from_2018-10-08_02-03-08\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_and_configure_openlitespeed_server_on_ubuntu_1804_along_with_mariadb\/big\/Screenshot_from_2018-10-08_02-03-08.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/10\/how-to-install-and-configure-openlitespeed-server-on-ubuntu-18-04-along-with-mariadb-5.png\" alt=\"Configure Script Handler\" width=\"550\" height=\"334\" title=\"\"><\/a><\/p>\n<p>Click Save. Now click the **Graceful restart** button on the top right to save the changes. This should setup PHP 7.2 to work with OpenLiteSpeed server. To check if PHP is working properly, visit\u00a0 <em>http:\/\/yourdomainname\/phpinfo.php<\/em> from your browser.<\/p>\n<p>That&#8217;s all folks to this tutorial. If you have any questions, post it in the comment box. To learn more about the server, visit\u00a0<a href=\"https:\/\/openlitespeed.org\/\" target=\"_blank\" rel=\"noopener\">OpenLiteSpeed.org<\/a><\/p>\n<div>\n<p><b>Share this page:<\/b><\/p>\n<p>\n<a href=\"https:\/\/www.facebook.com\/sharer.php?u=https%3A%2F%2Fwww.howtoforge.com%2Ftutorial%2Fhow-to-install-and-configure-openlitespeed-server-on-ubuntu-1804-along-with-mariadb%2F\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/10\/how-to-install-and-configure-openlitespeed-server-on-ubuntu-18-04-along-with-mariadb-6.png\" height=\"20\" alt=\"\" title=\"\"><\/a><br \/>\n<a href=\"https:\/\/twitter.com\/intent\/tweet?url=https%3A%2F%2Fwww.howtoforge.com%2Ftutorial%2Fhow-to-install-and-configure-openlitespeed-server-on-ubuntu-1804-along-with-mariadb%2F&amp;text=How+to+Install+and+Configure+OpenLiteSpeed+Server+on+Ubuntu+18.04+along+with+MariaDB&amp;via=howtoforgecom&amp;related=howtoforgecom\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/10\/how-to-install-and-configure-openlitespeed-server-on-ubuntu-18-04-along-with-mariadb-7.png\" height=\"20\" alt=\"\" title=\"\"><\/a><br \/>\n<a href=\"https:\/\/twitter.com\/howtoforgecom\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/10\/how-to-install-and-configure-openlitespeed-server-on-ubuntu-18-04-along-with-mariadb-8.png\" height=\"20\" alt=\"\" title=\"\"><\/a><br \/>\n<a href=\"https:\/\/plus.google.com\/share?url=https%3A%2F%2Fwww.howtoforge.com%2Ftutorial%2Fhow-to-install-and-configure-openlitespeed-server-on-ubuntu-1804-along-with-mariadb%2F\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/10\/how-to-install-and-configure-openlitespeed-server-on-ubuntu-18-04-along-with-mariadb-9.png\" height=\"20\" alt=\"\" title=\"\"><\/a>\n<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>OpenLiteSpeed is a lightweight and open source version of the popular LiteSpeed Server. It comes with its WebGUI based Administration panel which makes it different from other web servers as you can configure pretty much everything from the panel itself.\u00a0 In this tutorial, we will learn about how to Install OpenLiteSpeed Server on Ubuntu 18.04 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[],"class_list":["post-6991","post","type-post","status-publish","format-standard","hentry","category-36"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/6991","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=6991"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/6991\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=6991"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=6991"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=6991"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}