Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Install Hashtopolis on CentOS 7
#1
Install dependencies and repos
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
to
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
to
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
*Adjust accordingly

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
Reply
#2
Thanks a lot for this contribution. I hope it is ok if I edit the post slightly to make it a bit more readable.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)