web-server 中的文章

网站日志分析工具goaccess安装配置实战

安装 GeoIP-devel ncurses-devel GeoIP-update yum install glib2 glib2-devel GeoIP-devel ncurses-devel zlib zlib-devel yum install gcc -y rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm yum -y install GeoIP-update 安装goaccess wget https://tar.goaccess.io/goaccess-1.3.tar.gz tar xzvf goaccess-1.3.tar.gz cd goaccess-1.3/ ; ./configure --enable-geoip --enable-utf8 ; make && make install 使用goaccess 修改nginx.conf文件的日志存储格式 log_format main '$remote_addr - $remote_user [$time_local] requesthost:"$http_host"; "$request" requesttime:"$request_time"; ' '$status $body_bytes_sent "$http_referer" - $request_body' '"$http_user_agent" "$http_x_forwarded_for"'; nginx配置 location /report.html { alias /home/zopen/nginx/html/report.html;……

阅读全文

haproxy cannot bind UNIX socket [/var/lib/haproxy/stats] 已解决

现象 CentOS7.2安装HAProxy1.8.12后启动报错, [root@fffmo.com run]# journalctl -xe Jan 22 16:37:10 fffmo.com systemd[1]: Unit haproxy.service entered failed state. Jan 22 16:37:10 fffmo.com systemd[1]: haproxy.service failed. Jan 22 16:37:10 fffmo.com systemd[1]: haproxy.service holdoff time over, scheduling restart. Jan 22 16:37:10 fffmo.com systemd[1]: Cannot add dependency job for unit syslog.service, ignoring: Unit not found. Jan 22 16:37:10 fffmo.com systemd[1]: Starting HAProxy Load Balancer... -- Subject: Unit haproxy.service has begun start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit haproxy.service has begun starting up.……

阅读全文

lvs故障 部分用户无法访问 (已解决)

lvs故障 部分用户无法访问 现象 LVS+Keepalived+Nginx架构中,某天突然发现网站www.fffmo.com 部分用户访问巨慢或无法访问,有些可以访问。 产生原因 查看当前后端web连接信息 ipvsadm -Ln Virtual Server version 1.2.1 (size=4096) Prot LocalAddress:Port Scheduler Flags ->……

阅读全文

网站系统程序优化日记

php-fmp 优化 vim /etc/php-fpm.d/www.conf pm = dynamic pm.max_children = 18 pm.start_servers = 4 pm.min_spare_servers = 3 pm.max_spare_servers = 10 vps mysql 优化 max-allowed-packet = 16M max-connect-errors = 1000000 skip-name-resolve # CACHES AND LIMITS # tmp-table-size = 32M max-heap-table-size = 32M query-cache-type = 0 query-cache-size = 0 max-connections = 500 thread-cache-size = 50 open-files-limit = 65535 table-definition-cache = 1024 table-open-cache = 2048 # INNODB # innodb-flush-method = O_DIRECT innodb-log-files-in-group = 2 innodb-log-file-size = 32M innodb-flush-log-at-trx-commit = 1 innodb-file-per-table = 1 innodb-buffer-pool-size = 256M # MyISAM # key-buffer-size = 16M myisam-recover = FORCE,BACKUP 卸载阿里云盾/安骑士 wget http://update.aegis.aliyun.com/download/uninstall.sh chmod +x uninstall.sh ./uninstall.sh wget……

阅读全文

LVS性能优化

1、最小化安装编译系统内核 2、优化持久服务超时时间: 1)显示超时时间 #ipvsadm -Ln –timeout #Timeout (tcp tcpfin udp): 900 120 300 2)配置为与自身应用贴近的超时时间 #ipvsadm –set tcp tcpfin udp 3、修改内核参数vi /etc/sysctl.conf net.ipv4.tcp_tw_recyle=1 net.ipv4.tcp_tw_reuse=1 net.ipv4.tcp_max_syn_backlog=8192 net.ipv4.tcp_keepalive_time=1800 net.ipv4.tcp_fin_timeout=30 net.core.rmem_max=16777216 net.core.wmem_max=16777216 net.ipv4.tcp_rmem=4096 87380 16777216 net.ipv4.tcp_wmem=4096 65536 16777216 net.core.netdev_max_backlog=3000 ##其它 # 关闭网卡LRO和GRO ethtool -K em1……

阅读全文

服务器监控

监控类别监控子对象监控维度监控指标警告严重服务器CPU负载1分钟采集,5分钟告警>=5>=10利用率1分钟采集,5分钟告警>=60%>=80%温度1分钟采集,5分钟告警>=70℃>=8……

阅读全文

分类

福利派送

标签

其它

休闲室