Skip to content
Snippets Groups Projects
Verified Commit 9691eead authored by Zhang Huanjie's avatar Zhang Huanjie
Browse files

change instsll.txt

parent 1b48d3b1
No related branches found
No related tags found
No related merge requests found
......@@ -2,42 +2,46 @@
# curl https://raw.githubusercontent.com/bg6cq/vpnsetup/master/install.txt | sh
#install packages
cd /etc/yum.repos.d
mv CentOS-Vault.repo CentOS-Valut.repo.save
curl http://ip.ustc.edu.cn/CentOS-Valut.repo.6 > CentOS-Vault.repo
#change the eth? style
cp -f /etc/default/grub /etc/default/grub.bak
sed -i -e 's/quiet"/quiet net.ifnames=0"/' /etc/default/grub
grub2-mkconfig -o /boot/grub2/grub.cfg
cd /etc
rm -f localtime
ln -s /usr/share/zoneinfo/Asia/Shanghai localtime
#curl http://ctos.ustc.edu.cn/epel.repo.6 > epel.repo
#cd /etc/pki/rpm-gpg/
#curl http://mirrors.ustc.edu.cn/epel/RPM-GPG-KEY-EPEL-6 > RPM-GPG-KEY-EPEL
#enable Devel rep
sed -i -e "s/enabled=0/enabled=1" /etc/yum.repos.d/Rocky-Devel.repo
#change logrotate.conf
sed -i -e "s/rotate 4/rotate 40/" /etc/logrotate.conf
#install packages
yum update -y
yum install -y gcc git lz4-devel openssl-devel dialog tcpdump ntpdate libpcap-devel
yum install -y telnet bind-utils traceroute gd-devel httpd
yum install -y gcc git lz4-devel openssl-devel dialog tcpdump telnet traceroute gd-devel httpd
yum install -y make libpcap-devel lm_sensors bind-utils net-tools
chkconfig httpd on
echo "HWMON_MODULES=coretemp" >> /etc/sysconfig/lm_sensors
echo "MODULE_0=coretemp" >> /etc/sysconfig/lm_sensors
#change network setting
sed -i -e "s/dhcp/static/" /etc/sysconfig/network-scripts/ifcfg-eth0
systemctl enable httpd.service
systemctl enable lm_sensors.service
#install ethudp
cd /usr/src
git clone https://github.com/bg6cq/ethudp.git
git clone https://git.ustc.edu.cn/james/ethudp.git
cd ethudp
make
#install udptest
cd /usr/src
git clone https://github.com/bg6cq/udptest.git
cd udptest
make
#install vpnsetup
cd /usr/src
git clone https://github.com/bg6cq/vpnsetup.git
git clone https://git.ustc.edu.cn/james/vpnsetup.git
cd /usr/src/vpnsetup
make
ln -s /usr/src/vpnsetup/ethudp /etc/
ln -s /usr/src/vpnsetup/vpnsetup.sh /bin/vpnsetup
cp -f rc.firewall /etc/rc.d
grep vpnrestart.sh /etc/rc.local
if [ $? -eq 0 ];
then
......@@ -47,16 +51,13 @@ else
echo /usr/src/vpnsetup/vpnrestart.sh >> /etc/rc.local
echo "/usr/src/traffic/iftrafficd &" >> /etc/rc.local
echo "setenforce 0" >> /etc/rc.local
echo "/etc/rc.d/rc.firewall" >> /etc/rc.local
fi
ln -s /usr/src/vpnsetup/vpnsetup.sh /bin/vpnsetup
/bin/cp -f iptables /etc/sysconfig
pwd
echo "-k 1234 -p 1234 -enc aes-128" > /etc/ethudp/SITE/OPT
cat /sys/class/net/eth0/address | tr 'a-f' 'A-F'|tr -d ':' > /etc/ethudp/SITE/SN
crontab crontab.txt
#install sshkey
mkdir /root/.ssh
chmod og-rwx /root/.ssh
cat authorized_keys >> /root/.ssh/authorized_keys
......@@ -64,17 +65,20 @@ chmod og-rwx /root/.ssh/authorized_keys
/sbin/restorecon -r /root/.ssh
cd /usr/src
git clone https://github.com/bg6cq/traffic.git
git clone https://git.ustc.edu.cn/james/traffic.git
cd /usr/src/traffic
make
cp traffic.html /var/www/html/index.html
cd /usr/src/vpnsetup
git remote add local ssh://root@202.141.160.125:22222/git/vpnsetup.git
#git checkout -b
#cd /usr/src/vpnsetup
#git remote add local ssh://root@202.141.160.125:22222/git/vpnsetup.git
#git checkout -b
#vi /etc/ethudp/SITE/INDEX
systemctl disable NetworkManager.service
systemctl stop NetworkManager.service
/usr/src/vpnsetup/vpnrestart.sh
ip link show dev eth0
sync
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment