Fi sii OpenLiteSpeed (HTTP), PHP 7 & MariaDB lori CentOS 7


OpenLiteSpeed jẹ orisun ọfẹ ati ṣiṣi, olupin HTTP fẹẹrẹ fẹẹrẹ fun awọn ọna ṣiṣe Unix pẹlu Linux ati Windows OS bakanna - apẹrẹ nipasẹ Awọn Imọ-ẹrọ LiteSpeed.

O jẹ ọlọrọ ẹya-ara; iṣẹ HTTP giga ti o le ṣee lo lati ṣakoso awọn ọgọọgọrun ẹgbẹrun ti awọn isopọ nigbakan laisi awọn ọran fifuye olupin pataki, ati pe o tun ṣe atilẹyin awọn modulu ẹnikẹta nipasẹ API (LSIAPI).

  • Iṣe giga, faaji ti o ṣakoso iṣẹlẹ.
  • iwuwo-iwuwo Super, Sipiyu ti o kere julọ ati awọn orisun iranti.
  • Awọn ọkọ oju omi pẹlu awọn ofin atunkọ Apache-ibaramu.
  • Olumulo WebAdmin GUI ti ọrẹ.
  • Ṣe atilẹyin ọpọlọpọ awọn modulu lati jẹki iṣẹ rẹ.
  • Faye gba ẹda ti awọn agbalejo foju.
  • Ṣe atilẹyin caching oju-iwe iṣẹ giga.
  • Ọpọlọpọ awọn ẹya oriṣiriṣi ti atilẹyin fifi sori PHP.

Ninu àpilẹkọ yii, a yoo ṣalaye bi o ṣe le fi sori ẹrọ ati tunto OpenLiteSpeed - Išẹ giga HTTP Web Server pẹlu PHP 7 ati atilẹyin MariaDB lori CentOS 7 ati RHEL 7.

Igbese 1: Jeki Ibi ipamọ OpenLitespeed

1. Akọkọ fi sori ẹrọ ati mu ibi ipamọ OpenLitespeed ti ara rẹ sori ẹrọ lati fi ẹya tuntun ti OpenLiteSpeed ati PHP 7 sii nipa lilo pipaṣẹ atẹle.

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

Igbese 2: Fi sii OpenLiteSeded lori CentOS 7

2. Bayi fi sii OpenLiteSpeed 1.4 (ẹya tuntun ni akoko kikọ yi) pẹlu aṣẹ oluṣakoso package package YUM ni isalẹ; eyi yoo fi sii labẹ itọsọna/usr/agbegbe/lsws.

# yum install openlitespeed

3. Lọgan ti a fi sii, o le bẹrẹ ati jẹrisi ẹya OpenLiteSpeed nipa ṣiṣiṣẹ.

# /usr/local/lsws/bin/lswsctrl start
# /usr/local/lsws/bin/lshttpd -v

4. Nipa aiyipada, OpenLiteSpeed gbalaye lori ibudo “8088, nitorinaa o nilo imudojuiwọn awọn ofin ogiriina lati gba ibudo 8088 laaye nipasẹ ogiriina lati wọle si aaye aiyipada OpenLiteSpeed lori olupin naa.

# firewall-cmd --zone=public --permanent --add-port=8088/tcp
# firewall-cmd --reload

5. Bayi ṣii ẹrọ lilọ kiri lori wẹẹbu kan ki o tẹ URL atẹle lati rii daju oju-iwe aiyipada ti OpenLiteSpeed.

http://SERVER_IP:8088/ 
or 
http://localhost:8088

Igbesẹ 3: Fi PHP 7 sii fun OpenLiteSpeed

6. Nibi, o nilo lati mu ibi ipamọ EPEL ṣiṣẹ lati eyiti iwọ yoo fi PHP 7 sori ẹrọ pẹlu aṣẹ atẹle.

# yum install epel-release

7. Lẹhinna fi PHP 7 sori ẹrọ ati awọn modulu pataki diẹ fun OpenLiteSpeed pẹlu aṣẹ ti o wa ni isalẹ, yoo fi PHP sii bi/usr/agbegbe/lsws/lsphp70/bin/lsphp.

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

Ifarabalẹ: O le ti ṣe akiyesi pe nibi a ko fi PHP sii ni ọna ti o wọpọ, o gbọdọ ṣaju rẹ pẹlu ls nitori pe PHP ọtọtọ wa fun LiteSpeed.

8. Lati fi awọn modulu PHP sii, lo aṣẹ ti o wa ni isalẹ lati ṣe atokọ gbogbo awọn modulu PHP ti o wa.

# yum search lsphp70
Loaded plugins: fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager, versionlock
This system is not registered with Subscription Management. You can use subscription-manager to register.
Loading mirror speeds from cached hostfile
 * base: centos.mirror.snu.edu.in
 * epel: mirror.premi.st
 * extras: mirrors.nhanhoa.com
 * rpmforge: mirror.veriteknik.net.tr
 * updates: centos.mirror.snu.edu.in
=============================================================================================== N/S matched: lsphp70 ================================================================================================
lsphp70-debuginfo.x86_64 : Debug information for package lsphp70
lsphp70-pecl-igbinary-debuginfo.x86_64 : Debug information for package lsphp70-pecl-igbinary
lsphp70.x86_64 : PHP scripting language for creating dynamic web sites
lsphp70-bcmath.x86_64 : A module for PHP applications for using the bcmath library
lsphp70-common.x86_64 : Common files for PHP
lsphp70-dba.x86_64 : A database abstraction layer module for PHP applications
lsphp70-dbg.x86_64 : The interactive PHP debugger
lsphp70-devel.x86_64 : Files needed for building PHP extensions
lsphp70-enchant.x86_64 : Enchant spelling extension for PHP applications
lsphp70-gd.x86_64 : A module for PHP applications for using the gd graphics library
lsphp70-gmp.x86_64 : A module for PHP applications for using the GNU MP library
lsphp70-imap.x86_64 : A module for PHP applications that use IMAP
lsphp70-intl.x86_64 : Internationalization extension for PHP applications
lsphp70-json.x86_64 : JavaScript Object Notation extension for PHP
lsphp70-ldap.x86_64 : A module for PHP applications that use LDAP
lsphp70-mbstring.x86_64 : A module for PHP applications which need multi-byte s
...

Igbesẹ 4: Tunto OpenLiteSpeed ati PHP 7

9. Bayi tunto OpenLiteSpeed ati PHP 7, ati lẹhinna ṣeto boṣewa HTTP ibudo 80 bi a ti salaye ni isalẹ.

Gẹgẹbi a ti mẹnuba ni iṣaaju lori, OpenLiteSpeed wa pẹlu itọnisọna WebAdmin eyiti o ni nkan ṣe pẹlu ibudo 7080.

Bẹrẹ nipa tito leto orukọ olumulo abojuto ati ọrọ igbaniwọle fun console OpenLiteSpeed WebAdmin; ṣiṣe aṣẹ wọnyi lati ṣe bẹ:

# /usr/local/lsws/admin/misc/admpass.sh
Please specify the user name of administrator.
This is the user name required to login the administration Web interface.

User name [admin]: tecmint

Please specify the administrator's password.
This is the password required to login the administration Web interface.

Password: 
Retype password: 
Administrator's username/password is updated successfully!

10. Awọn ofin ogiriina atẹle ti o tẹle lati gba ibudo 7080 laaye nipasẹ ogiriina lati wọle si kọnputa WebAdmin.

# firewall-cmd --zone=public --permanent --add-port=7080/tcp
# firewall-cmd --reload

11. Bayi ṣii ẹrọ lilọ kiri lori ayelujara kan ki o tẹ URL ti o tẹle lati wọle si console OpenLiteSpeed WebAdmin.

http://SERVER_IP:7080
OR
http://localhost:7080

Tẹ orukọ olumulo ati ọrọ igbaniwọle ti o ṣeto loke sii, ki o tẹ “Buwolu wọle”.

12. OpenLiteSpeed nlo LSPHP 5 nipasẹ aiyipada, o nilo lati ṣe awọn ayipada diẹ si setup LSPHP 70 bi a ti salaye ni isalẹ.

Lati ṣe eyi, lọ si Iṣeto ni olupin App Ohun elo Ita → Fikun bọtini ni apa ọtun lati ṣafikun “lsphp70” tuntun bi a ṣe han ninu shot iboju ni isalẹ.

13. Lẹhinna ṣalaye App ti ita, ṣeto iru si "LiteSpeed SAPI App" ki o tẹ lẹgbẹẹ lati ṣafikun orukọ ohun elo itagbangba tuntun, adirẹsi, nọmba ti o pọ julọ ti awọn isopọ, akoko ipari idahun akọkọ, ati akoko ipari gbiyanju.

Name: 					lsphp70
Address:    				uds://tmp/lshttpd/lsphp.sock
Notes: 					LSPHP70 Configuration 
Max Connections: 			35
Initial Request Timeout (secs): 	60
Retry Timeout : 			0

Konfigi ti o ṣe pataki julọ nibi ni eto Aṣẹ eyiti o nkọ ohun elo ita nibiti o ti le rii pe o ṣee ṣe PHP ti yoo lo; tọka si fifi sori LSPHP70:

 Command: 	/usr/local/lsws/lsphp70/bin/lsphp	

Lẹhinna tẹ bọtini Fipamọ lati fipamọ awọn atunto ti o wa loke.

14. Itele, tẹ lori Iṣeto ni olupin → Oluṣakoso iwe afọwọkọ ki o ṣatunkọ olutọju iwe afọwọkọ lsphp5 aiyipada, lo awọn iye ti o wa ni isalẹ. Lọgan ti o ba ti ṣetan, ṣafipamọ awọn eto naa.

Suffixes: 		php
Handler Type: 		LiteSpeed SAPI
Handler Name:		lsphp70
Notes:			lsphp70 script handler definition 

15. Awọn olupin HTTP ibudo aiyipada gbọ deede lori ibudo 80, ṣugbọn fun OpenLiteSpeed o jẹ 8080: yi pada si 80.

Tẹ lori Awọn olutẹtisi lati wo atokọ ti gbogbo awọn atunto awọn olutẹtisi. Lẹhinna tẹ Wo lati wo gbogbo awọn eto ti olutẹtisi aiyipada ati lati satunkọ, tẹ Ṣatunkọ. Ṣeto ibudo si 80 ki o fi iṣeto naa pamọ ki o fi awọn eto pamọ.

16. Lati ṣe afihan awọn ayipada ti o wa loke, ni igbadun tun bẹrẹ OpenLiteSpeed nipa tite lori bọtini atunbere ki o tẹ bẹẹni lati jẹrisi.

Igbesẹ 5: Ṣayẹwo PHP 7 ati Fifi sori ẹrọ OpenLiteSpeed

17. Bayi ṣe idanwo ti olupin OpenLiteSpeed ba tẹtisi lori ibudo 80. Ṣatunṣe awọn ofin ogiriina lati gba ibudo 80 laaye nipasẹ ogiriina.

# firewall-cmd --zone=public --permanent --add-port=80/tcp
# firewall-cmd --reload 

18. Lakotan rii daju pe OpenLiteSpeed n ṣiṣẹ lori ibudo 80 ati PHP 7 nipa lilo atẹle URL.

http://SERVER_IP
http://SERVER_IP/phpinfo.php 

19. Lati ṣakoso ati ṣakoso iṣẹ OpenLiteSpeed, lo awọn ofin wọnyi.

# /usr/local/lsws/bin/lswsctrl start 		#start OpenLiteSpeed
# /usr/local/lsws/bin/lswsctrl stop   		#Stop OpenLiteSpeed 
# /usr/local/lsws/bin/lswsctrl restart 		#gracefully restart OpenLiteSpeed (zero downtime)
# /usr/local/lsws/bin/lswsctrl help 		#show OpenLiteSpeed commands

Igbesẹ 6: Fi MariaDB sii fun OpenLiteSpeed

20. Fi sori ẹrọ eto iṣakoso data data MariaDB nipa lilo pipaṣẹ atẹle.

# yum install openlitespeed mariadb-server

21. Nigbamii, bẹrẹ eto eto data MariaDB ki o ni aabo fifi sori rẹ.

# systemctl start mariadb
# mysql_secure_installation

Ni akọkọ, yoo beere lọwọ rẹ lati pese ọrọ igbaniwọle root ti MariaDB, kan tẹ Tẹ lati ṣeto ọrọigbaniwọle gbongbo tuntun kan ki o jẹrisi. Fun awọn ibeere miiran, tẹ Lu Tẹ lati gba awọn eto aiyipada.

O le wa alaye ni afikun lati Oju-ile OpenLitespeed: http://open.litespeedtech.com/mediawiki/

O tun le tẹle awọn nkan ti o jọmọ.

  1. Fifi atupa (Linux, Apache, MariaDB, PHP/PhpMyAdmin) ni RHEL/CentOS 7.0
  2. Fi Nginx 1.10.1 Tuntun sii, MariaDB 10 ati PHP 5.5/5.6 lori RHEL/CentOS 7/6
  3. Bawo ni Lati Fi Nginx sii, MariaDB 10, PHP 7 (LEMP Stack) ni 16.10/16.04 Bii a ṣe le Fi sii atupa pẹlu PHP 7 ati MariaDB 10 lori Ubuntu 16.10

Ninu nkan yii, a ti ṣalaye rẹ nipasẹ awọn igbesẹ fun fifi sori ati tunto OpenLiteSpeed pẹlu PHP 7 ati MariaDB lori eto CentOS 7 kan.

A nireti pe ohun gbogbo ti lọ daradara, bibẹkọ ti firanṣẹ awọn ibeere rẹ tabi eyikeyi awọn ero nipasẹ apakan asọye ni isalẹ.