How do I update PHP 7.0.0RC1 to version 7.0 already released in centos?

Asked

Viewed 268 times

4

Good morning,

How do I update PHP 7.0.0RC1 to version 7.0 already released in centos?

Thank you

  • 1

    Update I don’t know how yet, but I can install. https://github.com/kasparsd/php-7-debian

  • Thanks for the feedback, however I have already installed version 7 RC however wanted to update to this final version released yesterday (3 December 2015).

  • Any idea how to uninstall PHP 7.0 RC1 from centos

  • I also tried. I didn’t see any tutorial teaching how to install via apt-get. If I find out

  • Okay thanks, in case I publish here too!

  • 1

    That’ll be trouble if this is the machine you use to work with.

  • You mean the hundreds?

  • 1

    You don’t have to duplicate the question, just have translated the other one, assuming it’s another account of yours: http://answall.com/q/101956/3635

  • Guys, I removed the directory where PHP 7.0 RC 1 was installed and installed the version already released yesterday, but when I run phpinfo() it appears to me that I still have the RC1 version

  • Yes it was my bill and I’m sorry I didn’t translate. Thank you

  • 1

    I voted because I left the question open, because it seems to me to be at the limit of the scope, but not outside. I only recommend details of how you installed the RC1 version which may have been what "locked" the final installation.

  • For the installation of the RC1 version follow these steps:

  • http://www.tecmint.com/install-and-compile-php-7-on-centos-7-and-debian-8/

  • Good afternoon guys, I already solved the problem I just published the solution, hoping to help anyone with similar problems! Regards

Show 9 more comments

2 answers

1


To delete the version of PHP 7 RC and install the final version released on December 3rd (Version 7.0.0) you will need to perform the following steps:

1 Step: Manually uninstall the folder and contents in php-7.0.0RC1

cd /opt
sudo rm -rf php-7.0.0RC1

2 Step: Uninstall libphp7.so present in directory "modules"

cd /usr/lib64/httpd/modules/
sudo rm -rf libphp7.so

3 Step: Download PHP 7.0.0 Realased released on December 3rd from the official php-php.net page

sudo wget http://php.net/get/php-7.0.0.tar.bz2/from/this/mirror

4 Step: Extract the files from the downloaded file *tar.bz2 to the /opt directory

tar xzf php-7.0.0RC1.tar.gz -C /opt

5 Step: Once this is done, in the /opt/php-7.0.0 directory buildconf -force is executed, doing:

cd /opt/php-7.0.0
ls
./buildconf --force

6 Step: The . /configure command is then executed. Below is the instruction to perform a typical php installation, however for a custom installation you can always see the php manuals in php.net.

    ./configure \
--prefix=$HOME/php7/usr \
--with-config-file-path=$HOME/php7/usr/etc \
--enable-mbstring \
--enable-zip \
--enable-bcmath \
--enable-pcntl \
--enable-ftp \
--enable-exif \
--enable-calendar \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--enable-wddx \
--with-curl \
--with-mcrypt \
--with-iconv \
--with-gmp \
--with-pspell \
--with-gd \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--with-zlib-dir=/usr \
--with-xpm-dir=/usr \
--with-freetype-dir=/usr \
--enable-gd-native-ttf \
--enable-gd-jis-conv \
--with-openssl \
--with-pdo-mysql=/usr \
--with-gettext=/usr \
--with-zlib=/usr \
--with-bz2=/usr \
--with-recode=/usr \
--with-mysqli=/usr/bin/mysql_config \
--with-apxs2

7 Step: Once done, you must execute these commands:

make

then execute:

make install

8 Step: Re-start the apache server

sudo /sbin/service httpd restart

9 Step: Completed! You can now run the phpinfo() to verify that the installation was successful by checking that the version now iinstalada is 7.0.0.

1

If you have YUM, I recommend the repository Webtatic

Before installing anything, always make sure there is no more installation.

yum list installed | grep php | cut -d' ' -F1

In bold, search keyword. In this case, we are looking for PHP-related installations.

If necessary, remove what you find. Example:

>yum remove php5-antigo

The package name (package) must be exactly the same as the one shown in the previously performed search list.

If you want to remove everything, just do:

>yum remove php5*

After confirming that everything is clean and without risk of conflict, we proceed with the installation.

Updates the repository:

>rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
>rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

Install the PHP

>yum install php70w

It’s done!

To add extensions

>yum install php70w-nome_da_extensão

Example installing PHP-Bcmath:

>yum install php70w-bcmath

After completing, check on the console

>php -v

Will show the version

>php -m

Show the loaded extensions

Browser other questions tagged

You are not signed in. Login or sign up in order to post.