- Clone this Repository
- Run the SQL scripts in ./etc/sql in order
- Configure Apache from
./etc/apache2.conf
- Success!
su - postgres
psql
create user openthc_cre with encrypted password 'NOT_A_SECRET';
create database openthc_cre with owner openthc_cre;
\c openthc_cre openthc_cre
\i 10-tables.sql
\i 20-pk.sql
\i 30-fk.sql
\i 40-constraint.sql
\i 50-udx.sql
\i 60-idx.sql
\i 70-views.sql
\i 80-triggers.sql
\i 90-data.sql
Just add in the application apache.conf file to the system apache.conf.
echo "Include "/opt/openthc/etc/apache.conf" >> /etc/apache2/apache2.conf
On Debian you can symlink it into /etc/apache2/sites-enabled
Update the boot.php
file to replace APP_ROOT and APP_HOST with the correct values.
Update the etc/app.ini
file with necessary values.
./bin/cli init
apt-get install certbot python-certbot-apache
certbot certonly --webroot --webroot-path APP_ROOT/webroot --domain APP_HOST