centos安装nginx 报错:cp: `conf/koi-win‘ and `/usr/local/nginx/conf/koi-win‘ are the same file
·
先给解压的包重名为nginx
./configure --prefix=/usr/local/nginx --conf-path=/usr/local/nginx/nginx.conf 执行这一步
make && make install
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf 文件启动
7、如何使用nginx文件名去直接启动nginx,而不用绝对路径,修改 /etc/profile文件,来配置变量名
1>在最后添加上以下内容,具体nginx安装路径以实际为主,保存退出:
PATH=/usr/local/nginx/sbin:$PATH
export PATH
2>执行一下:source /etc/profile # 重启配置文件
启动方式:直接输入nginx回车即可;
查询状态:
ps -aux | grep nginx
杀掉进程 kill 进程号
更多推荐

所有评论(0)