centos服务器配置日记(五)

安装mysql前,检查了下gd2没有。下载gd2,

#tar xzvf gd-2.0.33.tar.gz
#cd gd-2.0.33
#./configure --prefix=/usr/local/gd2 --mandir=/usr/share/man --with-png --with-freetype --with-jpeg
#make
#make install

居然出错了

aclocal:configure.ac:64: warning: macro `AM_ICONVnot found in library的错误,搜索google得知安装gettext这个包就可以了。

#yum install gettext gettext-devel

安装成功。

安装php.

#tar xvf php-**

#cd php-**

#./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-zlib-dir --with-bz2 --with-tiff-dir --with-libxml-dir=/usr/local/libxml2 --with-gd=/usr/local/gd2 --with-freetype-dir --with-jpeg-dir --with-png-dir --with-ttf --enable-mbstring --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-config-file-path=/etc --with-iconv --disable-ipv6 --enable-static

又出了问题了,mysql是rpm安装的,找不到路径。

错误如下:

configure: error: Cannot find MySQL header files under /usr.
Note that the MySQL client library is not bundled anymore!

现在东一块,西一块,找不到mysql.h头文件,真是杯具。

网上找了下,解决办法如下:

#yum install mysql-devel

然后把参数改成--with-mysql=/usr/include/mysql/

试验过后,这个方法行不通,因为我的mysql是最新的会冲突,我一度有重装mysql的想法了。

去掉参数,只留一个--with-mysql还是不行,无语了

下决心了,卸载mysql重新装.

还是拿src.rpm安装。

按照我原先的记录装,编译之后安装

然后再#> ./configure --prefix=/usr/local/mysql --localstatedir=/var/lib/mysql --with-comment=Source --with-server-suffix=-Community --with-mysqld-user=mysql --without-debug --with-big-tables --with-charset=latin1 --with-collation=latin1_swedish_ci --with-extra-charsets=all --with-pthread --enable-static --enable-thread-safe-client --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --enable-assembler --with-plugins=all 

安装完毕后再去装PHP





你可能感兴趣的:(centos服务器配置日记(五))