A memo when Django was released on VPS (preparation)

About this article

I want to continue to be myself who can create moving things. I signed up for a VPS and was able to publish what I made with Django, so I'll leave a note of that time.

VPS contract

As a person involved in AWS, GCP, and Azure-based business, I thought that it was not necessary to do anything individually, so I signed a VPS contract. Select the minimum memory and SSD for Sakura VPS.

Install CentOS7 x86 _64

Select the OS that you often come into contact with in your work. Since the connection permission port can be selected at this timing, SSH(22) Web(80/443) Email (25/110/143/465/587/993/995) choose.

ssh connection

Confirm the connection from Teraterm used by the client to the IP address at the time of contract. I want to prohibit login as root considering the minimum security at this point.

Settings to deny connections by root

User created.

# useradd hoge
# passwd hoge

Settings to prevent ssh connection as root.

# vi /etc/ssh/sshd_config

Open the file with

PermitRootLogin no

Save as. Confirm that ssh connection is no longer possible as root. After that, when connecting to ssh, the user Connect with hoge and if necessary

$ sudo command

And.

Install Python 3 on your development PC

Install Python 3 on your Windows 10 PC.

On the download site, select Windows x86_64 executable installer and DL. Execute python-3.7.7-amd64.exe. Add Python 3.7 to PATH check is ON. image.png

Create a Python virtual environment

In the future, a virtual environment will be created for each development unit.

> python -m venv venv_hoge_hoge

A directory has been created and contains a set of files for the virtual environment.

Enter the virtual environment.

> cd venv_hoge_hoge\Scripts
> activate.bat
(venv_hoge_hoge)> 

Exit the virtual environment.

(venv_hoge_hoge)> deactibate
>

Install Django

Pycharm installation

PostgreSQL installation

Version control system introduced

project creation

django app creation

Pycharm setting

Recommended Posts

A memo when Django was released on VPS (preparation)
[Django] A memo when log was not
What I did when I stumbled on a Django tutorial
Django page released on heroku: Preparation my addictive point
A solution when you can't start project Django on Windows
I was a little addicted to installing Python3.3 + mod_wsgi3.4 on Sakura VPS (CentOS), so a retrospective memo
DJango Memo: From the beginning (preparation)
A note I was addicted to when making a beep on Linux
Implement a Django app on Hy
Run TensorFlow2 on a VPS server
A memorandum when Django is installed on Sakura's rental server (standard plan)
A memo with Python2.7 and Python3 on CentOS
React → Ajax → Django on Linux implementation memo
A struggle when installing pyenv on Cygwin
A note on enabling PostgreSQL with Django
A memo that I stumbled upon when doing a quote RT on Twitter Bot
A memo of a tutorial on running python on heroku
A addictive story when using tensorflow on Android
Build a Django environment on Raspberry Pi (MySQL)
DJango Memo: From the beginning (creating a view)
A memo when creating a python environment with miniconda
Building a Python environment on a Sakura VPS server
A story that required preparation when trying to do a Django tutorial with plain centos7
The world changed when I opened a big Python project (Django) on Sourcetrail (Linux)
[Django] A memo when log was not
Django Learning Memo
django tutorial memo
heroku deployment memo (Django)
Try installing Sonnet (memo)
Stumbled when installing PyOCR
Django memo # 1 from scratch
Precautions when installing fbprophet
A memo when Django was released on VPS (preparation)
[Memo] Django development environment
Work memo when introducing mitmproxy
DEBUG settings when using Django
polyfit error when installing matplotlib
[Learning memo] Django command summary