https://rpms.remirepo.net/wizard/
---------------------------------------------------
dnf install https://rpms.remirepo.net/fedora/remi-release-31.rpm
dnf --enablerepo=remi install php56
dnf --enablerepo=remi install php56-php-* --skip-broken
dnf --enablerepo=remi-test install php56-php-xxx
php56 --version
php56 --modules
---------------------------------------------------
yum install php56-php php56-php-common php56-php-cli php56-php-dba php56-php-pecl-apcu php56-php-pear php56-php-pgsql php56-php-soap php56-php-intl php56-php-gd php56-php-ldap php56-php-mysqlnd php56-php-xmlrpc php56-php-process php56-php-recode php56-php-odbc php56-php-snmp php56-php-bcmath php56-php-embedded php56-php-mbstring php56-php-devel php56-php-pecl-memcache
#oci8 would be better customize and match with your oracle version
# yum install php56-php-oci8
---------------------------------------------------
customize php.ini
vi /etc/opt/remi/php56/php.ini
ex)
;short_open_tag = Off
short_open_tag = On
;asp_tags = Off
asp_tags = On
;max_execution_time = 30
max_execution_time = 1800 #for some special long process allowed
;memory_limit = 128M
memory_limit = 8192M
;error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
error_reporting = E_COMPILE_ERROR | E_ERROR | E_CORE_ERROR | E_PARSE
;display_errors = Off
display_errors = On
;variables_order = "GPCS"
variables_order = "EGPCS"
;post_max_size = 8M
post_max_size = 500M
;upload_tmp_dir =
upload_tmp_dir = "/home/php/tmp"
;upload_max_filesize = 2M
upload_max_filesize = 500M
;date.timezone =
date.timezone = Asia/Seoul
customize server label
vi /etc/opt/remi/php56/php-fpm.d/www.conf
[www] -> [www56]
---------------------------------------------------
systemctl enable php56-php-fpm.service
systemctl restart php56-php-fpm.service
systemctl status php56-php-fpm.service
---------------------------------------------------
php56 : /opt/remi/php56/root/usr/bin/php
ll /usr/bin/php56*
lrwxrwxrwx 1 root root 32 3월 17 15:45 /usr/bin/php56 -> /opt/remi/php56/root/usr/bin/php
lrwxrwxrwx 1 root root 36 3월 17 15:45 /usr/bin/php56-cgi -> /opt/remi/php56/root/usr/bin/php-cgi
lrwxrwxrwx 1 root root 33 12월 6 20:33 /usr/bin/php56-pear -> /opt/remi/php56/root/usr/bin/pear
lrwxrwxrwx 1 root root 38 3월 17 15:45 /usr/bin/php56-phar -> /opt/remi/php56/root/usr/bin/phar.phar
ll /etc/httpd/conf.d/php*
-rw-r--r-- 1 root root 1618 4월 5 05:15 /etc/httpd/conf.d/php.conf
-rw-r--r-- 1 root root 1599 4월 5 05:22 /etc/httpd/conf.d/php56-php.conf
ll /etc/httpd/conf.modules.d/*php*
-rw-r--r-- 1 root root 223 4월 5 05:02 /etc/httpd/conf.modules.d/10-php56-php.conf
-rw-r--r-- 1 root root 481 4월 5 05:02 /etc/httpd/conf.modules.d/15-php.conf
---------------------------------------------------
Apache MPM(Multi-Processing Module) : prefork, worker, event(Apache 2.4.X default)
# httpd -l
Compiled in modules:
core.c
mod_so.c
http_core.c
# httpd -V
Server version: Apache/2.4.41 (Fedora)
Server built: Nov 21 2019 00:00:00
Server's Module Magic Number: 20120211:88
Server loaded: APR 1.7.0, APR-UTIL 1.6.1
Compiled using: APR 1.7.0, APR-UTIL 1.6.1
Architecture: 64-bit
Server MPM: event
threaded: yes (fixed thread count)
forked: yes (variable process count)
Server compiled with....
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_PROC_PTHREAD_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=256
-D HTTPD_ROOT="/etc/httpd"
-D SUEXEC_BIN="/usr/sbin/suexec"
-D DEFAULT_PIDLOG="run/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
=> Server MPM: event
#if you need tunning
# vi /etc/httpd/conf.d/mpm.conf
<IfModule mpm_event_module>
StartServers 5
MinSpareThreads 75
MaxSpareThreads 250
ThreadsPerChild 25
MaxRequestWorkers 400
MaxConnectionsPerChild 0
</IfModule>
ab -n 5000 -c 500 http://localhost/
---------------------------------------------------
vi /etc/httpd/conf/httpd.conf
<VirtualHost *:80>
ServerName test.localhost.com
DocumentRoot /home/test/public_html
<Directory /home/test/public_html>
<FilesMatch \.(php|phar)$>
SetHandler "proxy:unix:/run/php-fpm/www.sock|fcgi://localhost"
</FilesMatch>
</Directory>
<Directory /home/test/public_html/php56>
<FilesMatch \.php$>
SetHandler "proxy:unix:/var/opt/remi/php56/run/php-fpm/www.sock|fcgi://localhost"
</FilesMatch>
</Directory>
</VirtualHost>
---------------------------------------------------
httpd -t
systemctl restart httpd.service
---------------------------------------------------
php56 -r "oci_connect();"
rpm -ivh oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm
rpm -ivh oracle-instantclient11.2-devel-11.2.0.4.0-1.x86_64.rpm
ln -s /usr/include/oracle/11.2/client64/ /usr/lib/oracle/11.2/client64/lib/include
pecl download oci8-1.4.10.tgz
tar xvzf oci8-1.4.10.tgz
cd oci8-1.4.10
/opt/remi/php56/root/usr/bin/phpize
./configure --with-php-config=/opt/remi/php56/root/usr/bin/php-config --with-oci8=instantclient,/usr/lib/oracle/11.2/client64/lib
make all
----------------------------------------------------------------------
Libraries have been installed in:
/db/install/oracle11_x86_64/oracle-instantclient11.2/oci8-1.4.10/modules
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the 'LD_RUN_PATH' environment variable
during linking
- use the '-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to '/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Build complete.
Don't forget to run 'make test'.
make install
Installing shared extensions: /opt/remi/php56/root/usr/lib64/php/modules/
echo "extension=oci8.so" > /etc/opt/remi/php56/php.d/oci8.ini
cat /etc/opt/remi/php56/php.d/oci8.ini
extension=oci8.so
php56 -r "oci_connect();"
systemctl restart php56-php-fpm.service
tail -f /var/opt/remi/php56/log/php-fpm/*
---------------------------------------------------