Exported on 11-Oct-2021 12:23:23
Parameters
1 - Update Yum Repositories
Update yum repositories.
Login as user {s1c} on node {s1}
# Install yum
sudo yum -y update
2 - Install Python version 3 and Pip3
Installs Python3 and Pip3.
Login as user {Linux User} on node {Linux Node}
# Install python3
sudo yum install -y python3 python3-pip
3 - Setup VirtualEnv
Installs and configures virtualenv.
Login as user {Linux User} on node {Linux Node}
# Install virtualenv
sudo pip3 install virtualenv
4 - Create Virtual Environment
Creates a virtual environment for the Django application.
Login as user {Linux User} on node {Linux Node}
# Create django applications
mkdir django-apps
cd django-apps
virtualenv env
5 - Install Django Package
Install Django pip package.
Login as user {Linux User} on node {Linux Node}
# Install Django
sudo pip3 install django
6 - Install SQLite3
Install SQLite database version 3.
Login as user {Linux User} on node {Linux Node}
# Download SQLite latest version
curl https://www.sqlite.org/2019/sqlite-autoconf-3280000.tar.gz -o sqlite-autoconf-3280000.tar.gz
# Unzip SQLite
tar -xzf sqlite-autoconf-3280000.tar.gz
# Install GCC
sudo yum -y install gcc
# Change directory to sqlite
cd sqlite-autoconf-3280000
# Install sqlite
./configure
make
sudo make install
7 - Start Django Development Server
Creates Django project and starts up a Django development server.
Login as user {Linux User} on node {Linux Node}
#Update Python's SQLite version
echo 'export LD_LIBRARY_PATH="/usr/local/lib"' >> ~/.bashrc
source ~/.bashrc
# Create Django project
django-admin startproject mysite
# Start development server
cd mysite
python3 manage.py migrate
python3 manage.py runserver
Install Django Development Environment On RHEL Based Server With AttuneOps
This Blueprint Installs Django Development Environment On RHEL Based Server
Django is a Python-based open-source and free web framework that follows the model–template–views architectural pattern. It is maintained by an American independent, Django Software Foundation.
Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design. Built by experienced developers, it takes care of much of the hassle of web development, so you can focus on writing your app without needing to reinvent the wheel.
Pre-Blueprint Attune setup
Steps Involved
Supported Operating Systems