ubuntu下php的编译安装与部署

2 篇文章 0 订阅
1 篇文章 0 订阅

php编译安装与配置

./configure --prefix=/usr/local/php --enable-opcache --enable-fpm --enable-pdo --enable-sockets --enable-exif --enable-soap --enable-ftp --enable-wddx --enable-pcntl --enable-soap --enable-bcmath --enable-mbstring --enable-dba --enable-gd-native-ttf --enable-gd-jis-conv --enable-zip --enable-calendar --enable-shmop --enable-sysvmsg --enable-sysvsem --enable-sysvshm --with-mysqli --with-pdo-mysql --with-pdo-sqlite --with-iconv --with-gmp --with-pspell --with-gettext --with-xmlrpc --with-openssl --with-mhash --with-mcrypt --with-xsl --with-curl --with-pcre-regex --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr  --with-gettext=/usr --with-zlib=/usr --with-bz2=/usr --with-recode=/usr --with-ldap --with-pear --with-readline --with-fpm-user=your_user --with-fpm-group=your_group

可选user和group
www-data

sudo apt-get update  
sudo apt-get install build-essential  
sudo ln -fs /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/
sudo apt-get install -y autoconf libtool re2c libxml2-dev openssl libcurl4-openssl-dev  libbz2-dev libjpeg-dev libpng12-dev libfreetype6-dev libldap2-dev libmcrypt-dev   libmysqlclient-dev libxslt1-dev libxt-dev libpcre3-dev libxpm-dev  libgmp-dev libpspell-dev librecode-dev libreadline6-dev bison libtidy-dev libcurl4-gnutls-dev
vim Makefile

找到EXTRA_LIBS =
在其后添加-llber

最后才开始 make

编译的php-fpm不会开机自启动,需要把启动脚本复制到启动目录下,执行如下命令:
cp {php source-dir}nit.d/php-fpm

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值