{"id":352,"date":"2021-08-18T03:15:14","date_gmt":"2021-08-18T03:15:14","guid":{"rendered":"https:\/\/tiruppurwebhosting.com\/blog\/?p=352"},"modified":"2021-08-18T03:31:43","modified_gmt":"2021-08-18T03:31:43","slug":"install-openlitespeed-maria","status":"publish","type":"post","link":"https:\/\/tiruppurwebhosting.com\/blog\/install-openlitespeed-maria\/","title":{"rendered":"Install OpenLiteSpeed, PHP 7.0 &#038; MariaDB on CentOS 7"},"content":{"rendered":"<p>Introduction:<\/p>\n<p><a href=\"https:\/\/openlitespeed.org\/\" target=\"_blank\" rel=\"noopener\">OpenLiteSpeed<\/a> is a high-performance HTTP server, and it can handle hundreds and thousands of simultaneous connections with very low resource consumptions.<\/p>\n<p>Setup openlitespeed Respository:<\/p>\n<p>Use the following command to add the OpenLiteSpeed repository.<\/p>\n<pre>rpm -ivh http:\/\/rpms.litespeedtech.com\/centos\/litespeed-repo-1.1-1.el7.noarch.rpm\r\nOutput:\r\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1062 size-full\" src=\"https:\/\/www.coimbatorewebhosting.com\/blog\/wp-content\/uploads\/2018\/07\/litespeed-1.jpg\" alt=\"OpenLiteSpeed\" width=\"863\" height=\"98\" \/><\/pre>\n<h2>Install openLiteSpeed on CentOS 7:<\/h2>\n<p>Now, install OpenLiteSpeed 1.4.26 (chck) using YUM command.<\/p>\n<pre>yum -y install openlitespeed<\/pre>\n<p>Run the following command to check the version of OpenLiteSpeed and its modules.<\/p>\n<pre>\/usr\/local\/lsws\/bin\/lshttpd -v<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1065\" src=\"https:\/\/www.coimbatorewebhosting.com\/blog\/wp-content\/uploads\/2018\/07\/lite-speed-1.jpg\" alt=\"\" width=\"455\" height=\"141\" \/><\/p>\n<h2>Controlling OpenLiteSpeed<\/h2>\n<p>To Start OpenLiteSpeed, run:<\/p>\n<pre>\/usr\/local\/lsws\/bin\/lswsctrl start<\/pre>\n<p>To Stop OpenLiteSpeed, run:<\/p>\n<pre>\/usr\/local\/lsws\/bin\/lswsctrl stop<\/pre>\n<p>To Restart OpenLiteSpeed, run:<\/p>\n<pre>\/usr\/local\/lsws\/bin\/lswsctrl restart<\/pre>\n<p>To check the running status of OpenLiteSpeed, run:<\/p>\n<pre>\/usr\/local\/lsws\/bin\/lswsctrl status<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1063\" src=\"https:\/\/www.coimbatorewebhosting.com\/blog\/wp-content\/uploads\/2018\/07\/litespeed2.jpg\" alt=\"\" width=\"488\" height=\"169\" \/><\/p>\n<p>By default,\u00a0<strong>OpenLiteSpeed listens on port 8088<\/strong>. So, you need to\u00a0<strong>add firewall rules to allow port 8088<\/strong>\u00a0for accessing the web server.<\/p>\n<pre>firewall-cmd --zone=public --permanent --add-port=8088\/tcp\r\nfirewall-cmd --reload\r\n\r\n<\/pre>\n<p>Enter the\u00a0<strong>URL with port no 8088<\/strong>\u00a0and see whether you can able to access OpenLiteSpeed or not.<\/p>\n<div class=\"itzgeek-url\">http:\/\/localhost:8088<\/div>\n<p><strong>OR<\/strong><\/p>\n<div class=\"itzgeek-url\">http:\/\/your-ip-addr-ess:8088<\/div>\n<div><\/div>\n<div><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1067\" src=\"https:\/\/www.coimbatorewebhosting.com\/blog\/wp-content\/uploads\/2018\/07\/litespeed3.jpg\" alt=\"\" width=\"1363\" height=\"690\" \/><\/div>\n<div><\/div>\n<div>\n<h2>Install MariaDB Server<\/h2>\n<p>We will now install the MariaDB server by using\u00a0<strong>YUM<\/strong>\u00a0command.<\/p>\n<pre>yum -y install mariadb mariadb-server<\/pre>\n<p>Start MariaDB server.<\/p>\n<pre>systemctl start mariadb<\/pre>\n<p>Set MariaDB service to start during every boot.<\/p>\n<p>systemctl enable mariadb<\/p>\n<h2>Install PHP<\/h2>\n<p>As said in features of OpenLiteSpeed, it supports different versions of PHP installation, so we will configure OpenLiteSpeed with both PHP v5.6 and V7.0. Add EPEL repository for getting dependent packages for PHP.<\/p>\n<pre>rpm -ivh https:\/\/dl.fedoraproject.org\/pub\/epel\/epel-release-latest-7.noarch.rpm<\/pre>\n<div class=\"itzgeek-info\">Choose either one of the PHP version for configuring OpenLiteSpeed.<\/div>\n<p><strong>OpenLiteSpeed with PHP 5.6 support:<\/strong><\/p>\n<pre>yum install -y lsphp56 lsphp56-common lsphp56-mysql lsphp56-gd lsphp56-process lsphp56-mbstring lsphp56-xml lsphp56-mcrypt lsphp56-pdo lsphp56-imap lsphp56-soap lsphp56-bcmath<\/pre>\n<p><strong>OpenLiteSpeed with PHP 7.0 support:<\/strong><\/p>\n<pre>yum install lsphp70 lsphp70-common lsphp70-mysqlnd lsphp70-gd lsphp70-process lsphp70-mbstring lsphp70-xml lsphp70-mcrypt lsphp70-pdo lsphp70-imap lsphp70-soap lsphp70-bcmath<\/pre>\n<h2>Configure OpenLiteSpeed<\/h2>\n<p>In this section, we will setup OpenLiteSpeed with both PHP 5.6\u00a0 &amp; PHP 7.0, Also we will\u00a0<strong>configure OpenLiteSpeed to listen on standard HTPP port 80 and via WebAdmin console<\/strong>.<\/p>\n<p>By Default,\u00a0<strong>WebAdmin console\u00a0<\/strong>listens<strong>\u00a0on port 7080<\/strong>\u00a0and t<strong>The default account of OpenLiteSpeed is,<\/strong><\/p>\n<p>Username:\u00a0<strong>admin<\/strong><br \/>\nPassword:\u00a0<strong>123456<\/strong><\/p>\n<p><strong>I recommend you to change the default password for security reason<\/strong>. To change the password of OpenLigtSpeed admin console, run the following command.<\/p>\n<pre>\/usr\/local\/lsws\/admin\/misc\/admpass.sh<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1069\" src=\"https:\/\/www.coimbatorewebhosting.com\/blog\/wp-content\/uploads\/2018\/07\/litespeed4.jpg\" alt=\"\" width=\"682\" height=\"229\" \/><\/p>\n<h3>Access WebAdmin Console<\/h3>\n<p>Open a web browser and visit the following URL.<\/p>\n<div class=\"itzgeek-url\">http:\/\/localhost:7080<\/div>\n<p><strong>OR<\/strong><\/p>\n<div class=\"itzgeek-url\">http:\/\/your-ip-add-ress:7080<\/div>\n<p>Login with the admin account and the password you set few steps before<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1071 size-full\" src=\"https:\/\/www.coimbatorewebhosting.com\/blog\/wp-content\/uploads\/2018\/07\/litespeed55.jpg\" alt=\"OpenLiteSpeed\" width=\"1359\" height=\"698\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1072\" src=\"https:\/\/www.coimbatorewebhosting.com\/blog\/wp-content\/uploads\/2018\/07\/litespeed5.jpg\" alt=\"\" width=\"1361\" height=\"702\" \/><\/p>\n<p><strong>Configure OpenLiteSpeed with PHP 5.6:<\/strong><\/p>\n<p>You do not have to do any configuration changes to OpenLiteSpeed as it uses PHP 5.6 by default.<\/p>\n<p><strong>Configure OpenLiteSpeed with PHP 7.0:<\/strong><\/p>\n<p>As I said earlier, OpenLiteSpeed uses PHP 5.6. To have PHP 7.0 with OpenLiteSpeed, follow the below steps.<\/p>\n<p>We already have PHP 7.0 on the server. So, go to \u201cS<strong>erver Configuration<\/strong>\u201d \u2013&gt; \u201c<strong>External App<\/strong>\u201d \u2013&gt; \u201c<strong>Add<\/strong>\u201c.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1073\" src=\"https:\/\/www.coimbatorewebhosting.com\/blog\/wp-content\/uploads\/2018\/07\/litespeed6.png\" alt=\"\" width=\"1351\" height=\"565\" \/><\/p>\n<p>Select \u201c<strong>LiteSpeed SAPI App<\/strong>\u201d and then click Next,<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1074\" src=\"https:\/\/www.coimbatorewebhosting.com\/blog\/wp-content\/uploads\/2018\/07\/litespeed7.png\" alt=\"\" width=\"1356\" height=\"471\" \/><\/p>\n<\/div>\n<p>Add the below configuration,<\/p>\n<pre>Name: lsphp7\r\nAddress: uds:\/\/tmp\/lshttpd\/lsphp.sock\r\nMax Connections : 35\r\nEnvironment: PHP_LSAPI_MAX_REQUESTS=500\r\nPHP_LSAPI_CHILDREN=35\r\nInitial Request Timeout (secs) : 60\r\nRetry Timeout (secs): 0\r\nPersistent Connection: Yes\r\nResponse Buffering: No\r\nAuto Start : Yes\r\nCommand: \/usr\/local\/lsws\/lsphp70\/bin\/lsphp\r\nBack Log: 100\r\nInstances: 1\r\nMemory Soft Limit (bytes): 2047M\r\nMemory Hard Limit (bytes): 2047M\r\nProcess Soft Limit: 400\r\nProcess Hard Limit: 500\r\n\r\n<\/pre>\n<p>Click save button to save the configuration.<\/p>\n<p>Modify the default script handler to use PHP 7.0. To do that, go to \u201c<strong>Server Configuration<\/strong>\u201d \u2013&gt; \u201c<strong>Script Handler<\/strong>\u201d \u2013&gt; Edit\u00a0<strong>lsphp5<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1075\" src=\"https:\/\/www.coimbatorewebhosting.com\/blog\/wp-content\/uploads\/2018\/07\/litespeed8.png\" alt=\"\" width=\"1352\" height=\"463\" \/><\/p>\n<p>Update with the following configurations.<\/p>\n<div class=\"bsac-container bsac-type-code \" data-adid=\"25694\" data-type=\"code\">\n<pre>Suffixes: php\r\nHandler Type: liteSpeed SAPI\r\nHandler Name: lsphp7\r\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1078\" src=\"https:\/\/www.coimbatorewebhosting.com\/blog\/wp-content\/uploads\/2018\/07\/litespeed81.png\" alt=\"\" width=\"1111\" height=\"533\" \/>\r\nClick the save icon.<\/pre>\n<h3>Configure OpenLiteSpeed to use port 80:<\/h3>\n<p>Go to \u201c<strong>Listeners<\/strong>\u201d and click on \u201c<strong>Zoom icon<\/strong>\u201d in the\u00a0<strong>Default<\/strong>\u00a0listener to view the configuration.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1079\" src=\"https:\/\/www.coimbatorewebhosting.com\/blog\/wp-content\/uploads\/2018\/07\/litespeed9.png\" alt=\"\" width=\"1350\" height=\"518\" \/><\/p>\n<p>Edit the listener.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1080\" src=\"https:\/\/www.coimbatorewebhosting.com\/blog\/wp-content\/uploads\/2018\/07\/litespeed10.png\" alt=\"\" width=\"1356\" height=\"585\" \/><\/p>\n<p>Update with the following information.<\/p>\n<pre>IP Address: ANY\r\nPort : 80<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1082\" src=\"https:\/\/www.coimbatorewebhosting.com\/blog\/wp-content\/uploads\/2018\/07\/litespeed102.png\" alt=\"\" width=\"1126\" height=\"654\" \/><\/p>\n<p>Click on the save icon.<\/p>\n<p>Finally,\u00a0<strong>restart<\/strong>\u00a0the OpenLiteSpeed server.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1081\" src=\"https:\/\/www.coimbatorewebhosting.com\/blog\/wp-content\/uploads\/2018\/07\/litespeed11.png\" alt=\"\" width=\"1361\" height=\"617\" \/><\/p>\n<h3>Verify OpenLiteSpeed server:<\/h3>\n<p>Just enter the URL without port number and see whether you can able to access OpenLiteSpeed.<\/p>\n<div class=\"itzgeek-url\">http:\/\/localhost\/<\/div>\n<p><strong>OR<\/strong><\/p>\n<div class=\"itzgeek-url\">http:\/\/your-ip-addr-ess\/<\/div>\n<div>\n<figure id=\"attachment_1067\" aria-describedby=\"caption-attachment-1067\" style=\"width: 1363px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1067 size-full\" src=\"https:\/\/www.coimbatorewebhosting.com\/blog\/wp-content\/uploads\/2018\/07\/litespeed3.jpg\" alt=\"OpenLiteSpeed\" width=\"1363\" height=\"690\" \/><figcaption id=\"caption-attachment-1067\" class=\"wp-caption-text\">OpenLiteSpeed<\/figcaption><\/figure>\n<\/div>\n<pre><\/pre>\n<\/div>\n<div>\n<p>The above page confirms that the\u00a0<strong>OpenLiteSpeed is listening on Standard HTTP port 80.<\/strong><\/p>\n<h2>Verify support\u00a0for\u00a0PHP in OpenLiteSpeed<\/h2>\n<p>Visit the following URL using your favorite web browser.<\/p>\n<div class=\"itzgeek-url\">http:\/\/localhost\/phpinfo.php<\/div>\n<p><strong>OR<\/strong><\/p>\n<div class=\"itzgeek-url\">http:\/\/your-ip-addr-ess\/phpinfo.php<\/div>\n<p>You can see the output like below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1084\" src=\"https:\/\/www.coimbatorewebhosting.com\/blog\/wp-content\/uploads\/2018\/07\/lite-speed-11.JPG.png\" alt=\"\" width=\"836\" height=\"573\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1085\" src=\"https:\/\/www.coimbatorewebhosting.com\/blog\/wp-content\/uploads\/2018\/07\/lite-speed-12.JPG.png\" alt=\"\" width=\"832\" height=\"553\" \/><\/p>\n<p>That&#8217;s all now you can come to know about the installing of OpenLiteSpeed, PHP 7.0 &amp; MariaDB on CentOS 7 \/<\/p>\n<p>And to know about to increase php memory <a href=\"https:\/\/tiruppurwebhosting.com\/blog\/2021\/08\/18\/how-to-increase-php-memory-upload-size-in-wordpress\/\">click here.<\/a><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Introduction: OpenLiteSpeed is a high-performance HTTP server, and it can handle hundreds and thousands of simultaneous connections with very low resource consumptions. Setup openlitespeed Respository: Use the following command to add the OpenLiteSpeed repository. rpm -ivh http:\/\/rpms.litespeedtech.com\/centos\/litespeed-repo-1.1-1.el7.noarch.rpm Output: Install openLiteSpeed on CentOS 7: Now, install OpenLiteSpeed 1.4.26 (chck) using YUM command. yum -y install openlitespeed<\/p>\n","protected":false},"author":1,"featured_media":361,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,8,92,1,9,3],"tags":[],"class_list":["post-352","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-basics","category-database","category-general","category-home","category-linux","category-linux-tutorials"],"_links":{"self":[{"href":"https:\/\/tiruppurwebhosting.com\/blog\/wp-json\/wp\/v2\/posts\/352","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tiruppurwebhosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tiruppurwebhosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tiruppurwebhosting.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tiruppurwebhosting.com\/blog\/wp-json\/wp\/v2\/comments?post=352"}],"version-history":[{"count":0,"href":"https:\/\/tiruppurwebhosting.com\/blog\/wp-json\/wp\/v2\/posts\/352\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tiruppurwebhosting.com\/blog\/wp-json\/wp\/v2\/media\/361"}],"wp:attachment":[{"href":"https:\/\/tiruppurwebhosting.com\/blog\/wp-json\/wp\/v2\/media?parent=352"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tiruppurwebhosting.com\/blog\/wp-json\/wp\/v2\/categories?post=352"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tiruppurwebhosting.com\/blog\/wp-json\/wp\/v2\/tags?post=352"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}