第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定

Ubuntu源碼安裝php服務(wù)

標(biāo)簽:
PHP Linux

一、下载PHP7的最新版源码

PHP官网下载PHP源码 下载地址:http://www.php.net/downloads.php

二、解压

tar -zxf /tmp/php-7.2.9.tar.gz

三、安装相关依赖库

sudo apt-get update
sudo apt-get install libxml2-dev
#安装gcc
sudo apt-get install build-essential
sudo apt-get install openssl 
sudo apt-get install libssl-dev 
sudo apt-get install make
sudo apt-get install curl
sudo apt-get install libcurl4-gnutls-dev
sudo apt-get install libjpeg-dev
sudo apt-get install libpng-dev
sudo apt-get install libmcrypt-dev
sudo apt-get install libreadline6 libreadline6-dev

四、编译:(编译参数2个中选择一个,第一段大部分机器即可编译,第二段参数推荐64位x86系统编译)

cd /tmp/php-7.2.9
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --enable-fpm --with-fpm-user=www --with-fpm-group=www --with-mysqli --with-pdo-mysql --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --with-mcrypt --enable-ftp --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --disable-fileinfo --enable-maintainer-zts

五、执行make 和 sudo make install 安装

make && sudo make install

六、配置php-fpm

cd /usr/local/php7/etc

cp php-fpm.conf.default php-fpm.conf

cd /usr/local/php7/etc/php-fpm.d

cp www.conf.default www.conf

user = www
group = www

如果www用户不存在,那么先添加www用户
groupadd www
useradd -g www www

七、验证PHP

/usr/local/php7/bin/php -v

八、启动php-fpm

sudo /usr/local/php7/sbin/php-fpm
注释
‘./configure’ ‘–prefix=/usr/local/php’ ‘–with-config-file-path=/etc’ ‘–with-mysql=/usr/local/mysql’ ‘–with-mysqli=/usr/local/mysql/bin/mysql_config’ ‘–with-iconv-dir=/usr/local’ ‘–with-freetype-dir’ ‘–with-jpeg-dir’ ‘–with-png-dir’ ‘–with-zlib’ ‘–with-libxml-dir=/usr’ ‘–enable-xml’ ‘–disable-rpath’ ‘–enable-safe-mode’ ‘–enable-bcmath’ ‘–enable-shmop’ ‘–enable-sysvsem’ ‘–enable-inline-optimization’ ‘–with-curl’ ‘–with-curlwrappers’ ‘–enable-mbregex’ ‘–enable-fpm’ ‘–enable-mbstring’ ‘–with-mcrypt’ ‘–with-gd’ ‘–enable-gd-native-ttf’ ‘–with-openssl’ ‘–with-mhash’ ‘–enable-pcntl’ ‘–enable-sockets’ ‘–with-xmlrpc’ ‘–enable-zip’ ‘–enable-soap’

出现得错误如下:

错误一:

configure: error: xml2-config not found. Please check your libxml2 installation.

而我已经安装过了libxml2,但是还是有这个提示:
解决办法:

sudo apt-get install libxml2-dev

错误二:

configure: error: Please reinstall the BZip2 distribution

而我也已经安装了bzip2,网上找到得解决方案都是需要安装bzip2-dev,可是11.10里面没有这个库。
解决办法:在网上找到bzip2-1.0.5.tar.gz,解压,直接make ,sudo make install.(我使用的该源来自于http://ishare.iask.sina.com.cn/f/9769001.html)

错误三:

configure: error: Please reinstall the libcurl distribution -easy.h should be in /include/curl/
解决办法:

sudo apt-get install libcurl4-gnutls-dev

错误四:

configure: error: jpeglib.h not found.

解决办法:

sudo apt-get install libjpeg-dev

错误五:

configure: error: png.h not found.

解决办法:

sudo apt-get install libpng-dev

错误六:

configure: error: libXpm.(a|so) not found.

解决办法:

sudo apt-get install libxpm-dev

错误七:

configure: error: freetype.h not found.

解决办法:

sudo apt-get install libfreetype6-dev

错误八:

configure: error: Your t1lib distribution is not installed correctly. Please reinstall it.

解决办法:

sudo apt-get install libt1-dev

错误九:

configure: error: mcrypt.h not found. Please reinstall libmcrypt.

解决办法:

sudo apt-get install libmcrypt-dev

错误十:

configure: error: Cannot find MySQL header files under yes.
Note that the MySQL client library is not bundled anymore!

解决办法:

sudo apt-get install libmysql++-dev

错误十一:

configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution

解决办法:

sudo apt-get install libxslt1-dev

可见PHP源码安装之前需要先安装这些依赖,详细可见http://forum.ubuntu.org.cn/viewtopic.php?f=88&t=231159

如上错误都解决之后,再次./config….没有错误之后,

make
sudo make install
點(diǎn)擊查看更多內(nèi)容
TA 點(diǎn)贊

若覺得本文不錯,就分享一下吧!

評論

作者其他優(yōu)質(zhì)文章

正在加載中
PHP開發(fā)工程師
手記
粉絲
104
獲贊與收藏
364

關(guān)注作者,訂閱最新文章

閱讀免費(fèi)教程

  • 推薦
  • 評論
  • 收藏
  • 共同學(xué)習(xí),寫下你的評論
感謝您的支持,我會繼續(xù)努力的~
掃碼打賞,你說多少就多少
贊賞金額會直接到老師賬戶
支付方式
打開微信掃一掃,即可進(jìn)行掃碼打賞哦
今天注冊有機(jī)會得

100積分直接送

付費(fèi)專欄免費(fèi)學(xué)

大額優(yōu)惠券免費(fèi)領(lǐng)

立即參與 放棄機(jī)會
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號

舉報

0/150
提交
取消