lamp

打印 上一主题 下一主题

主题 911|帖子 911|积分 2733

lamp

目录

1. lamp简介

有了前面学习的知识的铺垫,今天可以来学习下第一个常用的web架构了。
所谓lamp,其实就是由Linux+Apache+Mysql/MariaDB+Php/Perl/Python的一组动态网站或者服务器的开源软件,除Linux外其它各部件本身都是各自独立的程序,但是因为经常被放在一起使用,拥有了越来越高的兼容度,共同组成了一个强大的Web应用程序平台。
LAMP指的是Linux(操作系统)、Apache(HTTP服务器)、MySQL(也指MariaDB,数据库软件)和PHP(有时也是指Perl或Python)的第一个字母,一般用来建立web应用平台。
2. web服务器工作流程

在说lamp架构平台的搭建前,我们先来了解下什么是CGI,什么是FastCGI,什么是......
web服务器的资源分为两种,静态资源和动态资源

  • 静态资源就是指静态内容,客户端从服务器获得的资源的表现形式与原文件相同。可以简单的理解为就是直接存储于文件系统中的资源
  • 动态资源则通常是程序文件,需要在服务器执行之后,将执行的结果返回给客户端
那么web服务器如何执行程序并将结果返回给客户端呢?下面通过一张图来说明一下web服务器如何处理客户端的请求

阶段①显示的是httpd服务器(即apache)和php服务器通过FastCGI协议进行通信,且php作为独立的服务进程运行
阶段②显示的是php程序和mysql数据库间通过mysql协议进行通信。php与mysql本没有什么联系,但是由Php语言写成的程序可以与mysql进行数据交互。同理perl和python写的程序也可以与mysql数据库进行交互
2.1 cgi与fastcgi

CGI(Common Gateway Interface,通用网关接口),CGI是外部应用程序(CGI程序)与WEB服务器之间的接口标准,是在CGI程序和Web服务器之间传递信息的过程。CGI规范允许Web服务器执行外部程序,并将它们的输出发送给Web浏览器,CGI将web的一组简单的静态超媒体文档变成一个完整的新的交互式媒体。
FastCGI(Fast Common Gateway Interface)是CGI的改良版,CGI是通过启用一个解释器进程来处理每个请求,耗时且耗资源,而FastCGI则是通过master-worker形式来处理每个请求,即启动一个master主进程,然后根据配置启动几个worker进程,当请求进来时,master会从worker进程中选择一个去处理请求,这样就避免了重复的生成和杀死进程带来的频繁cpu上下文切换而导致耗时
2.2 httpd与php结合的方式

httpd与php结合的方式有以下三种:

  • modules:php将以httpd的扩展模块形式存在,需要加载动态资源时,httpd可以直接通过php模块来加工资源并返回给客户端

    • httpd prefork:libphp5.so(多进程模型的php)
    • httpd event or worker:libphp5-zts.so(线程模型的php)

  • CGI:httpd需要加载动态资源时,通过CGI与php解释器联系,获得php执行的结果,此时httpd负责与php连接的建立和断开等
  • FastCGI:利用php-fpm机制,启动为服务进程,php自行运行为一个服务,https通过socket与php通信
较于CGI方式,FastCGI更为常用,很少有人使用CGI方式来加载动态资源
2.3 web工作流程


  • 客户端通过http协议请求web服务器资源
  • web服务器收到请求后判断客户端请求的资源是静态资源或是动态资源

    • 若是静态资源则直接从本地文件系统取之返回给客户端。
    • 否则若为动态资源则通过FastCGI协议与php服务器联系,通过CGI程序的master进程调度worker进程来执行程序以获得客户端请求的动态资源,并将执行的结果通过FastCGI协议返回给httpd服务器,httpd服务器收到php的执行结果后将其封装为http响应报文响应给客户端。在执行程序获取动态资源时若需要获得数据库中的资源时,由Php服务器通过mysql协议与MySQL/MariaDB服务器交互,取之而后返回给httpd,httpd将从php服务器收到的执行结果封装成http响应报文响应给客户端。

3. lamp平台搭建

环境说明:
系统平台IP需要安装的服务centos7 redhat7172.16.12.128httpd-2.4 mysql-5.7 php php-mysqllamp平台软件安装次序:
httpd --> mysql --> php
3.1 安装httpd
  1. [root@mr ~]# cd /etc/yum.repos.d/
  2. [root@mr yum.repos.d]# ls
  3. CentOS-Stream-AppStream.repo  CentOS-Stream-Extras.repo            CentOS-Stream-PowerTools.repo
  4. CentOS-Stream-BaseOS.repo     CentOS-Stream-HighAvailability.repo  CentOS-Stream-RealTime.repo
  5. CentOS-Stream-Debuginfo.repo  CentOS-Stream-Media.repo
  6. [root@mr yum.repos.d]# rm -rf *
  7. [root@mr yum.repos.d]# ls
  8. [root@mr yum.repos.d]# curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
  9.   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
  10.                                  Dload  Upload   Total   Spent    Left  Speed
  11. 100  2495  100  2495    0     0  15993      0 --:--:-- --:--:-- --:--:-- 16096
  12. [root@mr yum.repos.d]# ls
  13. CentOS-Base.repo
  14. [root@mr yum.repos.d]# sed -i -e '/mirrors.cloud.aliyuncs.com/d' -e '/mirrors.aliyuncs.com/d' /etc/yum.repos.d/CentOS-Base.repo
  15. [root@mr yum.repos.d]# yum install -y https://mirrors.aliyun.com/epel/epel-release-latest-8.noarch.rpm
  16. CentOS-8.5.2111 - Base - mirrors.aliyun.com                              144 kB/s | 3.9 kB     00:00   
  17. CentOS-8.5.2111 - Extras - mirrors.aliyun.com                             69 kB/s | 1.5 kB     00:00   
  18. CentOS-8.5.2111 - AppStream - mirrors.aliyun.com                         176 kB/s | 4.3 kB     00:00   
  19. epel-release-latest-8.noarch.rpm                                         449 kB/s |  24 kB     00:00   
  20. Dependencies resolved.
  21. =========================================================================================================
  22. Package                    Architecture         Version                Repository                  Size
  23. =========================================================================================================
  24. Installing:
  25. epel-release               noarch               8-16.el8               @commandline                24 k
  26. Transaction Summary
  27. =========================================================================================================
  28. Install  1 Package
  29. Total size: 24 k
  30. Installed size: 34 k
  31. Downloading Packages:
  32. Running transaction check
  33. Transaction check succeeded.
  34. Running transaction test
  35. Transaction test succeeded.
  36. Running transaction
  37.   Preparing        :                                                                                 1/1
  38.   Installing       : epel-release-8-16.el8.noarch                                                    1/1
  39.   Running scriptlet: epel-release-8-16.el8.noarch                                                    1/1
  40. Many EPEL packages require the CodeReady Builder (CRB) repository.
  41. It is recommended that you run /usr/bin/crb enable to enable the CRB repository.
  42.   Verifying        : epel-release-8-16.el8.noarch                                                    1/1
  43. Installed products updated.
  44. Installed:
  45.   epel-release-8-16.el8.noarch                                                                           
  46. Complete!
  47. [root@mr yum.repos.d]#
  48. [root@mr yum.repos.d]# sed -i 's|^#baseurl=https://download.example/pub|baseurl=https://mirrors.aliyun.com|' /etc/yum.repos.d/epel*
  49. [root@mr yum.repos.d]# sed -i 's|^metalink|#metalink|' /etc/yum.repos.d/epel*
  50. [root@mr yum.repos.d]# ls
  51. CentOS-Base.repo  epel-modular.repo  epel.repo  epel-testing-modular.repo  epel-testing.repo
  52. [root@mr yum.repos.d]# cd
  53. [root@mr ~]# dnf clean all
  54. 37 files removed
  55. [root@mr ~]#
  56. [root@mr ~]# dnf makecache
  57. CentOS-8.5.2111 - Base - mirrors.aliyun.com                               10 MB/s | 4.6 MB     00:00   
  58. CentOS-8.5.2111 - Extras - mirrors.aliyun.com                            104 kB/s |  10 kB     00:00   
  59. CentOS-8.5.2111 - AppStream - mirrors.aliyun.com                          11 MB/s | 8.4 MB     00:00   
  60. Extra Packages for Enterprise Linux Modular 8 - x86_64                   3.2 MB/s | 1.0 MB     00:00   
  61. Extra Packages for Enterprise Linux 8 - x86_64                            10 MB/s |  13 MB     00:01   
  62. Module yaml error: Unexpected key in data: static_context [line 9 col 3]
  63. Module yaml error: Unexpected key in data: static_context [line 9 col 3]
  64. Metadata cache created.
  65. [root@mr ~]# dnf -y install
  66. openssl-devel pcre-devel expat-devel libtool gcc gcc-c++ make vim wget
  67. ......
  68.   perl-threads-shared-1.58-2.el8.x86_64                                                                  
  69.   pkgconf-1.4.2-1.el8.x86_64                                                                             
  70.   pkgconf-m4-1.4.2-1.el8.noarch                                                                          
  71.   pkgconf-pkg-config-1.4.2-1.el8.x86_64                                                                  
  72.   zlib-devel-1.2.11-17.el8.x86_64                                                                        
  73. Complete!
  74. [root@mr ~]# [root@mr ~]# useradd -r -M -s /sbin/nologin apache
  75. [root@mr ~]# wget https://downloads.apache.org/apr/apr-1.7.0.tar.gz
  76. --2022-08-02 19:20:01--  https://downloads.apache.org/apr/apr-1.7.0.tar.gz
  77. Resolving downloads.apache.org (downloads.apache.org)... 135.181.214.104, 88.99.95.219, 2a01:4f9:3a:2c57::2, ...
  78. Connecting to downloads.apache.org (downloads.apache.org)|135.181.214.104|:443... connected.
  79. HTTP request sent, awaiting response... 200 OK
  80. Length: 1093896 (1.0M) [application/x-gzip]
  81. Saving to: ‘apr-1.7.0.tar.gz’
  82. apr-1.7.0.tar.gz           100%[=====================================>]   1.04M  15.8KB/s    in 54s     
  83. 2022-08-02 19:20:56 (19.9 KB/s) - ‘apr-1.7.0.tar.gz’ saved [1093896/1093896]
  84. [root@mr~]#https://downloads.apache.org/apr/apr-util-1.6.1.tar.gz
  85. ......
  86. --2022-08-02 19:21:15--  https://downloads.apache.org/apr/apr-util-1.6.1.tar.gz
  87. Resolving downloads.apache.org (downloads.apache.org)... 135.181.214.104, 88.99.95.219, 2a01:4f9:3a:2c57::2, ...
  88. Connecting to downloads.apache.org (downloads.apache.org)|135.181.214.104|:443... connected.
  89. HTTP request sent, awaiting response... 200 OK
  90. Length: 554301 (541K) [application/x-gzip]
  91. Saving to: ‘apr-util-1.6.1.tar.gz’
  92. apr-util-1.6.1.tar.gz      100%[=====================================>] 541.31K  4.23KB/s    in 2m 13s  
  93. 2022-08-02 19:23:29 (4.08 KB/s) - ‘apr-util-1.6.1.tar.gz’ saved [554301/554301]
  94. [root@mr ~]# wget https://downloads.apache.org/httpd/httpd-2.4.54.tar.gz
  95. --2022-08-02 19:25:49--  https://downloads.apache.org/httpd/httpd-2.4.54.tar.gz
  96. Resolving downloads.apache.org (downloads.apache.org)... 88.99.95.219, 135.181.214.104, 2a01:4f9:3a:2c57::2, ...
  97. Connecting to downloads.apache.org (downloads.apache.org)|88.99.95.219|:443... connected.
  98. HTTP request sent, awaiting response... 200 OK
  99. Length: 9743277 (9.3M) [application/x-gzip]
  100. Saving to: ‘httpd-2.4.54.tar.gz’
  101. httpd-2.4.54.tar.gz        100%[=====================================>]   9.29M  48.2KB/s    in 4m 57s  
  102. 2022-08-02 19:30:47 (32.0 KB/s) - ‘httpd-2.4.54.tar.gz’ saved [9743277/9743277]
  103. [root@mr ~]# ls
  104. anaconda-ks.cfg  apr-1.7.0.tar.gz  apr-util-1.6.1.tar.gz  httpd-2.4.54.tar.gz
  105. [root@mr ~]# tar xf apr-1.7.0.tar.gz
  106. [root@mr ~]# tar xf apr-util-1.6.1.tar.gz
  107. [root@mr ~]# ls
  108. anaconda-ks.cfg  apr-1.7.0  apr-1.7.0.tar.gz  apr-util-1.6.1  apr-util-1.6.1.tar.gz  httpd-2.4.54.tar.gz
  109. [root@mr ~]# cd apr-1.7.0
  110. [root@mr apr-1.7.0]# ls
  111. apr-config.in  atomic            config.layout  file_io     LICENSE       network_io     README.cmake  time
  112. apr.dep        build             configure      helpers     locks         NOTICE         shmem         tools
  113. apr.dsp        build.conf        configure.in   include     Makefile.in   NWGNUmakefile  strings       user
  114. apr.dsw        buildconf         docs           libapr.dep  Makefile.win  passwd         support
  115. apr.mak        build-outputs.mk  dso            libapr.dsp  memory        poll           tables
  116. apr.pc.in      CHANGES           emacs-mode     libapr.mak  misc          random         test
  117. apr.spec       CMakeLists.txt    encoding       libapr.rc   mmap          README         threadproc
  118. [root@mr apr-1.7.0]# vim configure
  119.   # $RM "$cfgfile"        //将此行加上注释,或者删除此行
  120. [root@mr apr-1.7.0]# ./configure --prefix=/usr/local/apr
  121. ......
  122. config.status: creating build/apr_rules.mk
  123. config.status: creating build/pkg/pkginfo
  124. config.status: creating apr-1-config
  125. config.status: creating apr.pc
  126. config.status: creating test/Makefile
  127. config.status: creating test/internal/Makefile
  128. config.status: creating include/arch/unix/apr_private.h
  129. config.status: executing libtool commands
  130. config.status: executing default commands
  131. [root@mr apr-1.7.0]# make
  132. ......
  133. /unix -I/root/apr-1.7.0/include/arch/unix -I/root/apr-1.7.0/include -I/root/apr-1.7.0/include/private -I/root/apr-1.7.0/include/private  export_vars.c | sed -e 's/^\#[^!]*//' | sed -e '/^$/d' >> apr.exp
  134. sed 's,^\(location=\).*$,\1installed,' < apr-1-config > apr-config.out
  135. sed -e 's,^\(apr_build.*=\).*$,\1/usr/local/apr/build-1,' -e 's,^\(top_build.*=\).*$,\1/usr/local/apr/build-1,' < build/apr_rules.mk > build/apr_rules.out
  136. make[1]: Leaving directory '/root/apr-1.7.0'
  137. [root@mr apr-1.7.0]# make install
  138. ......
  139. /usr/bin/install -c -m 755 apr-config.out /usr/local/apr/bin/apr-1-config
  140. [root@mr apr-1.7.0]# cd ../apr-util-1.6.1
  141. [root@mr apr-util-1.6.1]# ls
  142. aprutil.dep     apu-config.in     CHANGES         dbd                include         LICENSE       NWGNUmakefile    strmatch
  143. aprutil.dsp     buckets           CMakeLists.txt  dbm                ldap            Makefile.in   README           test
  144. aprutil.dsw     build             config.layout   docs               libaprutil.dep  Makefile.win  README.cmake     uri
  145. aprutil.mak     build.conf        configure       encoding           libaprutil.dsp  memcache      README.FREETDS   xlate
  146. apr-util.pc.in  buildconf         configure.in    export_vars.sh.in  libaprutil.mak  misc          redis            xml
  147. apr-util.spec   build-outputs.mk  crypto          hooks              libaprutil.rc   NOTICE        renames_pending
  148. [root@mr apr-util-1.6.1]# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
  149. checking build system type... x86_64-pc-linux-gnu
  150. checking host system type... x86_64-pc-linux-gnu
  151. checking target system type... x86_64-pc-linux-gnu
  152. ......
  153. config.status: creating test/Makefile
  154. config.status: creating include/private/apu_config.h
  155. config.status: executing default commands
  156. [root@mr apr-util-1.6.1]# make && make install
  157. ......
  158. See any operating system documentation about shared libraries for
  159. more information, such as the ld(1) and ld.so(8) manual pages.
  160. ----------------------------------------------------------------------
  161. /usr/bin/install -c -m 644 aprutil.exp /usr/local/apr-util/lib
  162. /usr/bin/install -c -m 755 apu-config.out /usr/local/apr-util/bin/apu-1-config
  163. [root@mr apr-util-1.6.1]# cd
  164. [root@mr ~]# ls /usr/local/
  165. apr  apr-util  bin  etc  games  include  lib  lib64  libexec  sbin  share  src
  166. [root@mr ~]#
  167. [root@mr ~]# ls
  168. anaconda-ks.cfg  apr-1.7.0  apr-1.7.0.tar.gz  apr-util-1.6.1  apr-util-1.6.1.tar.gz  httpd-2.4.54.tar.gz
  169. [root@mr ~]# tar xf httpd-2.4.54.tar.gz
  170. [root@mr ~]# cd httpd-2.4.54
  171. [root@mr httpd-2.4.54]# ls
  172. ABOUT_APACHE     BuildBin.dsp     docs         InstallBin.dsp  modules           ROADMAP
  173. acinclude.m4     buildconf        emacs-style  LAYOUT          NOTICE            server
  174. Apache-apr2.dsw  CHANGES          httpd.dep    libhttpd.dep    NWGNUmakefile     srclib
  175. Apache.dsw       changes-entries  httpd.dsp    libhttpd.dsp    os                support
  176. apache_probes.d  CMakeLists.txt   httpd.mak    libhttpd.mak    README            test
  177. ap.d             config.layout    httpd.spec   LICENSE         README.CHANGES    VERSIONING
  178. build            configure        include      Makefile.in     README.cmake
  179. BuildAll.dsp     configure.in     INSTALL      Makefile.win    README.platforms
  180. [root@mr httpd-2.4.54]# ./configure --prefix=/usr/local/apache \
  181. > --enable-so \
  182. > --enable-ssl \
  183. > --enable-cgi \
  184. > --enable-rewrite \
  185. > --with-zlib \
  186. > --with-pcre \
  187. > --with-apr=/usr/local/apr \
  188. > --with-apr-util=/usr/local/apr-util/ \
  189. > --enable-modules=most \
  190. > --enable-mpms-shared=all \
  191. > --with-mpm=prefork
  192. ......
  193. config.status: executing default commands
  194. configure: summary of build options:
  195.     Server Version: 2.4.54
  196.     Install prefix: /usr/local/apache
  197.     C compiler:     gcc
  198.     CFLAGS:          -g -O2 -pthread  
  199.     CPPFLAGS:        -DLINUX -D_REENTRANT -D_GNU_SOURCE  
  200.     LDFLAGS:           
  201.     LIBS:            
  202.     C preprocessor: gcc -E
  203. [root@mr httpd-2.4.54]# make && make install
  204. ......
  205. Installing build system files
  206. mkdir /usr/local/apache/build
  207. Installing man pages and online manual
  208. mkdir /usr/local/apache/man
  209. mkdir /usr/local/apache/man/man1
  210. mkdir /usr/local/apache/man/man8
  211. mkdir /usr/local/apache/manual
  212. make[1]: Leaving directory '/root/httpd-2.4.54'
  213. [root@mr httpd-2.4.54]# cd
  214. [root@mr ~]# ls
  215. anaconda-ks.cfg  apr-1.7.0.tar.gz  apr-util-1.6.1.tar.gz  httpd-2.4.54.tar.gz
  216. apr-1.7.0        apr-util-1.6.1    httpd-2.4.54
  217. [root@mr ~]# echo 'export PATH=/usr/local/apache/bin:$PATH' > /etc/profile.d/httpd.sh
  218. [root@mr ~]# cat /etc/profile.d/httpd.sh
  219. export PATH=/usr/local/apache/bin:$PATH
  220. [root@mr ~]# source /etc/profile.d/httpd.sh
  221. [root@mr ~]# which httpd
  222. /usr/local/apache/bin/httpd
  223. [root@mr ~]# ls /usr/local/apache/
  224. bin  build  cgi-bin  conf  error  htdocs  icons  include  logs  man  manual  modules
  225. [root@mr ~]#  ln -s /usr/local/apache/include/ /usr/include/apache
  226. [root@mr ~]# vim /etc/man_db.conf
  227. MANDATORY_MANPATH                       /usr/man
  228. MANDATORY_MANPATH                       /usr/share/man
  229. MANDATORY_MANPATH                       /usr/local/share/man
  230. MANDATORY_MANPATH                       /usr/local/apache/man(添加这一行)
  231. [root@mr ~]# cd /usr/lib/systemd/system
  232. [root@mr system]# ls
  233. auditd.service                           runlevel0.target
  234. autovt@.service                          runlevel1.target
  235. basic.target                             runlevel1.target.wants
  236. basic.target.wants                       runlevel2.target
  237. ......
  238. rngd-wake-threshold.service              user-.slice.d
  239. rpcbind.target                           vgauthd.service
  240. rsyslog.service                          vmtoolsd.service
  241. [root@mr system]# cp sshd.service httpd.service
  242. [root@mr system]# vim httpd.service
  243. [Unit]
  244. Description=web server daemon
  245. Documentation=man:httpd(5)
  246. After=network.target sshd-keygen.target
  247. [Service]
  248. Type=forking
  249. ExecStart=/usr/local/apache/bin/apachectl start
  250. ExecReload=/bin/kill -HUP $MAINPID
  251. ExecStop=/usr/local/apache/bin/apachectl stop
  252. [Install]
  253. WantedBy=multi-user.target
  254. [root@mr system]# cd
  255. [root@mr ~]# systemctl daemon-reload
  256. [root@mr ~]# systemctl status httpd
  257. ● httpd.service - web server daemon
  258.    Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
  259.    Active: inactive (dead)
  260.      Docs: man:httpd(5)
  261. [root@mr ~]# systemctl start httpd
  262. [root@mr ~]# ss -antl
  263. State       Recv-Q      Send-Q           Local Address:Port           Peer Address:Port     Process      
  264. LISTEN      0           128                    0.0.0.0:22                  0.0.0.0:*                     
  265. LISTEN      0           128                          *:80                        *:*                     
  266. LISTEN      0           128                       [::]:22                     [::]:*                     
  267. [root@mr ~]# systemctl enable httpd
  268. Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service.
  269. [root@mr ~]# systemctl status httpd
  270. ● httpd.service - web server daemon
  271.    Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
  272.    Active: active (running) since Tue 2022-08-02 20:12:20 CST; 53min ago
  273.      Docs: man:httpd(5)
  274. Main PID: 48353 (httpd)
  275.     Tasks: 6 (limit: 24717)
  276.    Memory: 5.8M
  277.    CGroup: /system.slice/httpd.service
  278.            ├─48353 /usr/local/apache/bin/httpd -k start
  279.            ├─48354 /usr/local/apache/bin/httpd -k start
  280.            ├─48355 /usr/local/apache/bin/httpd -k start
  281.            ├─48356 /usr/local/apache/bin/httpd -k start
  282.            ├─48357 /usr/local/apache/bin/httpd -k start
  283.            └─48358 /usr/local/apache/bin/httpd -k start
  284. Aug 02 20:12:02 mr systemd[1]: Starting web server daemon...
  285. Aug 02 20:12:20 mr apachectl[48350]: AH00558: httpd: Could not reliably determine the server's fully qua>
  286. Aug 02 20:12:20 mr systemd[1]: Started web server daemon.
  287. [root@mr ~]#
复制代码
3.2 安装mysql
  1. [root@mr ~]# dnf -y install ncurses-devel openssl-devel openssl cmake mariadb-devel
  2. ......
  3.   mariadb-connector-c-devel-3.1.11-2.el8_3.x86_64                                                        
  4.   mariadb-devel-3:10.3.28-1.module_el8.3.0+757+d382997d.x86_64                                          
  5.   ncurses-c++-libs-6.1-9.20180224.el8.x86_64                                                            
  6.   ncurses-devel-6.1-9.20180224.el8.x86_64                                                               
  7. Complete!
  8. [root@mr ~]#
  9. [root@mr ~]# useradd -r -M -s /sbin/nologin mysql
  10. [root@mr ~]# wget https://downloads.mysql.com/archives/get/p/23/file/mysql-5.7.38-linux-glibc2.12-x86_64.tar.gz
  11. ......
  12. HTTP request sent, awaiting response... 200 OK
  13. Length: 674830866 (644M) [application/x-tar-gz]
  14. Saving to: ‘mysql-5.7.38-linux-glibc2.12-x86_64.tar.gz’
  15. mysql-5.7.38-linux-glibc2. 100%[=====================================>] 643.57M   659KB/s    in 9m 26s  
  16. 2022-08-02 22:09:46 (1.14 MB/s) - ‘mysql-5.7.38-linux-glibc2.12-x86_64.tar.gz’ saved [674830866/674830866]
  17. [root@mr ~]# ls
  18. anaconda-ks.cfg  apr-1.7.0.tar.gz  apr-util-1.6.1.tar.gz  httpd-2.4.54.tar.gz
  19. apr-1.7.0        apr-util-1.6.1    httpd-2.4.54           mysql-5.7.38-linux-glibc2.12-x86_64.tar.gz
  20. [root@mr ~]# tar xf mysql-5.7.38-linux-glibc2.12-x86_64.tar.gz -C /usr/local/
  21. [root@mr ~]# cd /usr/local/
  22. [root@mr local]# ls
  23. apache  apr-util  etc    include  lib64    mysql-5.7.38-linux-glibc2.12-x86_64  share
  24. apr     bin       games  lib      libexec  sbin                                 src
  25. [root@mr local]# mv mysql-5.7.38-linux-glibc2.12-x86_64 mysql
  26. [root@mr local]# ls
  27. apache  apr  apr-util  bin  etc  games  include  lib  lib64  libexec  mysql  sbin  share  src
  28. [root@mr local]# chown -R mysql.mysql mysql
  29. [root@mr local]# ll
  30. total 0
  31. drwxr-xr-x. 14 root  root  164 Aug  2 19:53 apache
  32. drwxr-xr-x.  6 root  root   58 Aug  2 19:38 apr
  33. drwxr-xr-x.  5 root  root   43 Aug  2 19:44 apr-util
  34. drwxr-xr-x.  2 root  root    6 May 19  2020 bin
  35. drwxr-xr-x.  2 root  root    6 May 19  2020 etc
  36. drwxr-xr-x.  2 root  root    6 May 19  2020 games
  37. drwxr-xr-x.  2 root  root    6 May 19  2020 include
  38. drwxr-xr-x.  2 root  root    6 May 19  2020 lib
  39. drwxr-xr-x.  3 root  root   17 Aug  1 15:49 lib64
  40. drwxr-xr-x.  2 root  root    6 May 19  2020 libexec
  41. drwxr-xr-x.  9 mysql mysql 129 Aug  2 22:11 mysql
  42. drwxr-xr-x.  2 root  root    6 May 19  2020 sbin
  43. drwxr-xr-x.  5 root  root   49 Aug  1 15:49 share
  44. drwxr-xr-x.  2 root  root    6 May 19  2020 src
  45. [root@mr local]# ls /usr/local/mysql/
  46. bin  docs  include  lib  LICENSE  man  README  share  support-files
  47. [root@mr local]# ln -s /usr/local/mysql/include /usr/include/mysql
  48. [root@mr local]# echo '/usr/local/mysql/lib' > /etc/ld.so.conf.d/mysql.conf
  49. [root@mr local]# vim /etc/man_db.conf
  50. MANDATORY_MANPATH                       /usr/man
  51. MANDATORY_MANPATH                       /usr/share/man
  52. MANDATORY_MANPATH                       /usr/local/share/man
  53. MANDATORY_MANPATH                       /usr/local/mysql/man
  54. [root@mr local]# cd
  55. [root@mr ~]# echo 'export PATH=/usr/local/mysql/bin:$PATH' > /etc/profile.d/mysql.sh
  56. [root@mr ~]# source /etc/profile.d/mysql.sh
  57. [root@mr ~]# which mysql
  58. /usr/local/mysql/bin/mysql
  59. [root@mr ~]#
  60. [root@mr ~]# mysqld --initialize --user mysql --datadir /opt/data
  61. 2022-08-02T14:22:01.195167Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
  62. 2022-08-02T14:22:01.338468Z 0 [Warning] InnoDB: New log files created, LSN=45790
  63. 2022-08-02T14:22:01.364317Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
  64. 2022-08-02T14:22:01.423393Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 799aa4e2-126e-11ed-a53b-000c29f0dfce.
  65. 2022-08-02T14:22:01.424482Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
  66. 2022-08-02T14:22:01.621913Z 0 [Warning] A deprecated TLS version TLSv1 is enabled. Please use TLSv1.2 or higher.
  67. 2022-08-02T14:22:01.621947Z 0 [Warning] A deprecated TLS version TLSv1.1 is enabled. Please use TLSv1.2 or higher.
  68. 2022-08-02T14:22:01.622320Z 0 [Warning] CA certificate ca.pem is self signed.
  69. 2022-08-02T14:22:01.648745Z 1 [Note] A temporary password is generated for root@localhost: <rC:S!uXs6yk
  70. [root@mr ~]# echo '<rC:S!uXs6yk' > pass
  71. [root@mr ~]# rpm -qa|grep mariadb
  72. mariadb-connector-c-config-3.1.11-2.el8_3.noarch
  73. mariadb-connector-c-3.1.11-2.el8_3.x86_64
  74. mariadb-connector-c-devel-3.1.11-2.el8_3.x86_64
  75. mariadb-devel-10.3.28-1.module_el8.3.0+757+d382997d.x86_64
  76. [root@mr ~]# dnf -y remove mariadb*
  77. Removed:
  78.   mariadb-connector-c-3.1.11-2.el8_3.x86_64                                                              
  79.   mariadb-connector-c-config-3.1.11-2.el8_3.noarch                                                      
  80.   mariadb-connector-c-devel-3.1.11-2.el8_3.x86_64                                                        
  81.   mariadb-devel-3:10.3.28-1.module_el8.3.0+757+d382997d.x86_64                                          
  82. Complete!
  83. [root@mr ~]# rpm -qa|grep mariadb
  84. [root@mr ~]# vim /etc/my.cnf
  85. [mysqld]
  86. basedir = /usr/local/mysql
  87. datadir = /opt/data
  88. socket = /tmp/mysql.sock
  89. port = 3306
  90. pid-file = /opt/data/mysql.pid
  91. user = mysql
  92. skip-name-resolve
  93. [root@mr ~]# cd /usr/local/mysql/
  94. [root@mr mysql]# ls
  95. bin  docs  include  lib  LICENSE  man  README  share  support-files
  96. [root@mr mysql]# cd support-files/
  97. [root@mr support-files]# ls
  98. magic  mysqld_multi.server  mysql-log-rotate  mysql.server
  99. [root@mr support-files]# file mysql.server
  100. mysql.server: POSIX shell script, ASCII text executable
  101. [root@mr support-files]# cp mysql.server /etc/init.d/mysqld
  102. [root@mr support-files]# vim /etc/init.d/mysqld
  103. basedir=/usr/local/mysql
  104. datadir=/opt/data
  105. [root@mr support-files]# chmod +x /etc/init.d/mysqld
  106. [root@mr support-files]# cd
  107. [root@mr ~]# service mysqld start
  108. Starting MySQL.Logging to '/opt/data/mr.err'.
  109. SUCCESS!
  110. [root@mr ~]# ss -antl
  111. State       Recv-Q      Send-Q           Local Address:Port           Peer Address:Port     Process      
  112. LISTEN      0           128                    0.0.0.0:22                  0.0.0.0:*                     
  113. LISTEN      0           128                          *:80                        *:*                     
  114. LISTEN      0           128                       [::]:22                     [::]:*                     
  115. LISTEN      0           80                           *:3306                      *:*                     
  116. [root@mr ~]# chkconfig --add mysqld
  117. [root@mr ~]# chkconfig --list
  118. Note: This output shows SysV services only and does not include native
  119.       systemd services. SysV configuration data might be overridden by native
  120.       systemd configuration.
  121.       If you want to list systemd services use 'systemctl list-unit-files'.
  122.       To see services enabled on particular target use
  123.       'systemctl list-dependencies [target]'.
  124. mysqld                 0:off        1:off        2:on        3:on        4:on        5:on        6:off
  125. [root@mr ~]#
  126. [root@mr ~]# systemctl disable --now firewalld
  127. Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.
  128. Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
  129. [root@mr ~]# vim /etc/selinux/config
  130. SELINUX=disabled
  131. [root@mr ~]# reboot
  132. [root@master ~]# ss -antl
  133. State       Recv-Q      Send-Q           Local Address:Port           Peer Address:Port     Process      
  134. LISTEN      0           128                    0.0.0.0:22                  0.0.0.0:*                     
  135. LISTEN      0           80                           *:3306                      *:*                     
  136. LISTEN      0           128                          *:80                        *:*                     
  137. LISTEN      0           128                       [::]:22                     [::]:*                     
  138. [root@master ~]#
  139. [root@master ~]# dnf provides libncurses.so.5
  140. Last metadata expiration check: 2:52:43 ago on Tue 02 Aug 2022 07:55:40 PM CST.
  141. Module yaml error: Unexpected key in data: static_context [line 9 col 3]
  142. Module yaml error: Unexpected key in data: static_context [line 9 col 3]
  143. ncurses-compat-libs-6.1-9.20180224.el8.i686 : Ncurses compatibility libraries
  144. Repo        : base
  145. Matched from:
  146. Provide    : libncurses.so.5
  147. [root@master ~]# dnf -y install ncurses-compat-libs
  148. [root@master ~]# cat pass
  149. <rC:S!uXs6yk
  150. [root@master ~]# mysql -uroot -p'<rC:S!uXs6yk'
  151. mysql: [Warning] Using a password on the command line interface can be insecure.
  152. Welcome to the MySQL monitor.  Commands end with ; or \g.
  153. Your MySQL connection id is 3
  154. Server version: 5.7.38
  155. Copyright (c) 2000, 2022, Oracle and/or its affiliates.
  156. Oracle is a registered trademark of Oracle Corporation and/or its
  157. affiliates. Other names may be trademarks of their respective
  158. owners.
  159. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  160. mysql> set password = password('marui');
  161. Query OK, 0 rows affected, 1 warning (0.01 sec)
  162. mysql> exit
  163. Bye
  164. [root@master ~]# mysql -uroot -pmarui
  165. mysql: [Warning] Using a password on the command line interface can be insecure.
  166. Welcome to the MySQL monitor.  Commands end with ; or \g.
  167. Your MySQL connection id is 4
  168. Server version: 5.7.38 MySQL Community Server (GPL)
  169. Copyright (c) 2000, 2022, Oracle and/or its affiliates.
  170. Oracle is a registered trademark of Oracle Corporation and/or its
  171. affiliates. Other names may be trademarks of their respective
  172. owners.
  173. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  174. mysql> exit
  175. Bye
  176. [root@master ~]#
复制代码
3.3 安装php
  1. [root@master ~]# wget https://www.php.net/distributions/php-7.4.30.tar.xz
  2. ......
  3. Saving to: ‘php-7.4.30.tar.xz’
  4. php-7.4.30.tar.xz          100%[++++++++++++++++=====================>]   9.94M  16.1KB/s    in 5m 16s  
  5. 2022-08-02 23:24:04 (18.5 KB/s) - ‘php-7.4.30.tar.xz’ saved [10419136/10419136]
  6. [root@master ~]# sha256sum php-7.4.30.tar.xz
  7. ea72a34f32c67e79ac2da7dfe96177f3c451c3eefae5810ba13312ed398ba70d  php-7.4.30.tar.xz
  8. [root@master ~]#
  9. [root@master ~]# dnf list all|grep php|grep mysql
  10. Module yaml error: Unexpected key in data: static_context [line 9 col 3]
  11. Module yaml error: Unexpected key in data: static_context [line 9 col 3]
  12. php-mysqlnd.x86_64                                                7.2.24-1.module_el8.2.0+313+b04d0a66                   AppStream   
  13. [root@master ~]# dnf -y install libxml2 libxml2-devel openssl openssl-devel bzip2 bzip2-devel libcurl libcurl-devel libicu-devel libjpeg libjpeg-devel libpng libpng-devel openldap-devel  pcre-devel freetype freetype-devel gmp gmp-devel libmcrypt libmcrypt-devel readline readline-devel libxslt libxslt-devel mhash mhash-devel php-mysqlnd
  14. .....
  15. mhash-0.9.9.9-20.el8.x86_64                                                                           
  16.   mhash-devel-0.9.9.9-20.el8.x86_64                                                                     
  17.   openldap-devel-2.4.46-18.el8.x86_64                                                                    
  18.   php-common-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64                                                
  19.   php-mysqlnd-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64                                                
  20.   php-pdo-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64                                                   
  21.   readline-devel-7.0-10.el8.x86_64                                                                       
  22.   xz-devel-5.2.4-3.el8.x86_64                                                                           
  23.   zlib-1.2.11-17.el8.i686                                                                                
  24. Complete!
  25. [root@master ~]# dnf -y install libsqlite3x-devel
  26. Last metadata expiration check: 3:40:33 ago on Tue 02 Aug 2022 07:55:40 PM CST.
  27. Module yaml error: Unexpected key in data: static_context [line 9 col 3]
  28. Module yaml error: Unexpected key in data: static_context [line 9 col 3]
  29. Dependencies resolved.
  30. =============================================================================================================================
  31. Package                             Architecture             Version                           Repository              Size
  32. =============================================================================================================================
  33. Installing:
  34. libsqlite3x-devel                   x86_64                   20071018-26.el8                   epel                   143 k
  35. Upgrading:
  36. sqlite-libs                         x86_64                   3.26.0-15.el8                     base                   581 k
  37. Installing dependencies:
  38. libsqlite3x                         x86_64                   20071018-26.el8                   epel                    39 k
  39. sqlite                              x86_64                   3.26.0-15.el8                     base                   668 k
  40. sqlite-devel                        x86_64                   3.26.0-15.el8                     base                   165 k
  41. Transaction Summary
  42. =============================================================================================================================
  43. Install  4 Packages
  44. Upgrade  1 Package
  45. Total download size: 1.6 M
  46. Downloading Packages:
  47. (1/5): sqlite-3.26.0-15.el8.x86_64.rpm                                                       7.1 MB/s | 668 kB     00:00   
  48. (2/5): sqlite-devel-3.26.0-15.el8.x86_64.rpm                                                 1.3 MB/s | 165 kB     00:00   
  49. (3/5): libsqlite3x-20071018-26.el8.x86_64.rpm                                                233 kB/s |  39 kB     00:00   
  50. (4/5): sqlite-libs-3.26.0-15.el8.x86_64.rpm                                                   12 MB/s | 581 kB     00:00   
  51. (5/5): libsqlite3x-devel-20071018-26.el8.x86_64.rpm                                          269 kB/s | 143 kB     00:00   
  52. -----------------------------------------------------------------------------------------------------------------------------
  53. Total                                                                                        2.5 MB/s | 1.6 MB     00:00     
  54. Running transaction check
  55. Transaction check succeeded.
  56. Running transaction test
  57. Transaction test succeeded.
  58. Running transaction
  59.   Preparing        :                                                                                                     1/1
  60.   Upgrading        : sqlite-libs-3.26.0-15.el8.x86_64                                                                    1/6
  61.   Installing       : sqlite-3.26.0-15.el8.x86_64                                                                         2/6
  62.   Installing       : sqlite-devel-3.26.0-15.el8.x86_64                                                                   3/6
  63.   Installing       : libsqlite3x-20071018-26.el8.x86_64                                                                  4/6
  64.   Installing       : libsqlite3x-devel-20071018-26.el8.x86_64                                                            5/6
  65.   Cleanup          : sqlite-libs-3.26.0-13.el8.x86_64                                                                    6/6
  66.   Running scriptlet: sqlite-libs-3.26.0-13.el8.x86_64                                                                    6/6
  67.   Verifying        : sqlite-3.26.0-15.el8.x86_64                                                                         1/6
  68.   Verifying        : sqlite-devel-3.26.0-15.el8.x86_64                                                                   2/6
  69.   Verifying        : libsqlite3x-20071018-26.el8.x86_64                                                                  3/6
  70.   Verifying        : libsqlite3x-devel-20071018-26.el8.x86_64                                                            4/6
  71.   Verifying        : sqlite-libs-3.26.0-15.el8.x86_64                                                                    5/6
  72.   Verifying        : sqlite-libs-3.26.0-13.el8.x86_64                                                                    6/6
  73. Installed products updated.
  74. Upgraded:
  75.   sqlite-libs-3.26.0-15.el8.x86_64                                                                                          
  76. Installed:
  77.   libsqlite3x-20071018-26.el8.x86_64       libsqlite3x-devel-20071018-26.el8.x86_64       sqlite-3.26.0-15.el8.x86_64      
  78.   sqlite-devel-3.26.0-15.el8.x86_64      
  79. Complete!
  80. [root@master ~]# dnf -y install http://mirror.centos.org/centos/8-stream/PowerTools/x86_64/os/Packages/oniguruma-devel-6.8.2-2.el8.x86_64.rpm
  81. ......
  82. Verifying        : oniguruma-6.8.2-2.el8.x86_64                                                                        1/2
  83.   Verifying        : oniguruma-devel-6.8.2-2.el8.x86_64                                                                  2/2
  84. Installed products updated.
  85. Installed:
  86.   oniguruma-6.8.2-2.el8.x86_64                               oniguruma-devel-6.8.2-2.el8.x86_64                              
  87. Complete!
  88. [root@master ~]# ls
  89. anaconda-ks.cfg   apr-util-1.6.1         httpd-2.4.54.tar.gz                         php-7.4.30.tar.xz
  90. apr-1.7.0         apr-util-1.6.1.tar.gz  mysql-5.7.38-linux-glibc2.12-x86_64.tar.gz
  91. apr-1.7.0.tar.gz  httpd-2.4.54           pass
  92. [root@master ~]# dnf -y install libzip-devel
  93. Verifying        : libzip-devel-1.5.1-2.module_el8.2.0+313+b04d0a66.x86_64                         2/2
  94. Installed products updated.
  95. Installed:
  96.   libzip-1.5.1-2.module_el8.2.0+313+b04d0a66.x86_64                                                      
  97.   libzip-devel-1.5.1-2.module_el8.2.0+313+b04d0a66.x86_64                                                
  98. Complete!
  99. [root@master ~]#
  100. [root@master ~]# tar xf php-7.4.30.tar.xz
  101. [root@master ~]# cd php-7.4.30
  102. [root@master php-7.4.30]# ./configure --prefix=/usr/local/php7  \
  103. > --with-config-file-path=/etc \
  104. > --enable-fpm \
  105. > --enable-inline-optimization \
  106. > --disable-debug \
  107. > --disable-rpath \
  108. > --enable-shared \
  109. > --enable-soap \
  110. > --with-openssl \
  111. > --enable-bcmath \
  112. ......
  113. config.status: creating main/php_config.h
  114. config.status: executing default commands
  115. +--------------------------------------------------------------------+
  116. | License:                                                           |
  117. | This software is subject to the PHP License, available in this     |
  118. | distribution in the file LICENSE. By continuing this installation  |
  119. | process, you are bound by the terms of this license agreement.     |
  120. | If you do not agree with the terms of this license, you must abort |
  121. | the installation process at this point.                            |
  122. +--------------------------------------------------------------------+
  123. Thank you for using PHP.
  124. [root@master php-7.4.30]# make
  125. ......
  126. pharcommand.inc
  127. invertedregexiterator.inc
  128. directorytreeiterator.inc
  129. directorygraphiterator.inc
  130. phar.inc
  131. Build complete.
  132. Don't forget to run 'make test'.
  133. [root@master php-7.4.30]# make install
  134. Installing shared extensions:     /usr/local/php7/lib/php/extensions/no-debug-non-zts-20190902/
  135. Installing PHP CLI binary:        /usr/local/php7/bin/
  136. Installing PHP CLI man page:      /usr/local/php7/php/man/man1/
  137. ......
  138. /root/php-7.4.30/build/shtool install -c ext/phar/phar.phar /usr/local/php7/bin/phar.phar
  139. ln -s -f phar.phar /usr/local/php7/bin/phar
  140. Installing PDO headers:           /usr/local/php7/include/php/ext/pdo/
  141. [root@master php-7.4.30]# echo 'export PATH=/usr/local/php7/bin:$PATH' > /etc/profile.d/php7.sh
  142. [root@master php-7.4.30]#  source /etc/profile.d/php7.sh
  143. [root@master php-7.4.30]#  which php
  144. /usr/local/php7/bin/php
  145. [root@master php-7.4.30]# php -v
  146. PHP 7.4.30 (cli) (built: Aug  3 2022 00:00:44) ( NTS )
  147. Copyright (c) The PHP Group
  148. Zend Engine v3.4.0, Copyright (c) Zend Technologies
  149. [root@master php-7.4.30]# cp php.ini-production /etc/php.ini
  150. cp: overwrite '/etc/php.ini'? y
  151. [root@master php-7.4.30]# cd sapi/
  152. [root@master sapi]# ls
  153. apache2handler  cgi  cli  embed  fpm  litespeed  phpdbg
  154. [root@master sapi]# cd fpm/
  155. [root@master fpm]# ls
  156. config.m4       init.d.php-fpm.in  php-fpm.8        php-fpm.service     tests
  157. CREDITS         LICENSE            php-fpm.8.in     php-fpm.service.in  www.conf
  158. fpm             Makefile.frag      php-fpm.conf     status.html         www.conf.in
  159. init.d.php-fpm  php-fpm            php-fpm.conf.in  status.html.in
  160. [root@master fpm]# file init.d.php-fpm
  161. init.d.php-fpm: POSIX shell script, ASCII text executable
  162. [root@master fpm]# cp init.d.php-fpm /etc/init.d/php-fpm
  163. [root@master fpm]# chmod +x /etc/init.d/php-fpm
  164. [root@master fpm]# cd
  165. [root@master ~]# service php-fpm status
  166. php-fpm is stopped
  167. [root@master ~]# cd /usr/local/php7/
  168. [root@master php7]# ls
  169. bin  etc  include  lib  php  sbin  var
  170. [root@master php7]# cd etc/
  171. [root@master etc]# ls
  172. pear.conf  php-fpm.conf.default  php-fpm.d
  173. [root@master etc]# cp php-fpm.conf.default php-fpm.conf
  174. [root@master etc]# ls
  175. pear.conf  php-fpm.conf  php-fpm.conf.default  php-fpm.d
  176. [root@master etc]# cd php-fpm.d/
  177. [root@master php-fpm.d]# ls
  178. www.conf.default
  179. [root@master php-fpm.d]# cp www.conf.default www.conf
  180. [root@master php-fpm.d]# ls
  181. www.conf  www.conf.default
  182. [root@master php-fpm.d]# service php-fpm start
  183. Starting php-fpm  done
  184. [root@master php-fpm.d]# ss -antl
  185. State       Recv-Q      Send-Q           Local Address:Port           Peer Address:Port     Process      
  186. LISTEN      0           128                  127.0.0.1:9000                0.0.0.0:*                     
  187. LISTEN      0           128                    0.0.0.0:22                  0.0.0.0:*                     
  188. LISTEN      0           80                           *:3306                      *:*                     
  189. LISTEN      0           128                          *:80                        *:*                     
  190. LISTEN      0           128                       [::]:22                     [::]:*                     
  191. [root@master php-fpm.d]#
  192. [root@master php-fpm.d]# cd
  193. [root@master ~]# chkconfig --add php-fpm
  194. [root@master ~]# chkconfig --list
  195. Note: This output shows SysV services only and does not include native
  196.       systemd services. SysV configuration data might be overridden by native
  197.       systemd configuration.
  198.       If you want to list systemd services use 'systemctl list-unit-files'.
  199.       To see services enabled on particular target use
  200.       'systemctl list-dependencies [target]'.
  201. mysqld                 0:off        1:off        2:on        3:on        4:on        5:on        6:off
  202. php-fpm                0:off        1:off        2:on        3:on        4:on        5:on        6:off
  203. [root@master ~]#
复制代码
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复

使用道具 举报

0 个回复

正序浏览

快速回复

您需要登录后才可以回帖 登录 or 立即注册

本版积分规则

郭卫东

金牌会员
这个人很懒什么都没写!
快速回复 返回顶部 返回列表