CentOS系统编译安装实例详解


当前第2页 返回上一页

./configure --prefix=/usr/local/zlib

make && make install

重新安装nginx

./configure --sbin-path=/usr/local/nginx/nginx \

--conf-path=/usr/local/nginx/nginx.conf \

--pid-path=/usr/local/nginx/nginx.pid \

--with-http_ssl_module \

--with-pcre=/usr/local/src/pcre-8.40 \

--with-zlib=/usr/local/src/zlib-1.2.11 \

--with-openssl=/usr/local/src/openssl-1.0.2l

[root@bogon nginx-1.12.0]# ./configure --sbin-path=/usr/local/nginx/nginx \

> --conf-path=/usr/local/nginx/nginx.conf \

> --pid-path=/usr/local/nginx/nginx.pid \

local/src/openssl-1.0.2l> --with-http_ssl_module \

> --with-pcre=/usr/local/src/pcre-8.40 \

> --with-zlib=/usr/local/src/zlib-1.2.11 \

> --with-openssl=/usr/local/src/openssl-1.0.2l

[root@bogon nginx-1.12.0]# make && make install

修改/etc/local/nginx/nginx.conf 将lisent商品80改为8080

启动服务:/etc/local/nginx/nginx

访问:192.168.158.128:8080

Welcome to nginx!

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

For online documentation and support please refer to nginx.org.

Commercial support is available at nginx.com.

Thank you for using nginx.

启动nginx服务

方法一:

/usr/local/nginx/nginx

方法二(-c nginx配置文件地址):

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

停止nginx服务

方法一:从容停止

查看进程

[root@bogon nginx]# ps -ef | grep nginx

root 62024 1 0 07:01 ? 00:00:00 nginx: master process /usr/local/nginx/nginx

nobody 62025 62024 0 07:01 ? 00:00:00 nginx: worker process

root 62308 18453 0 07:14 pts/1 00:00:00 grep --color=auto nginx

杀死进程

[root@bogon nginx]# kill -QUIT 62024

方法二:快速停止

查看进程

[root@bogon nginx]# ps -ef | grep nginx

root 62358 1 0 07:17 ? 00:00:00 nginx: master process /usr/local/nginx/nginx -c /usr/local/nginx/nginx.conf

nobody 62359 62358 0 07:17 ? 00:00:00 nginx: worker process

root 62463 18453 0 07:20 pts/1 00:00:00 grep --color=auto nginx

杀死进程

[root@bogon nginx]# kill -TERM 62358

或者

[root@bogon nginx]# /usr/local/nginx/nginx -c /usr/local/nginx/nginx.conf

[root@bogon nginx]# ps -ef | grep nginx

root 62473 1 0 07:21 ? 00:00:00 nginx: master process /usr/local/nginx/nginx -c /usr/local/nginx/nginx.conf

nobody 62474 62473 0 07:21 ? 00:00:00 nginx: worker process

root 62476 18453 0 07:21 pts/1 00:00:00 grep --color=auto nginx

[root@bogon nginx]# kill -INT 62473

方法三:强制停止

[root@bogon nginx]# pkill -9 nginx

以上就是CentOS系统编译安装实例详解的详细内容,更多文章请关注木庄网络博客

返回前面的内容

相关阅读 >>

centos怎么安装deb格式软件包

如何安装linux的flash

如何解决在centos下mysql.h找不到

怎么样在ubuntu中安装docker

centos无法正常启动

centos ios镜像文件的实例详解

centos系统网络不通怎么办

centos下如何查看端口是否已经开启

centos下php curl如何安装

centos系统怎么配置上网

更多相关阅读请进入《nginx-1.12.0》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...