CentOS6一键升级Python2.7及安装常用工具脚本
2017-10-09 15:05
716 查看
CentOS6一键升级Python2.7及安装常用工具脚本
#!/bin/bash
#
# Check if user is root
if [ $(id -u) != "0" ]; then
echo "Error: You must be ROOT to run this script"
exit 1
fi
###升级yum
#yum upgrade -y
#yum clean all
###安装常用工具
yum -y install vixie-cron crontabs vim screen wget
###安装依赖库
yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel
libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers sqlite-devel libaio libaio-devel
###删除yum的历史记录
rm -rf /var/lib/yum/history/*.sqlite
###下载Python-2.7.10
wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz
tar -xvf Python-2.7.10.tgz
cd Python-2.7.10
###编译
./configure --prefix=/usr/local
make && make altinstall
ln -fs /usr/local/bin/python2.7 /usr/local/bin/python
python -V
sleep 5
###安装setuptools
wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-18.2.tar.gz
tar xzvf setuptools-18.2.tar.gz
cd setuptools-18.2
python setup.py install
easy_install pip
###安装pip
wget --no-check-certificate https://pypi.python.org/packages/source/p/pip/pip-7.1.2.tar.gz
tar xzvf pip-7.1.2.tar.gz
cd pip-7.1.2成都治疗性功能障碍的误区
python setup.py install
###升级pip
94c7
pip install --upgrade pip
sleep 5
###安装Python常用模块
pip install requests
pip install cymysql
###清空防火墙规则
iptables -F
iptables -Z
iptables -X
service iptables save
service iptables restart
###修改系统时间
rm -rf /etc/localtime
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
###安装fail2ban
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum -y install fail2ban
###安装一键防CC脚本
wget -O install.sh --no-check-certificate https://zhangge.net/wp-content/uploads/files/cckiller/install.sh?ver=1.0.5 && chmod +x install.sh && bash install.sh -i预防阳痿的方法有哪些?
###安装lnmp1.4
#screen -S lnmp
#wget -c http://soft.vpser.net/lnmp/lnmp1.4beta.tar.gz && tar zxf lnmp1.4beta.tar.gz && cd lnmp1.4 && ./install.sh lnmp
###安装91yun锐速破解版
###参考文章:https://www.91yun.org/archives/683
###卸载方法:chattr -i /serverspeeder/etc/apx* && /serverspeeder/bin/serverSpeeder.sh uninstall -f
#wget -N --no-check-certificate https://raw.githubusercontent.com/91yun/serverspeeder/master/serverspeeder-all.sh && bash serverspeeder-all.sh成都包皮手术术后需要注意什么?
#!/bin/bash
#
# Check if user is root
if [ $(id -u) != "0" ]; then
echo "Error: You must be ROOT to run this script"
exit 1
fi
###升级yum
#yum upgrade -y
#yum clean all
###安装常用工具
yum -y install vixie-cron crontabs vim screen wget
###安装依赖库
yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel
libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers sqlite-devel libaio libaio-devel
###删除yum的历史记录
rm -rf /var/lib/yum/history/*.sqlite
###下载Python-2.7.10
wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz
tar -xvf Python-2.7.10.tgz
cd Python-2.7.10
###编译
./configure --prefix=/usr/local
make && make altinstall
ln -fs /usr/local/bin/python2.7 /usr/local/bin/python
python -V
sleep 5
###安装setuptools
wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-18.2.tar.gz
tar xzvf setuptools-18.2.tar.gz
cd setuptools-18.2
python setup.py install
easy_install pip
###安装pip
wget --no-check-certificate https://pypi.python.org/packages/source/p/pip/pip-7.1.2.tar.gz
tar xzvf pip-7.1.2.tar.gz
cd pip-7.1.2成都治疗性功能障碍的误区
python setup.py install
###升级pip
94c7
pip install --upgrade pip
sleep 5
###安装Python常用模块
pip install requests
pip install cymysql
###清空防火墙规则
iptables -F
iptables -Z
iptables -X
service iptables save
service iptables restart
###修改系统时间
rm -rf /etc/localtime
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
###安装fail2ban
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum -y install fail2ban
###安装一键防CC脚本
wget -O install.sh --no-check-certificate https://zhangge.net/wp-content/uploads/files/cckiller/install.sh?ver=1.0.5 && chmod +x install.sh && bash install.sh -i预防阳痿的方法有哪些?
###安装lnmp1.4
#screen -S lnmp
#wget -c http://soft.vpser.net/lnmp/lnmp1.4beta.tar.gz && tar zxf lnmp1.4beta.tar.gz && cd lnmp1.4 && ./install.sh lnmp
###安装91yun锐速破解版
###参考文章:https://www.91yun.org/archives/683
###卸载方法:chattr -i /serverspeeder/etc/apx* && /serverspeeder/bin/serverSpeeder.sh uninstall -f
#wget -N --no-check-certificate https://raw.githubusercontent.com/91yun/serverspeeder/master/serverspeeder-all.sh && bash serverspeeder-all.sh成都包皮手术术后需要注意什么?
相关文章推荐
- centos 6.8 下python2.6 升级python2.7,安装pip工具
- centos默认python2.6升级到python2.7,并用pip方式安装python工具包。
- centos 已经安装python2.7 升级到python3.5
- CentOS升级Python2.6到Python2.7并安装pip
- CentOS6.5升级Python到2.7并安装pip
- CentOS 6.x系统升级Python到2.7版本的Shell脚本分享
- CentOS升级Python2.6到Python2.7并安装pip
- CentOS6.8升级Python2.6到Python2.7并安装pip
- CentOS6.5升级Python2.6到Python2.7并安装pip
- 给CentOS 5.5升级Python2.7 Django安装
- 详解CentOS升级Python2.6到Python2.7并安装pip
- Centos 5.x 升级 python2.7,安装setuptools、mysqldb 完整记录
- CentOS升级Python2.6到Python2.7并安装pip
- CentOS升级Python2.6到Python2.7并安装pip
- 【笔记】CentOS升级Python2.7及安装pip
- CentOS升级Python2.7及安装pip
- CentOS python2.7 自动安装脚本
- CentOS升级Python2.6到Python2.7并安装pip