centos7 源碼安裝php7

來源:互聯網
上載者:User

標籤:php7

系統:centos7.2

php版本:php7.0.0

安裝前工作:

yum install gcc make crul-devel libxslt-devel gd-devel libjpeg-devel libpng libpng-devel libxml2-devel bzip2-devel libcurl-devel –y      #如果下面 配置編譯報錯 請yum安裝相關依賴包

wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo

yum -y install libmcrypt-devel mcytpt mhash libxslt-devel

安裝libiconv

tar xf libiconv-1.14.tar.gz

cd libiconv-1.14

./configure --prefix=/usr/lcoal/libiconv

make && make install

解壓安裝:

tar xf php-7.0.0.tar.gz

cd php-7.0.0/

./configure --prefix=/usr/local/php7 --with-fpm-user=nginx --with-fpm-group=nginx --with-bz2 --with-curl --with-gd --with-mcrypt --with-openssl --with-mhash --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir=/usr/local/libiconv --with-gettext --with-libxml-dir --with-zlib --with-xmlrpc --with-pcre-regex --with-pear --with-pdo-mysql=mysqlnd --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-libdir=lib64 --enable-dom --enable-xml --enable-fpm --enable-bcmath --enable-ftp --enable-sockets --disable-ipv6 --enable-mbregex --enable-mbstring --enable-calendar --enable-gd-native-ttf --enable-static --enable-fpm --enable-bcmath --enable-libxml --enable-inline-optimization --enable-mbregex --enable-opcache --enable-pcntl --enable-shmop --enable-soap --enable-sockets --enable-sysvsem --enable-zip make && make installcp php.ini-production /usr/local/php7/lib/php.inicp /usr/local/php7/etc/php-fpm.conf.default  /usr/local/php7/etc/php-fpm.confcp /usr/local/php7/etc/php-fpm.conf.default /usr/local/php7/etc/php-fpm.confcp /usr/local/php7/etc/php-fpm.d/www.conf.default /usr/local/php7/etc/php-fpm.d/www.conf#php-fpm.conf 引用這個目錄中*.conf 設定檔,修改啟動使用者。連接埠號碼等啟動/etc/init.d/php-fpm停止pkill php-fpm  或者 ps -ef |grep php-fpm |awk ‘{print $2}‘ |xargs kill
 



本文出自 “jinchuang” 部落格,請務必保留此出處http://jinchuang.blog.51cto.com/8690689/1897385

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.