Django + nginx + gunicore + supervisor + Ali cloud host deployments blog project

1 preparation phase

1 Fresh Ali cloud host 
2 to buy a domain name like 
3 to create a virtual environment python

Select 2 Ali cloud host

Let's just to experiment, I bought the cheapest Ali cloud host

3 Ali cloud host creates a superuser

3.1 default when connected using a root user, create a new user with root authority

# Run this command to create a new user under the root user, mosson username 
# because I'm Yangxue Guang, so I took username is Mosson 
# Choose a user name you like, and I do not necessarily have the same 
root @ Server: ~ # adduser Mosson 
# set a password for the new user # Note that there will be no time to lose the password characters appear, do not think the keyboard is broken, you can enter the normal root @ Server: ~ # passwd Mosson
# join the newly created users super rights group root @ Server: ~ # the usermod -Ag Wheel Mosson
# to switch to the new user-created root @ Server: ~ # su - Mosson
# handover success, before the @ sign is already a new user name and not the root mosson @ server: $

3.2 update older versions of the system to avoid the influence of [command]

mosson@server:$ sudo yum update
mosson@server:$ sudo yum upgrade

3.3 update sqlite3 database will be replaced with mysql [late]

# Create a src directory and into the directory 
Mosson @ Server: $ mkdir -p ~ / src 
Mosson @ Server: $ cd ~ / src 

# sqlite3 download the source code and extract the installation 
mosson @ server: $ wget https://sqlite.org/2019 /sqlite-autoconf-3290000.tar.gz 
Mosson @ Server: $ tar zxvf SQLite-autoconf-3290000.tar.gz 
Mosson @ Server: $ cd SQLite-autoconf-3.29 million 
Mosson @ Server: $ ./configure 
Mosson @ Server: $ the make 
Mosson @ Server: $ sudo the make install

3.4 Installation and Pipenv python3

1 安装依赖
mosson@server:$ sudo yum install -y openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel

下载python源码
mosson@server:$ cd ~/src
mosson@server:$ wget https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tgz mosson@server:$ tar -zxvf Python-3.6.4.tgz 源码安装python3 mosson@server:$ cd Python-3.6.4 mosson@server:$ ./configure LD_RUN_PATH=/usr/local/lib LDFLAGS="-L/usr/local/lib" CPPFLAGS="-I/usr/local/include" mosson@server:$ make LD_RUN_PATH=/usr/local/lib mosson@server:$ sudo make install

Check the python is not installed successfully

python3 -V

 

Guess you like

Origin www.cnblogs.com/mosson/p/11563243.html