CentOS安裝PHP5.6

來源:互聯網
上載者:User

標籤:centos7安裝php5.6

配置yum源:


centos6.5:

# rpm -Uvh # rpm -Uvh

centos7:

1安裝EPEL源EPEL源是centos下一個非常強大的擴充yum源(反正別人都這麼說)

2安裝REMI源:這個是用來安裝和更新PHP的,由於有的東西(比如laravel架構)php的版本是有要求的,而centos預設安裝的php版本是比較低的,因此我們通過這個yum源可以安裝較新的php。

# yum install epel-release# rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm



使用yum list命令查看可安裝的包(Packege):

# yum list --enablerepo=remi --enablerepo=remi-php56 | grep php


yum源配置好,接下來安裝php5.6

# yum install --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof


查看php版本:

# php --version


重啟apache:

#systemctl restart httpd.server


寫段php指令碼測試

650) this.width=650;" src="https://s3.51cto.com/wyfs02/M02/8E/99/wKiom1jGXZnD4IJGAAFYZU9q5bw523.png" title="111.png" alt="wKiom1jGXZnD4IJGAAFYZU9q5bw523.png" />


本文出自 “心有多大” 部落格,轉載請與作者聯絡!

CentOS安裝PHP5.6

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.