Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
81 lines (62 sloc) 2.53 KB
yum -y install epel-release ; yum -y install sudo vim git gcc automake make prce-devel ncurses-devel libevent-devel openssl-devel fail2ban pptpd easy-rsa iptables-services libtool mysql-server wget
systemctl enable fail2ban
cat <<EOF >/etc/fail2ban/jail.local
[DEFAULT]
# Ban hosts for 10 hours:
bantime = 36000
# Override /etc/fail2ban/jail.d/00-firewalld.conf:
banaction = iptables-multiport
[sshd]
enabled = true
EOF
systemctl restart fail2ban
cd
git clone https://github.com/tmux/tmux
cd tmux
./autogen.sh && ./configure && make && make install
cd
git clone https://github.com/nginx/nginx
cd nginx
./auto/configure --with-http_ssl_module && make && make install && cd
cd
curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
python get-pip.py
pip install --upgrade pip
pip install shadowsocks
cd
git clone https://github.com/nkwsqyyzx/.sys.config
echo "source ~/.sys.config/.bashrc" >> .bashrc
echo "source ~/.sys.config/.zshrc" >> .zshrc
ln -s ~/.sys.config/.tmux.conf .tmux.conf
cd
git clone git://github.com/joelthelion/autojump.git && cd autojump && ./install.py && cd .. && rm -rf autojump
cd
git clone https://github.com/nkwsqyyzx/.vim --recursive
ln -s .vim/.vimrc .vimrc
# open port for shadowsocks
firewall-cmd --zone=public --add-port=8443/tcp --permanent && firewall-cmd --reload
# default port for python server
firewall-cmd --zone=public --add-port=8000/tcp --permanent && firewall-cmd --reload
# shadowsocks
ssserver -p 8443 -k password -m rc4-md5
# libreswan only for centos7
yum install -y nss-devel nspr-devel pkgconfig pam-devel libcap-ng-devel libselinux-devel curl-devel flex bison gcc make fipscheck-devel unbound-devel libevent-devel xmlto audit-libs-devel systemd-devel
# wget https://raw.githubusercontent.com/hwdsl2/setup-ipsec-vpn/master/vpnsetup_centos.sh
# edit vpnsetup_centos.sh and run
# install jenkins
# full ref: https://www.vultr.com/docs/how-to-install-jenkins-on-centos-7
sudo yum -y install java-1.8.0-openjdk.x86_64
sudo cp /etc/profile /etc/profile_backup
echo 'export JAVA_HOME=/usr/lib/jvm/jre-1.8.0-openjdk' | sudo tee -a /etc/profile
echo 'export JRE_HOME=/usr/lib/jvm/jre' | sudo tee -a /etc/profile
source /etc/profile
echo $JAVA_HOME
echo $JRE_HOME
cd ~
sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
sudo yum -y install jenkins
sudo systemctl start jenkins.service
sudo systemctl enable jenkins.service
sudo firewall-cmd --zone=public --permanent --add-port=8080/tcp
sudo firewall-cmd --reload