nginx安装及目录

nginx官网 nginx.org

# nginx版本

Mainline version 开发版本

Stable version 稳定版本

Legacy version  历史版本的升级

 

# pgp安全校验工具    校验nginx包的是否有注入等安全隐含

#CHANCE 版本更新信息

 

# 安装

1. yum方式 

a)点击stab版本,copy nginx的yum源,在linux上新建nginx的repo文件,vim /etc/yum.repos.d/nginx.repo

b)复制yum源到linux,修改源中系统版本信息 OS/OSRELEASE => centos/7

c) yum list| grep nginx

d)  yum install nginx-

e) nginx -v  查看版本

f)  nginx -V 查看编译参数

nginx版本,编译的gcc版本,支持ssl ,

--prefix=/etc/nginx 安装目录

--sbin-path=/usr/sbin/nginx 执行文件路径

--modules-path= nginx模块路径

--error-log-path

--http-log-path

--conf-path。。。。

--with-xxxx_module 安装的插件

--http-client-body-temp-path=/var/cache/nginx 缓存路径

fcgi。。。。等

--user=nginx指定了以nginx用户进行启动

--group=nginx 用户组

--with-cc-opt=设置额外参数被添加到CFLAGS内

--with-ld-opt  设置附件参数链接系统库

 

2. 官网下载方式

2.1   源码安装

2.2 下载可执行程序

 

 

# 安装目录

rpm -qa|grep nginx 命令可以查看安装路径

## /etc/logrotate.d/nginx     nginx日志轮转,用logrotate服务进行日志切割

配置eg:

[root@hs-10-20-64-224 logrotate.d]# cat yum 

/var/log/yum.log {

    missingok

    notifempty

    size 30k

    yearly

    create 0600 root root

}

[root@hs-10-20-64-224 logrotate.d]# cat syslog 

/var/log/cron

/var/log/maillog

/var/log/messages

/var/log/secure

/var/log/spooler

{

    missingok

    sharedscripts

    postrotate

        /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true

    endscript

}

## /etc/nginx/

nginx.conf 主要配置文件

conf.d/default.conf

 

## fastcgi_xx    php cgi模式

## uwsgi_xx

## scgi_xx

 

## koiXXX  win-utf

 

## conf/mime.types  content-type类型及扩展名对应关系

text/html                                          html htm shtml;

 

## /var/cache/nginx  缓存目录

## /var/log/nginx 日志目录

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值