nginx服务器搭建

308 阅读1分钟

ubuntu系统安装依赖

apt-get install libpcre3 libpcre3-dev
apt-get install libssl-dev
apt-get install zlib1g-dev

源码安装

wget http://nginx.org/download/nginx-1.18.0.tar.gz
./configure
make -j 4
make install

启动

cd /usr/local/nginx
./sbin/nginx -c conf/nginx.conf

ps查看进程

root@PF1YTXHH-ZTB:/usr/local/nginx# ps faux |egrep nginx |egrep -v grep
root      7520  0.0  0.0  24416  1540 ?        Ss   17:18   0:00 nginx: master
nobody    7521  0.0  0.0  25164  8896 ?        S    17:18   0:00  \_ nginx: worker