This article records the python3web development environment that took a day's spare time to deploy
table of Contents
-
- Alibaba Cloud server installation graphical interface
- Ubuntu16.04 switch to python3 by default
- Problem with hostname in ubuntu16.04
- Remote connection problem
- ubuntu16.04 install phpstudy
- When installing django, the pip command cannot be executed
- Alibaba Cloud deploys Django to achieve public network access
After learning a little bit of front-end development knowledge, I learned about the Django framework. The study in the laboratory building was not enough to meet my exploration needs. I found more tutorials and hoped to knock out the code in the tutorials. I feel sorry for the idle server, and it takes a lot of energy to finish, and encounter various problems...
Alibaba Cloud server installation graphical interface
Test version centos7.3, ubuntu16.04
To install the graphical interface, you must first determine whether your server's performance is sufficient. See other people's tutorials are all 8M 4 cores. The
author's single core 1M, failed to install successfully.
centos7.3:
The answer provided by the Linux Commune.
After trying, I found that it failed. It may be a problem after the version 7.4, but Alibaba Cloud only provides centos version 7.3.
ubuntu16.04: Alibaba
Cloud (ECS)_Ubuntu_graphical interface installation_VNC remote access complete tutorial
Ubuntu16.04 switch to python3 by default
Just execute these two commands directly
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 100
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 150
Details:
How to set python3 as default in ubuntu16.04
Problem with hostname in ubuntu16.04
vim /etc/hosts
Add the second line in the figure
Remote connection problem
Putty connection generally occupies port 22 ssh connection. Might as well use xftp. After connecting with xftp, you can not only view the file list, but also directly open xshell for command line input. The default user name for the connection is root, and the login password can be set on the server console
ubuntu16.04 install phpstudy
Effective and detailed tutorial
on ubuntu16.04: Detailed tutorial on installing PHPstudy on Ubuntu17.04
The process is time-consuming. I used 23 minutes on the Alibaba Cloud server.
When installing django, the pip command cannot be executed
First look at the version control, whether the corresponding version can run in the environment:
Note that django2.0.x can be used under python2.7
Correspondence between django version and python version
(sudo) pip3 install Django
或者 (sudo) pip3 install Django==2.2.7
安装显示pip没安装问题时
The installation is as follows, and the actual measurement is valid:
apt install python3-pip
ps: I switched the default python2 to python3>
Alibaba Cloud deploys Django to achieve public network access
Alibaba Cloud deploys Django to achieve public network access