安装环境:VMWare + RedHat Linux AS5U2
Linux的安装过程比较简单这里就不在赘述了。为了避免实验中不必要的麻烦,建议大家在安装的时候将SELinux(SELinux 是 linux 系统中一个强制性的安全机制)、iptables等服务禁用掉,如果在安装Linux的时候忘记了也可以用如下的方法:
# vi /etc/selinux/conifg
将 SELINUX=enforcing改成SELINUX=disabled即可。
MySQL的安装:
1.下载mysql源码包并解压
#cd /usr/local/src
#tar xzvf mysql-5.1.30.tar.gz
#cd mysql-5.1.30
2.创建mysql用户、组
#groupadd mysql
#useradd -g mysql -s /bin/false -M mysql
3.编译安装
#./configure –prefix=/usr/local/mysql –localstatedir=/var/lib/mysql –with-comment=Source –with-server-suffix=Comsenz –with-mysqld-user=mysql –without-debug –with-big-tables –with-charset=gbk –with-collation=gbk_chinese_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 –without-ndb-debug
如果编译成功,你会看到:Thank you for choosing MySQL!
#make;make install