github地址:https://github.com/laileman/Zabbix/
1- linux编译工具安装
1.1- centos/redhat版本
yum -y install gcc gcc-c++;
yum -y install pcre-devel openssl openssl-devel zlib zlib-devel;
1.2- ubuntu/debian版本
apt update;
apt-get install build-essential zlib1g-dev libpcre3 libpcre3-dev
libssl-dev libxslt1-dev libxml2-dev libgd2-xpm-dev libgeoip-dev;
2- nginx 编译安装
2.1- 下载源包
wget http://nginx.org/download/nginx-1.10.3.tar.gz
tar -xvzf nginx-1.10.3.tar.gz -C nginx-1.10.3
2.2- 编译安装
cd nginx-1.10.3
./configure --prefix=/usr/local/nginx-1.10.3 --with-http_stub_status_module --with- http_ssl_module
make && make install
2.3- 启动nginx服务
/usr/local/nginx-1.10.3/sbin/nginx
ln -s /data/nginx-1.10.3/ /usr/local/nginx
echo "/usr/local/nginx/sbin/nginx" >>/etc/rc.local
2.4- 配置环境变量
touch /etc/profile.d/nginx.sh
echo "export PATH=/usr/local/ngin/sbin:$PATH" >>/etc/profile.d/nginx.sh
source /etc/profile.d/nginx.sh
3- 查看进程
ps -axu|grep nginx
netstat -tunlp|grep nginx