
Installing SQL-Ledger is simple. I have two simple scripts available as well that install and configure SQL-Ledger with Apache and Postgress. The scripts also get and configure a SSL certificate for the SQL-Ledger installation. They are available here.
Debian/Ubuntu Script
CentOs/RedHat/Rocky Script
Below are also step by step instructions for installing manually.
SQL-Ledger requires Perl, a web server (like Apache), and PostgreSQL as its database.
sudo apt-get update sudo apt-get install apache2 postgresql libdbd-pg-perl sudo apt-get install perl libdbi-perl libapache2-mod-perl2sudo dnf install httpd postgresql-server perl-DBD-Pg sudo dnf install perl perl-DBI mod_perlSet up and start the PostgreSQL database.
sudo pg_createcluster 13 main --startsudo /usr/bin/postgresql-setup --initdb sudo systemctl start postgresql sudo systemctl enable postgresqlEdit the pg_hba.conf file to configure authentication.
/etc/postgresql/13/main/pg_hba.conf on Debian/Ubuntu and /var/lib/pgsql/data/pg_hba.conf on CentOS/RedHat.peer or ident to md5 for local and IPv4/IPv6 connections.sudo systemctl restart postgresqlDownload the latest version of SQL-Ledger from the official website or a repository.
wget [SQL-Ledger-Download-Link] tar -zxvf [Downloaded-File]Replace [SQL-Ledger-Download-Link] and [Downloaded-File] with the actual download link and file name.
Move the SQL-Ledger files to your web server directory (like /var/www/html/ for Apache)
sudo mv sql-ledger /var/www/html/Set the appropriate permissions for the SQL-Ledger directory.
sudo chown -R www-data:www-data /var/www/html/sql-ledgerCreate an Apache configuration file for SQL-Ledger. Enable CGI module if not already enabled.
sudo a2enmod cgiCreate a new site configuration or update an existing one to serve SQL-Ledger.
sudo systemctl restart apache2