autoDevops,CI,CD
How To Fix NIC Link is Down On Centos 6.5  Centos6网卡:  e1000e Timesync Tx Control register not set as expectedSince upgrading a CentOS 6.4 with a SuperMicro X8SIE-F/X9SCL board with Intel 82574L NIC to 2.6.32-431.el6.x86_64 and rebooting, I have been having consistent NIC failures where the NIC shuts down permanently until a soft reboot is performed.Type the following commands to get more info about error# cat /var/log/messages | grep eth1 kernel: NETDEV WATCHDOG: eth1 (e1000e): transmit queue 0 timed out kernel: e1000e 0000:02:00.0: eth1: Reset adapter unexpectedly kernel: e1000e 0000:02:00.0: eth1: Timesync Tx Control register not set as expected kernel: e1000e 0000:02:00.0: eth1: Timesync Tx Control register not set as expected kernel: e1000e 0000:02:00.0: eth1: Timesync Tx Control register not set as expected kernel: ADDRCONF(NETDEV_UP): eth1: link is not ready# uname -a Linux svr.lifelinux.com 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86...
Apache PHP Server Issue : Warning: POST Content-Length exceeding the limit PHP Warning: POST Content-Length of xxxxx bytes exceeds the limit of xxxxxx bytes in Unknown on line 0You receive the “POST Content-Length” error message when a file greater than the size defined in the php.ini file is uploaded via the browser.The file you are uploading using the POST method should not exceed the value of post_max_size defined in php.ini file. If it does, it results in the above error message.Solution:In case you are looking to upload a larger file size, you need to increase the value of “post_max_size” in php.ini.1) To locate the exact php.ini file, your PHP is using php -i | grep php.ini 2) Edit the php configuration file pico /usr/local/lib/php.ini 3) If you are looking to upload a file of 30M, set post_max_size and to upload_max_filesize to 40M. post_max_size = 40M upload_max_filesize = 40M 4) Save the file and restart the httpd service service httpd restart cha...
 
0
centos下安装php的ZipArchive扩展 系统:centos6.5 64位系统 下载ZipArchivewget http://pecl.php.net/get/zip-1.12.4.tgz 解压:tar zxvf zip-1.12.4.tgz 切换到zip-1.12.4目录一看,没有configure,这怎么编译呢,于是网上一 阵狂搜。后来在意个论坛的一片帖子的回复中有人提到了phpize,我也试着执行了一下phpize命令,提示没有该命令,于是又是一阵狂搜。原来phpize是php.devel带的,于是又安装了php.devel,命令为:yum -y install php.devel 然后再执行phpize,接着ls一下,果然configure出现了,然后执行:./configure --with-php-config=/usr/bin/php-config 出现错误,提示缺少zlib什么的,于是执行yum -y install zlib-devel 进行安装,然后重新./configure --with-php-config=/usr/bin/php-config 接着make,但是又遇到了错误,提示缺少pcre啥的,于是执行yum install pcre-devel 然后make && make install 搞定!
您所在的组无权查看该日志
Linux查看连接数与连接IP的脚本在centos6.7 上测试下面的脚本,取的数据正常。使用其它的方法会有一些问题netstat -ntu | grep ':' | awk '{print $5}' | sed 's/::ffff://' | cut -d: -f1 | sort | uniq -c | sort -nrnetstat -ntu | awk '{print $5}' | egrep -o "[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}" | sort | uniq -c | sort -nr以下方法会有些问题:netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -nnetstat -anlp|grep 80|grep tcp|awk '{print $5}'|awk -F: '{print $1}'|sort|uniq -c|sort -nr|head -n20 | netstat -ant |awk '/:80/{split($5,ip,":");++A[ip[1]]}END{for(i in A) print A[i],i}' |sort -rn|head -n20
介绍一个强大的分析网络的shell脚本,此脚本是从EZHTTP拆分出来的,觉得有必要单独介绍下。脚本运行效果截图:此脚本包含的功能有:1、实时监控任意网卡的流量2、统计10秒内平均流量3、统计每个端口在10秒内的平均流量,基于客户端和服务端端口统计。可以看出哪些端口占流量比较大,对于web服务器,一般是80端口。其它端口受到攻击时,也有可能其它端口流量比较大。所以此功能可以帮助我们端口流量是否正常。4、统计在10s内占用带宽最大的前10个ip。此项功能可以帮助我们来查出是否有恶意占用带宽的ip。5、统计连接状态。此项功能可以让我们看出哪些连接状态比较大。如果SYN-RECV状态比较多的话,有可以受到半连接攻击。如果ESTABLISED非常大,但通过日志发现没有那么多请求,或者通过tcpdump发现大量ip只建立连接不请求数据的话,可能是受到了全连接攻击,这时候如果你使用的是nginx服务器,可以在配置文件增加listen 80 deferred来防止。6、统计各端口连接状态。当可能受到攻击时,此项功能可以帮助我们发现是哪个端口受到攻击。7、统计端口为80且状态为ESTAB连接数最多的前10个IP。此项功能可以帮助我们来找出创建连接过多的Ip,进而屏蔽。8、统计端口为80且状态为SYN-REC...
 
0

CentOS7一键VPN脚本

发表者:admin分类:Devops2016-01-12 09:50:23 阅读[2503]
安装PPTP脚本------------------------------------------------------------------ #!/bin/bash yum -y update wget -c http://dl.fedoraproject.org/pub/epel/7/x86_64/p/pptpd-1.4.0-2.el7.x86_64.rpmyum -y install pptpd-1.4.0-2.el7.x86_64.rpm cp -rf /etc/pptpd.conf /etc/pptpd.conf.bakcat >> /etc/pptpd.conf << EOFlocalip 192.168.144.1remoteip 192.168.144.2-254EOF cp -rf /etc/ppp/options.pptpd /etc/ppp/options.pptpd.bakcat >> /etc/ppp/options.pptpd <<EOFms-dns 8.8.8.8ms-dns 8.8.4.4EOF yum -y install ppp cp -rf /etc/ppp/chap-secrets /etc/ppp/chap-secrets.bakcat >> /etc/ppp/chap-secrets << EOFvpn pptpd 123456 *EOF cp -rf /etc/rc.d/rc.local /etc/rc.d/rc.local.bakcat >> /etc/rc.d/rc.local <<EOFiptables -A INPUT -p gre -j ACCEPTiptables -t nat -A POSTROUTING -s 192.168.144.0/24 -j MASQUERADEiptables -A INPUT -p tcp -m multiport --dport 1723 -j ACCEPTecho 1 > /proc/sys/net/ipv4/ip_forwardsystemctl restart pptpdEO...
APACHE中限制IP连接数与IP并发数和流量控制实现方法,如果只限制连接数据我们可以直接使用limit,如果要限制其它的需要使用其它第三方模块了使用mod_limitipconn模块限制IP并发连接数安装:?1234wget http://dominia.org/djao/limit/mod_limitipconn-0.24.tar.bz2tar jxvf mod_limitipconn-0.24.tar.bz2cd mod_limitipconn-0.24/usr/local/apache2/bin/apxs -c -i mod_limitipconn.c编辑httpd.conf?123456789101112ExtendedStatus OnLoadModule limitipconn_module modules/mod_limitipconn.so  <ifModule mod_limitipconn.c><location />                       #对应根目录   MaxConnPerIP 5                 #最大并发数为5   NoIPLimit image/*                #对图片不做限制</location><location /test> &n...
How to Set Up the Minecraft Control Panel Multicraft On CentOS 7This article describes in detail how you can install the Multicraft control panel for Minecraft on your Linux server. In particular we focus on a Multicraft setup on CentOS 7 on one of our DDoS proof VPS servers, which work very well for running a Multicraft server due to their fast local SSD storage and high-frequency DDR3 RAM. Both are very important types of resources when it comes to Minecraft hosting. DDoS filtering is at least as important, because you can be almost certain that your server will get attacked sooner or later (learn all about DDoS attacks). Table of ContentsWhat is the Multicraft Control Panel?How to Install Multicraft on CentOS 7Installing the DependenciesInstalling the Multicraft Control PanelFinishing the Multicraft InstallationAdditional Multicraft Setup StepsHow to Create Your First Minecraft ServerStarting the Minecraft ServerMulticraft PluginsFinal Thoughts What is the Multicraft Cont...
您所在的组无权查看该日志
    总共67页,当前第16页 | 页数:
  1. 6
  2. 7
  3. 8
  4. 9
  5. 10
  6. 11
  7. 12
  8. 13
  9. 14
  10. 15
  11. 16
  12. 17
  13. 18
  14. 19
  15. 20
  16. 21
  17. 22
  18. 23
  19. 24
  20. 25
  21. 26