-
Notifications
You must be signed in to change notification settings - Fork 2
Installation instructions
- You are running Arch Linux + MariaDB + Apache.
- The source code will reside under
/srv/http/dignitas
. - The development site will be available at http://localhost/dignitas/www/.
- The shared drive is
/srv/http/dignitas-shared
and will be available at http://localhost/dignitas/www/static/. - MariaDB connects with
username=root
,password=<none>
,host=localhost
,database=dignitas
.
For different setups, please adapt the instructions below.
sudo pacman -S apache mariadb php php-apache git gettext imagemagick
cd /srv/http/
sudo git clone https://github.com/TeamDignitas/dignitas
sudo chown -R youruser:youruser dignitas
cd dignitas
scripts/setup.sh
Most likely you will only need to change
-
URL_HOST
andURL_PREFIX
if your website URL is different; -
DB_*
if your MariaDB has different connection parameters.
Replace /var/log/dignitas.log
with the value you chose for LOG_FILE
in Config.php
.
sudo touch /var/log/dignitas.log
sudo chmod 666 /var/log/dignitas.log
This is where uploaded files will be stored (author images and others).
sudo mkdir /srv/http/dignitas-shared
mariadb -u root -e 'create database dignitas charset utf8mb4'
In /etc/php/php.ini
uncomment the lines
extension=gettext
extension=intl
extension=iconv
extension=pdo_mysql
Then restart Apache.
sudo apachectl restart
tail -f /var/log/dignitas.log & # to see what the script does
sudo php scripts/importSampleData.php
Be sure you have read and understood the script's preamble. It deletes stuff!
Note that this gives you a Romanian dataset. We are not currently aware of clones in other languages that can offer working datasets.
Activate mod_rewrite
: ensure the following line is not commented out:
LoadModule rewrite_module modules/mod_rewrite.so
Configure php-apache following the instructions. Currently, this requires you to load php_module
and php_module.conf
as well as switch to using mpm_prefork_module
.
Allow .htaccess
files and map the shared drive:
<Directory "/srv/http">
...
AllowOverride All
....
</Directory>
Restart the Apache service
sudo apachectl restart
Now http://localhost/dignitas/www/ should work.
Update the code:
git pull
Git will let you know if any further action is needed:
- database schema changes: run
php scripts/migration.php
; - config file changes: compare your
Config.php
file withConfig.php.sample
; - htaccess changes: compare your
www/.htaccess
file withwww/.htaccess.sample
.
You can also rerun the import script whenever you wish. In the long run, this is easier than dealing with all the schema changes.
We follow the Google Java style guide. Most of the time you can just follow the style of existing code.