标签:fast cti modules 安装环境 out centos keep ror lld
1-安装pcre、openssl、zlib
2-安装指令:yum -y install gcc zlib zlib-devel pcre-devel openssl openssldevel
Installed: pcre-devel.x86_64 0:8.32-17.el7 zlib-devel.x86_64 0:1.2.7-18.el7 Updated: openssl.x86_64 1:1.0.2k-19.el7 zlib.x86_64 0:1.2.7-18.el7 Dependency Updated: openssl-libs.x86_64 1:1.0.2k-19.el7 Complete!
...........
Configuration summary + using system PCRE library + OpenSSL library is not used + using system zlib library nginx path prefix: "/usr/local/nginx" nginx binary file: "/usr/local/nginx/sbin/nginx" nginx modules path: "/usr/local/nginx/modules" nginx configuration prefix: "/usr/local/nginx/conf" nginx configuration file: "/usr/local/nginx/conf/nginx.conf" nginx pid file: "/usr/local/nginx/logs/nginx.pid" nginx error log file: "/usr/local/nginx/logs/error.log" nginx http access log file: "/usr/local/nginx/logs/access.log" nginx http client request body temporary files: "client_body_temp" nginx http proxy temporary files: "proxy_temp" nginx http fastcgi temporary files: "fastcgi_temp" nginx http uwsgi temporary files: "uwsgi_temp" nginx http scgi temporary files: "scgi_temp"
4-编译并安装nginx:make && make install
............ test -d ‘/usr/local/nginx/logs‘ || mkdir -p ‘/usr/local/nginx/logs‘ make[1]: Leaving directory `/opt/nginx-1.12.2‘
#user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; #log_format main ‘$remote_addr - $remote_user [$time_local] "$request" ‘ # ‘$status $body_bytes_sent "$http_referer" ‘ # ‘"$http_user_agent" "$http_x_forwarded_for"‘; #access_log logs/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; server { listen 80; server_name localhost; #charset koi8-r; #access_log logs/host.access.log main;
6-启动ngnix(执行 /usr/local/nginx/sbin/下的nginx脚本):先cd /usr/local/nginx/sbin/;再./nginx
8-查看nginx状态:lsof -i:8081
[root@VM_0_4_centos sbin]# lsof -i:8081 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME nginx 16148 root 6u IPv4 98149743 0t0 TCP *:tproxy (LISTEN) nginx 16149 nobody 6u IPv4 98149743 0t0 TCP *:tproxy (LISTEN)
如下异常:
FirewallD is not running
2-查看防火墙状态:systemctl status firewalld
防火墙dead ● firewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled) Active: inactive (dead) Docs: man:firewalld(1)
3-启动防火墙:systemctl start firewalld (重新查看防火墙状态如下)
防火墙running ● firewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled) Active: active (running) since Wed 2020-01-29 15:55:58 CST; 1min 54s ago Docs: man:firewalld(1) Main PID: 10829 (firewalld) Tasks: 2 Memory: 27.1M CGroup: /system.slice/firewalld.service └─10829 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid
4-继续查看防火墙允许的端口号:firewall-cmd --list-all
无端口号开放 public target: default icmp-block-inversion: no interfaces: sources: services: ssh dhcpv6-client ports: protocols: masquerade: no forward-ports: source-ports: icmp-blocks:
5-开放8081端口号:先firewall-cmd --add-port=8081/tcp --permanent;再firewall-cmd --reload
添加端口号 [root@VM_0_4_centos sbin]# firewall-cmd --add-port=8081/tcp --permanent success 重新加载防火墙 [root@VM_0_4_centos sbin]# firewall-cmd --reload success 查看开放端口 [root@VM_0_4_centos sbin]# firewall-cmd --list-all public target: default icmp-block-inversion: no interfaces: sources: services: ssh dhcpv6-client ports: 8081/tcp protocols: masquerade: no forward-ports: source-ports: icmp-blocks: rich rules:
标签:fast cti modules 安装环境 out centos keep ror lld
原文地址:https://www.cnblogs.com/wobuchifanqie/p/12240696.html