select模型主要是apache用
FD 文件描述符
soa架构
安装nginx
ping baidu.com
netstat -lntup 查看端口
cat /etc/redhat-release 查看内核
安装依赖
yum install -y gcc gcc-c++ autoconf pcre pcre-devel make automake wget httpd-tools vim tree
防火墙关闭
systemctl status firewalld
systemctl disable firewalld
关闭 iptables
/etc/init.d/iptables stop
chkconfig iptables off
查看
getenforce 查看selinux的状态
//临时关闭selinux
setenforce 0
//初始化基本目录
mkdir /soft/{app,logs,package/src} -p
// 配置nginx官方yum源
vim /etc/yum.repos.d/nginx.repo
[nginx-stable] name=nginx stable repo baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ gpgcheck=1 enabled=1 gpgkey=https://nginx.org/keys/nginx_signing.key [nginx-mainline] name=nginx mainline repo baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/ gpgcheck=1 enabled=0 gpgkey=https://nginx.org/keys/nginx_signing.key
sudo yum install nginx
rpm -q nginx
nginx -v 版本号
nginx -V 看编译参数
rpm -ql nginx 看nginx装了些什么
rpm -qc nginx
启动nginx
nginx
nginx -t 检查配置文件
ps aux | grep nginx
查看日志
tail -f /var/log/nginx/access.log
vim /etc/nginx/nginx.conf
vim /etc/nginx/nginx.conf +10 定位到第十行
日志文件配置
nginx -t -c /etc/nginx/nginx.conf
nginx -s reload
vim /etc/hosts
cat /var/run/nginx.pid
ps aux | grep nginx
nginx -s stop 关闭nginx 他会关掉pid
vim /etc/logrotate.d/nginx
vim /etc/nginx/nginx.conf 配置全局参数