This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| INFO[0000] WARNING: You are running linux kernel version 2.6.32-504.12.2.el6.x86_64, which might be unstable running docker. Please upgrade your kernel to 3.8.0. | |
| #Docker needs 3.8+ Kernel | |
| yum -y install http://www.elrepo.org/elrepo-release-6-5.el6.elrepo.noarch.rpm | |
| yum -y --enablerepo=elrepo-kernel install kernel-ml | |
| #Set new kernel | |
| sed -i 's,default=1,default=0,' /boot/grub/grub.conf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| function installVPN(){ | |
| echo "begin to install VPN services"; | |
| #check wether vps suppot ppp and tun | |
| yum remove -y pptpd ppp | |
| iptables --flush POSTROUTING --table nat | |
| iptables --flush FORWARD | |
| rm -rf /etc/pptpd.conf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getRealIpAddr() { | |
| if (!empty($_SERVER['HTTP_CLIENT_IP'])) { //check ip from share internet | |
| $ip = $_SERVER['HTTP_CLIENT_IP']; | |
| } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { //to check ip is pass from proxy | |
| $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; | |
| } else { | |
| $ip = $_SERVER['REMOTE_ADDR']; | |
| } | |
| return $ip; | |
| } |