一、软件获取
apache_1.3.6.tar.gz
php-3.0.8.tar.gz
mysql-3.22.21-pc-linux-gnu-i686.tar.gz
phpMyAdmin_2.0.1.tar.gz从 http://www.htmlwizard.net/phpMyAdmin/ 取得注意:
以上均为源代码而非RPM包
二、软件安装
以root登录,将以上文件均拷贝至/root下
1.安装MySQL
#tar -zvxf mysql-3.22.21-pc-linux-gnu-i686.tar.gz
//将产生mysql-3.22.21-pc-linux-gnu-i686目录
#mv mysql-3.22.21-pc-linux-gnu-i686 /usr/local/mysql
//移到 /usr/local/mysql
#cd /usr/local/mysql
#./configure --prefix=/usr/local/mysql
#cd MySQL安装完毕(我下载的是bin包)
2.安装Apache及php3
#tar xvzf apache_1.3.6.tar.gz 产生apache_1.3.6目录
#tar xvzf php-3.0.8.tar.gz 产生php-3.0.8目录
#cd apache_1.3.6#./configure --prefix=/usr/local/apache
把Apache的安装目录定为/usr/local/apache
#cd ../php-3.0.8
#./configure --with-mysql=/usr/local/mysql --with-apache=../apache_1.3.6
--enable-track-vars
配置支持MySQL、作为Apache功能模块、跟踪变量有效
#make; make install
PHP安装完毕
#cd ../apache_1.3.6
#./configure --prefix=/usr/local/apache --activate-
module=src/modules/php3/libphp3.a
#make; make installAPACHE安装完毕
#cd ../php-3.0.8#cp php3.ini-dist /usr/local/lib/php3.ini
把php.ini文件拷到/usr/local/lib/目录下.
#cd /usr/local/apache/conf
#vi httpd.conf 找到
AddType application/x-httpd-php3 .php3把它前头的#号给删了当然也可加一行
AddType application/x-httpd-php3 .asp这样用FrontPage编?shy;会方便一点
3.安装phpMyAdminL
#tar -zvxf phpMyAdmin_2.0.1.tar.gz 产生phpMyAdmin-2.0.1目录
#mv phpMyAdmin_2.0.1 /usr/local/apache/htdocs/phpMyAdmin 移/usr/local/mysql
#cd /usr/local/apache/htdocs/phpMyAdmin
#chmod a+r * 置为可读
三、软件运行
启动MySQL
#cd /usr/local/mysql/
#bin/safe_mysqld &测试:
#bin/mysql -u root 默认没有设口令
mysql>use mysql 打开mysql数据库
mysql>select * from user; 从表user中读数据,别忘加;号
mysql>exit这样就算可以了,先不急着加口令
启动Apache: /usr/local/apache/bin/apachectl start测试:
#telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.Escape character is '^]'.
HEAD / HTTP /1.1 输入并加两次回车
HTTP/1.1 200 OK
Date: Wed, 23 Jun 1999 02:51:27
GMTServer: Apache/1.3.6(Unix)
PHP/3.0.8Last-Modified: Wed, 20 May 1998 14:59:42
GMTETag: "2e341-656-3562efde"Accept-Ranges: bytesContent-Length: 622
Connection:
closeContent-Type: text/htmlX-Pad: avoid browser bug
Connection closed by foreign host
再用浏览器测试一下吧
#cd /usr/local/apache/htdocs
#vi test.php3在文件里敲入:
并存盘退出再用浏览器看一下这个文件,是不是一大串信息出来了?
使用phpMyAdmin用浏览器打开/phpMyAdmin/index.php3 注意大小写
四、MySQL及phpMyAdmin的使用
1.MySQL的用户及口令设置
#cd /usr/local/mysql
#bin/mysqladmin -u root password '新口令'
#bin/mysql -u root -pEnter password: 输入口令
mysql>use mysql
mysql>update user set select_priv='y';使任何人均可读数据库
mysql>flush privileges; 使设置有效
mysql>exit其它设置请参见相关文档
2.phpMyAdmin设置
设置口令后,phpMyAdmin也要作相关设置:
#cd /usr/local/apache/htdocs/phpMyAdmin
#vi config.inc.php3将第8行改为
$cfgServers[1]['adv_auth'] = true; //这样会问用户名和口令将第47行改为
$cfgMysqladmin = "/usr/local/mysql/bin/mysqladmin";
//用于重新启动MySQL将第59行改为require("chinese_gb.inc.php3");
//简体中文显示存盘退出用浏览器打开/phpMyAdmin/index.php3 注意大小写。这
下好了,都是亲切的中文提示....
欢迎访问最专业的网吧论坛,无盘论坛,网吧经营,网咖管理,网吧专业论坛https://bbs.txwb.com |
关注天下网吧微信,了解网吧网咖经营管理,安装维护:
本文来源:网络收集 作者:佚名