How to Install Web-Portal on Debian Latest
In this tutorial, we will guide you through the process of installing Web-Portal from https://github.com/enchant97/web-portal on Debian Latest.
Prerequisites
Before proceeding with this tutorial, you should have the following:
- Debian Latest installed on your system
- Superuser or "sudo" privileges
- Basic knowledge of the command line interface and Git
Step 1: Install Required Dependencies
To get started, we need to install some required dependencies for Web-Portal. Open your terminal and execute the following commands:
sudo apt update
sudo apt install git python3-pip python3-venv nginx
Step 2: Clone Web-Portal Repository
Next, navigate to your desired directory to store the repository, and clone the Web-Portal repository using the following command:
git clone https://github.com/enchant97/web-portal.git
Step 3: Create and Activate Python Virtual Environment
After cloning the repository, create and activate a Python virtual environment to install all necessary dependencies. Use the following commands:
cd web-portal
python3 -m venv env
source env/bin/activate
Step 4: Install Required Packages
With the virtual environment activated, install the required packages using pip:
pip install -r requirements.txt
Step 5: Configure Nginx
Web-Portal utilizes Nginx as a web server to reverse proxy incoming requests to the application server. To configure Nginx, use the following steps:
Create a new Nginx configuration file at /etc/nginx/sites-available/web-portal and add the following contents:
server {
listen 80;
server_name your_domain.com; # Replace with your domain name or server IP
location / {
proxy_pass http://localhost:8000;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Note that the server_name directive should be replaced with your domain name or server IP address.
Then, create a symbolic link from the sites-available directory to the sites-enabled directory:
sudo ln -s /etc/nginx/sites-available/web-portal /etc/nginx/sites-enabled/
To verify the configuration and restart Nginx:
sudo nginx -t
sudo systemctl restart nginx
Step 6: Run Web-Portal
Finally, start the Web-Portal server using the following command:
python manage.py runserver 0.0.0.0:8000
This will start the server on port 8000 and allow incoming connections from any IP address (0.0.0.0).
Conclusion
In this tutorial, we have covered the installation steps for Web-Portal on Debian Latest. You should now have a fully functional installation of Web-Portal running on your Debian machine.