編譯安裝php7

來源:互聯網
上載者:User

標籤:handle   blog   url   main   mod   roo   zip   str   socket   

#! /bin/bash##編譯安裝 php7cd /root/soft || mkdir /root/soft && cd /root/soft wget http://cn2.php.net/distributions/php-7.0.12.tar.gztar -zxvf php-7.0.12.tar.gzcd  php-7.0.12./configure --prefix=/usr/local/php7  --sysconfdir=/usr/local/php7/etc  --with-config-file-path=/usr/local/php7/etc   --with-config-file-scan-dir=/usr/local/php7/etc/php.d  --enable-fpm  --enable-mbstring --enable-zip --enable-mysqlnd --with-iconv --with-zlib  --enable-xml  --with-curl   --with-gd  --with-openssl --with-mhash  --enable-sockets --with-xmlrpc --enable-zip --enable-soap --enable-opcache --with-pdo-mysql --enable-maintainer-zts make clearmake && make installmkdir /usr/local/php7/etc/php.d -pcd /root/soft/php-7.0.12/sapi/fpmcp init.d.php-fpm /etc/init.d/php7-fpmchmod +x /etc/init.d/php7-fpmchkconfig --add php7-fpmchkconfig php7-fpm oncp php-fpm.conf /usr/local/php7/etc/php-fpm.confcp www.conf   /usr/local/php7/etc/php-fpm.d/www.confcd /root/soft/php-7.0.12cp php.ini-production /usr/local/php7/etc/php.inicat >/usr/local/php7/etc/php.d/10-opcache.ini <<EOFFzend_extension=opcache.soopcache.enable=1opcache.memory_consumption=128opcache.interned_strings_buffer=8opcache.max_accelerated_files=4000opcache.blacklist_filename=/etc/php.d/opcache*.blacklistEOFF##redis 擴充yum install unzip -y cd /root/softwget -c https://github.com/phpredis/phpredis/archive/php7.zipunzip php7.zip cd phpredis-php7//usr/local/php7/bin/phpize ./configure  --with-php-config=/usr/local/php7/bin/php-config makemake installecho "extension=redis.so" >> /usr/local/php7/etc/php.d/20.redis.ini#######igbinary7擴充cd /root/softwget https://github.com/igbinary/igbinary7/archive/master.zipcd igbinary7-master/usr/local/php7/bin/phpize./configure CFLAGS="-O2 -g" --enable-igbinary --with-php-config=/usr/local/php7/bin/php-configecho "extension=igbinary.so" >> /usr/local/php7/etc/php.d/20.igbinary.iniecho "session.serialize_handler=igbinary" >> /usr/local/php7/etc/php.d/20.igbinary.ini##memcache擴充cd /root/softyum install -y libmemcached10-devel-1.0.16-1.ius.centos6.x86_64 libmemcached10-1.0.16-1.ius.centos6.x86_64wget https://codeload.github.com/php-memcached-dev/php-memcached/zip/php7unzip php7cd php-memcached-php7//usr/local/php7/bin/phpize./configure  --with-php-config=/usr/local/php7/bin/php-config --enable-memcached-igbinarymakemake installecho "extension=memcached.so" >> /usr/local/php7/etc/php.d/20.memcached.ini

 

編譯安裝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.