安装扩展工具包:
查看是否安装成功:
做软连接:
安装libxml
先安装python:
做软连接:
同样安装
libmcrypt和mhash
make && make install
make && make install
安装mcrypt
安装libpng:
make && make install
安装libiconv
make && make install
安装freetype
安装autoconf
安装jpeg-9a
安装libgd
gettxt
安装gettxt
安装PHP
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-apxs2=/usr/local/httpd/bin/apxs --with-openssl --with-mysql=/usr/local/mysql --with-pdo-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-zlib-dir=/usr/local/zlib --with-libxml-dir=/usr/local/libxml2 --with-mhash --with-png-dir=/usr/local/libpng --with-iconv-dir=/usr/local/libiconv --with-freetype-dir=/usr/local/freetype --with-jpeg-dir=/usr/local/jpeg --with-gd=/usr/local/libgd --enable-mbstring=all --enable-sockets --enable-libxml --enable-soap --enable-xml --enable-bcmath --enable-shmop --enable-sysvsem --enable-mbregex --enable-gd-native-ttf --enable-pcntl --with-xmlrpc --enable-zip --enable-phar --without-pear --enable-ftp --enable-maintainer-zts --disable-rpath --with-gettext --enable-opcache=no --with-xpm-dir=/usr/lib64
make && make install
出了个错误:
重新做个软连接
重新./configure 没有报错:
安装成功:
进行php配置:
修改字符集:
整合:
vim /usr/local/httpd/conf/httpd.conf
重启httpd,新建测试php文件
检验:
至此LAMP环境搭建成功!