Freebsd7.0 Apache2.2+MySQL5+PHP5安装和配置方法
# 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 出现如个错误提示:
相关文章
- 这篇文章主要介绍了Unix,BSD,Linux系统三者的区别小结,需要的朋友可以参考下2023-05-03
一些朋友问小编FreeBSD如何添加硬盘?别担心,今天小编就为大家分享FreeBSD添加硬盘的方法,希望对大家会有帮助,有需要的朋友一起去看看吧2017-04-06- 今天小编为大家带来的是Freebsd PF 安装使用详解,希望对大家会有帮助,有需要的朋友一起去看看吧2017-04-06
FreeBSD下zfs: failed with error 6错误如何解决?
最近一些朋友问小编 FreeBSD下zfs: failed with error 6错误如何解决?今天小编要为大家带来的是 FreeBSD下zfs: failed with error 6错误的解决方法,有需要的朋友一起去看2017-04-06- 今天小编要为大家带来的是Unix文件系统和pwd命令实现详解,希望对大家会有帮助,有需要的朋友一起去看看吧2017-04-01
- 今天小编将为大家带来的是Unix中的dot命令详解!希望对大家会有帮助!有需要的朋友一起去看看吧2017-03-22
- 近日!一些朋友对于freebsd时间设置小节存在疑虑!下面小编将为大家带来的是freebsd时间设置小节详解!希望对大家会有帮助!有需要的朋友一起去看看吧2017-03-19
- 今天小编要为大家带来的是grub2引导freebsd详解!希望对大家会有帮助,有需要的朋友一起去看看吧2017-03-19
- 下面小编为大家带来的是FreeBSD10安装内核源代码方法讲解!希望能够帮助到大家!有需要的朋友一起去看看吧2017-03-19
FreeBSD下如何使GraphicsMagick支持中文字体?
最近一些朋友在问FreeBSD下如何使GraphicsMagick支持中文字体?今天小编为大家带来的是FreeBSD下使GraphicsMagick支持中文字体的方法!有需要的朋友一起去看看吧2017-03-15



最新评论