开元周游
德国频道
查看: 1269|回复: 0
打印 上一主题 下一主题

[bkp] Apache+MySQL+PHP under Debian

[复制链接]
1#
发表于 22.12.2003 02:56:53 | 只看该作者
1.Apache Httpd-server 1.3的安装:<br>        <br>        apt-get install apache<br><br>将Apache Httpd-server的缺省语言设置为简体中文:<br><br>添加或者修改下面的几项于配置文件:/etc/apache/httpd.conf:<br><br>LanguagePriority zh-CN en da nl et fr de el it ja ko no pl pt pt-br ltz ca es sv<br>AddLanguage zh-CN .zh-cn<br>AddCharset GB2312 .gb2312 .gb<br>AddDefaultCharset GB2312<br><br>系统缺省的http服务器根目录是/var/www/,可以修改DocumentRoot /var/www和<br>&lt;Directory /var/www/&gt;项改之,<br>缺省的cgi脚本目录是/usr/lib/cgi-bin/,可以修改ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/项改之。<br><br>缺省的主页文件通过下面项修改,这个例子选择index.php为缺省的主页和主页类型:<br>&lt;IfModule mod_dir.c&gt;<br>    DirectoryIndex index.php index.html index.htm index.shtml index.cgi<br>&lt;/IfModule&gt;<br><br><br><br><br>2. MySQL 3.23的安装:<br><br>        apt-get install mysql-server<br>        apt-get install mysql-client<br>        apt-get install mysql-common<br>        apt-get install libmysqlclient10<br>        apt-get install libmyodbc<br><br>为MySQL server的root添加密码:<br>运行mysql,见到提示符mysql&gt;<br>运行:<br><br>grant select,insert,update,delete on *.* to root@&quot;%&quot; identified by &quot;xxxx&quot;;<br>grant select,insert,update,delete on *.* to ODBC@&quot;%&quot; identified by &quot;xxxx&quot;;<br><br>其中xxxx替换为希望设置的密码.<br><br><br><br><br>3.PHP4的安装:<br><br>        apt-get install php4<br><br>去掉/etc/apache/httpd.conf文件下面的几项的注释:<br><br>LoadModule php4_module /usr/lib/apache/1.3/libphp4.so<br><br>AddType application/x-httpd-php3 .php3<br>AddType application/x-httpd-php3-source .phps<br>AddType application/x-httpd-php .php<br>AddType application/x-httpd-php-source .phps<br><br>接着还得安装一些用于操作数据库的一些php函数库:<br><br>        apt-get install php4-mysql<br><br><br><br><br>4.简单测试:<br><br>写一个简单index.php文件,察看安装信息,其内容是:<br><br>&lt;?php<br>phpinfo();<br>?&gt;<br><br>然后建立一个目录/var/www/info/,将这个文件存放进入,用浏览器打开<br>http : //localhost/info/,如果看到详细的info页面,检查相应的项目,比如:<br><br>apache<br><br>APACHE_INCLUDE   <br>APACHE_TARGET   <br>Apache Version Apache/1.3.26 <br>Apache Release 10326100 <br>Apache API Version 19990320 <br>Hostnameort hehe-9x.hehe-9x:80 <br>User/Group www-data(33)/33 <br>Max Requests Per Child: 100 - Keep Alive: on - Max Per Connection: 100 <br>Timeouts Connection: 300 - Keep-Alive: 15 <br>Server Root /etc/apache <br>Loaded Modules mod_php4, mod_setenvif, mod_unique_id, mod_expires, mod_auth, mod_access, <br>mod_rewrite, mod_alias, mod_userdir, mod_cgi, mod_dir, mod_autoindex, mod_status, <br>mod_negotiation, mod_mime, mod_mime_magic, mod_log_config, mod_macro, mod_so, http_core <br><br><br>mysql<br><br>MySQL Support enabled <br>Active Persistent Links 0 <br>Active Links 0 <br>Client API version 3.23.49 <br>MYSQL_MODULE_TYPE external <br>MYSQL_SOCKET /var/run/mysqld/mysqld.sock <br>MYSQL_INCLUDE -I/usr/include/mysql <br>MYSQL_LIBS -L/usr/lib -lmysqlclient -L/usr/lib -z <br><br>6. Done&#33;
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

站点信息

站点统计| 举报| Archiver| 手机版| 小黑屋

Powered by Discuz! X3.2 © 2001-2014 Comsenz Inc.

GMT+1, 27.11.2024 05:17

关于我们|Apps

() 开元网

快速回复 返回顶部 返回列表