Home >Database >Mysql Tutorial >Apache2+php4.3.6+MySQL4.0.20+SSL配置过程_MySQL

Apache2+php4.3.6+MySQL4.0.20+SSL配置过程_MySQL

WBOY
WBOYOriginal
2016-06-01 14:12:261102browse

Apache


  Apache2+php4.3.6+MySQL4.0.20+SSL详细配置过程
  首先安装将需要的文件都放到root目录下:
  1.MySQL-client-4.0.20-0.i386.rpm 2. MySQL-server-4.0.20-0.i386.rpm
  3. httpd-2.0.49.tar.gz 4. php-4.3.6.tar.gz
  
  我们先来安装MySQL,步骤如下:
  # >rpm –Uvh MySQL-server-4.0.20-0.i386.rpm
  # >rpm -Uvh MySQL-client-4.0.20-0.i386.rpm
  # >mysql_install_db  (对数据库初始化)
  # >mysql –u root –p (看看是否能登陆,要求输入密码)
  
  接下来安装Apache2,步骤如下:
  # >tar zxvf httpd-2.0.49.tar.gz
  # >cd httpd-2.0.49
  # >./configure --prefix=/usr/local/apache2 --enable-so --enable-ssl
  (--prefix=/usr/local/apache2 为安装路径,--enable-so支持模块,--enable-ssl支持ssl)
  # >make
  # >make install (安装结束)
  初步测试:
  # >cd /usr/local/apache2/htdoc/
  # >cp index.html.zh-cn.gb2312 index.html
  # >cd ../conf (进入apache的配置文件夹,也就是/usr/local/apache2/conf)
  # >vi http.conf
  查找AddDefaultCharset ISO-8859-1
  将ISO-8859-1替换成GB2312,以解决中文乱码问题
  继续查找AddType,找到AddType application/x-tar .tgz,取消注解,改为如下
  AddType application/x-tar .tgz
  AddType image/x- icon .ico
  AddType application/x-httpd-php .php  (存盘退出)
  # >/usr/local/apache2/bin/apachectl start  
  (启动apache服务器,现在用你的浏览器看一看,没有什么问题就关闭它)
  # >/usr/local/apache2/bin/apachectl stop
  # >/usr/local/apache2/bin/apachectl –l (可以通过这个命令观看已经加载的模块)
  
  最后安装PHP-4.3.6,步骤如下:
  # >tar zxvf php-4.3.6.tar.gz
  # >cd php-4.3.6
  #>./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-config-filepath=/usr/local/php --enable-sockets --with-mysql
  (--prefix=/usr/local/php安装路径)
  (--with-apxs2=/usr/local/apache2/bin/apxs,此段具体我也不太清楚是什么意思,不过一定要自己看看这个文件在那里)
  (--with-config-filepath=/usr/local/php,配置文件的存放路径,一会儿就要将配置文件拷贝到这里)
  (--enable-sockets --with-mysql,对一些功能的支持)
  # >make
  # >make install
  # >cp php.ini-dist /usr/local/php/php.ini (此文件为PHP配置文件.)
  # >cd /usr/local/apache2/conf/
  # >vi httpd.conf
  (编辑httpd.conf文件,察看是否有LoadModule php4_module modules/libphp4.so,默认应该就有了)
  # >/usr/local/apache2/bin/apachectl start
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn