Need epel-release
package installed.
sudo yum install php php-pgsql php-mbstring php-fpm postgresql-server postgresql
In the trial environment I am using postgresql on the VM
sudo postgresql-setup initdbsudo systemctl enable postgresqlsudo systemctl start postgresql
Setup the postgres password
$ sudo passwd postgres# enter new password$ su - postgres$ psqlpostgres=# \password# enter same passwordpostgres=# \q$ exit
As the postgres
user also modify /var/lib/pgsql/data/pg_hba.conf
to set md5
method for all IPv4 local connections.
host all all 127.0.0.1/32 md5
Grab the source
curl -O "https://kent.dl.sourceforge.net/project/mantisbt/mantis-stable/2.6.0/mantisbt-2.6.0.tar.gz"
Make a /srv/www
directory and extract the contents into a folder mantisbt
.
semanage fcontext -a -t httpd_sys_content_t "/srv/www(/.*)?"restorecon -R -v /srv/www
Grab the tarball
curl -O caddy.tar.gz "https://caddyserver.com/download/linux/amd64?license=personal"
Follow the installation instructions in caddy/dist/init/linux-systemd at master · mholt/caddy · GitHub to enable systemd support, substituting /var/www
for /srv/www
.
The /etc/caddy/Caddyfile
is as simple as:
192.168.124.20:8080root /srv/www/mantisbtgzipfastcgi / 127.0.0.1:9000 phplog stdout
Allow web server to connect to database.
sudo setsebool -P httpd_can_network_connect_db on
Enable firewall rule
sudo firewall-cmd --zone=public --add-port=8080/tcp --permanentsudo firewall-cmd --reload
By default php-fpm is configured to use the apache
user on CentOS. Caddy and the mantisbt files use www-data
so update this in /etc/php-fpm.d/www.conf
by changing the user
and group
directives.