{"id":350,"date":"2024-06-11T12:26:18","date_gmt":"2024-06-11T12:26:18","guid":{"rendered":"https:\/\/249host.com\/tutorials\/?p=350"},"modified":"2024-06-11T12:27:57","modified_gmt":"2024-06-11T12:27:57","slug":"how-to-install-litespeed-webserver-in-centos","status":"publish","type":"post","link":"https:\/\/249host.com\/tutorials\/how-to-install-litespeed-webserver-in-centos\/","title":{"rendered":"How to install Litespeed webserver in centos."},"content":{"rendered":"<p>This article shows how to install litespeed in centos.LSAPI is used within the context of the LiteSpeed Web Server (LSWS) to handle requests for web applications efficiently. To use LSAPI, you typically follow these steps:<\/p>\n<h3>1. How to <strong>Install LiteSpeed Web Server (LSWS)<\/strong><\/h3>\n<p>First, you need to install the LiteSpeed Web Server on your server. LSWS comes in different versions, including an open-source version (OpenLiteSpeed) and commercial versions. Here\u2019s how you can install OpenLiteSpeed:<\/p>\n<ul>\n<li><strong>For CentOS\/RHEL<\/strong>:<\/li>\n<\/ul>\n<p>sudo yum install epel-release<br \/>\nsudo rpm -Uvh http:\/\/rpms.litespeedtech.com\/centos\/litespeed-repo-1.1-1.el7.noarch.rpm<br \/>\nsudo yum install openlitespeed<\/p>\n<p><strong>For Ubuntu\/Debian<\/strong>:<\/p>\n<p>wget -O &#8211; http:\/\/rpms.litespeedtech.com\/debian\/enable_lst_debain_repo.sh | sudo bash<br \/>\nsudo apt-get update<br \/>\nsudo apt-get install openlitespeed<\/p>\n<h3>2. <strong>Configure the Web Server<\/strong><\/h3>\n<p>After installation, you need to configure LSWS to use LSAPI for your applications.<\/p>\n<h4>For PHP applications:<\/h4>\n<ol>\n<li><strong>Install LSAPI for PHP<\/strong>:<\/li>\n<\/ol>\n<p>sudo apt-get install lsphp74 lsphp74-common lsphp74-mysql lsphp74-opcache<\/p>\n<ul>\n<li><strong>Set Up PHP with LSAPI<\/strong>: Edit the LiteSpeed configuration to point to the PHP LSAPI binary. Typically, this can be done in the LiteSpeed WebAdmin console (usually accessible at <code>http:\/\/&lt;your-server-ip&gt;:7080<\/code>).\n<ul>\n<li>Navigate to <code>Server Configuration<\/code> -&gt; <code>External App<\/code>.<\/li>\n<li>Add a new external app and choose <code>LiteSpeed SAPI App<\/code>.<\/li>\n<li>Configure the necessary details, such as:\n<ul>\n<li>Name: <code>lsphp<\/code><\/li>\n<li>Address: <code>uds:\/\/tmp\/lshttpd\/lsphp.sock<\/code><\/li>\n<li>Command: <code>\/usr\/local\/lsws\/lsphp74\/bin\/lsphp<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li><strong>Create a Script Handler<\/strong>:\n<ul>\n<li>Navigate to <code>Server Configuration<\/code> -&gt; <code>Script Handler<\/code>.<\/li>\n<li>Add a new script handler with:\n<ul>\n<li>Suffix: <code>php<\/code><\/li>\n<li>Handler Type: <code>LiteSpeed SAPI<\/code><\/li>\n<li>Handler Name: <code>lsphp<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><code><\/code>For other applications (e.g., Ruby, Python):<\/p>\n<ol>\n<li><strong>Install the necessary runtime and LSAPI module<\/strong>: Follow the specific instructions for your language to install the LSAPI module.<\/li>\n<li><strong>Configure the external application<\/strong>: Similar to PHP, you\u2019ll need to configure an external application in the LiteSpeed WebAdmin console, pointing to the appropriate LSAPI binary for your language.<\/li>\n<\/ol>\n<p>3. <strong>Restart LiteSpeed Server<\/strong><\/p>\n<p>After making the necessary configuration changes, restart the LiteSpeed <a href=\"https:\/\/www.squarebrothers.com\/dedicated-server-india\/\" target=\"_blank\" rel=\"noopener\">server<\/a> to apply them:<\/p>\n<p>sudo systemctl restart lsws<\/p>\n<div class=\"flex flex-grow flex-col max-w-full\">\n<div class=\"min-h-[20px] text-message flex flex-col items-start whitespace-pre-wrap break-words [.text-message+&amp;]:mt-5 juice:w-full juice:items-end overflow-x-auto gap-2\" dir=\"auto\" data-message-author-role=\"assistant\" data-message-id=\"dde1de8f-58af-4b4c-8a72-7d6383f1d401\">\n<div class=\"flex w-full flex-col gap-1 juice:empty:hidden juice:first:pt-[3px]\">\n<div class=\"markdown prose w-full break-words dark:prose-invert light\">\n<h3>4. <strong>Deploy Your Application<\/strong><\/h3>\n<p>Deploy your web application as you normally would in the web server\u2019s document root or a virtual host&#8217;s document root.<\/p>\n<h3>Summary<\/h3>\n<ul>\n<li><strong>Install<\/strong> LSWS and LSAPI for your application\u2019s language.<\/li>\n<li><strong>Configure<\/strong> LSWS to use LSAPI via the LiteSpeed WebAdmin console.<\/li>\n<li><strong>Restart<\/strong> LSWS to apply the configuration.<\/li>\n<li><strong>Deploy<\/strong> your application to the server.<\/li>\n<\/ul>\n<p>Using LSAPI with the LiteSpeed Web Server can significantly improve the performance and efficiency of your web applications by leveraging the optimized communication protocol between the web server and your application\u2019s runtime.<\/p>\n<p>To know and understand Creating a website backup using terminal and command line<a href=\"https:\/\/249host.com\/tutorials\/creating-a-website-backup-using-terminal\/\"> click here.<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"mt-1 flex gap-3 empty:hidden juice:-ml-3\">\n<div class=\"items-center justify-start rounded-xl p-1 flex\">\n<div class=\"flex items-center\"><\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>This article shows how to install litespeed in centos.LSAPI is used within the context of the LiteSpeed Web Server (LSWS) to handle requests for web applications efficiently. To use LSAPI, you typically follow these steps: 1. How to Install LiteSpeed Web Server (LSWS) First, you need to install the LiteSpeed Web Server on your server. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,1],"tags":[],"class_list":["post-350","post","type-post","status-publish","format-standard","hentry","category-general","category-linux"],"_links":{"self":[{"href":"https:\/\/249host.com\/tutorials\/wp-json\/wp\/v2\/posts\/350","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/249host.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/249host.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/249host.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/249host.com\/tutorials\/wp-json\/wp\/v2\/comments?post=350"}],"version-history":[{"count":6,"href":"https:\/\/249host.com\/tutorials\/wp-json\/wp\/v2\/posts\/350\/revisions"}],"predecessor-version":[{"id":356,"href":"https:\/\/249host.com\/tutorials\/wp-json\/wp\/v2\/posts\/350\/revisions\/356"}],"wp:attachment":[{"href":"https:\/\/249host.com\/tutorials\/wp-json\/wp\/v2\/media?parent=350"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/249host.com\/tutorials\/wp-json\/wp\/v2\/categories?post=350"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/249host.com\/tutorials\/wp-json\/wp\/v2\/tags?post=350"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}