My Vps Install Script

个人的vps安装脚本

发布在这里做个备忘 分为Ubuntu && Centos

如果有需要可以看看哈~

ubuntu.sh

#!/bin/bash
#update
apt-get update -y
apt-get upgrade -y
#install software
apt-get install -y nmap vim build-essential gcc  g++ nc git curl wget  python-dev openssl openssl-dev zip automake make ncurses-dev
#install proxychains
git clone https://github.com/rofl0r/proxychains-ng /tmp/proxychains-ng
cd  /tmp/proxychains-ng
./configure --prefix=/usr/local/
make && make install
cp ./src/proxychains.conf /etc/proxychains.conf
cd ~
rm -rf /tmp/proxychains-ng
#install tmux
apt-get install -y  tmux
#install python2 pip
curl https://bootstrap.pypa.io/ez_setup.py | python
curl https://bootstrap.pypa.io/get-pip.py | pytohn
#install python2 requests & beautifulsoup
pip install requests
pip install requests[security]
wget https://www.crummy.com/software/BeautifulSoup/bs4/download/4.0/beautifulsoup4-4.1.0.tar.gz -O /tmp/beautifulsoup4-4.1.0.tar.gz 
cd /tmp/
tar -zxvf beautifulsoup4-4.1.0.tar.gz
cd beautifulsoup4-4.1.0
python setup.py install
#install python3
wget --no-check-certificate https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz -O Python-3.5.2.tgz
tar xvf Python-3.5.2.tgz
cd Python-3.5.2
./configure --prefix=/usr/local
make && make install
cd /tmp
curl https://bootstrap.pypa.io/ez_setup.py | /usr/local/bin/python3
curl https://bootstrap.pypa.io/get-pip.py | /usr/local/bin/python3
#install python3 requests & beautifulsoup
pip3 install requests
pip3 install requests[security]
cd /tmp/
tar -zxvf beautifulsoup4-4.1.0.tar.gz
cd beautifulsoup4-4.1.0
python3 setup.py install
#install msf
curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall && \
  chmod 755 msfinstall && \
  ./msfinstall
#install subdomainBrute
cd ~
git clone https://github.com/lijiejie/subDomainsBrute
pip install dnspython
#install sqlmap
git clone --depth 1 https://github.com/sqlmapproject/sqlmap.git sqlmap-dev
#install shadowsocks
pip install shadowsocks
#dirsearch
git clone https://github.com/maurosoria/dirsearch
#install tor
git clone https://github.com/torproject/tor
cd tor
./configure && make && make install
sh autogen.sh && ./configure && make && make install
#go ssserver
ssserver  -p 7788 -k password -d start
#http server
apt-get install -y php5 apache2 php5-mysql php5-gd php5-curl
#install jdk
apt-get install -y  default-jdk

Centos

#!/bin/bash

#update
yum update -y
yum upgrade

#install software
yum install -y nmap vim gcc gcc-c++ nc git curl wget  python-devel openssl openssl-devel automake  kernel-devel make ncurses-devel


#install proxychains
git clone https://github.com/rofl0r/proxychains-ng /tmp/proxychains-ng
cd  /tmp/proxychains-ng
./configure --prefix=/usr/local/
make && make install
cp ./src/proxychains.conf /etc/proxychains.conf
cd ~
rm -rf /tmp/proxychains-ng

#install libenvent
wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz -O /tmp/libevent-2.0.21-stable.tar.gz
cd /tmp
tar -zxvf libevent-2.0.21-stable.tar.gz
cd libevent-2.0.21-stable
./configure
make
sudo make install

#install tmux
git clone https://github.com/tmux/tmux.git /tmp/tmux
cd /tmp/tmux
sh autogen.sh
./configure && make

#install python2.7 pip
wget —no-check-certificate https://www.python.org/ftp/python/2.7.12/Python-2.7.12.tgz -O Python-2.7.12.tgz
tar xvf Python-2.7.12.tgz
cd Python-2.7.12
./configure --prefix=/usr/local
make && make install
cd /tmp
curl https://bootstrap.pypa.io/ez_setup.py | python
curl https://bootstrap.pypa.io/get-pip.py | python


yum install -y zlib-devel bzip2-devel  sqlite-devel readline-devel gdbm-devel libdbi-devel libffi-devel libxslt-devel

# install Python-3.5.2
wget —no-check-certificate https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz -O Python-3.5.2.tgz
tar xvf Python-3.5.2.tgz
cd Python-3.5.2
./configure --prefix=/usr/local
make && make install
cd /tmp
curl https://bootstrap.pypa.io/ez_setup.py | /usr/local/bin/python3
curl https://bootstrap.pypa.io/get-pip.py | /usr/local/bin/python3

#install python2 requests & beautifulsoup
pip2.7 install requests
pip2.7 install requests[security]
pip3.5 install requests
pip3.5 install requests[security]
wget https://www.crummy.com/software/BeautifulSoup/bs4/download/4.0/beautifulsoup4-4.1.0.tar.gz -O /tmp/beautifulsoup4-4.1.0.tar.gz
cd /tmp/
tar -zxvf beautifulsoup4-4.1.0.tar.gz
cd beautifulsoup4-4.1.0
python setup.py install
python3 setup.py install


#install msf
cd /tmp
curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall && \
  chmod 755 msfinstall && \
  ./msfinstall

#install subdomainBrute
cd ~
git clone https://github.com/lijiejie/subDomainsBrute
pip2.7 install dnspython

#install sqlmap
git clone --depth 1 https://github.com/sqlmapproject/sqlmap.git sqlmap-dev

#install dirsearch
git clone https://github.com/maurosoria/dirsearch

#install shadowsocks
pip2.7 install shadowsocks

#install tor
git clone https://github.com/torproject/tor
cd tor
sh autogen.sh 
./configure --disable-asciidoc
make && make install

#go ssserver
ssserver  -p 7788 -k password -d start

#install apache + php
yum install -y httpd  httpd-devel php php-mysql php-common php-gd php-curl

# install jdk
yum  -y install java-1.8.0-openjdk java-1.8.0-openjdk-devel
comments powered by Disqus