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 SIHgit clone https://github.com/chiragagarwal54/AlumniTrackingSystem.gitpython3 -m venv venvsource venv/bin/activatecd AlumniTrackingSystempip install -r requirements.txtcp .env.example .envAdd your database name, user and password to the .env file. Keep host as localhost and port as null.python manage.py makemigrationspython manage.py migratepython 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-serversudo nano /etc/redis/redis.conf- Inside the file find the
superviseddirective and change it tosystemd. It should be set tonoby 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.