How to Install Gancio on Debian Latest
Gancio is an open-source event manager that can be used to create and manage events. In this tutorial, we will guide you through the steps needed to install Gancio on Debian latest.
Prerequisites
- A Debian latest system with sudo access.
- An internet connection.
Steps
- Update the system
The first step is to update the system to ensure that all the packages are up to date.
sudo apt update && sudo apt upgrade -y
- Install Necessary Packages
Gancio requires some additional packages to be installed before it can run smoothly.
sudo apt install python3 python3-dev python3-pip python3-venv libpq-dev libffi-dev libssl-dev -y
- Install Gancio
Use git to clone the Gancio repository.
git clone https://git.autistici.org/ai/gancio
cd gancio
- Create a Python Virtual Environment
Create a Python virtual environment to install the required Python packages.
python3 -m venv env
source env/bin/activate
- Install Requirements
Install the required Python packages.
pip3 install -r requirements/base.txt
pip3 install -r requirements/production.txt
- Configure Gancio
Gancio uses a settings_prod.py file to store configuration settings. A sample file has already been provided in the gancio folder. Edit the file and add your own configuration. Replace SECRET_KEY with any secret key of your choice.
DEBUG = False
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'gancio_db',
'USER': 'gancio',
'PASSWORD': 'password',
'HOST': '127.0.0.1',
'PORT': '5432'
}
}
SECRET_KEY = 'your_secret_key'
- Create Database
Create a new PostgreSQL database and user for Gancio.
sudo su - postgres
psql
CREATE USER gancio WITH PASSWORD 'password';
CREATE DATABASE gancio_db;
GRANT ALL PRIVILEGES ON DATABASE gancio_db TO gancio;
\q
exit
- Migrate Database
Migrate the database to reflect the changes made.
python3 manage.py migrate
- Load Initial Data
Load initial data for the application.
python3 manage.py loaddata gancio/fixtures/initial.json
- Create a Superuser
Create a superuser account to manage the application.
python3 manage.py createsuperuser
- Collect Static Files
Collect the static files used by the application.
python3 manage.py collectstatic --noinput
- Run Gancio
Run Gancio at http://127.0.0.1:8000/.
python3 manage.py runserver 0.0.0.0:8000
Conclusion
In this tutorial, we have shown you how to install Gancio on Debian latest. Now you can browse to http://127.0.0.1:8000/ and enjoy using the application.