标签:gcc code oca 编译 load usr https read image
yum install gcc gcc-c++ pcre-devel patch libffi-devel python-devel zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel openssl-devel –y
wget -c https://nginx.org/download/nginx-1.10.3.tar.gz
useradd nginx -s /sbin/nologin -M
tar -zxvf nginx-1.10.3.tar.gz
cd nginx-1.10.3
./configure --user=nginx --group=nginx --prefix=/usr/local/nginx-1.10.3/ --with-http_stub_status_module --with-http_ssl_module --with-stream
make
make install
执行成功后我们可以看一下/usr/local目录下是否有nginx
ll /usr/local/
ln -s /usr/local/nginx-1.10.3 /usr/local/nginx
cd /usr/local/nginx-1.10.3
查看目录结构:ll
cd /usr/local/nginx/conf
grep -Ev "#|^$" /usr/local/nginx/conf/nginx.conf.default > /usr/local/nginx/conf/nginx.conf
监测语法
/usr/local/nginx/sbin/nginx -t
cd /usr/local/nginx/sbin
./nginx
监测端口
netstat -lntup|grep 80
监测进程
ps -ef|grep nginx
注:若想使用外部主机连接上虚拟机访问10.0.0.200,需要关闭虚拟机的防火墙:
systemctl stop firewalld.service
./nginx -s stop 关闭
./nginx -s reload 重启
标签:gcc code oca 编译 load usr https read image
原文地址:https://www.cnblogs.com/zhangguosheng1121/p/11994605.html