Title Image

8 月 2013

4步完成,vps搭建VPN

  |   Geek   |   2 Comments

//2013-11-12更新--------------- 发现了一揽子打包安装VPN的方法。 采用AMH面板,众多功能包采用模块式插件安装。 众多模块中包括了PPTP-VPN-1.1 模块(一键安装PPTP-VPN服务); 甚至都不用通过终端命令行添加账户。而直接安装LanYing-VPN-1.0模块(VPN代理服务器对用户的管理,支持PPTP和L2TP方式的VPN代理用户管理)可视化操作添加账户。 对于服务器只用来架设VPN的,可以考虑这种形式安装。简单快捷。 AMH还有SSL的模块,采用SSL的方式也可以破墙。 //自架VPN,4步安装步骤----------------- 自架VPN虽然速度不俗,在20M使用带宽下,最高1080p在线视频流量能跑到527kb每秒。 但是在低带宽环境下,表现依旧不如wallproxy的多线程下载。 优势在于,VPN表现平稳,完全模拟服务器所在的上网环境, 由于GAE被大量使用,使用GAE的代理现在越来越多的被各个网站所限制。(维基百科的编辑,youtube的部分视频。) VPS配置:洛杉矶 OpenVZ VPS 512MB 100M共享带宽 系统环境: CentOS5.4 无web环境 也试了一个 Xen VPS - 64MB 的,效果也不差, 只是64M内存看着实在揪心,除了vpn其它估计什么也做不了。   以下,VPN的搭建记录: 1--确保服务器配置天生支持pptp的VPN(很多VPS后台具有TUN和ppp的开关)。 cat /dev/net/tun //cat: /dev/net/tun: File descriptor in bad state //返回上面这句“File descriptor in bad state”则确定可以安装,继续下面步骤。   2--进入安装步骤; //安装环境软件依赖: yum makecache yum -y update yum -y install ppp wget iptables iptables-devel perl   3--使用googlecode的pptp资源,安装pptp。 //32位安装: rpm -ivh http://acelnmp.googlecode.com/files/pptpd-1.3.4-1.rhel5.1.i386.rpm //64位安装: rpm -ivh http://acelnmp.googlecode.com/files/pptpd-1.3.4-1.rhel5.1.x86_64.rpm   4--配置参数: vim /etc/pptpd.conf //去掉以下两句的注释: localip 192.168.0.1 remoteip 192.168.0.234-238,192.168.0.245 vim /etc/ppp/options.pptpd //去掉ms-dns的注释,并修改为8.8.8.8和8.8.4.4: ms-dns 8.8.8.8 ms-dns 8.8.4.4 vim /etc/sysctl.conf //修改net.ipv4.ip_forward=0,改为1, //并注释net.ipv4.tcp_syncookies...

Read More

设置MySQL远程链接

  |   Geek   |   No comment

//更改mysql自身数据库‘mysql’ use mysql; select host,user,password from user; //%允许任何主机连接本数据库, grant all privileges on *.* to 'root'@'%' identified by 'XXXXXXXXX' with grant option; //重置mysql服务; flush privileges; //退出mysql exit; //如果有防火墙,确保打开3306端口 iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT //开关防火墙(重启) chkconfig iptables on chkconfig iptables off //临时开关防火墙 service iptables start service iptables stop //连接方命令: mysql -u root -p -h 地址 ...

Read More

Lnmp—php5.5编译安装

  |   Geek   |   No comment

安装版本:php5.5 nginx:1.5.3 PHP:5.5.1 CentOS 5.4 32位   php-fpm编译配置参数: ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/ --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path --enable-magic-quotes --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --enable-ftp --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --with-mime-magic 报错一个: configure: error: Please...

Read More