Thank you @ guilerme-birth.
I was able to install as follows (remembering that I use CentOS 6.6):
Download PHP
$ wget link
Unzip and switch to the unzipped folder
$ tar -xzf php-5.6.10.tar.gz
$ cd php-5.6.10
Run the configure command with the desired parameters (below my example)
./ configure
--prefix = / usr
--sysconfdir = / etc
--localstatedir = / var
--datadir = / usr / share / php
--mandir = / usr / share / man
--with-config-file-path = / etc
--with-config-file-scan-dir = / etc / php.d
--with-zlib
--enable-bcmath
--with-bz2
--enable-calendar
--with-gdbm
--with-gmp
--enable-ftp
--with-gettext
--enable-mbstring
--with-readline
--with-apxs2
--with-pdo-oci = instantclient, / usr, 12.1
--enable-dba = shared
--with-pdo-mysql --with-mysql-sock = / var / mysql / mysql.sock
--with-pdo-pgsql
OBS: Errors can occur during this step because of dependencies that need to be installed before, such as db4 and db4-devel. In my case, I ran the command, seeing which dependency was giving error. Once identified, I would install the dependency (always installing also the devel version of each package) and ran it again to see the next missing dependency. I did this until the command ran without errors.
Compiling and installing
$ make & make install
At this point, PHP is already installed.
To make sure, run the following command:
$ php -v
But before we finish, we need to make some adjustments ...
Copy php.ini to the correct directory
If you are on a local server
$ cp php.ini-development /etc/php.ini
If you are on a production server
$ cp php.ini-production /etc/php.ini
Open apache configuration file for editing
$ vi /etc/httpd/conf/httpd.conf
Add the lines below for Apache to interpret PHP
AddType application / x-httpd-php .php
AddType application / x-httpd-php-source .phps
Save and restart Apache
$ service httpd restart
Ready! It should all be working properly now!
The disadvantage of this method (at least as far as I've noticed) is that whenever you need a module such as PDO_MYSQL, PDO_PGSQL etc, you can not install via package as it will not work.
To install some, it can be via PECL, except those that are outdated, such as PDO_MYSQL and PDO_OCI, where you must compile php again to install these.