在平时运维工作中,经常需要用到LNMP应用框架。LNMP环境是指在Linux系统下,由Nginx + MySQL + PHP组成的网站服务器架构。

可参考前面的文章:

 (1) CentOS7.5 (系统最小化安装)准备环境。

# 更改主机名
[root@localhost ~]# hostnamectl set-hostname --static lnmp-01 && exec bash # 关闭SELinux
[root@lnmp-01 ~]# sed -i '7s/enforcing/disabled/' /etc/selinux/config
[root@lnmp-01 ~]# setenforce 0
[root@lnmp-01 ~]# getenforce
Permissive # 关闭firewalld
[root@lnmp-01 ~]# systemctl stop firewalld && systemctl disable firewalld # 查看内核版本
[root@lnmp-01 ~]# cat /etc/redhat-release
CentOS Linux release 7.5.1804 (Core)
[root@lnmp-01 ~]# uname -r
3.10.0-862.el7.x86_64 # 安装基础软件
[root@lnmp-01 ~]# yum install -y vim wget lsof net-tools tree curl lrzsz

(2) 安装Nginx-1.18.0   【官方下载站点:源码包rpm包,版本号A.B.C,B是偶数为稳定版;奇数则为开发版】【官方站点:configure命令参数

# 查看是否已安装,有则卸载
[root@lnmp-01 ~]# yum list installed | egrep nginx
[root@lnmp-01 ~]# yum remove -y nginx.x86_64 nginx-xxx # 创建nginx用户和目录
[root@lnmp-01 ~]# useradd -M -s /sbin/nologin nginx
[root@lnmp-01 ~]# mkdir -p /data/apps/nginx # 安装nginx 编译所需依赖
[root@lnmp-01 ~]# yum -y install gcc gcc-c++ make zlib-devel pcre-devel openssl-devel
[root@lnmp-01 ~]# wget http://nginx.org/download/nginx-1.18.0.tar.gz
[root@lnmp-01 ~]# tar -xf nginx-1.18.0.tar.gz
[root@lnmp-01 ~]# ls
nginx-1.18.0 nginx-1.18.0.tar.gz
[root@lnmp-01 ~]# cd nginx-1.18.0
# 选择相应的编译参数【官方站点:configure命令参数】
[root@lnmp-01 nginx-1.18.0]# ./configure --help
[root@lnmp-01 nginx-1.18.0]# ./configure --prefix=/data/apps/nginx \
--user=nginx \
--group=nginx \
--with-http_ssl_module \
--with-http_flv_module \
--with-http_stub_status_module \
--with-http_gzip_static_module 编译参数解析
--prefix=      安装目录路径
--user=       用户
--group=      组
--with-http_ssl_module    支持HTTPS协议
--with-http_flv_module    支持Flash视频  
--with-http_stub_status_module  提供访问的状态信息
--with-http_gzip_static_module  支持gzip压缩文件 [root@lnmp-01 nginx-1.18.0]# make -j 4 && make install    #make -j 4 表示开4核同时进行编译: cat /proc/cpuinfo| grep "processor"| wc -l # 将nginx命令添加环境变量
[root@lnmp-01 ~]# echo "export PATH=/data/apps/nginx/sbin:$PATH" >> /etc/profile.d/nginx.sh
[root@lnmp-01 ~]# source /etc/profile.d/nginx.sh # nginx命令语法及参数
[root@lnmp-01 ~]# nginx -h
nginx version: nginx/1.18.0
Usage: nginx [-?hvVtTq] [-s signal] [-c filename] [-p prefix] [-g directives] Options:
-?,-h : this help
-v : show version and exit
-V : show version and configure options then exit
-t : test configuration and exit
-T : test configuration, dump it and exit
-q : suppress non-error messages during configuration testing
-s signal : send signal to a master process: stop, quit, reopen, reload
-p prefix : set prefix path (default: /data/apps/nginx/)
-c filename : set configuration file (default: conf/nginx.conf)
-g directives : set global directives out of configuration file # 测试启动nginx
[root@lnmp-01 ~]# nginx
[root@lnmp-01 ~]# netstat -ntupl | grep nginx
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1098/nginx: master # 访问nginx测试页面
[root@lnmp-01 ~]# curl 127.0.0.1
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>    
<style>
body {
width: 35em;
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
}
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>    # 安装正常会显示如下内容
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p> <p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p> <p><em>Thank you for using nginx.</em></p>
</body>
</html> [root@lnmp-01 ~]# nginx -s stop # 添加systemd管理
[root@lnmp-01 ~]# vim /usr/lib/systemd/system/nginx.service
# 添加以下内容
[Unit]
Description=The nginx HTTP and reverse proxy server
After=network-online.target remote-fs.target nss-lookup.target
Wants=network-online.target [Service]
Type=forking
PIDFile=/data/apps/nginx/logs/nginx.pid    # 自定义项
# Nginx will fail to start if /run/nginx.pid already exists but has the wrong
# SELinux context. This might happen when running `nginx -t` from the cmdline.
# https://bugzilla.redhat.com/show_bug.cgi?id=1268621
ExecStartPre=/usr/bin/rm -f /data/apps/nginx/logs/nginx.pid    # 自定义项
ExecStartPre=/data/apps/nginx/sbin/nginx -t -c /data/apps/nginx/conf/nginx.conf    # 自定义项
ExecStart=/data/apps/nginx/sbin/nginx    # 自定义项
ExecReload=/data/apps/nginx/sbin/nginx -s reload    # 自定义项
KillSignal=SIGQUIT
TimeoutStopSec=5
KillMode=process
PrivateTmp=true [Install]
WantedBy=multi-user.target # 启动nginx
[root@lnmp-01 ~]# systemctl daemon-reload
[root@lnmp-01 ~]# systemctl start|stop|restart|reload nginx
[root@lnmp-01 ~]# netstat -nutpl | grep nginx
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 9714/nginx: master
[root@lnmp-01 ~]# ps -ef |grep nginx
root 9714 1 0 11:46 ? 00:00:00 nginx: master process /data/apps/nginx/sbin/nginx
nginx 9715 9714 0 11:46 ? 00:00:00 nginx: worker process # 设置开机自启动
[root@lnmp-01 ~]# systemctl enable nginx
[root@lnmp-01 ~]# systemctl list-unit-files | grep nginx
nginx.service enabled

 (3) MySQL-5.7.30 【官方下载站点:源码/rpm包】【下载站点:boost_1_59_0】【官方站点:cmake选项参数

# 查看是否已安装mariadb或mysql,有则卸载
[root@lnmp-01 ~]# yum list installed | egrep 'mariadb|mysql'
mariadb-libs.x86_64 1:5.5.56-2.el7 @anaconda
[root@lnmp-01 ~]# yum remove -y mariadb-libs.x86_64 # 安装mysql编译所需依赖
[root@lnmp-01 ~]# yum install -y cmake make gcc gcc-c++ bison ncurses ncurses-devel # 若需下载其他版本,修改最后段版本号(30改为34)即可;推荐到官方站点下载
[root@lnmp-01 ~]# wget https://cdn.mysql.com/archives/mysql-5.7/mysql-5.7.30.tar.gz    # 地址1
[root@lnmp-01 ~]# wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.30.tar.gz  # 地址2
[root@lnmp-01 ~]# wget https://sourceforge.net/projects/boost/files/boost/1.59.0/boost_1_59_0.tar.gz
---------------------------------# 或下载带boost的包 ----------------------------------------------------
[root@lnmp-01 ~]# wget https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-5.7.30.tar.gz  # 地址1
[root@lnmp-01 ~]# wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-boost-5.7.30.tar.gz  # 地址2
--------------------------------------------------------------------------------------------------------
[root@lnmp-01 ~]# tar -xf mysql-5.7.30.tar.gz
[root@lnmp-01 ~]# tar -xf boost_1_59_0.tar.gz
[root@lnmp-01 ~]# ls
boost_1_59_0 boost_1_59_0.tar.gz mysql-5.7.30 mysql-5.7.30.tar.gz
[root@lnmp-01 ~]# cd mysql-5.7.30
# 选择相应的编译参数【官方站点:cmake选项参数】
[root@lnmp-01 mysql-5.7.30]# cmake --help
[root@lnmp-01 mysql-5.7.30]# cmake . \
-DCMAKE_INSTALL_PREFIX=/data/apps/mysql \
-DMYSQL_DATADIR=/data/apps/mysql/data_db \
-DSYSCONFDIR==/etc \
-DDEFAULT_CHARSET=utf8mb4 \
-DWITH_SYSTEMD=bool \
-DENABLED_LOCAL_INFILE=bool \
-DWITH_BOOST=/root/boost_1_59_0 \
-DWITH_EXTRA_CHARSETS=all ======= 等待几分钟完成编译,末尾正常输出以下内容=========
......
-- INSTALL mysqlclient.pc lib/pkgconfig
-- Skipping deb packaging on unsupported platform .
-- CMAKE_BUILD_TYPE: RelWithDebInfo
-- COMPILE_DEFINITIONS: _GNU_SOURCE;_FILE_OFFSET_BITS=64;HAVE_CONFIG_H
-- CMAKE_C_FLAGS: -Wall -Wextra -Wformat-security -Wvla -Wwrite-strings -Wdeclaration-after-statement
-- CMAKE_CXX_FLAGS: -Wall -Wextra -Wformat-security -Wvla -Woverloaded-virtual -Wno-unused-parameter
-- CMAKE_C_LINK_FLAGS:
-- CMAKE_CXX_LINK_FLAGS:
-- CMAKE_C_FLAGS_RELWITHDEBINFO: -O3 -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -DDBUG_OFF
-- CMAKE_CXX_FLAGS_RELWITHDEBINFO: -O3 -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -DDBUG_OFF
-- Configuring done
-- Generating done
-- Build files have been written to: /root/mysql-5.7.30 参数说明:
-DCMAKE_INSTALL_PREFIX:mysql安装目录
-DMYSQL_DATADIR:数据存放目录
-DEFAULT_CHARSET:数据库默认字符编码
-DWITH_SYSTEMD:提供systemd脚本
-DENABLED_LOCAL_INFILE:允许从本文件导入数据
-DWITH_BOOST: boost源码路径
-DWITH_EXTRA_CHARSETS:支持额外字符集 ----------------------------------------------------------------------
# 若cmake出错了,需根据下面操作,然后再重新编译安装。
[root@wencheng mysql-5.7.30]# find / -iname CMakeCache.txt
[root@wencheng mysql-5.7.30]# make clean
[root@wencheng mysql-5.7.30]# rm -f CMakeCache.txt
---------------------------------------------------------------------- [root@lnmp-01 mysql-5.7.30]# make -j 4 && make install    # make -j 4 表示开4核同时进行编译: cat /proc/cpuinfo| grep "processor"| wc -l [root@lnmp-01 ~]# /data/apps/mysql/bin/mysql -V
/data/apps/mysql/bin/mysql Ver 14.14 Distrib 5.7.30, for Linux (x86_64) using EditLine wrapper # 添加环境变量
[root@lnmp-01 ~]# echo "PATH=/data/apps/mysql/bin:$PATH" >> /etc/profile.d/mysql.sh
[root@lnmp-01 ~]# source /etc/profile.d/mysql.sh # 创建mysql用户和目录并设置权限
[root@lnmp-01 ~]# useradd -M -s /sbin/nologin mysql
[root@lnmp-01 ~]# mkdir -p /data/apps/mysql/{data_db,logs,tmp}
[root@lnmp-01 ~]# chown -R mysql:mysql /data/apps/mysql/{data_db,logs,tmp} # 创建配置文件my.cnf
[root@lnmp-01 ~]# vim /etc/my.cnf
[client]
port = 3306
default-character-set = utf8mb4
socket = /data/apps/mysql/tmp/mysql.sock [mysql]
port = 3306
default-character-set = utf8mb4
socket = /data/apps/mysql/tmp/mysql.sock [mysqld]
port = 3306
server-id = 1
user = mysql
basedir = /data/apps/mysql
datadir = /data/apps/mysql/data_db
character_set_server = utf8mb4
collation-server = utf8mb4_general_ci
socket = /data/apps/mysql/tmp/mysql.sock log-error = /data/apps/mysql/logs/mysql-error.log
pid-file = /data/apps/mysql/tmp/mysqld.pid # 执行初始化
[root@lnmp-01 ~]# /data/apps/mysql/bin/mysqld --initialize-insecure --basedir=/data/apps/mysql --datadir=/data/apps/mysql/data_db --user=mysql   #(5.7以上版本)
--------- 正常输出以下信息 -----------
2021-06-22T11:38:05.991267Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2021-06-22T11:38:06.327772Z 0 [Warning] InnoDB: New log files created, LSN=45790
2021-06-22T11:38:06.367358Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2021-06-22T11:38:06.424912Z 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: 4fc67845-d34e-11eb-9ce0-000c29ceb2c0.
2021-06-22T11:38:06.426105Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2021-06-22T11:38:06.590676Z 0 [Warning] CA certificate ca.pem is self signed.
2021-06-22T11:38:06.643809Z 1 [Warning] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option. # 添加systemd管理
[root@lnmp-01 ~]# cp /data/apps/mysql/usr/lib/systemd/system/mysqld.service /usr/lib/systemd/system/
[root@lnmp-01 ~]# grep -Ev '^$|#' /usr/lib/systemd/system/mysqld.service
[Unit]
Description=MySQL Server
Documentation=man:mysqld(8)
Documentation=http://dev.mysql.com/doc/refman/en/using-systemd.html
After=network.target
After=syslog.target
[Install]
WantedBy=multi-user.target
[Service]
User=mysql
Group=mysql
Type=forking
PIDFile=/data/apps/mysql/tmp/mysqld.pid    # 自定义项
TimeoutSec=0
PermissionsStartOnly=true
ExecStartPre=/data/apps/mysql/bin/mysqld_pre_systemd
ExecStart=/data/apps/mysql/bin/mysqld --daemonize --pid-file=/data/apps/mysql/tmp/mysqld.pid $MYSQLD_OPTS # 自定义项
EnvironmentFile=-/etc/sysconfig/mysql
LimitNOFILE = 5000
Restart=on-failure
RestartPreventExitStatus=1
PrivateTmp=false # 启动mysql
[root@lnmp-01 ~]# systemctl daemon-reload
[root@lnmp-01 ~]# systemctl start|stop|restart|reload mysqld
[root@lnmp-01 ~]# netstat -nutpl | grep mysql
tcp6 0 0 :::3306 :::* LISTEN 30472/mysqld
[root@lnmp-01 ~]# ps -ef |grep mysql
mysql 30472 1 0 12:33 ? 00:00:00 /data/apps/mysql/bin/mysqld --daemonize --pid-file=/data/apps/mysql/tmp/mysqld.pid # 登录mysql
[root@lnmp-01 ~]# mysql -uroot
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.30 Source distribution Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.00 sec) # 设置开机自启动
[root@lnmp-01 ~]# systemctl enable mysqld
[root@lnmp-01 ~]# systemctl list-unit-files | grep mysql
mysqld.service enabled

 (4) PHP-7.4.14 【官方下载站点:源码包】【官方站点:comfigure选项参数

# 查看是否已安装php,有则卸载
[root@lnmp-01 ~]# yum list installed | grep php # 安装mysql编译所需依赖
[root@lnmp-01 ~]# yum install -y epel-release
[root@lnmp-01 ~]# yum install -y bzip2 bzip2-devel libmcrypt-devel openssl-devel libxml2-devel sqlite-devel libcurl-devel libpng-devel libjpeg libjpeg-devel oniguruma oniguruma-devel # 下载指定版本
[root@lnmp-01 ~]# wget https://www.php.net/distributions/php-7.4.14.tar.gz
[root@lnmp-01 ~]# tar -xf php-7.4.14.tar.gz
[root@lnmp-01 ~]# cd php-7.4.14 # 选择相应的编译参数【官方站点:cmake选项参数】
[root@lnmp-01 php-7.4.14]# ./configure --help
[root@lnmp-01 php-7.4.14]# ./configure --prefix=/data/apps/php \
--with-config-file-path=/etc \
--with-fpm-user=www \
--with-fpm-group=www \
--enable-fpm \
--with-openssl \
--enable-mbstring \
--enable-sockets \
--with-freetype-dir \
--with-jpeg-dir \
--with-png-dir \
--with-libxml-dir=/usr \
--enable-xml \
--with-zlib \
--with-mcrypt \
--with-bz2 \
--with-mhash ======= 等待几分钟完成编译,末尾正常输出以下内容=========
+--------------------------------------------------------------------+
| License: |
| This software is subject to the PHP License, available in this |
| distribution in the file LICENSE. By continuing this installation |
| process, you are bound by the terms of this license agreement. |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point. |
+--------------------------------------------------------------------+
Thank you for using PHP. 参数说明:
--prefix:安装目录
--with-config-file-path:配置文件位置
--with-fpm-user:进程管理器进程守护者
--with-fpm-group:进程管理器进程守护者的用户组
--enable-fpm:进程管理器
 ......
--------------------------------------------------
# 若configure出错了,需清除原编译,然后再重新编译安装。
[root@lnmp-01 php-7.4.14]# make clean
-------------------------------------------------- [root@lnmp-01 php-7.4.14]# make -j 4 && make install    # make -j 4 表示开4核同时进行编译: cat /proc/cpuinfo| grep "processor"| wc -l [root@lnmp-01 ~]# /data/apps/php/bin/php -v
PHP 7.4.14 (cli) (built: Sep 8 2021 09:41:51) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologi # 添加环境变量
[root@lnmp-01 ~]# echo "PATH=/data/apps/php/bin:$PATH" >> /etc/profile.d/php.sh
[root@lnmp-01 ~]# echo "PATH=/data/apps/php/sbin:$PATH" >> /etc/profile.d/php.sh
[root@lnmp-01 ~]# source /etc/profile.d/php.sh
-----------------------------------------------------------------
# 或可创建软连接
[root@lnmp-01 ~]# ln -s /data/apps/php/bin/php /usr/local/bin/php
[root@lnmp-01 ~]# ln -s /data/apps/php/sbin/php-fpm /usr/local/bin/php-fpm # 创建php用户并设置目录权限
[root@lnmp-01 ~]# useradd -M -s /sbin/nologin www
[root@lnmp-01 ~]# chown -R www:www /data/apps/php # 生成php服务脚本
[root@lnmp-01 ~]# cp ~/php-7.4.14/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpmd
[root@lnmp-01 ~]# chmod +x /etc/init.d/php-fpmd # 设置php-fpm配置文件
[root@lnmp-01 ~]# cp /data/apps/php/etc/php-fpm.conf.default /data/apps/php/etc/php-fpm.conf
[root@lnmp-01 ~]# cp /data/apps/php/etc/php-fpm.d/www.conf.default /data/apps/php/etc/php-fpm.d/www.conf # 测试php配置文件语法是否正确
[root@lnmp-01 ~]# php-fpm -t
[08-Sep-2021 10:45:52] NOTICE: configuration file /data/apps/php/etc/php-fpm.conf test is successful # 启动php
[root@lnmp-01 ~]# /etc/init.d/php-fpmd start|stop|force-quit|restart|reload|status|configtest
[root@lnmp-01 ~]# netstat -nuptl | grep php
tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 63705/php-fpm: mast
[root@lnmp-01 ~]# ps -ef | grep php
root 63705 1 0 10:49 ? 00:00:00 php-fpm: master process (/data/apps/php/etc/php-fpm.conf)
www 63706 63705 0 10:49 ? 00:00:00 php-fpm: pool www
www 63707 63705 0 10:49 ? 00:00:00 php-fpm: pool www # 添加systemd管理
[root@lnmp-01 ~]# vim /usr/lib/systemd/system/php-fpm.service
[Unit]
Description=The PHP FastCGI Process Manager
After=syslog.target network.target [Service]
Type=simple
PIDFile=/data/apps/php/var/run/php-fpm.pid  # 自定义项
ExecStart=/data/apps/php/sbin/php-fpm --nodaemonize --fpm-config /data/apps/php/etc/php-fpm.conf  # 自定义项
ExecReload=/bin/kill -USR2 $MAINPID [Install]
WantedBy=multi-user.target # 设置开机自启动
[root@lnmp-01 ~]# systemctl enable php-fpm
[root@lnmp-01 ~]# systemctl list-unit-files | grep php
php-fpm.service enable

至此,手动编译部署LNMP环境(CentOS7.5+Nginx-1.18.0+MySQL-5.7.30+PHP-7.4.14)已完成。

 :YUM安装php【下载rpm包

[root@lnmp-01 ~]# yum install epel-release
[root@lnmp-01 ~]# rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
# 查看php所有版本
[root@lnmp-01 ~]# ls /etc/yum.repos.d/*php*
/etc/yum.repos.d/remi-php54.repo /etc/yum.repos.d/remi-php72.repo /etc/yum.repos.d/remi-php80.repo
/etc/yum.repos.d/remi-php70.repo /etc/yum.repos.d/remi-php73.repo /etc/yum.repos.d/remi-php81.repo
/etc/yum.repos.d/remi-php71.repo /etc/yum.repos.d/remi-php74.repo
# 选择适合的版本,这里选择php74
[root@lnmp-01 ~]# yum --enablerepo=remi install -y php74-php
[root@lnmp-01 ~]# yum --enablerepo=remi install php74-php php74-php-gd php74-php-xml php74-php-sockets php74-php-session php74-php-snmp php74-php-mysql
[root@lnmp-01 ~]# php74 -v
PHP 7.4.23 (cli) (built: Aug 24 2021 16:33:30) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies

手动编译部署LNMP环境(CentOS7.5+Nginx-1.18.0+MySQL-5.7.30+PHP-7.4.14)的更多相关文章

  1. 五、部署LNMP环境(linux + nginx + mysql + php)

    装包(nginx.数据库.php.php调用)---------起服务-----权限   装包: yum -y install gcc openssl-devel pcre-devel zlib-de ...

  2. 手动部署LNMP环境(CentOS 7)

    手动部署LNMP环境(CentOS 7) 一.修改 yum 源 [root@localhost ~]# rpm -Uvh https://dl.fedoraproject.org/pub/epel/e ...

  3. 手动编译PHP开发环境

    目录 手动编译PHP开发环境 问题复盘 部署环境及配置 目标环境 安装部署环境开始 首先安装PHP 安装mysql 安装nginx 手动编译PHP开发环境 这是一篇来自深夜加班的手稿 问题复盘 你有没 ...

  4. 【转载】Centos系统快速部署LNMP环境

    PHP语言在Linux系统上运行的时候,需要在Linux系统上部署相应的Nginx.MySQL.PHP等环境,只有将这些环境参数都设置好,PHP相关应用程序才可正常运行,部署环境的方法有很多种,可手动 ...

  5. docker中基于centos镜像部署lnmp环境 php7.3 mysql8.0 最新版

    Docker是一个开源的应用容器引擎,基于Go语言并遵从Apache2.0协议开源. Docker可以让开发者打包他们的应用以及依赖包到一个轻量级.可移植的容器中,然后发布到任何流行的Linux机器上 ...

  6. CentOS编译安装LNMP环境

    这里是教大家如何在centos下利用源码编译安装LNMP环境. 工具/原料 centos服务器一台 自用电脑一台 准备篇 配置好IP.DNS .网关,确保使用远程连接工具能够连接服务器 配置防火墙,开 ...

  7. Centos 6.8编译安装LNMP环境

    Centos 6.8编译安装LNMP环境 参考资料: http://www.jb51.net/article/107429.htm https://phperzh.com/articles/1360 ...

  8. 部署文档(centos7.x\nginx\mysql5.6\jdk1.8\ssl\jboot)

    部署文档(centos7.x\nginx\mysql5.6\jdk1.8\ssl\jboot) 1.基础环境********************************************** ...

  9. SaltStack之编译安装LNMP环境

    使用saltstack编译安装LNMP环境 一,系统版本查看 二,安装salt-master和salt-minion 安装配置过程参考SaltStack概述及安装 三,修改配置文件 /etc/salt ...

随机推荐

  1. GhostScript 沙箱绕过(命令执行)漏洞(CVE-2019-6116)

    影响范围 Ghostscript 9.24之前版本 poc地址:https://github.com/vulhub/vulhub/blob/master/ghostscript/CVE-2019-61 ...

  2. 15 道超经典大厂 Java 面试题!重中之重

    从超高频的后端面试题出发,指明学习方向 大家好,我是鱼皮. 还记得我的老弟小阿巴么?他目前正值大一暑假,在家自学编程(刷短视频)中. 他整个大一期间基本都在学习前端.后来,我带他写了一次后端,结果就崩 ...

  3. 100的累加和 for循环

    1 int main() 2 { 3 int sum ; 4 int i; 5 for(i = 0; i<101; i++) 6 { 7 sum += i; 8 } 9 printf(" ...

  4. Markdown 学习(语法)

    标题 井号加空格(# ) 几个#就是几级标题 字体 粗体 (两边两个*) 斜体 (两边一个*) 斜体加粗 (两边三个*) 中间斜线 (两个波浪号~) 引用 选择引用,一个箭头 > 加空格 分割线 ...

  5. Send Excerpts from Jenkins Console Output as Email Contents

    Sometimes we need to send some excerpts from Jenkins console output (job logs) as email, such as tes ...

  6. Ubuntu 查询用户账号

    查看当前登录 who users 查看系统中所有用户: grep bash /etc/passwd XXXX-VirtualBox:~/桌面$ w 13:23:26 up 15 min, 1 user ...

  7. miniFTP项目实战二

    项目简介: 在Linux环境下用C语言开发的Vsftpd的简化版本,拥有部分Vsftpd功能和相同的FTP协议,系统的主要架构采用多进程模型,每当有一个新的客户连接到达,主进程就会派生出一个ftp服务 ...

  8. 当Transactional碰到锁,有个大坑,要小心。

    你好呀,我是why. 前几天在某平台看到一个技术问题,很有意思啊. 涉及到的两个技术点,大家平时开发使用的也比较多,但是属于一个小细节,深挖下去,还是有点意思的. 来,先带你看一下问题是什么,同时给你 ...

  9. Ubuntu18.04忘记root密码,重置root密码

    输入命令,更新root密码: sudo passwd root 然后输入新密码,再输入一次确认新密码,新密码更新完毕! 切换root账号: su 如下图所示,发现已经由zyw账号切换到root账号了!

  10. flutter捕获应用退出弹出对话框

    使用WillPopScope组件,它会检测到子组件的Navigation的pop事件,并拦截下来.我们需要在它的onWillPop属性中返回一个新的组件(一般是一个Dialog)处理是否真的pop该页 ...