• Home
    • Cool Knowledge base
    • Light Knowledge base
    • Help Desk
    • OnePage Documentation
  • Services
    • Main Services
    • PPC Services
    • SEO Services
    • SMM Services
  • Docs
  • Blog
    • Affiliate
    • Ecommerce
    • Frontend
    • linux
      • nginx
    • PHP
      • Magento
      • wordpress
    • Python
    • SEO
    • Web
  • Forum
    • Forums
    • Forum Topics
    • Topic Details
    • Ask Question
  • Pages
  • Contact

Subscribe to Updates

Get the latest creative news from FooBar about art, design and business.

What's Hot

VideoJS – multiple source demo

2022-03-08

Add custom field to Woocommerce tab

2022-03-07

Surror Product Tabs for WooCommerce

2022-03-07
Facebook Twitter Instagram
  • 中文
  • English
Facebook Twitter Instagram Pinterest VKontakte
SEO & Website build tips SEO & Website build tips
  • Home
    • Cool Knowledge base
    • Light Knowledge base
    • Help Desk
    • OnePage Documentation
  • Services
    • Main Services
    • PPC Services
    • SEO Services
    • SMM Services
  • Docs
  • Blog
    • Affiliate
    • Ecommerce
    • Frontend
    • linux
      • nginx
    • PHP
      • Magento
      • wordpress
    • Python
    • SEO
    • Web
  • Forum
    • Forums
    • Forum Topics
    • Topic Details
    • Ask Question
  • Pages
  • Contact
SEO & Website build tips SEO & Website build tips
Home»Uncategorized»OpenLiteSpeed and php7.x setup on centos
Uncategorized

OpenLiteSpeed and php7.x setup on centos

OxfordBy Oxford2019-11-27No Comments2 Mins Read
Facebook Twitter Pinterest LinkedIn Tumblr Email
Share
Facebook Twitter LinkedIn Pinterest Email

OpenLiteSpeed 是 LiteSpeed Technologies 开发的开源HTTP服务器。OpenLiteSpeed 具有高性能和轻量级的特点,并带有一个 Web GUI 管理界面,可以处理超过十万个具有低资源使用(CPU 和 RAM)的并发连接。OpenLiteSpeed 支持许多操作系统,如 Linux,Mac OS,FreeBSD 和 SunOS,可用于运行用 PHP,Ruby Perl 和 java 编写的网站脚本。

在本篇教程中,我将指导您在云服务器上安装并配置 OpenLiteSpeed 和 PHP 7(我们将用 CentOS 作为演示版本)。 如果您还没有腾讯云的服务器,可以先点击这里进行免费套餐的试用。免费套餐包含企业版和个人版,超过11款热门产品和42款长期免费的云产品可以供您选择。如果您有长期搭建服务器的需求的话,可以点击这里进行服务器的购买,现在的促销力度很大哦。

添加 OpenLiteSpeed 存储库

要在CentOS服务器上安装 OpenLiteSpeed,我们必须添加 lite 速度存储库。使用此 rpm 命令添加它:

rpm -ivh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el7.noarch.rpm

安装 OpenLiteSpeed

在此步骤中,我们将安装 OpenLiteSpeed 1.4。这是稳定版本,具有 Pagespeed,文件上传,PHP 7 支持,RCS 集成和 HTTP / 2支持等许多功能。让我们使用以下yum 命令安装 OpenLiteSpeed 1.4:

yum -y install openlitespeed14.x86_64

等待安装完成。

安装 Epel 存储库和 PHP 7

PHP 7安装需要 Epel 存储库。它可以在 CentOS 存储库中使用。使用 yum 命令安装 Epel 存储库:

yum -y install epel-release

接下来,为openLiteSpeed安装php 7。OpenLiteSpeed 使用特殊版本的 PHP,OpenLiteSpeed 的 PHP 版本以“ls”开头。通过键入以下内容安装带有多扩展的 PHP 7 以获得丰富的功能集:

yum -y install lsphp70 lsphp70-mysqlnd lsphp70-process lsphp70-mbstring lsphp70-mcrypt lsphp70-gd lsphp70-opcache lsphp70-bcmath lsphp70-pdo lsphp70-common lsphp70-xml

如果要查看所有 PHP 扩展的列表,可以使用 yum search 命令:

yum search lsphp70

配置 OpenLiteSpeed 和 PHP 7

在这一步中,我们将配置 OpenLiteSpeed 和 PHP 7。OpenLiteSpeed 有一个管理界面,因此我们将配置 OpenLiteSpeed GUI 的管理员密码,然后配置 PHP 7 以使用 OpenLiteSpeed 并打开标准HTTP端口80。

配置并测试 GUI

要配置GUI的管理员用户和密码,请运行以下命令:

/usr/local/lsws/admin/misc/admpass.sh

输入GUI 管理的用户名和密码。

接下来,打开 Web 浏览器并使用端口7080访问服务器 IP 地址。

https://192.168.1.108:7080/

输入您的用户名和密码,然后按“登录”,您将看到 OpenLiteSpeed 仪表板。

配置 PHP 7

默认情况下,OpenLiteSpeed 1.4 使用 PHP 5,在此步骤中,我们将其更改为 PHP 7。

Php 7安装在服务器上,我们只需要通过浏览器中的管理GUI添加新配置。

单击“服务器配置”,然后单击“外部应用程序”选项卡。你会看到带有套接字地址的“lsphp5”。单击右侧的“添加”按钮添加新的“lsphp70”。

对于该类型,请使用“LiteSpeed SAPI App”并单击“下一步”

接下来,添加以下配置:

Name: lsphp70
Address:    uds://tmp/lshttpd/lsphp.sock
Max Connections: 35
Environment: PHP_LSAPI_MAX_REQUESTS=500
             PHP_LSAPI_CHILDREN=35
Initial Request Timeout (secs): 60
Retry Timeout : 0
Response Buffering: no
Auto Start: yes
Command: $SERVER_ROOT/lsphp70/bin/lsphp
Back Log: 100
Instances: 1
Memory Soft Limit (bytes): 2047M
Memory Hard Limit (bytes):2047M
Process Soft Limit: 400
Process Hard Limit: 500

单击“保存”图标以保存配置。

然后转到“脚本处理程序”选项卡并编辑“lsphp5” 5脚本处理程序。将处理程序名称更改为“lsphp70”。

单击保存图标。

配置端口80

OpenLiteSpeed 的默认http端口是8080,它用于接收客户端请求。在此步骤中,我们将从 OpenLiteSpeed 管理GUI将端口更改为80。

在左侧,转到“Listeners”部分以查看侦听器配置。您将看到端口为8080的默认侦听器。单击“查看”缩放图标以查看详细信息配置。现在点击“编辑”。

IP Address: ANY
Port 80

将端口更改为80并保存配置。

如果全部完成,请单击“重启”按钮重新启动 OpenLiteSpeed,然后单击“是”进行确认。

测试

现在我们可以测试服务器了。使用端口80访问服务器IP地址以确保我们的配置正常工作:http://192.168.1.108/

要测试PHP配置,请单击PHP信息。

http://192.168.1.108/phpinfo.php

所有工作正常。

(可选)更改默认管理端口

此步骤是可选的,但我建议更改 OpenLiteSpeed 的 Admin GUI 的默认端口。

要更改默认管理端口配置,请单击“WebAdmin 设置”,然后单击“监听器”,现在单击操作以编辑默认端口。

单击 “编辑”图标并输入管理配置的端口,然后单击“保存”图标。

接下来,从浏览器重新加载 OpenLiteSpeed 并检查 Web 管理员。

http://192.168.1.108:8088/

结论

OpenLiteSpeed 是 LiteSpeed 开发的 Linux,Windows Mac 和 BSD 的开源 HTTP 服务器。OpenLiteSpeed 使用不同的PHP版本,其名称为“lsphp”,并且支持lsphp7 或 PHP 7 。通过其管理GUI可以轻松配置 OpenLiteSpeed,因此我们可以从浏览器进行配置。若您想在实验室环境抢先体验搭建自己的网站,博客或者各类应用,我推荐您到腾讯云实验室页面进行选择,不仅有步骤指导,还可以免费上机,帮助您快速掌握开发知识!

 

https://cloud.tencent.com/developer/article/1358153

Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
Avatar photo
Oxford

Related Posts

nginx multi sub domain proxy

2021-06-05

How TO – Position Text Over an Image

2021-05-24

bootstrapstudio.io

2021-03-25

how to get wordpress theme getmetrix and google speed insight 100 scores?

2021-03-12
Recent Posts
  • VideoJS – multiple source demo
  • Add custom field to Woocommerce tab
  • Surror Product Tabs for WooCommerce
  • How To Scrape Amazon at Scale With Python Scrapy, And Never Get Banned
  • Compile a Jekyll project without installing Jekyll or Ruby by using Docker
November 2019
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  
« Oct   Dec »
Tags
app branding culture design digital Docly docs etc faq fashion featured fitness fix github Helpdesk Image issue leisure lifestyle magento Manual marketing memecached Photography picks planing seo sequrity tips Travel trending ui/ux web WordPress 爬虫
Editors Picks

Fujifilm’s 102-Megapixel Camera is the Size of a Typical DSLR

2021-01-05
Top Reviews
8.9

Which LED Lights for Nail Salon Safe? Comparison of Major Brands

By Oxford
8.9

Review: Xiaomi’s New Loudspeakers for Hi-fi and Home Cinema Systems

By Oxford
70

CES 2021 Highlights: 79 Top Photos, Products, and Much More

By Oxford
Advertisement
Demo
  • Facebook
  • Twitter
  • Instagram
  • Pinterest
About Us
About Us

Your source for the lifestyle news. This demo is crafted specifically to exhibit the use of the theme as a lifestyle site. Visit our main page for more demos.

We're accepting new partnerships right now.

Email Us: [email protected]
Contact: +1-320-0123-451

Facebook Twitter Instagram Pinterest YouTube LinkedIn
Recent Posts
  • VideoJS – multiple source demo
  • Add custom field to Woocommerce tab
  • Surror Product Tabs for WooCommerce
  • How To Scrape Amazon at Scale With Python Scrapy, And Never Get Banned
  • Compile a Jekyll project without installing Jekyll or Ruby by using Docker
From Flickr
Ascend
terns
casual
riders on the storm
chairman
mood
monument
liquid cancer
blue
basement
ditch
stars
© 2025 Designed by 九号资源网.

Type above and press Enter to search. Press Esc to cancel.