redhat8.6 php8.3.10编译
-
redhat8.6最小化安装
-
设置yum
curl -o /etc/yum.repos.d/redhat.repo http://mirrors.aliyun.com/repo/Centos-8.repo
yum config-manager --set-enabled PowerTools
-
安装很多包
yum -y install wget libxml2-devel sqlite-devel bzip2-devel libcurl-devel libffi-devel libpng-devel libwebp-devel libjpeg-devel libzip
以下包也要安装
libicu-devel
freetype-devel
openssl-devel
krb5-devel
libxslt-devel
libzip-devel
libevent-devel
oniguruma
oniguruma-devel -
配置
./configure
--prefix=/usr/local/php
--with-config-file-path=/usr/local/php/etc
--with-zlib-dir
--with-freetype
--enable-soap
--enable-calendar
--with-curl
--with-zlib
--enable-gd
--disable-rpath
--enable-inline-optimization
--with-bz2
--with-zlib
--enable-sockets
--enable-sysvsem
--enable-sysvshm
--enable-pcntl
--enable-mbregex
--enable-exif
--enable-bcmath
--with-mhash
--with-zip
--with-pdo-mysql
--with-mysqli
--with-mysql-sock=/var/run/mysqld/mysqld.sock
--with-jpeg
--with-openssl
--with-fpm-user=www
--with-fpm-group=www
--with-libdir=/lib/x86_64-linux-gnu
--enable-ftp
--with-kerberos
--with-gettext
--with-xmlrpc
--with-xsl
--enable-opcache
--enable-intl
--with-pear
--enable-fpm
--with-ldap -
编译
make
make install
- 碰到问题:--enable-mbstring 这个只能去掉,不知道有没有影响?
/usr/bin/ld: dynamic STT_GNU_IFUNC symbolmb_utf16be_to_wchar' with pointer equality in
ext/mbstring/libmbfl/filters/mbfilter_utf16.o' can not be used when making an executable; recompile with -fPIE and relink with -pie
最好是有,这是很常用的扩展,比如
mb_strlen
和mb_substr
函数都是由该扩展提供,并且本系统已经使用了这两个函数后面发现可以编译扩展,生成动态链接库mbstring
cd extname
phpize
./configure
make
make install
编译ldap扩展碰到找不到库的情况,需要处理如下。
yum install openldap openldap-devel -y
cp -frp /usr/lib64/libldap* /usr/lib/
- 1
前往