Run this command in your terminal first:
sudo apt install python3-venv postgresql postgresql-contrib
Then,
sudo -u postgres psql
A new type of terminal will open with postgres=#
starting tag.
Next in that terminal,
CREATE DATABASE <project_name>
;CREATE USER <project_user> WITH PASSWORD '<user_password>';
ALTER ROLE <project_user> SET client_encoding TO 'utf8';
ALTER ROLE <project_user> SET default_transaction_isolation TO 'read committed';
ALTER ROLE <project_user> SET timezone TO 'UTC';
GRANT ALL PRIVILEGES ON DATABASE <project_name> TO <project_user>;
\q
You will be back to the original terminal.
mkdir SIH && cd SIH
git clone https://github.com/chiragagarwal54/AlumniTrackingSystem.git
python3 -m venv venv
source venv/bin/activate
cd AlumniTrackingSystem
pip install -r requirements.txt
cp .env.example .env
Add your database name, user and password to the .env file. Keep host as localhost and port as null.
python manage.py makemigrations
python manage.py migrate
python manage.py runserver
The website is now up and running at http://localhost:8000/
To Check the reak-time chat function you need to install redis. Steps to install redis are as follows:
sudo apt install redis-server
sudo nano /etc/redis/redis.conf
- Inside the file find the
supervised
directive and change it tosystemd
. It should be set tono
by default. sudo systemctl restart redis.service
To check if redis is working or not:
- Type in
redis-cli
- Type
ping
- If it returns
PONG
, then your redis-broker server is running fine.