一、nginx安装搭建
a) 官网下载nginx:sudo wget http://nginx.org/download/nginx-1.18.0.tar.gz
b) 解压:sudo tar -zxvf nginx-1.18.0.tar.gz
c) 进入目录:cd nginx-1.18.0
d) 编译:sudo ./configure --prefix=/usr/local/nginx
e) 执行构建:sudo make && make install
f) 启动nginx:/usr/local/nginx/sbin/nginx
g) 查看nginx进程:ps aux | grep nginx
h) 环境配置nginx.conf :
一、PHP7源码安装
a) 官网下载PHP源码:php-7.2.32.tar.bz2
b) 解压:sudo tar -jxvf php-7.2.32.tar.bz2
c) 进入目录:cd php-7.2.32
d) 编译:./configure --prefix=/usr/local/php --with-mysqli=mysqlnd --enable-mysqlnd --with-iconv=/usr/local/opt/libiconv --enable-fpm
e) 执行构建:sudo make && make install
f) 拷贝php.ini:cp /usr/local/package/php-7.3.20/php.ini-development /usr/local/php/lib/php.ini (从PHP安装目录拷贝一份php.ini文件到PHP程序的lib目录下)
g) 拷贝php-fpm.conf:cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
h) 拷贝www.conf: cp /usr/local/php/etc/php-fpm.d/www.conf.default /usr/local/php/etc/php-fpm.d/www.conf.
i) 启动PHP:/usr/local/php/sbin/php-fpm
三、mysql安装(方法多种):
a) 下载mysql包:wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.24-linux-glibc2.12-x86_64.tar.gz
b) 解压:tar -xzvf mysql-5.7.24-linux-glibc2.12-x86_64.tar.gz
c) 重命名: mv mysql-5.7.24-linux-glibc2.12-x86_64 /usr/local/mysql
d) 其他略过(有问题请留言)