Centos7下安裝php7

來源:互聯網
上載者:User

標籤:conf   get   bcmath   bst   date   iconv   open   file   efault   

通過編譯的方式安裝php7

1. 安裝PHP7
## 下載wget http://us2.php.net/distributions/php-7.0.2.tar.gz## 安裝tar zxvf php-7.0.2.tar.gzcd php-7.0.2/./configure --help ## 查看安裝的配置./configure --prefix=/usr/local/webserver/php --with-curl --with-freetype-dir --with-gd --with-gettext --with-iconv-dir --with-kerberos --with-libdir=lib64 --with-libxml-dir --with-mysqli --with-openssl --with-pcre-regex --with-pdo-mysql --with-pdo-sqlite --with-pear --with-png-dir --with-xmlrpc --with-xsl --with-zlib --enable-fpm --enable-bcmath --enable-libxml --enable-inline-optimization --enable-gd-native-ttf --enable-mbregex --enable-mbstring --enable-opcache --enable-pcntl --enable-shmop --enable-soap --enable-sockets --enable-sysvsem --enable-xml --enable-zip --with-config-file-path=/etcmake && make installcp php.ini-development /etc/php.inicd /usr/local/webserver/php/etc && cp php-fpm.conf.default php-fpm.conf/sbin/chkconfig php-fpm on  # 設定開機啟動
2. 配置php.ini
extension_dir = "/usr/local/webserver/php/lib/php/extensions/no-debug-non-zts-20151012/"date.timezone = prcenable_dl = Oncgi.force_redirect = 0cgi.fix_pathinfo=1fastcgi.impersonate = 1cgi.rfc2616_headers = 1allow_url_fopen = On
3. 測試安裝,檢測安裝是否正確4. 本次安裝的收穫
  • --with-config-file-path 參數指定的php.ini的位置,預設php.ini在php/lib目錄下。如果要改變位置需要指定改參數
  • php.ini在php啟動時讀取,這樣修改php.ini只要重啟php即可,不需要重啟nginx。設定檔

Centos7下安裝php7

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.