mariadb10.0.14
请参看:源码安装MariaDB10
php5.6.8
一.编译安装php
A.安装编译工具和依赖库
[root@test1 ~]#yum -y install gcc gcc-c++ libxml2-devel openssl-devel pcre-devel libcurl-devel gd-devel bzip2-devel freetype-devel giflib-devel openjpeg-devel readline-devel libedit-devel
B.编译php扩展库
libmcrypt
ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/attic/libmcrypt
[root@test1 ~]#
wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/attic/libmcrypt/libmcrypt-2.5.7.tar.gz
[root@test1 ~]
# tar -zxvf libmcrypt-2.5.7.tar.gz -C /usr/local/src
[root@test1 ~]
# cd /usr/local/src/libmcrypt-2.5.7
[root@test1
libmcrypt-2.5.7]
# ./configure && make && make install
[root@test1 ~]
#ldconfig
mhash
http://sourceforge.net/projects/mhash/files/
[root@test1 ~]
# tar -jxvf mhash-0.9.9.9.tar.bz2 -C /usr/local/src
[root@test1 ~]
# cd /usr/local/src/mhash-0.9.9.9/
[root@test1 mhash-0.9.9.9]
# ./configure && make && make install
[root@test1 ~]
#ldconfig
mcrypt
ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/attic
[root@test1 ~]
# wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/attic/mcrypt-2.6.4.tar.gz
[root@test1 ~]
# tar -zxvf
mcrypt-2.6.4.tar.gz
-C /usr/local/src
[root@test1 ~]
# cd /usr/local/src/mcrypt-2.6.4
[root@test1
mcrypt-2.6.4]
# LD_LIBRARY_PATH=/usr/local/lib ./configure && make && make install
[root@test1 ~]
#ldconfig
注意:上面标红的部分必定不能省,否则会报以下错误
checking for libmcrypt -
version >= 2.5.0... no
*** Could not run libmcrypt test program, checking why...
*** The test program compiled, but did not run. This usually means
*** that the run-time linker is not finding LIBMCRYPT or finding the wrong
*** version of LIBMCRYPT. If it is not finding LIBMCRYPT, you'll need to set your
*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point
*** to the installed location
Also, make sure you have run ldconfig if that
*** is required on your system
***
*** If you have an old version installed, it is best to remove it, although
*** you may also be able to get things to work by modifying
LD_LIBRARY_PATH
***
configure: error: ***
libmcrypt was not found
说明:若是提示GD库找不到,能够再从新源码安装下GD库
(可选)
libgd
http://libgd.bitbucket.org/
http://autosetup1.googlecode.com/files
[root@test1 ~]
#
wget http://autosetup1.googlecode.com/files/gd-2.0.35.tar.gz
[root@test1 ~]
#
tar -zxvf gd-2.0.35.tar.gz -C /usr/local/src/
[root@test1 ~]
#
cd /usr/local/src/gd-2.0.35/
[root@test1 gd-2.0.35]#
./configure && make && make install
[root@test1 ~]
#ldconfig
gd库很重要,诸如dedeCMS, DiscuzX!,PHPwind等建站框架都须要gd库支持,而且官方下载的gd库一直安装不成功,因此这里才用了第三方的地址。
C.编译php-fpm
新建用户和用户组
groupadd -r php-fpm
useradd -r php-fpm -g php-fpm
php
http://cn2.php.net/get/php-5.6.8.tar.xz/from/a/mirror
[root@test1 ~]
# tar -xvf php-5.6.8.tar.xz -C /usr/local/src
[root@test1 ~]
# cd /usr/local/src/php-5.6.8
[root@test1
php-5.6.8]# ./configure \
--prefix=/usr/local/php \
--with-config-file-path=/usr/local/php/etc \
--with-config-file-scan-dir=/usr/local/php/etc/php.d \
--with-fpm-user=php-fpm \
--with-fpm-group=php-fpm \
--enable-inline-optimization \
--enable-pcntl \
--enable-shmop \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--enable-sockets \
--enable-shared \
--enable-opcache \
--enable-bcmath \
--enable-soap \
--enable-zip \
--enable-gd-native-ttf \
--enable-ftp \
--enable-fpm \
--enable-mbstring \
--enable-calendar \
--enable-dom \
--enable-xml \
--with-pear \
--with-pcre-regex \
--with-curl \
--with-bz2 \
--with-zlib \
--with-gd \
--with-gettext \
--with-jpeg-dir=/usr/local \
--with-png-dir=/usr/local \
--with-iconv-dir=/usr/local \
--with-freetype-dir=/usr/local \
--with-libxml-dir=/usr/local \
--with-readline \
--with-iconv \
--with-mcrypt \
--with-mhash \
--with-openssl \
--with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--disable-debug \
--disable-fileinfo
[root@test1 php-5.6.8]#
make && make install
注意:
编译出现错误
make: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1
这是因为内存小于1G所致使,解决办法在./configure加上选项:
--disable-fileinfo #禁用 fileinfo
--enable-mbstring #
phpMyadmin4须要mbstring支持,编译时能够加上