最近在雲端伺服器部署環境時,用的CentOS6.5的系統,預設是用的php.5.3.3,不過這個有點小低,就試著升級下。
以下方法來自網絡,測試可用
1、移除先前安裝的php相關檔案
<span>yum remove php php</span><span>-</span><span>bcmath php</span><span>-</span><span>cli php</span><span>-</span><span>common php</span><span>-</span><span>devel php</span><span>-</span><span>fpm php</span><span>-</span><span>gd php</span><span>-</span><span>imap php</span><span>-</span><span>ldap php</span><span>-</span><span>mbstring php</span><span>-</span><span>mcrypt php</span><span>-</span><span>mysql php</span><span>-</span><span>odbc php</span><span>-</span><span>pdo php</span><span>-</span><span>pear php</span><span>-</span><span>pecl</span><span>-</span><span>igbinary php</span><span>-</span><span>xml php</span><span>-</span><span>xmlrpc</span>
2、安裝rpm
<span>rpm </span><span>-</span><span>Uvh</span><span> http</span><span>:</span><span>//mirror.webtatic.com/yum/el6/latest.rpm</span>
3、安裝php5.5
<pre class="brush:php;toolbar:false"><span>yum install php55w php55w</span><span>-</span><span>bcmath php55w</span><span>-</span><span>cli php55w</span><span>-</span><span>common php55w</span><span>-</span><span>devel php55w</span><span>-</span><span>fpm php55w</span><span>-</span><span>gd php55w</span><span>-</span><span>imap php55w</span><span>-</span><span>ldap php55w</span><span>-</span><span>mbstring php55w</span><span>-</span><span>mcrypt php55w</span><span>-</span><span>mysql php55w</span><span>-</span><span>odbc php55w</span><span>-</span><span>pdo php55w</span><span>-</span><span>pear php55w</span><span>-</span><span>pecl</span><span>-</span><span>igbinary php55w</span><span>-</span><span>xml php55w</span><span>-</span><span>xmlrpc php55w</span><span>-</span><span>opcache php55w</span><span>-</span><span>intl php55w</span><span>-</span><span>pecl</span><span>-</span><span>memcache</span>