以centos6.8为例
1.获取linux-nginx-1.10.2.tar.gz文件
2.nginx安装依赖命令
yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel
3.解压
sudo tar -zxvf linux-nginx-1.10.2.tar.gz
4.安装
cd nginx-1.10.2/
sudo ./configure
sudo make
sudo make install
5.测试安装
进入nginx目录下的sbin里面有一个可执行文件nginx
sudo ./nginx
然后直接访问本机域名出现一下文字即安装成功
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.
网友评论