5. 安装gd,下载地址:http://down.itlearner.com/soft/2357.shtml
# tar zxvf gd-2.0.33.tar.gz
# cd gd-2.0.33
# ./configure --prefix=/usr/local/gd --with-jpeg=/usr/local/jpeg --with-freetype=/usr/local/freetype --with-png --with-zlib
//编译过程中会看到如下信息
** Configuration summary for gd 2.0.33:
Support for PNG library: yes
Support for JPEG library: yes
Support for Freetype 2.x library: yes
Support for Fontconfig library: no
Support for Xpm library: no
Support for pthreads: yes
//可以看到png 、 jpeg 、 freetype都已经安装上了
# make
# make install
6. 正式安装php
# tar zxvf php-5.1.6.tar.gz
# cd php-5.1.6
#./configure--prefix=/usr/local/php5--with-apxs2=/usr/local/apache2/bin/apxs--with-mysql=/usr/local/mysql--with-gd --with-zlib --with-png--with-jpeg --with-freetype--enable-sockets --with-iconv--enable-mbstring --enable-track-vars--enable-force-cgi-redirect--with-config-file-path=/usr/local/php5/etc
7.整合php和apache
cp php.ini-dist /usr/local/php5/etc/php.ini
vi /usr/local/php5/etc/php.ini
将extension=php_mysql.dll前面的#去掉
1.php5 在configure时提示:configure: error: mysqlconfigurefailed.,只用--with-mysql参数提示:Cannot find MySQL header filesunderyes,去掉--with-mysql参数可以安装,php5将无法连接mysql,页面提示为:Fatal error: Calltoundefined function mysql_connect()。查阅了一下,发现是mysql5对应的版本不对导致的,换个版本就可以了。
我用mysql-standard-5.0.27-linux-i686.tar.gz时会提示,换了mysql-standard-5.0.27-linux-i686-glibc23.tar.gz后就正常了。
2.重装mysql后启动出错,提示:
Starting mysqld daemon with databases from /usr/local/mysql/data
STOPPING server from pid file /usr/local/mysql/data/xmcncn.pid
061103 15:25:32 mysqld ended
请教高手gump,解决方法:
touch /tmp/mysql.sock
killall -9 mysqld
/usr/local/mysql/bin/mysqld_safe -user=mysql &
成功启动
3安装MYSQL时报错
[iyunv@localhost mysql]# Starting mysqld daemon with databases from /usr/local/mysql/data
STOPPING server from pid file /var/run/mysqld/mysqld.pid
070206 22:56:06 mysqld ended
修改此处
<Directory "/home/jiaxinxu/wysj">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
另外注意wysj文件夹和其中文件的权限最好chmod 775
并且
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
# Deny from all
</Directory>