Centos7.9服务器编译安装Nginx1.24.0和php8.3
服务器nginx原版本有安全漏洞,需要升级,由于原始是yum源安装,通过yum直接升级,无法正常升级完成,故而需要卸载yum源,重新编译安装。
1、查看原来nginx版本,ps查看原来nginx进程,运行状态:
ps aux | grep nginx root 1284 0.0 0.0 42264 244 ? Ss 2023 0:00 nginx: master process /usr/sbin/nginx nginx 1285 0.0 0.0 44352 816 ? S 2023 0:00 nginx: worker process nginx 1286 0.0 0.0 44352 836 ? S 2023 0:00 nginx: worker process nginx 1287 0.0 0.0 44352 824 ? S 2023 0:00 nginx: worker process nginx 1288 0.0 0.0 44352 704 ? S 2023 0:00 nginx: worker process nginx 1289 0.0 0.0 44352 888 ? S 2023 0:00 nginx: worker process nginx 1290 0.0 0.0 44352 868 ? S 2023 0:00 nginx: worker process nginx 1291 0.0 0.0 44352 680 ? S 2023 0:00 nginx: worker process nginx 1292 0.0 0.0 44352 804 ? S 2023 0:00 nginx: worker process root 106491 0.0 0.0 112816 980 pts/0 S+ 15:35 0:00 grep --color=auto nginx
查看nginx版本号为1.20: