📄 1809.html
字号:
<DIV align=right><FONT class=normalfont>当前位置:
<A href="index.html" tppabs="http://www.linuxhero.com/docs/index.html">本站首页</A>
<font color="#FF6699">>></font>
<A href="type30.html" tppabs="http://www.linuxhero.com/docs/type30.html">mysql</A> | <A href="copyright.html" tppabs="http://www.linuxhero.com/docs/copyright.html">版权说明</A></font></DIV>
</TD>
<TD><IMG height=22 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=1
border=0></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=10 cellPadding=0 width="100%" bgColor=#ffffff
border=0>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=3 width="100%" border=0>
<TR>
<TD vAlign=top align=middle width="60%">
<TABLE cellSpacing=0 cellPadding=0 width="100%"
background="images/back.gif" tppabs="http://www.linuxhero.com/docs/images/back.gif" border=0>
<TBODY>
<TR>
<TD vAlign=top width="80%">
<DIV align=center>
<FORM action="search.html" tppabs="http://www.linuxhero.com/docs/search.html" method=get>
</FORM>
<TABLE cellSpacing=0 cellPadding=0 width="95%"
border=0><TBODY>
<TR>
<TD background="images/bgi.gif" tppabs="http://www.linuxhero.com/docs/images/bgi.gif"
height=30></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=3 width="95%"
align=center border=0>
<TBODY>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=3 width="100%"
border=0>
<TBODY>
<TR>
<TD vAlign=top>
<p><FONT class=normalfont><B><font color=blue>安装</font></B></FONT><BR><FONT class=smallfont color=#ff9900>2004-04-23 15:18 pm</FONT><BR><FONT class=normalfont>作者:作者<br>来自:Linux知识宝库<br>联系方式:无名<br><br> 一、软件获取<br>
apache_1.3.6.tar.gzphp-3.0.8.tar.gzmysql-3.22.21-pc-linux-gnu-i686.<br>
tar.gzphpMyAdmin_2.0.1.tar.gz 从http://www.htmlwizard.net/phpMyAdmin/取<br>
得注意:以上均为源代码而非RPM包<br>
二、软件安装<br>
以root登录,将以上文件均拷贝至/root下1.安装MySQL<br>
#tar -zvxf mysql-3.22.21-pc-linux-gnu-i686.tar.gz 产生mysql-3.22.<br>
21-pc-linux-gnu-i686目录#mv mysql-3.22.21-pc-linux-gnu-i686<br>
/usr/local/mysql 移到/usr/local/mysql#cd /usr/local/mysql#./configure<br>
--prefix=/usr/local/mysql#cdMySQL安装完毕(我下载的是bin包)<br>
2.安装Apache及php3<br>
#tar xvzf apache_1.3.6.tar.gz 产生apache_1.3.6目录#tar xvzf php-3.<br>
0.8.tar.gz 产生php-3.0.8目录#cd apache_1.3.6#./configure<br>
--prefix=/usr/local/apache 把Apache的安装目录定为/usr/local/apache#cd .<br>
./php-3.0.8#./configure --with-mysql=/usr/local/mysql --with-apache=..<br>
/apache_1.3.6 --enable-track-vars<br>
配置支持MySQL、作为Apache功能模块、跟踪变量有效#make; make<br>
installPHP安装完毕#cd ../apache_1.3.6#./configure<br>
--prefix=/usr/local/apache --activate-module=src/modules/php3/libphp3.<br>
a#make; make installAPACHE安装完毕#cd ../php-3.0.8#cp php3.ini-dist<br>
/usr/local/lib/php3.ini 把php.ini文件拷到/usr/local/lib/目录下.#cd<br>
/usr/local/apache/conf#vi httpd.conf找到AddType application/x-httpd-php3<br>
.php3把它前头的#号给删了当然也可加一行AddType<br>
application/x-httpd-php3 .asp这样用FrontPage编辑会方便一点3.安装<br>
phpMyAdminL<br>
#cd#tar -zvxf phpMyAdmin_2.0.1.tar.gz 产生phpMyAdmin-2.0.1目录#mv<br>
phpMyAdmin_2.0.1 /usr/local/apache/htdocs/phpMyAdmin 移到<br>
/usr/local/mysql#cd /usr/local/apache/htdocs/phpMyAdmin#chmod a+r * 置为<br>
可读<br>
<br>
三、软件运行<br>
启动MySQL#cd /usr/local/mysql/#bin/safe_mysqld &测试:<br>
#bin/mysql -u root 默认没有设口令mysql>use mysql 打开mysql数据库<br>
mysql>select * from user; 从表user中读数据,别忘加;号mysql>exit这样就算<br>
可以了,先不急着加口令<br>
启动Apache/usr/local/apache/bin/apachectl start测试:<br>
#telnet localhost 80Trying 127.0.0.1...Connected to localhost.Escape<br>
character is '^]'.HEAD / HTTP /1.1 输入并加两次回车<br>
HTTP/1.1 200 OKDate: Wed, 23 Jun 1999 02:51:27 GMTServer: Apache/1.<br>
3.6 (Unix) PHP/3.0.8Last-Modified: Wed, 20 May 1998 14:59:42 GMTETag:<br>
"2e341-656-3562efde"Accept-Ranges: bytesContent-Length: 1622Connection:<br>
closeContent-Type: text/htmlX-Pad: avoid browser bug<br>
Connection closed by foreign host<br>
再用浏览器测试一下吧#cd /usr/local/apache/htdocs#vi test.php3在文件<br>
里敲入:<br>
并存盘退出再用浏览器看一下这个文件,是不是一大串信息出来了?<br>
使用phpMyAdmin用浏览器打开/phpMyAdmin/index.php3 注意大小写<br>
<br>
四、MySQL及phpMyAdmin的使用<br>
1.MySQL的用户及口令设置<br>
#cd /usr/local/mysql#bin/mysqladmin -u root password '新口令<br>
'#bin/mysql -u root -pEnter password: 输入口令mysql>use<br>
mysqlmysql>update user set select_priv='y'; 使任何人均可读数据库<br>
mysql>flush privileges; 使设置有效mysql>exit其它设置请参见相关文档<br>
2.phpMyAdmin设置<br>
设置口令后,phpMyAdmin也要作相关设置:<br>
#cd /usr/local/apache/htdocs/phpMyAdmin#vi config.inc.php3将第8行改<br>
为$cfgServers[1]['adv_auth'] = true; //这样会问用户名和口令将第47行改为<br>
$cfgMysqladmin = "/usr/local/mysql/bin/mysqladmin"; //用于重新启动MySQL<br>
将第59行改为require("chinese_gb.inc.php3"); //简体中文显示存盘退出用浏览<br>
器打开/phpMyAdmin/index.php3 注意大小写<br>
这下好了,都是亲切的中文提示....<br>
<br>
<br>
<br>
[目录]<br>
<br>
--------------------------------------------------------------------------------<br>
<br>
<br>
apache+php3+mysql<br>
<br>
================================================================================<br>
*安装apache-devel rpm包.<br>
*安装MySQL相关的包.<br>
rpm -ivh MySQL-3.22.25-1.i386.rpm<br>
rpm -ivh MySQL-client-3.22.25-1.i386.rpm<br>
rpm -ivh MySQL-devel-3.22.25-1.i386.rpm<br>
*下载php3源文件php-3.0.tar.gz<br>
*解开源文件<br>
tar xzvf php-3.0.tar.gz<br>
*进入php-3.0源文件目录<br>
./configure --with-mysql=/usr --with-apxs=/usr/sbin/apxs --with-config-file<br>
-path=/etc/httpd (还有其他选项,可以运行 ./configure --help 看看)<br>
*建一个modules目录<br>
mkdir modules<br>
*进入regex目录<br>
运行 make r (这一步可能不必要)<br>
运行 make lib<br>
*退回上一级目录<br>
运行 make install<br>
* cp modules/libphp3.so /etc/httpd/modules/<br>
* cp php3.ini-dist /etc/httpd/php3.ini<br>
* 修改/etc/httpd/conf/httpd.conf 加入<br>
LoadModule php3_module modules/libphp3.so<br>
AddModule mod_php3.c<br>
修改/etc/httpd/conf/srm.conf 加入<br>
AddType application/x-http-php3 .php3<br>
*重起apache<br>
/etc/rc.d/init.d/httpd restart<br>
*测试<br>
查看mysqld是否已经运行.如果没有,先运行mysqld<br>
将php3源文件下tests目录下的mysql文件拷贝到 /home/httpd/html目录下<br>
lynx localhost/mysql.php3<br>
如果有问题,可以将mysql.php3中的127.0.0.1改为localhost
</FONT><br>
</TD>
</TR>
<TR>
<TD colSpan=2><FONT
class=middlefont></FONT><BR>
<FONT
class=normalfont>全文结束</FONT> </TD>
</TR>
<TR>
<TD background="images/dot.gif" tppabs="http://www.linuxhero.com/docs/images/dot.gif" colSpan=2
height=10></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV></TD>
<TD vAlign=top width="20%"
background="images/line.gif" tppabs="http://www.linuxhero.com/docs/images/line.gif" rowSpan=2>
<DIV align=center>
<table class=tableoutline cellspacing=1 cellpadding=4
width="100%" align=center border=0>
<tr class=firstalt>
<td noWrap background="images/bgline.gif" tppabs="http://www.linuxhero.com/docs/images/bgline.gif" colspan=2 height=21>
<font class=normalfont><b>所有分类</b></font></td>
</tr>
<tr class=secondalt> <td noWrap width=27%> <font class=normalfont>1:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type1.html" tppabs="http://www.linuxhero.com/docs/type1.html">非技术类</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>2:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type2.html" tppabs="http://www.linuxhero.com/docs/type2.html">基础知识</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>3:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type3.html" tppabs="http://www.linuxhero.com/docs/type3.html">指令大全</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>4:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type4.html" tppabs="http://www.linuxhero.com/docs/type4.html">shell</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>5:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type5.html" tppabs="http://www.linuxhero.com/docs/type5.html">安装启动</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>6:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type6.html" tppabs="http://www.linuxhero.com/docs/type6.html">xwindow</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>7:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type7.html" tppabs="http://www.linuxhero.com/docs/type7.html">kde</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>8:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type8.html" tppabs="http://www.linuxhero.com/docs/type8.html">gnome</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>9:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type9.html" tppabs="http://www.linuxhero.com/docs/type9.html">输入法类</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>10:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type10.html" tppabs="http://www.linuxhero.com/docs/type10.html">美化汉化</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>11:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type11.html" tppabs="http://www.linuxhero.com/docs/type11.html">网络配置</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>12:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type12.html" tppabs="http://www.linuxhero.com/docs/type12.html">存储备份</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>13:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type13.html" tppabs="http://www.linuxhero.com/docs/type13.html">杂项工具</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>14:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type14.html" tppabs="http://www.linuxhero.com/docs/type14.html">编程技术</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>15:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type15.html" tppabs="http://www.linuxhero.com/docs/type15.html">网络安全</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>16:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type16.html" tppabs="http://www.linuxhero.com/docs/type16.html">内核技术</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>17:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type17.html" tppabs="http://www.linuxhero.com/docs/type17.html">速度优化</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>18:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type18.html" tppabs="http://www.linuxhero.com/docs/type18.html">apache</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>19:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type19.html" tppabs="http://www.linuxhero.com/docs/type19.html">email</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>20:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type20.html" tppabs="http://www.linuxhero.com/docs/type20.html">ftp服务</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>21:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type21.html" tppabs="http://www.linuxhero.com/docs/type21.html">cvs服务</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>22:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type22.html" tppabs="http://www.linuxhero.com/docs/type22.html">代理服务</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>23:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type23.html" tppabs="http://www.linuxhero.com/docs/type23.html">samba</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>24:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type24.html" tppabs="http://www.linuxhero.com/docs/type24.html">域名服务</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>25:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type25.html" tppabs="http://www.linuxhero.com/docs/type25.html">网络过滤</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>26:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type26.html" tppabs="http://www.linuxhero.com/docs/type26.html">其他服务</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>27:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type27.html" tppabs="http://www.linuxhero.com/docs/type27.html">nfs</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>28:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type28.html" tppabs="http://www.linuxhero.com/docs/type28.html">oracle</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>29:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type29.html" tppabs="http://www.linuxhero.com/docs/type29.html">dhcp</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>30:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type30.html" tppabs="http://www.linuxhero.com/docs/type30.html">mysql</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>31:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type31.html" tppabs="http://www.linuxhero.com/docs/type31.html">php</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>32:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type32.html" tppabs="http://www.linuxhero.com/docs/type32.html">ldap</a></font></td> </tr> </table></td></tr> </table>
</DIV></TD></TR>
<TR vAlign=top>
<TD width="80%">
<DIV align=center><BR>
</DIV>
</TD></TR></TBODY></TABLE></TD></TR>
</TABLE></TD></TR>
</TABLE>
<TABLE cellSpacing=0 cellPadding=4 width="100%" bgColor=#eeeeee
border=0><TBODY>
<TR>
<TD width="50%">
<P><FONT class=middlefont>版权所有 © 2004 <A
href="mailto:bjchenxu@sina.com">linux知识宝库</A><BR>
违者必究. </FONT></P>
</TD>
<TD width="50%">
<DIV align=right><FONT class=middlefont>Powered by: <A
href="mailto:bjchenxu@sina.com">Linux知识宝库</A> Version 0.9.0 </FONT></DIV>
</TD></TR></TBODY></TABLE>
<CENTER></CENTER></TD></TR>
</TABLE></CENTER></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -