ubuntu下php的编译安装与部署

来源:互联网 发布:windows phone 10微信 编辑:程序博客网 时间:2024/05/22 12:35

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-devvim Makefile

找到EXTRA_LIBS =
在其后添加-llber

最后才开始 make

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

原创粉丝点击