德国开元华人社区 开元周游
标题:
[bkp] Apache+MySQL+PHP under Debian
[打印本页]
作者:
cyan
时间:
22.12.2003 02:56
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><Directory /var/www/>项改之,<br>缺省的cgi脚本目录是/usr/lib/cgi-bin/,可以修改ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/项改之。<br><br>缺省的主页文件通过下面项修改,这个例子选择index.php为缺省的主页和主页类型:<br><IfModule mod_dir.c><br> DirectoryIndex index.php index.html index.htm index.shtml index.cgi<br></IfModule><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><br>运行:<br><br>grant select,insert,update,delete on *.* to root@"%" identified by "xxxx";<br>grant select,insert,update,delete on *.* to ODBC@"%" identified by "xxxx";<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><?php<br>phpinfo();<br>?><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>Hostname
ort 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!
欢迎光临 德国开元华人社区 开元周游 (https://forum.kaiyuan.de/)
Powered by Discuz! X3.2