源码安装nginx1.18版本
下载地址http://nginx.org/en/download.html
首先安装nginx需要的依赖包 [root@localhost?~]#?yum?-y?install?gcc?pcre?openssl-devel [root@localhost?~]#?wget???#下载源码包 [root@localhost?~]#?ls anaconda-ks.cfg??nginx-1.18.0.tar.gz [root@localhost?~]#?tar?-xvf?nginx-1.18.0.tar.gz?-C?/usr/local/src/?#将压缩包解压到指定路径下 [root@localhost?~]#?useradd?-M?-s?/sbin/nologin?nginx??#创建一个用于管理nginx程序进程的用户nginx且没有家目录 [root@localhost?~]#?mkdir?/usr/local/nginx????#创建安装目录 [root@localhost?~]#?chown?-R?nginx:nginx?/usr/local/nginx??#修改nginx目录权限 [root@localhost?~]#?cd?/usr/local/src/nginx-1.18.0/ [root@localhost?nginx-1.18.0]#?ls auto??CHANGES??CHANGES.ru??conf??configure??contrib??html??LICENSE??man??README??src [root@localhost?nginx-1.18.0]#?./configure?--prefix=/usr/local/nginx?--user=nginx?--group=nginx?--with-http_ssl_module?#编译 [root@localhost?nginx-1.18.0]#?make?&&?make?install?安装 [root@localhost?~]#?/usr/local/nginx/sbin/nginx??#启动nginx服务 [root@localhost?~]#?systemctl?stop?firewalld????#关闭防火墙 [root@localhost?~]#?setenforce?0??#关闭selinux
安装就已经完成了,测试一下,打开浏览器,输入虚拟机的ip地址
?2.yum源安装mariaDB和php (安装的包:mariadb,mariadb-server,mariadb-devel,php,php-fpm,php-mysql)
[root@localhost?~]#?yum?-y?install?mariadb?mariadb-server?mariadb-devel?php?php-fpm?php-mysql? [root@localhost?~]#?systemctl?start?mariadb [root@localhost?~]#?systemctl?enable?mariadb [root@localhost?~]#?systemctl?start?mariadb [root@localhost?~]#?systemctl?enable?mariadb
原文:https://blog.51cto.com/u_14736864/2824310