Linux AS4U4 安装LMAP+GD+phpMyAdmin+Zend
系统环境:Linux as4 update4(32bit)
撰写人:hx100
撰写日期:2009/12/30 Hangzhou
Blog:[url]http://hi.baidu.com/hx10[/url]
准备软件:
1. httpd-2.2.14.tar.gz
[url]http://httpd.apache.org/download.cgi[/url]
2. php-5.2.12.tar.gz
[url]http://www.php.net/downloads.php[/url]
3. mysql-5.0.89-linux-i686-icc-glibc23.tar.gz [url]http://dev.mysql.com/downloads/mysql/5.0.html#downloads[/url]
4. curl-7.15.0.tar.gz
[url]http://dl.ambiweb.de/mirrors/curl.haxx.se/curl-7.15.0.tar.gz[/url]
5. freetype-2.1.10.tar.gz
[url]http://mirror.its.uidaho.edu/pub/savannah/freetype/[/url]
6. jpegsrc.v6b.tar.gz
[url]http://download.chinaunix.net/download/0006000/5095.shtml[/url]
7. libpng-1.2.8.tar.gz
[url]http://nchc.dl.sourceforge.net/sourceforge/libpng/libpng-1.2.8.tar.gz[/url]
8. libxml2-2.6.19.tar.gz
[url]http://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/libxml2-2.6.19.tar.gz[/url]
9. libxslt-1.1.15.tar.gz
[url]http://ftp.gnome.org/pub/GNOME/sources/libxslt/1.1/libxslt-1.1.15.tar.gz[/url]
10. zlib-1.2.3.tar.gz
[url]http://www.zlib.net/zlib-1.2.3.tar.gz[/url]
11. gd-2.0.33.tar.gz
[url]http://www.boutell.com/gd/http/gd-2.0.33.tar.gz[/url]
12. libmcrypt-2.5.7.tar.gz
[url]ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/libmcrypt/[/url]
13. ZendOptimizer-3.3.9-linux-glibc23-i386.tar.gz
[url]http://www.zend.com/en/products/guard/downloads[/url]
14. phpMyAdmin-3.2.4-all-languages.tar.gz
[url]http://www.phpmyadmin.net/home_page/index.php[/url]
以上软件都放到/usr/local/src目录下,设置该目录属性#chmod –R 755 /usr/local/src
第一步、安装apache
1.安装
[root@TestServer src]#tar –zxvf httpd-2.2.14.tar.gz
[root@TestServer src] #cd httpd-2.2.14
[root@TestServer httpd-2.2.14]#
./configure --prefix=/usr/local/apache --enable-modules=so --enable-rewrite
[root@TestServer httpd-2.2.14]#make
[root@TestServer httpd-2.2.14]#make install
[root@TestServer httpd-2.2.14]# vi /usr/local/apache/conf/httpd.conf
#ServerName [url]www.example.com:80[/url] 在其下增加
ServerName 127.0.0.1:80
保存退出。
2.启停apache
启动apache
# /usr/local/apache/bin/apachectl start
用浏览器查看[url]http://127.0.0.1[/url],得到it works,说明apache已经配置成功了。
停止apache
#/usr/local/apache/bin/apachectl stop
3.配置apache开机自动启动(两种方法)
第一种:
在/etc/rc.d/rc.local 文件中加入一行
/usr/local/apache/bin/apachectl start
这样每次重新启动系统以后,apache 也会随系统一起启动.
第二种:
或者将apache 安装为系统服务
# cp /usr/local/apache/bin/apachectl /etc/rc.d/init.d/httpd
#cd /etc/rc.d/init.d
#vi /etc/rc.d/init.d/httpd
添加以下两行内容(在#!/bin/sh下面)
# chkconfig: 2345 10 90
# description: Activates/Deactivates Apache Web Server
最后,运行chkconfig 把Apache 添加到系统的启动服务组里面:
# chkconfig --add httpd
# chkconfig httpd on
第二步、安装Mysql
1.安装
[root@TestServer mysql]# groupadd mysql
[root@TestServer mysql]# useradd -g mysql mysql
[root@TestServer mysql src]]# tar zxvf mysql-5.0.89-linux-i686-icc-glibc23.tar.gz
[root@TestServer mysql src]]#mv mysql-5.0.89-linux-i686-icc-glibc23 ../ mysql
[root@TestServer mysql]# cd ../mysql
[root@TestServer mysql]# chown -R root /usr/local/mysql
[root@TestServer mysql]# chgrp -R mysql /usr/local/mysql
[root@TestServer mysql]# chown -R mysql /usr/local/mysql/data
[root@TestServer mysql]# scripts/mysql_install_db --user=mysql
[root@TestServer mysql]# chown -R root .
[root@TestServer mysql]# chown -R mysql data
[root@TestServer mysql]# chgrp -R mysql .
[root@TestServer mysql]#cp support-files/my-medium.cnf /etc/my.cnf
[root@TestServer mysql]# /usr/local/mysql/bin/mysqld_safe --user=mysql&
如出现Starting mysqld daemon with databases from /usr/local/mysql/data
代表正常启动mysql服务了,按Ctrl + C跳出
验证是否启动成功
[root@TestServer mysql]#ps -ef |grep '3306'
[root@TestServer mysql]#ps -ef |grep mysql
出现mysql的相关信息,说明启动成功了
2.登陆mysql
[root@TestServer bin]# bin/mysql -u root -p
Enter password: //第一次没有密码,直接回车进入数据库
设置密码:
[root@TestServer bin]#./mysqladmin –u root password “123456” //此处密码为123456


网友评论(0)