RedHatLinuxAS4下整合安装mysql-5.1.37、apache-2.2.13、php-5.3.0与zendoptions并支持GD库以下所有操作请注意是在root账号权限下执行。一、准备工作:首先查看系统中是否已经安装了GD环境:[root@localhost~]#rpm-qa|grepzlib[root@localhost~]#rpm-qa|greplibpng[root@localhost~]#rpm-qa|grepfreetype[root@localhost~]#rpm-qa|grepjpeg[root@localhost~]#rpm-qa|grepgd如果没有安装的话,可以按照下面的步骤手动安装:1.1安装zlib[root@localhost~]#tarzxvfzlib-1.2.2.tar.gz[root@localhost~]#cdzlib-1.2.2[root@localhost~]#./configure[root@localhost~]#make[root@localhost~]#makeinstall1.2安装libpng[root@localhost~]#tarzxvflibpng-1.2.7.tar.tar[root@localhost~]#cdlibpng-1.2.7[root@localhost~]#cdscripts/[root@localhost~]#mvmakefile.linux../makefile[root@localhost~]#cd..[root@localhost~]#make[root@localhost~]#makeinstall注意,这里的makefile不是用./configure生成,而是直接从scripts/里复制一个。1.3安装freetype[root@localhost~]#tarzxvffreetype-2.1.9.tar.gz[root@localhost~]#cdfreetype-2.1.9[root@localhost~]#./configure[root@localhost~]#make[root@localhost~]#makeinstall[/quote]1.4安装Jpeg[root@localhost~]#tarzxvfjpegsrc.v6b.tar.gz[root@localhost~]#cdjpeg-6b/[root@localhost~]#./configure--enable-shared[root@localhost~]#make[root@localhost~]#maketest[root@localhost~]#makeinstall注意:这里configure一定要带--enable-shared参数,不然,不会生成共享库1.5安装GD[root@localhost~]#tarzxvfgd-2.0.33.tar.gz[root@localhost~]#cdgd-2.0.33[root@localhost~]#./configure--with-png--with-freetype--with-jpeg[root@localhost~]#makeinstall二、安装mysql2.1解压缩[root@localhost~]#unzipmysql-5.1.37.zip[root@localhost~]#cdmysql-5.1.372.2创建MYSQL用户和组[root@localhostmysql-5.1.37]#groupaddmysql[root@localhostmysql-5.1.37]#useradd-gmysqlmysql2.3编译前配置mysql安装路径为/usr/local/mysql[root@localhostmysql-5.1.37]#./configure--prefix=/usr/local/mysql2.4开始编译[root@localhostmysql-5.1.37]#make2.5安装[root@localhostmysql-5.1.37]#makeinstall2.6数据库初始化相关操作[root@localhostmysql-5.1.37]#cdscripts/[root@localhostscripts]#./mysql_install_db--user=mysql[root@localhostscripts]#cp../support-files/my-medium.cnf/etc/my.cnf编辑/etc/my.cnf,加入下面一行内容:user=mysql更改部分目录权限,增强安全性。[root@localhostscripts]#chown-Rroot/usr/local/mysql/[root@localhostscripts]#chown-Rmysql/usr/local/mysql/var[root@localhostscripts]#chgrp-Rmysql/usr/local/mysql/编辑/etc/ld.so.conf并加入以下两行:[root@localhostscripts]#vi/etc/ld.so.conf/usr/local/mysql/lib/mysql/usr/local/lib编辑完后载入库[root@localhostscripts]#ldconfig-v2.7启动数据库[root@localhostscripts]#cd/usr/local/mysql/bin/[root@localhostbin]#./mysqld_safe--user=mysql&2.8设置数据库root密码[root@localhostbin]#mysqladmin-urootpassword'newpassword'注意“password”和’newpassword’之间必须有空格。2.9测试安装结果,可有可无的一步******************************************************[root@localhostbin]#mysql-uroot-pEnterpassword:WelcometotheMySQLmonitor.Commandsendwith;or\g.YourMySQLconnectionidis5toserverversion:5.1.37-logType'help;'or'\h'forhelp.Type'\c'toclearthebuffer.mysql>usemysqlDatabasechanged******************************************************当你看到以上内容的时候,恭喜你,数据库已经安装成功了。三、安装apache3.1解压缩[root@localhost~]#tar-zxvfhttpd-2.2.13.tar.gz[root@localhost~]#cdhttpd-2.2.133.2配置安装路径和加载方式,在此选择动态加载方式,以便节约系统资源。[root@localhosthttpd-2.2.13]#./configu...