Install the PCR-360 Application Files
- Get required files from the Installer Repo:
https://bitbucket.pcr.com/projects/PCR/repos/install360/browse/lib?at=refs%2Fheads%2Fcentos8
Extract and copy the application files to the Apache web directory:
# extract the archive tar -xzvf ./external/pcr360.tar.gz # create the applicaton directory mkdir -p /var/www/pcr360/prod mkdir -p /var/www/pcr360/configs # move the extracted files to the app mv ./pcr360/* /var/www/pcr360/prod # create data and misc folders mkdir -p /var/www/pcr360/prod/logs /var/www/pcr360/prod/data/cache /var/www/pcr360/prod/data/cache/page mkdir -p /var/www/pcr360/prod/data/tmp/prod /var/www/pcr360/prod/data/cache/prod /var/www/pcr360/prod/data/session/prod mkdir -p /var/www/pcr360/prod/data/archive /var/www/pcr360/prod/data/emails /var/www/pcr360/prod/data/errors /var/www/pcr360/prod/data/reports /var/www/pcr360/prod/data/reports/historical /var/www/pcr360/prod/data/search mkdir -p /var/www/pcr360/prod/data/uploads /var/www/pcr360/prod/data/uploads/importfiles /var/www/pcr360/prod/data/uploads/vh mkdir -p /var/www/pcr360/data/outbound /var/www/pcr360/data/inbound /var/www/pcr360/data/outbound-test /var/www/pcr360/data/inbound-test # copy default vh data to the vh import directory tar -xzvf vhdata.tar.gz -C /var/www/pcr360/prod/data/uploads/vh
- Set file permissions
- Allow read/write access to the PCR user for the entire folder
Allow read/write access to Apache for the data and logs folders
# set file permissions chown -R pcr:pcr /var/www/pcr360/prod chown -R apache:pcr /var/www/pcr360/prod/data /var/www/pcr360/prod/logs /var/www/pcr360/data find /var/www/pcr360/prod -type f -exec chmod 644 {} + find /var/www/pcr360/data -type f -exec chmod 664 {} + find /var/www/pcr360/prod/data -type f -exec chmod 664 {} + find /var/www/pcr360/prod/logs -type f -exec chmod 664 {} + find /var/www/pcr360/prod -type d -exec chmod 755 {} + find /var/www/pcr360/data -type d -exec chmod 775 {} + find /var/www/pcr360/prod/data -type d -exec chmod 775 {} + find /var/www/pcr360/prod/logs -type d -exec chmod 775 {} + chown apache:pcr /var/www/pcr360/prod/external/syschk.sh /var/www/pcr360/prod/external/ssl-cert-info.sh chmod 700 /var/www/pcr360/prod/external/syschk.sh /var/www/pcr360/prod/external/ssl-cert-info.sh # set acl permissions setfacl -Rm g:apache:rwx /var/www/pcr360/prod/data setfacl -Rm u:pcr:rwx /var/www/pcr360/prod/data
- Set SE Linux Permissions
- Give Apache read access to the entire application folder
Give Apache write access to the data and logs folders
# set selinux permission chcon -t httpd_sys_content_t /var/www/pcr360/prod -R chcon -t httpd_sys_rw_content_t /var/www/pcr360/prod/logs -R chcon -t httpd_sys_rw_content_t /var/www/pcr360/prod/data -R chcon -t httpd_sys_rw_content_t /var/www/pcr360/data -R chcon -t httpd_sys_content_t /var/www/pcr360/test -R chcon -t httpd_sys_rw_content_t /var/www/pcr360/test/logs -R chcon -t httpd_sys_rw_content_t /var/www/pcr360/test/data -R chcon -t httpd_sys_rw_content_t /var/www/pcr360/data -R # allow apache to excute external programs like java and wkhtmltopdf setsebool -P httpd_execmem on
Create the PCR-360 configuration INI file. NOTE: "<>" indicates a value that needs to be filled in. For example: <DB_SERVER> could be replaced with mysql.pcr.com
MySQL
Oracle
Install Virtual Host Configurations. Example Configuration:
cat >/etc/httpd/conf.d/pcr360_prod.conf <<CONF ServerName pcr360.customeraddress.com Protocols h2 h2c http/1.1 Header always set Strict-Transport-Security max-age=31536000 ## PROTECT FILES ## <FilesMatch "\.(htaccess|htpasswd|ini|phps|fla|psd|log|sh)$"> Require all granted </FilesMatch> ## HEADERS FOR MS EDGE ## <IfModule headers_module> Header Set X-UA-Compatible: IE=Edge </IfModule> ## LIMIT UPLOAD FILE SIZE TO PROTECT AGAINST DOS ATTACK ## LimitRequestBody 10240000 #bytes, 0-2147483647(2GB) RewriteEngine On RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK) RewriteRule .* - [F] <VirtualHost *:80> ServerName pcr360.customeraddress.com DocumentRoot /var/www/pcr360/prod/public # rewrite to SSL RewriteEngine on RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^(.*) https://%{HTTP_HOST}%{REQUEST_URI} </VirtualHost> <VirtualHost *:443> ServerName pcr360.customeraddress.com DocumentRoot /var/www/pcr360/prod/public # logs ErrorLog logs/ssl_error_log TransferLog logs/ssl_access_log LogLevel warn # SSL SSLEngine on SSLCertificateFile /etc/pki/tls/certs/pcr360_test.crt SSLCertificateKeyFile /etc/pki/tls/private/pcr360_prod.key SSLProtocol -all +TLSv1.2 +TLSv1.3 SSLCipherSuite HIGH:MEDIUM:!aNULL:+SHA1:+MD5:+HIGH:+MEDIUM SSLHonorCipherOrder on # environment variables SetEnv APPLICATION_ENV prod SetEnv APPLICATION_INI "/var/www/pcr360/configs/pcr360.ini" SetEnv APPLICATION_ENVDEBUG 0 SetEnv APPLICATION_ENVPCR 0 # file system <Directory /var/www/pcr360/prod/public> Options -Indexes DirectoryIndex index.php AllowOverride None Include /var/www/pcr360/prod/public/.htaccess Require all granted </Directory> <Files ~ "\.(cgi|shtml|phtml|php3?)$"> SSLOptions +StdEnvVars </Files> </VirtualHost> CONF
Help Desk Portal - Email: help@pcr.com - Phone: 616.259.9242