因为工作需要,我要在Linux下搭建apache+mysql的环境,所以把安装过程分享给大家
首先要确定是否有GCC,可以在shell下输入cc -v
[root@localhost root]# cc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
显示我的机器上的GCC版本为3.2.2,所以可以用它来编译.然后去www.apache.org下载apache,我安装的版本是2.0.53
安装
#tar zxvf httpd-2.0.53.tar.gz
#cd httpd-2.0.53
#./configure -prefix=/usr/local/apache2 -enable-module=so
#make
#make install
启动apache
#/usr/local/apache2/bin/apachectl start
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
去www.mysql.com下载MySQL的客户端和服务端
安装
#rpm -ivh MySQL-server-4.1.11-0.i386.rpm
#rpm -ivh MySQL-client-4.1.11-0.i386.rpm
然后
[root@localhost root]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 4.1.11-standard
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
说明安装成功了,呵呵..