background image

make             //如果 GD 报错:configure.ac:64: warning: macro 
`AM_ICONV' not found in library 你就 make clean 一下,然后再 make
make install

 

二、安装

Mysql 5.1.x:

1)先安装 Google 的开源 TCMalloc 库,可以提高 MySQL 在高并发情况下的
性能
cd /usr/local/src
wget -c http://google-perftools.googlecode.com/files/google-
perftools-1.7.tar.gz
tar zxvf  google-perftools-1.7.tar.gz
cd google-perftools-1.7/
./configure
make && make install
echo "/usr/local/lib" > /etc/ld.so.conf.d/usr_local_lib.conf
/sbin/ldconfig
cd ../
2)开始安装 Mysql 5.1.x
cd /usr/local/src
wget -c http://mysql.proserve.nl/Downloads/MySQL-5.1/mysql-
5.1.55.tar.gz
tar -zxvf mysql-5.1.55.tar.gz
cd mysql-5.1.55
./configure --prefix=/usr/local/mysql --with-extra-charsets=all 
--enable-thread-safe-client --enable-assembler --with-charset=utf8 
--enable-thread-safe-client --with-big-tables --with-readline --with-ssl 
--with-embedded-server --enable-local-infile --without-debug 
--without-innodb --without-isam --with-mysqld-ldflags=-
ltcmalloc_minimal
make && make install
cd ../
groupadd mysql
useradd -g mysql mysql
cp /usr/local/mysql/share/mysql/my-medium.cnf /etc/my.cnf
/usr/local/mysql/bin/mysql_install_db --user=mysql
chown -R mysql /usr/local/mysql/var
chgrp -R mysql /usr/local/mysql/.
cp /usr/local/mysql/share/mysql/mysql.server /etc/init.d/mysql
chmod 755 /etc/init.d/mysql
chkconfig --level 345 mysql on
echo "/usr/local/mysql/lib/mysql" >> /etc/ld.so.conf
echo "/usr/local/lib" >>/etc/ld.so.conf
ldconfig
ln -s /usr/local/mysql/lib/mysql /usr/lib/mysql
ln -s /usr/local/mysql/include/mysql /usr/include/mysql