一、Nginx简介
Nginx是一款轻量级的服务器,主要用来做负载均衡及反向代理,相比Apache等服务器,具有占用内存小,稳定性高等优势
二、下载安装
注意;安装Nginx之前,需要安装Nginx需要的三个组件,分别是:pcre,zlib,openssl.
#nginx下载---------> [root@CentOS1 app]# wget http://nginx.org/download/nginx-1.10.2.tar.gz
#解压----------------> [root@CentOS1 app]# tar-zxvf nginx-1.8.0.tar.gz
#进入解压目录-----> [root@CentOS1 app]# cd nginx-1.8.0
#编译安装-----------> [root@CentOS1 nginx-1.8.0]# ./configure && make && make install
三、启动
[root@CentOS1 nginx-1.8.0]# /usr/local/nginx/sbin/nginx
启动成功后,打开浏览器,输入localhost,看到如下界面,则说明安装成功。
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.
四、Nginx使用心得