CentOS8 + Anaconda + Django development environment construction procedure

Thing you want to do

Premise

Preparation

Connect to CentOS8 with SSH and execute the following with root privileges.

yum -y update
yum install -y wget
sysctl -w net.ipv6.conf.all.disable_ipv6=1
yum -y install vim-enhanced

SELinux disabled

setenforce 0
vi /etc/selinux/config

Edit below
SELINUX=disabled

Port open

Open the port for http access to Django.

firewall-cmd --add-port=80/tcp --zone=public --permanent	
firewall-cmd --add-port=8000/tcp --zone=public --permanent
firewall-cmd --add-port=8081/tcp --zone=public --permanent
firewall-cmd --reload

Anaconda installation

You have created a user (yamato in this case) on CentOS and have administrator privileges.

Get the installation shell.

su yamato
cd /home/yamato
wget https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux-x86_64.sh

Hit the shell to start the installation.

sh Anaconda3-2020.11-Linux-x86_64.sh

Follow the wizard and enter yes to proceed. Activate the path when you are done.

source .bashrc

Django installation

Install with the pip command.

pip install django

Create myapp as a trial.

cd /home/yamato
django-admin.py startproject myapp

Edit settings.py.

vi /home/yamato/myapp/myapp/settings.py

Modify ALLOWED_HOSTS.

#ALLOWED_HOSTS = []
ALLOWED_HOSTS = ["*"]

Start-up

The http server starts up below.

python /home/yamato/myapp/manage.py runserver 0.0.0.0:8000

Access via http from a browser.

Access http on port 8000 with the IP address of the virtual server (192.168.1.14 in this case).

http://192.168.1.14:8000/

OK when the following screen is displayed.

image.png

Recommended Posts

CentOS8 + Anaconda + Django development environment construction procedure
CentOS8 + Anaconda 4.9.2 + jupyterhub environment construction procedure
[Unity] Android development environment construction procedure
java development environment construction
Django development environment construction using Docker-compose (personal memorandum)
Wordpress local environment construction & development procedure with Docker
Rails6 development environment construction [Mac]
Offline environment construction CentOS edition
[Procedure 1 for beginners] Ruby on Rails: Construction of development environment
Environment construction for Servlet application development
Rails on Docker environment construction procedure
[Processing x Java] Construction of development environment
Laravel development environment construction with Docker (Mac)
Sapper × Go (echo) × Docker development environment construction
Universal Robotics UR Caps development environment construction
Java development environment construction memo on Mac
[Docker] Development environment construction Rails6 / Ruby2.7 / MySQL8
Spring Boot + Docker Java development environment construction
Run Keras with CentOS7 + Anaconda + Django + Apache
CentOS8.2 (x86_64) + ruby2.5 + Rails5.2 + MariaDB (10.3.17) environment construction
Build a simple Docker + Django development environment
Environment construction procedure for using PowerMock with JUnit
[Java] Environment construction
JAVA + STS (Spring Tool Suite) environment construction procedure
Java environment construction
Java development environment
Development environment construction using IntelliJ IDEA + Maven + Tomcat 9
Build a simple Docker Compose + Django development environment
A reminder of Docker and development environment construction
Ruby on Rails development environment construction on M1 Mac
React + Django + Nginx + MySQL environment construction with Docker
[Spring] Environment construction
Docker environment construction
WebSphere Liberty for Windows development environment maintenance procedure
Introduction to Slay the Spire Mod Development (2) Development Environment Construction
Java development environment construction on Mac-JDK Install (2020 preservation version)
BEAR application Docker development environment construction example (docker-sync, Mutagen)
[Mac] VS Code development environment construction (Java, Gradle, Node.js)
Stable development environment construction manual for "Rails6" with "Docker-compose"
Let's create a gcloud development environment on a centos8 container
CentOS8 + nginx1.18 + php-fpm7.4 + MariaDB10.5 + CodeIgniter4 development environment preparation memo
TDD study # 1 environment construction & first test-driven development (July 6th, 2020)
[Java] Environment construction procedure for developing struts 1.3 with Eclipse
[Environment construction] Build a Java development environment with VS Code!
Java + Spring development environment construction with VirtualBox + Ubuntu (Xfce4)
Penronse environment construction [Windows]
[Environment construction] Eclipse installation
[Flutter] Ubuntu 20.04 environment construction
Java development environment memo
Rails Docker environment construction
Server construction procedure Ubuntu18.04 server
Circle CI environment construction
Web application development environment construction in Java (for inexperienced people)
[Environment construction] Get the Ruby on Rails 6 development environment within 1 hour
Java web application development environment construction with VS Code (struts2)
Rails application development environment construction with Docker [Docker, Rails, Puma, Nginx, MySQL]
Create a Java and JavaScript team development environment (gradle environment construction)
[Vagrant] Prepare LAMP development environment with Vagrant (centos + apache + MySQL + PHP)
[Java development environment construction] Install OpenJDK 11 (Java 11) on macOS with Homebrew.