...
Update all packages
Code Block theme RDark yum update
In some cases you may see this error:
Code Block theme RDark The GPG keys listed for the "Percona-Release YUM repository - noarch" repository are already installed but they are not correct for this package. Check that the correct key URLs are configured for this repository.
To resolve, manually edit the repo file:
Code Block theme RDark vim /etc/yum.repos.d/percona-release.repo # change all instances of gpgcheck = 1 # to gpgcheck = 0 # save and close the file, then try to update again
Reboot the server:
Code Block theme RDark reboot now
- Make sure the EPEL repo is installed and active
The following file should exist:
Code Block language bash theme RDark /etc/yum.repos.d/epel.repo
and contain the section [epel] with the value enabled=1
If not, install the repo
Code Block theme RDark ## RHEL/CentOS 6 64-Bit ## # wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm # rpm -ivh epel-release-6-8.noarch.rpm ## RHEL/CentOS 7 64-Bit ## # wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm # rpm -ivh epel-release-latest-7.noarch.rpm
Install the remi-safe repo:
Code Block language bash theme RDark # Redhat 6 or CentOS 6 yum -y install http://rpms.famillecollet.com/enterprise/remi-release-6.rpm # Redhat 7 or CentOS 7 yum -y install http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
Install PHP 7.2, FPM for PHP 7.2, and the Apache FPM Mod
Code Block language bash theme RDark yum -y install php72 php72-php-fpm mod_proxy_fcgi
Edit the php.ini file. This will typically be located at /etc/opt/remi/php72/php.ini. The following lines need to be updated:
Code Block language bash theme RDark # Set max memory to 1 Gb memory_limit = 1024M # Set the max file upload size to 10 Megabytes upload_max_filesize = 10M # This would need to be set to the timezone in which the Server is located date.timezone = America/Detroit
Install the PHP modules required by PCR-360
Code Block language bash theme RDark yum -y install php72-php-process php72-php-xml php72-php-pecl-apcu php72-php-gd php72-php-intl php72-php-mbstring php72-php-pecl-mcrypt php72-php-pdo php72-php-soap php72-php-pecl-zip # Optional (installation dependant) Packages # MySql support yum -y install php72-php-mysqlnd # LDAP Support yum -y install php72-php-ldap
If you experience an issue with installing dependencies for the Modules, you will either need to compile them yourself, or install the centos repo:
Code Block theme RDark vim /etc/yum.repos.d/centos.repo [centos] name=CentOS $releasever - $basearch baseurl=http://ftp.heanet.ie/pub/centos/6/os/$basearch/ enabled=1 gpgcheck=0
- Install OCI8 Support ONLY if this is an Oracle Load:
Support for this will require you Update the Oracle Instant Client to at at least version 18.1
You will likely need to remove previous versions of SQL Plus
Code Block language bash theme RDark # This command will vary depending on the version installed rpm -e oracle-instantclient12.1-sqlplus-12.1.0.2.0-1.x86_6
Start Here: Instant Client Install
/wiki/spaces/PCRIN/pages/17266319hen install the PHP72 Mod
Code Block language bash theme RDark # Oracle Support yum -y install php72-php-oci8
The defaults settings for PHP-FPM should be ok, but if you need to change anything (i.e. listening port), the config can be found at:
Code Block language bash theme RDark /etc/opt/remi/php72/php-fpm.d/www.conf
The default listening port may be changed at the following line
Code Block language bash theme RDark listen = 127.0.0.1:9000
Edit the Virtual Host configuration. This is generally located in the default Virtual Hosts directory:
Code Block language bash theme RDark /etc/httpd/conf.d/<vhost_name>.conf
- For Apache Version 2.2, two new directives need to be added:
- The placement of the new lines is especially important in Shibboleth configurations
- Just below the <Directory> directive, add the <Location> directive
Just below the newly added <Location> directive, add the ProxyPassMatch
Code Block language bash theme RDark # DIRECTORY-based Setup: This is the most common used on customer loads <VirtualHost> # This is just an example ServerName. The value should already be present and does not need to be altered ServerName servername.domain.com ... <Directory /var/www/pcr360/test/public> ... </Directory> # Just below the <Directory> directive, add the <Location> directive # Proxy to php72 on fpm <Location /> Order allow,deny Allow from all </Location> # Just below the newly added <Location> directive, add the ProxyPassMatch ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www/pcr360/test/public/$1 disablereuse=off timeout=900 ... </VirtualHost>
- For Apache Version 2.4
Tell PHP-FPM to listen to the socket. Edit /etc/opt/remi/php72/php-fpm.d/www.conf and change the line listen= ... to:
Code Block language bash theme RDark listen = /var/run/php72.sock
Find the listen.owner / .group / .mode lines and un-comment them. Also, change the user & group to whatever Apache runs as (usually "apache").
Code Block language bash theme RDark listen.owner = apache listen.group = apache listen.mode = 0660
Declare the proxy in a separate .conf file so we can re-use it. i.e. /etc/httpd/conf.d/php72.conf
Code Block language bash theme RDark <Proxy "unix:/var/run/php72.sock|fcgi://php-fpm72"> ProxySet disablereuse=off ProxySet timeout=900 </Proxy>
Edit the PCR360 <VirtualHost> and add the <FilesMatch> & SetHandler:
Code Block language bash theme RDark <VirtualHost> # This is just an example ServerName. The value should already be present and does not need to be altered ServerName servername.domain.com ... <FilesMatch \.php$> SetHandler proxy:fcgi://php-fpm72 </FilesMatch> ... </VirtualHost>
- For Apache Version 2.2, two new directives need to be added:
Start the FPM service
Code Block language bash theme RDark # RedHat 6 and CentOS 6 service php72-php-fpm start # RedHat 7 and CentOS 7 systemctl start php72-php-fpm
Verify the the service is listening on the configured port (default is 9000).
Code Block language bash theme RDark netstat -plnt Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 4262/php-fpm
Enable the FPM service. Restart Apache and PHP
Code Block language bash theme RDark # RedHat 6 and CentOS 6 chkconfig php72-php-fpm on && service httpd restart && service php72-php-fpm restart # RedHat 7 and CentOS 7 systemctl enable httpd php72-php-fpm && systemctl restart httpd php72-php-fpm
- The application code can now be updated to version 2018.1+
IMPORTANT: These instructions are only for upgrade installations only. If you are installing a new server, or do not want to run PHP 7.2 alongside an older version please see the PHP 7.2 Install Instructions
Additionally, REDHAT 8 does not auto configure php-fpm as it does in previous versions, so for REDHAT 8, these instructions should be used:
Excerpt | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Note to Licensed Customers:The following information represents the process we use to upgrade hosted installations.
Required PHP Modules
Optional PHP Modules
|
Required Packages
Name | Description |
---|---|
php72 | The PHP 7.2 Package |
php72-php-fpm | PHP 7.2 FPM Service |
mod_proxy_fcgi | Apache Proxy Mod |
Upgrade Process
Update all packages
Code Block theme RDark yum update
In some cases you may see this error:
Code Block theme RDark The GPG keys listed for the "Percona-Release YUM repository - noarch" repository are already installed but they are not correct for this package. Check that the correct key URLs are configured for this repository.
To resolve, manually edit the repo file:
Code Block theme RDark vim /etc/yum.repos.d/percona-release.repo # change all instances of gpgcheck = 1 # to gpgcheck = 0 # save and close the file, then try to update again
Reboot the server:
Code Block theme RDark reboot now
- Make sure the EPEL repo is installed and active
The following file should exist:
Code Block language bash theme RDark /etc/yum.repos.d/epel.repo
and contain the section [epel] with the value enabled=1
If not, install the repo
Code Block theme RDark ## RHEL/CentOS 6 64-Bit ## # wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm # rpm -ivh epel-release-6-8.noarch.rpm ## RHEL/CentOS 7 64-Bit ## # wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm # rpm -ivh epel-release-latest-7.noarch.rpm
Install the remi-safe repo:
Code Block language bash theme RDark # Redhat 6 or CentOS 6 yum -y install http://rpms.famillecollet.com/enterprise/remi-release-6.rpm # Redhat 7 or CentOS 7 yum -y install http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
Install PHP 7.2, FPM for PHP 7.2, and the Apache FPM Mod
Code Block language bash theme RDark yum -y install php72 php72-php-fpm mod_proxy_fcgi
Edit the php.ini file. This will typically be located at /etc/opt/remi/php72/php.ini. The following lines need to be updated:
Code Block language bash theme RDark # Set max memory to 1 Gb memory_limit = 1024M # Set the max file upload size to 10 Megabytes upload_max_filesize = 10M # This would need to be set to the timezone in which the Server is located date.timezone = America/Detroit
Install the PHP modules required by PCR-360
Code Block language bash theme RDark yum -y install php72-php-process php72-php-xml php72-php-pecl-apcu php72-php-gd php72-php-intl php72-php-mbstring php72-php-pecl-mcrypt php72-php-pdo php72-php-soap php72-php-pecl-zip # Optional (installation dependant) Packages # MySql support yum -y install php72-php-mysqlnd # LDAP Support yum -y install php72-php-ldap
If you experience an issue with installing dependencies for the Modules, you will either need to compile them yourself, or install the centos repo:
Code Block theme RDark vim /etc/yum.repos.d/centos.repo [centos] name=CentOS $releasever - $basearch baseurl=http://ftp.heanet.ie/pub/centos/6/os/$basearch/ enabled=1 gpgcheck=0
- Install OCI8 Support ONLY if this is an Oracle Load:
Support for this will require you Update the Oracle Instant Client to at at least version 18.1
You will likely need to remove previous versions of SQL Plus
Code Block language bash theme RDark # This command will vary depending on the version installed rpm -e oracle-instantclient12.1-sqlplus-12.1.0.2.0-1.x86_6
Start Here: Instant Client Install
/wiki/spaces/PCRIN/pages/17266319hen install the PHP72 Mod
Code Block language bash theme RDark # Oracle Support yum -y install php72-php-oci8
The defaults settings for PHP-FPM should be ok, but if you need to change anything (i.e. listening port), the config can be found at:
Code Block language bash theme RDark /etc/opt/remi/php72/php-fpm.d/www.conf
The default listening port may be changed at the following line
Code Block language bash theme RDark listen = 127.0.0.1:9000
Edit the Virtual Host configuration. This is generally located in the default Virtual Hosts directory:
Code Block language bash theme RDark /etc/httpd/conf.d/<vhost_name>.conf
- For Apache Version 2.2, two new directives need to be added:
- The placement of the new lines is especially important in Shibboleth configurations
- Just below the <Directory> directive, add the <Location> directive
Just below the newly added <Location> directive, add the ProxyPassMatch
Code Block language bash theme RDark # DIRECTORY-based Setup: This is the most common used on customer loads <VirtualHost> # This is just an example ServerName. The value should already be present and does not need to be altered ServerName servername.domain.com ... <Directory /var/www/pcr360/test/public> ... </Directory> # Just below the <Directory> directive, add the <Location> directive # Proxy to php72 on fpm <Location /> Order allow,deny Allow from all </Location> # Just below the newly added <Location> directive, add the ProxyPassMatch ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www/pcr360/test/public/$1 disablereuse=off timeout=900 ... </VirtualHost>
- For Apache Version 2.4
Tell PHP-FPM to listen to the socket. Edit /etc/opt/remi/php72/php-fpm.d/www.conf and change the line listen= ... to:
Code Block language bash theme RDark listen = /var/run/php72.sock
Find the listen.owner / .group / .mode lines and un-comment them. Also, change the user & group to whatever Apache runs as (usually "apache").
Code Block language bash theme RDark listen.owner = apache listen.group = apache listen.mode = 0660
Declare the proxy in a separate .conf file so we can re-use it. i.e. /etc/httpd/conf.d/php72.conf
Code Block language bash theme RDark <Proxy "unix:/var/run/php72.sock|fcgi://php-fpm72"> ProxySet disablereuse=off ProxySet timeout=900 </Proxy>
Edit the PCR360 <VirtualHost> and add the <FilesMatch> & SetHandler:
Code Block language bash theme RDark <VirtualHost> # This is just an example ServerName. The value should already be present and does not need to be altered ServerName servername.domain.com ... <FilesMatch \.php$> SetHandler proxy:fcgi://php-fpm72 </FilesMatch> ... </VirtualHost>
- For Apache Version 2.2, two new directives need to be added:
Start the FPM service
Code Block language bash theme RDark # RedHat 6 and CentOS 6 service php72-php-fpm start # RedHat 7 and CentOS 7 systemctl start php72-php-fpm
Verify the the service is listening on the configured port (default is 9000).
Code Block language bash theme RDark netstat -plnt Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 4262/php-fpm
Enable the FPM service. Restart Apache and PHP
Code Block language bash theme RDark # RedHat 6 and CentOS 6 chkconfig php72-php-fpm on && service httpd restart && service php72-php-fpm restart # RedHat 7 and CentOS 7 systemctl enable httpd php72-php-fpm && systemctl restart httpd php72-php-fpm
- The application code can now be updated to version 2018.1+