折腾自己的VPS,想装个VPN救急的时候用用,上网找了这个方法,脚本安装。 #注意本地址在墙外 wget -c http://nchc.dl.sourceforge.net/project/vpn3in1/vpn3in1.tar.gz tar zxvf vpn3in1.tar.gz cd vpn3in1/ ./vpn3in1.sh 2>&1 | tee vpn3in1.log #注意本地址在墙外
mysql -u root -proot; grant all on *.* to username@'%' identified by 'password'; flush privileges; 其中 all 指定相关的操作, *.*说明数据库和表名, username表示用户名,‘%’这里写Host名称,允许所有就用‘%’,‘password’是密码。这里改成相应的值后进行操作就可以开启远程帐号访问 修改VPN服务器radius认证为远程服务器修改参数在VPN服务器运行下面脚本 radius_server="radius服务器IP" secret_key="yishanhome.com" etc_dir="/usr/local/etc" sed -i -e "s/name=127.0.0.1/name=$radius_server/" /etc/openvpn/radiusplugin.cnf sed -i -e "s/sharedsecret=testpw/sharedsecret=$secret_key/" /etc/openvpn/radiusplugin.cnf sed -i -e "s/localhost:1812/$radius_server:1812/" $etc_dir/radiusclient/radiusclient.conf sed -i -e "s/localhost:1813/$radius_server:1813/" $etc_dir/radiusclient/radiusclient.conf mv -f $etc_dir/radiusclient/servers $etc_dir/radiusclient/servers.bak cat >> $etc_dir/radiusclient/servers <<EOF $radius_server $secret_key EOF 修改参数在radius服务器运行下面脚本 client_ip="VPN服务器IP" secret_key="yishanhome.com" etc_dir="/usr/local/etc" iptables -A INPUT -i eth0 -p udp -s $client_ip --dport 1812 -j ACCEPT iptables -A INPUT -i eth0 -p udp -s $client_ip --dport 1813 -j ACCEPT cat >> $etc_dir/raddb/clients.conf <<EOF client localhost { ipaddr = $client_ip secret = $secret_key require_message_authenticator = no nastype = other } EOF 安装LNMPwget -c http://soft.vpser.net/lnmp/lnmp0.9-full.tar.gz tar zxvf lnmp0.9-full.tar.gz cd lnmp0.9-full/ ./centos.sh 2>&1 | tee lnmp.log(责任编辑:IT) |