免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 9988 | 回复: 13
打印 上一主题 下一主题

[Web] Apache-2.0.43+Php-4.2.3+Mysql-3.23.53 在 linux 下的安装 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-01-16 12:25 |只看该作者 |倒序浏览
作者:lmw921273
本人最近决定将原 Apache-1.3.27+php-4.1.0+Mysql-3.23.47 更换为 Apache-2.0.43+Php-4.2.3+Mysql-3.23.53,本人原先使用的 php 能提供最大 20M 的文件上载功能,支持 session 。当本人决定更新系统时,到网上查阅了不少文档,发现很少有提到成功使用Apache-2.0.43+Php-4.2.3+Mysql-3.23.53,只好自己动手安装配置,在经过几次反复设置后,终于成功,现将本人的安装过程提供给广大初学者,使大家少走冤枉路,如有不到之处,还请不吝指正。

一、软件下载
分别下载软件以下软件:
Apache-2.0.43 (www.apache.org)
Php-4.2.3 (www.php.net)
Mysql-3.23.53 (www.mysql.com)

二、准备安装
由于本人将所有软件的源代码放置在目录 /home/src 下 ,安装目录为 /server ,下载后的源代码包在/root目录下,故执行以下操作:
mkdir /home/src
mkdir /server
groupadd mysql
useradd -g mysql -d /home/mysql mysql //建立mysql组及用户
cd /home/src
tar zxvf /root/mysql-3.23.53.tar.gz
tar zxvf /root/httpd-2.0.43.tar.gz
tar zxvf /root/php-4.2.3.tar.gz

三、安装配置过程
使用 vi 编辑一 shell 文件,内容如下:
-----------------------------------

cd /home/src/mysql-3.23.53
./configure --prefix=/server/mysql
make
make install
/server/mysql/bin/mysql_install_db

chown -R root /server/mysql
chgrp -R mysql /server/mysql

chown -R root /server/mysql/bin
chgrp -R mysql /server/mysql/bin

chown -R root /server/mysql/var
chgrp -R mysql /server/mysql/var
chmod 777 /server/mysql/var

chown -R root /server/mysql/var/mysql
chgrp -R mysql /server/mysql/var/mysql
chmod 777 /server/mysql/var/mysql

chown -R root /server/mysql/var/mysql/*
chgrp -R mysql /server/mysql/var/mysql/*
chmod 777 /server/mysql/var/mysql/*

chmod 777 /server/mysql/lib/mysql/libmysqlclient.a
#安装 mysql-3.23.53

cd /home/src/httpd-2.0.43
./configure --prefix=/server/apache --enable-so
make
make install
#安装 Apache-2.0.43

cd /home/src/php-4.2.3
./configure --with-mysql=/server/mysql --with-apxs2=/server/apache/bin/apxs \
--eable-track-vars --enable-force-cgi-redirect --enable-pic \
--enable-inline-optimiation --enable-memory-limit --enable-bcmath \
--enable-shmop --enable-versioning \
-enable-calendar --enable-dbx --enable-dio --enable-mcal \
--with-config-file-path=/server/apache/conf
make
make install
cp php.ini-dist /server/apache/conf/php.ini
#安装php-4.2.3 ,以上某些模块可不使用,--with-config-file-path=/server/apache/conf 指定
#php的配置文件在目录 /server/apache/conf

ln -s /server/apache/bin/apachectl /bin/apache
ln -s /server/mysql/bin/mysql /bin/mysql
#创建符号连接
----------------------------------------------------

四、修改配置文件
vi /server/apache/conf/httpd.conf
# 加入以下行(装载php4模块并指定.php 文件)
# LimitRequestBody (指定php处理的请求数据大小,以下指定为 20M)

LoadModule php4_module modules/libphp4.so
<Files *.php>;
SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 20971520
</Files>;

#注解以下行(在文本前加#),使apache显示中文,具体原因未知
ForceLanguagePriority Prefer Fallback
AddDefaultCharset ISO-8859-1

#加入默认的引导文件index.php(找到DirectoryIndex,修改如下:)
DirectoryIndex index.html index.html.var index.php

#指定网站目录(假设为 /apache 目录)
DocumentRoot "/apache"

vi /server/apache/conf/php.ini
#找到并修改以下参数
max_execution_time = 600 ;最大运行时间 600 秒
max_input_time = 600 ;最大输出时间 600秒
memory_limit = 20M ;最大内存限制 20M
file_uploads = On ;允许上载文件
upload_max_filesize = 20M ;最大文件大小 20M
post_max_size = 20M ;php可接受的 post 方法大小 20M
session.auto_start = 1 ;session自动启动


五、运行

#启动mysql
/server/mysql/bin/safe_mysqld --user=mysql &amp;
#停止mysql
/server/mysql/bin/mysqladmin shutdown

#启动apache
apache start
#停止apache
apache stop

mkdir /apache
echo "<?" >;/apache/index.php
echo "phpinfo();" >;>;/apache/index.php
echo "?>;" >;>;/apache/index.php
#生成/apache/index.php 文件

在浏览器上输入 linux 机器网址,php 的配置信息将显示出来。

一切OK! 现在您已经拥有了一个自己的网站,嘿嘿!

论坛徽章:
0
2 [报告]
发表于 2003-03-20 17:07 |只看该作者

Apache-2.0.43+Php-4.2.3+Mysql-3.23.53 在 linux 下的安装

按照你的方法libphp4.so 没有!!

论坛徽章:
0
3 [报告]
发表于 2003-03-23 10:03 |只看该作者

Apache-2.0.43+Php-4.2.3+Mysql-3.23.53 在 linux 下的安装

这样PHP4 作为apache的动态模块加载。
PHP_AUTH_USER,PHP_AUTH_PWP_AUTH_TYPE
功能无效,无法使用WWW验证

论坛徽章:
0
4 [报告]
发表于 2003-03-25 08:29 |只看该作者

Apache-2.0.43+Php-4.2.3+Mysql-3.23.53 在 linux 下的安装

我有同样的问题!不知道hmkart能否给我答案!

论坛徽章:
0
5 [报告]
发表于 2003-03-26 12:29 |只看该作者

Apache-2.0.43+Php-4.2.3+Mysql-3.23.53 在 linux 下的安装

更改php.ini时差了一步,没有把register_globals = Off
改为register_globals = On
还有httpd.conf要把AddDefaultCharset ISO-8859-1

改为:AddDefaultCharset gb2312才行,不然老是乱码

论坛徽章:
0
6 [报告]
发表于 2003-03-26 12:29 |只看该作者

Apache-2.0.43+Php-4.2.3+Mysql-3.23.53 在 linux 下的安装

更改php.ini时差了一步,没有把register_globals = Off
改为register_globals = On
还有httpd.conf要把AddDefaultCharset ISO-8859-1

改为:AddDefaultCharset gb2312才行,不然老是乱码

论坛徽章:
0
7 [报告]
发表于 2003-03-26 12:30 |只看该作者

Apache-2.0.43+Php-4.2.3+Mysql-3.23.53 在 linux 下的安装

更改php.ini时差了一步,没有把register_globals = Off
改为register_globals = On
还有httpd.conf要把AddDefaultCharset ISO-8859-1

改为:AddDefaultCharset gb2312才行,不然老是乱码

论坛徽章:
0
8 [报告]
发表于 2003-05-13 21:25 |只看该作者

Apache-2.0.43+Php-4.2.3+Mysql-3.23.53 在 linux 下的安装

怎么解决的阿?

论坛徽章:
0
9 [报告]
发表于 2003-05-15 00:19 |只看该作者

Apache-2.0.43+Php-4.2.3+Mysql-3.23.53 在 linux 下的安装

他是不是在原有apache基础上升级的啊?
这个文件确实没有
不知道他怎么装的
libphp4.so

论坛徽章:
0
10 [报告]
发表于 2003-06-12 17:07 |只看该作者

Apache-2.0.43+Php-4.2.3+Mysql-3.23.53 在 linux 下的安装

???

我装了后怎么有这个文件啊?     倒是网页打开的是那几句代码。 :(
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP