Contao installation
Install Composer
To get Contao with Composer we have to install the package first.
root$ |
|
Contao directory and SELinux
Create a directory for the Contao installation.
root$ |
|
Make sure it is owned by the apache user and group.
root$ |
|
Now inform SELinux to grant "httpd" write-access to this folder.
root$ |
|
root$ |
|
Composer cache
The composer cache directory must also be owned by the Apache user and group.
root$ |
|
root$ |
|
Contao database and user
Login to mysql or mariadb as root and your root-password.
root$ |
|
Now, create the database e.g. your_domain_com_www
mysql> |
|
Create a user with password for the Contao database for connections on localhost e.g. your_domain_com_www
mysql> |
|
Grant all access to the Contao database for this created user.
mysql> |
|
mysql> |
|
Configure Apache
Create a Apache configuration-file for your domain and the Contao installation.
e.g. /etc/httpd/conf.d/your-domain.com.www443.conf
<VirtualHost xxx.xxx.xxx.xxx:443>
DocumentRoot /var/www/your-domain.com.www/web
ServerName your-domain.com
<Directory "/var/www/your-domain.com.www/web">
AllowOverride all
</Directory>
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/your-domain.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/your-domain.com/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/your-domain.com/chain.pem
ServerAlias www.your-domain.com server.your-domain.com
</VirtualHost>
and redirect your http requests to https.
e.g. /etc/httpd/conf.d/your-domain.com.www80.conf
<VirtualHost xxx.xxx.xxx.xxx:80>
DocumentRoot /var/www/your-domain.com.www/web
ServerName your-domain.com
<Directory "/var/www/your-domain.com.www/web">
allow from all
Options None
Require all granted
</Directory>
Redirect / "https://www.your-domain.com/"
ServerAlias www.your-domain.com
</VirtualHost>
Install Contao
Install Contao to the created directory, using the composer command as apache user.
root$ |
|
Enter the database-name, user, and password that you created above.
Start Contao
In your favorite web-browser open the install.php and follow the instructions.
e.g. https://www.your-domain.com/contao/install
Undo Speicherzeit
Per default ist die Speicherzeit für das Wiederherstellen gelöschter Datensätze auf 24 Stunden gesetzt. Gerade beim Aufbau einer Webseite, oder wenn sich ein Kunde gerade in das System einarbeitet und dabei versehentlich Elemente gelöscht werden, kann es von Vorteil sein, wenn hier die Speicherzeit erhöht wird. Setzt man den Wert in den Einstellungen unter "Speicherzeit für Undo-Schritte" auf den selben Wert wie die Speicherzeit für Versionen (7776000 Sekunden), können versehentliche Löschvorgänge bis zu 90 Tage lang rückgängig gemacht werden.
Config file
system/config/localconfig.php
References
Original Contao installation guide
https://docs.contao.org/books/manual/current/de/01-installation/contao-installieren.html
Contao check
Kommentare