1. Installing Python3
1.1 Installing dependent libraries (toolkits)---> Important
Yum install gcc patch libffi-devel python-devel zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel Readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel-y
1.2 Enter the OPT (for storage software) directory
1.3 Python Source: wget http://www.python.org/ftp/python/3.5.6/Python-3.5.6.tar.xz1.4 Decompression (Note the compression method): TAR-XF PYTHON-3.5.6.TGZ 1.5 Enter the source code directory: CD python-3.5.61.6 generate a compilation script (specify the installation directory)./configure--prefix=/opt/python351.7 compile make1.8 compile successfully, Compile and install make install1.9 switch the installed python3.5 directory cd/opt/python35/2.0 view python3.5 executable script file ls bin/2.1 execute Python3.5 interpreter 1. Absolute path Execution mode/ opt/python35/bin/python3.52. relative path execution [[email protected] python35]# bin/python3.5
2.2 Adding environment variables
1. Add soft connection (usage) ln-s original file path destination file path 2. Add a soft connection (absolute path) ln-s/opt/python35/bin/python3.5/usr/local/bin/python33. Add PIP3 Soft Connection ln-s/ Opt/python35/bin/pip3/usr/local/bin/pip34. View PIP3 version Pip3-v
2. Install Django
1. Install Django mode 1PIP3 install django==1.11 mode 2:python3-m pip install-i https://pypi.tuna.tsinghua.edu.cn/simple django== 1.112. Configure the soft connection ln-s/opt/python35/bin/django-admin/usr/local/bin/django-admin3. Uninstall DJANGOPIP3 Uninstall Django4. Start Djangovi settings.py Write allowed_hosts = [' * ']5. Start djangopython3.5 manage.py runserver 0.0.0.0:80006. Windows access to linux IP address + port x.x.x.x:8000
3. Code upload and run
1.windows Write code to modify the corresponding configuration file 2. Test bug!!!! 3. Transfer to server via XFTP 4. Start Project
Portal: Software to implement Linux visualization on Windows----> poke here
Install Python and Django process details on Linux