下载vmware12:
链接:http://pan.baidu.com/s/1kUGhZyZ密码:rdv8
下载centos6.8镜像:
http://mirrors.163.com/centos/6.8/isos/x86_64/CentOS-6.8-x86_64-minimal.iso
系统安装:
安装过程(见centos6.5安装文档)
配置网络:
# vim /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=00:0c:29:55:8c:95
TYPE=Ethernet
UUID=fa5330f5-8b74-4db6-8285-e3689ecbc133
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
IPADDR=192.168.1.63
NETMASK=255.255.255.0
DNS2=8.8.8.8
GATEWAY=192.168.1.1
DNS1=192.168.1.1
其它安装:
本地yum源的配置
#vim /etc/yum.repo.d/centos6.7.repo
[name]
name=centos6.7
baseurl=file:///mnt
enabled=1
gpgcheck=0
#mount /dev/cdrom/mnt
mount: block device /dev/sr0 is write-protected,mountingread-only
关闭防火墙并加入开机启动:
/etc/init.d/iptables stop关闭防火墙
关闭selinux
#setenforce 0临时关闭
RPM源安装:
# rpm -ivhhttp://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Python源码安装:
#yum install �Cy gcc gcc-c++ readline-devel
#yum install -y MysqL MysqL-server MysqL-devel zlibzlib-devel
#wgethttps://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz
#tar zxvf Python-2.7.6.tgz
#cd Python-2.7.6
#./configure
#make && make install
#rm /usr/bin/python
#ln /usr/local/bin/python2.7 /usr/bin/
#ln /usr/local/bin/python2.7 /usr/bin/python
PIP2.7安装
wgethttps://bootstrap.pypa.io/get-pip.pypython2.7get-pip.py
pip2.7 install flask
pip2.7 install MysqL-python
GIT安装
# yum install curl-devel expat-devel gettext-developenssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker
# wgethttps://www.kernel.org/pub/software/scm/git/git-1.9.4.tar.gz
# tar xzf git-1.9.4.tar.gz
# cd git-1.9.4
# make prefix=/usr/local/git all
# make prefix=/usr/local/git install
# echo "export PATH=$PATH:/usr/local/git/bin">> /etc/bashrc
# source /etc/bashrc
#vim /etc/my.conf
[MysqLd]
datadir=/var/lib/MysqL
socket=/var/lib/MysqL/MysqL.sock
user=MysqL
# Disabling symbolic-links is recommended to preventassorted security risks
symbolic-links=0
default-character-set = utf8
character_set_server = utf8
[MysqLd_safe]
log-error=/var/log/MysqLd.log
pid-file=/var/run/MysqLd/MysqLd.pid
default-character-set = utf8
[client]
default-character-set = utf8
到此为止配置python环境安装结束