Install dependencies and repos
Turn off SELinux
Disable SELinux
Setup mysql
Create mysql database and user
Configure php-fpm
Edit file /etc/opt/rh/rh-php71/php-fpm.d/www.conf
Change
to
and change
to
Then run
Edit file /etc/opt/rh/rh-php71/php.ini
*Adjust accordingly
Configure Apache
Edit file /opt/rh/httpd24/root/etc/httpd/conf.d/php.conf
Set the timeout for the server
Install Hashtopolis
Start Apache
Browse to site and finish installation
Code:
yum install -y git vim centos-release-scl-rh epel-release
yum install -y rh-php71 rh-php71-php-gd rh-php71-php-pear mariadb-server httpd24 rh-php71-php-fpm rh-php71-php-pdo rh-php71-php-mysqlnd
Turn off SELinux
Code:
setenforce 0
Disable SELinux
Code:
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/sysconfig/selinux
Setup mysql
Code:
systemctl start mariadb
systemctl enable mariadb
mysql_secure_installation
Create mysql database and user
Code:
mysql -u root -p
> create database hash;
> GRANT ALL PRIVILEGES ON hash.* TO 'hash'@'%' IDENTIFIED BY 'hash';
> FLUSH PRIVILEGES;
> quit
Configure php-fpm
Edit file /etc/opt/rh/rh-php71/php-fpm.d/www.conf
Change
Code:
listen = 127.0.0.1:9000
Code:
listen = '/opt/rh/rh-php71/root/var/run/php-fpm/default.sock'
and change
Code:
;listen.owner = nobody
;listen.group = nobody
;listen.mode = 0660
Code:
listen.owner = apache
listen.group = apache
listen.mode = 0660
Then run
Code:
mkdir -p /opt/rh/rh-php71/root/var/run/php-fpm
chown apache: /opt/rh/rh-php71/root/var/run/php-fpm
Edit file /etc/opt/rh/rh-php71/php.ini
Code:
memory_limit = 2G
upload_max_filesize = 2G
post_max_size = 2G
Code:
systemctl start rh-php71-php-fpm
systemctl enable rh-php71-php-fpm
Configure Apache
Edit file /opt/rh/httpd24/root/etc/httpd/conf.d/php.conf
Code:
<Proxy "unix:/opt/rh/rh-php71/root/var/run/php-fpm/default.sock|fcgi://php-fpm">
ProxySet disablereuse=off
</Proxy>
<FilesMatch \.php$>
SetHandler proxy:fcgi://php-fpm
</FilesMatch>
AddType text/html .php
DirectoryIndex index.php
Set the timeout for the server
Code:
echo KeepAliveTimeout 10 >> /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf
Install Hashtopolis
Code:
cd /opt
git clone https://github.com/s3inlc/hashtopolis
cp -R hashtopolis/src/. /opt/rh/httpd24/root/var/www/html/.
chown -R apache: /opt/rh/httpd24/root/var/www/html/.
Start Apache
Code:
systemctl start httpd24-httpd
systemctl enable httpd24-httpd
Browse to site and finish installation