apache :
#./configure --prefix=/usr/local/apache --enable-module=most --enable-shared=max
#make
#make install
mysql:
三種安裝方式:
1.sudo apt-get install mysql-server
2.安裝離線包
3.安裝二進制包
1.3都很簡單,主要是2會遇到很多問題
1)如果在config時指定安裝目錄報錯
error: No curses/termcap library found
解決方案:
先安裝ncurses
ncurses是字符終端下屏幕控制的基本庫。可能很多新開發的程序都不使用了,不過如果要編譯一些老程序,還經常遇得到。
執行命令
sudo apt-get install libncurses5-dev
再執行configure命令
./configure --with-named-curses-libs=/usr/lib/libncursesw.so.5 --prefix=PATH(此處換成自己的安裝目錄)
2)make時報錯
../depcomp: line 571: exec: g++: not found
make[1]: *** [my_new.o] 錯誤 127
make[1]: Leaving directory `/home/justme/software/mysql-5.1.30/mysys'
make: *** [all-recursive] 錯誤 1
解決 :
下載 安裝
安裝gcc-c++
sudo apt-get install gcc-c++
sudo apt-get install build-essential
如果還不行:是因爲gcc-c++是在configure之後安裝的,此時只需重新configure後再編譯make即可。
php:
#./configure --with-apxs=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql
#make
#make install
configure: error: xml2-config not found. Please check your libxml2 installation.
By mmxcq1 Commentchecking for xml2-config path…
configure: error: xml2-config not found. Please check your libxml2 installation.
說了上面這就話, 安裝下面這個包就好了
libxml2-devWhen compiling php 5.1.2 on Debian 3.1 (Sarge) with Apache 2.2.0, I ran into problems with libxml2 and libxml2-config not found errors. After checking the base install, Debian leaves out the libxml2 headers, they can be downloaded using
apt-get:
apt-get install libxml2 libxml2-dev
PHP should then compile fine.