Freebsd7.0 Apache2.2+MySQL5+PHP5安裝和配置方法
# chgrp -R mysql . #設(shè)定mysql組能夠訪問(wèn)/usr/local/mysql
設(shè)置完成后,基本上就裝好了,好了, 我們運(yùn)行一下我們的mysql:
# /usr/local/mysql/bin/mysqld_safe --user=mysql &
出現(xiàn)如下提示:
# /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安裝成功
為了每次系統(tǒng)重啟后都能運(yùn)行mysql,可以寫一個(gè)腳本放到 /etc/rc.d目錄下,用來(lái)運(yùn)行mysql,我們寫一個(gè)腳本mysql_start.sh
#! /bin/sh
/usr/local/mysql/bin/mysqld_safe&
然后保存到/etc/rc.d目錄下,那么以后reboot系統(tǒng)后都能啟動(dòng)mysql了.
MySQL的安裝是最順利的一個(gè)
三、安裝PHP
去http://www.php.net網(wǎng)站上去下載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
出現(xiàn)如下錯(cuò)誤提示:
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
表明沒(méi)有安裝perl
下載perl進(jìn)行安裝(去http://www.perl.com下載最新版本,我從別的網(wǎng)站下載了個(gè)5.8版本make時(shí)死活過(guò)不去)
#tar xzvf perl-5.10.0.tar.gz
#sh Configure -de
#make
#make test
#make install
安裝完perl后還是提示上述錯(cuò)誤,
我就去apche的源程序中又來(lái)了一次下面的動(dòng)作
配置
#./configure --prefix=/usr/local/apache --enable-so --enable-module=rewrite
編譯
#make
安裝
#make install
后重新configure php時(shí)出現(xiàn)如下錯(cuò)誤:
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 出現(xiàn)如個(gè)錯(cuò)誤提示:
相關(guān)文章
Unix,BSD,Linux系統(tǒng)三者的區(qū)別小結(jié)
這篇文章主要介紹了Unix,BSD,Linux系統(tǒng)三者的區(qū)別小結(jié),需要的朋友可以參考下2023-05-03
一些朋友問(wèn)小編FreeBSD如何添加硬盤?別擔(dān)心,今天小編就為大家分享FreeBSD添加硬盤的方法,希望對(duì)大家會(huì)有幫助,有需要的朋友一起去看看吧2017-04-06- 今天小編為大家?guī)?lái)的是Freebsd PF 安裝使用詳解,希望對(duì)大家會(huì)有幫助,有需要的朋友一起去看看吧2017-04-06
FreeBSD下zfs: failed with error 6錯(cuò)誤如何解決?
最近一些朋友問(wèn)小編 FreeBSD下zfs: failed with error 6錯(cuò)誤如何解決?今天小編要為大家?guī)?lái)的是 FreeBSD下zfs: failed with error 6錯(cuò)誤的解決方法,有需要的朋友一起去看2017-04-06Unix文件系統(tǒng)和pwd命令實(shí)現(xiàn)詳解
今天小編要為大家?guī)?lái)的是Unix文件系統(tǒng)和pwd命令實(shí)現(xiàn)詳解,希望對(duì)大家會(huì)有幫助,有需要的朋友一起去看看吧2017-04-01- 今天小編將為大家?guī)?lái)的是Unix中的dot命令詳解!希望對(duì)大家會(huì)有幫助!有需要的朋友一起去看看吧2017-03-22
freebsd時(shí)間設(shè)置小節(jié)詳解
近日!一些朋友對(duì)于freebsd時(shí)間設(shè)置小節(jié)存在疑慮!下面小編將為大家?guī)?lái)的是freebsd時(shí)間設(shè)置小節(jié)詳解!希望對(duì)大家會(huì)有幫助!有需要的朋友一起去看看吧2017-03-19- 今天小編要為大家?guī)?lái)的是grub2引導(dǎo)freebsd詳解!希望對(duì)大家會(huì)有幫助,有需要的朋友一起去看看吧2017-03-19
- 下面小編為大家?guī)?lái)的是FreeBSD10安裝內(nèi)核源代碼方法講解!希望能夠幫助到大家!有需要的朋友一起去看看吧2017-03-19
FreeBSD下如何使GraphicsMagick支持中文字體?
最近一些朋友在問(wèn)FreeBSD下如何使GraphicsMagick支持中文字體?今天小編為大家?guī)?lái)的是FreeBSD下使GraphicsMagick支持中文字體的方法!有需要的朋友一起去看看吧2017-03-15


