CentOS で PHP 7 RC を新しい安定バージョンに削除 (アップグレード) するにはどうすればよいですか?
ありがとう
PHP 7.0 RC をアンインストールし、12 月 3 日にリリースされた PHP 7 の最終バージョンをインストールするには、まず、PHP 7 RC のディレクトリとファイルを手動で削除する必要があります。
1 ステップ: PHP-7.0.0RC1 フォルダーを手動でアンインストールする
cd /opt
sudo rm -rf php-7.0.0RC1
2 ステップ: libphp7.so をアンインストールする
cd /usr/lib64/httpd/modules/
sudo rm -rf libphp7.so
3 ステップ: 12 月 3 日にリリースされた PHP 7.0.0 を php.net の公式ページからダウンロードします。
sudo wget http://php.net/get/php-7.0.0.tar.bz2/from/this/mirror
4 ステップ: /opt から *tar.bz2 のファイルを抽出します
tar xzf php-7.0.0RC1.tar.gz -C /opt
5 ステップ: 完了したら、/opt/php-7.0.0 に移動し、この新しいバージョンのビルドを強制するために、-force スイッチを使用して buildconf スクリプトを実行しましょう。
cd /opt/php-7.0.0
ls
./buildconf --force
6 ステップ: 今度は configure コマンドを実行します。以下のオプションは標準の PHP 7 インストールを保証しますが、必要に応じてインストールをより適切にカスタマイズするために、PHP マニュアルの完全なオプション リストを参照できます。
./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 ステップ: 完了したら、次のコマンドを実行します。
make
それとその後:
make install
8 ステップ: 最後に Apache サーバーを再起動します
sudo /sbin/service httpd restart
9 ステップ: 完了です。これで、 phpinfo()を実行して、インストールされている「PHP 7.0.0」のバージョンを確認できます。