当前位置: 代码网 > 科技>操作系统>Unix > Freebsd7.0 Apache2.2+MySQL5+PHP5安装和配置方法

Freebsd7.0 Apache2.2+MySQL5+PHP5安装和配置方法

2008年09月08日 Unix 我要评论
Freebsd7.0 Apache2.2+MySQL5+PHP5安装和配置方法 一、安装apache2.2.8   首先去http://www.apache.org 网站上下载apache2.2.8源码包   解压缩   #tar zxvf httpd-2.2.8.tar.gz   得到 httpd-2.2.8文件夹   #cd http... 08-09-08

 # chgrp -r mysql .         #设定mysql组能够访问/usr/local/mysql

  设置完成后,基本上就装好了,好了, 我们运行一下我们的mysql:

  # /usr/local/mysql/bin/mysqld_safe --user=mysql &

  出现如下提示:

  # /usr/local/mysql/bin/mysqld_safe --user=mysql &

  [2] 7022

  # starting mysqld daemon with databases from /usr/local/mysql/var

  # ps -ef

  ps: process environment requires procfs(5)

  pid tt stat   time command

  1040 v0 is+  0:00.00 /usr/libexec/getty pc ttyv0

  723 v1 is+  0:00.00 /usr/libexec/getty pc ttyv1

  724 v2 is+  0:00.00 /usr/libexec/getty pc ttyv2

  725 v3 is+  0:00.00 /usr/libexec/getty pc ttyv3

  726 v4 is+  0:00.00 /usr/libexec/getty pc ttyv4

  727 v5 is+  0:00.00 /usr/libexec/getty pc ttyv5

  728 v6 is+  0:00.00 /usr/libexec/getty pc ttyv6

  729 v7 is+  0:00.00 /usr/libexec/getty pc ttyv7

  7022 p0 s   0:00.01 /bin/sh /usr/local/mysql/bin/mysqld_safe --user=mysql

  7038 p0 r+  0:00.00 ps -ef

  上述信息表明mysql安装成功

  为了每次系统重启后都能运行mysql,可以写一个脚本放到 /etc/rc.d目录下,用来运行mysql,我们写一个脚本mysql_start.sh

  #! /bin/sh

  /usr/local/mysql/bin/mysqld_safe&

  然后保存到/etc/rc.d目录下,那么以后reboot系统后都能启动mysql了.

  mysql的安装是最顺利的一个

  三、安装php

  去http://www.php.net网站上去下载php-5.2.5的源码包

解压缩

  #tar zxvf php-5.2.5.tar.gz

  #cd php-5.2.5

  配置

  # ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql

  出现如下错误提示:

  sorry, i cannot run apxs. possible reasons follow:

  1. perl is not installed

  2. apxs was not found. try to pass the path using --with-apxs2=/path/to/apxs

  3. apache was not built using --enable-so (the apxs usage page is displayed)

  the output of /usr/local/apache/bin/apxs follows:

  ./configure: /usr/local/apache/bin/apxs: not found

  configure: error: aborting

  表明没有安装perl

  下载perl进行安装(去http://www.perl.com下载最新版本,我从别的网站下载了个5.8版本make时死活过不去)

  #tar xzvf perl-5.10.0.tar.gz

  #sh configure -de

  #make

  #make test

  #make install

  安装完perl后还是提示上述错误,

  我就去apche的源程序中又来了一次下面的动作

  配置

  #./configure --prefix=/usr/local/apache --enable-so --enable-module=rewrite

  编译

  #make

  安装

  #make install

  后重新configure php时出现如下错误:

  configure: error: xml2-config not found. please check your libxml2 installation.

  安装libxml2

  #tar zxvf libxml2-2.6.31.tar.gz

  #cd libxm2-2.6.31

  #./configure

  #make

  #make install

  安装libxml2后,重新configure php 出现如个错误提示:

(0)

相关文章:

版权声明:本文内容由互联网用户贡献,该文观点仅代表作者本人。本站仅提供信息存储服务,不拥有所有权,不承担相关法律责任。 如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 2386932994@qq.com 举报,一经查实将立刻删除。

发表评论

验证码:
Copyright © 2017-2025  代码网 保留所有权利. 粤ICP备2024248653号
站长QQ:2386932994 | 联系邮箱:2386932994@qq.com