Home  >  Article  >  Operation and Maintenance  >  How to recompile installed nginx

How to recompile installed nginx

王林
王林forward
2020-10-21 17:32:025654browse

How to recompile installed nginx

Modify nginx as a global command

(Recommended tutorial: nginx tutorial)

Modify the file:

[root@localhost ~]# vim /etc/profile
最后面追加:
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH:/opt/nginx_fdfs/sbin
然后生效配置
[root@localhost ~]# source /etc/profile

How to recompile installed nginx

Get parameters:

How to recompile installed nginx

Copy configure arguments to the text editor

How to recompile installed nginx

Find the installation configuration command in the installation package

How to recompile installed nginx

Execute

How to recompile installed nginx

Stop nginx, and then execute it in the current directory

make && make install

Then restart nginx

[root@localhost nginx_fdfs]# nginx -c /opt/nginx_fdfs/conf/nginx.conf

Test whether it takes effect

How to recompile installed nginx

The above is the detailed content of How to recompile installed nginx. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:juejin.im. If there is any infringement, please contact admin@php.cn delete
Previous article:Why is nginx so fast?Next article:Why is nginx so fast?