linux下安装python3.5.4 共存版,并配置django,oracle,mysql环境
安装python3.5.4
python3.5.4下载地址
https://www.python.org/ftp/python/3.5.4/Python-3.5.4.tgz
yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel
chmod o+x configure
./configure --prefix=/usr/local/python3.5
chmod 777 /u01/install/Python-3.5.4/Modules/_ctypes/libffi/configur
make
make install
ln -s /usr/local/python3.5/bin/python3 /usr/bin/python3
ln -s /usr/local/python3.5/bin/pip3 /usr/bin/pip3
python3 -V
pip3 -V
安装django模块
pip3 install django
ln -s /usr/local/python3.5/bin/django-admin /usr/bin/django-admin
djaong命令
django-admin startproject sitename
python3 manage.py runserver 0.0.0.0
python3 manage.py startapp appname
python3 manage.py syncdb
python3 manage.py makemigrations
python3 manage.py migrate
安装oracle模块
pip3 install cx_Oracle
firewall-cmd --zone=public --add-port=8000/tcp --permanent && firewall-cmd --reload && firewall-cmd --zone=public --list-ports
下载oracle_client
https://share.weiyun.com/34c57428655d2481e8e233ee0151e1ec
cat /etc/profile.d/oracle.sh
export ORACLE_HOME=/u01/install/instantclient_12_2
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME
source /etc/profile.d/oracle.sh
安装mysql模块
yum install mysql-devel
pip3 install mysqlclient