Linux下安装nginx与配置

以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.

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

友情链接更多精彩内容