安装php7记录下遇到的坑
先做一下准备工作,把一些必要的编译包安装一下
yum install libxml2-devel
yum -y install curl-devel
yum -y install libjpeg-devel
yum install libpng-devel
yum install freetype-devel
wget https://jaist.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz
tar -zxvf libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8
./configure --prefix=/usr/local
make && make install
vim /etc/ld.so.conf.d/local.conf # 编辑库文件 /usr/local/lib # 添加该行 :wq # 保存退出 ldconfig # 使之生效 然后进行安装操作
./configure \ --prefix=/usr/local/php7 \ --exec-prefix=/usr/local/php7 \ --bindir=/usr/local/php7/bin \ --sbindir=/usr/local/php7/sbin \ --includedir=/usr/local/php7/include \ --libdir=/usr/local/php7/lib/php \ --mandir=/usr/local/php7/php/man \ --with-config-file-path=/usr/local/php7/etc \ --with-mcrypt=/usr/include \ --with-mhash \ --with-openssl \ --with-mysqli=mysqlnd \ --with-pdo-mysql=mysqlnd \ --with-gd \ --with-iconv \ --with-zlib \ --enable-zip \ --enable-inline-optimization \ --disable-debug \ --disable-rpath \ --enable-shared \ --enable-xml \ --enable-bcmath \ --enable-shmop \ --enable-sysvsem \ --enable-mbregex \ --enable-mbstring \ --enable-ftp \ --enable-gd-native-ttf \ --enable-pcntl \ --enable-sockets \ --with-xmlrpc \ --enable-soap \ --without-pear \ --with-gettext \ --enable-session \ --with-curl \ --with-jpeg-dir \ --with-freetype-dir \ --enable-opcache \ --enable-fpm \ --without-gdbm \ --disable-fileinfo
安装没问题!!!!