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 mmxcq 1 Commentchecking for xml2-config path…
configure: error: xml2-config not found. Please check your libxml2 installation.
说了上面这就话, 安装下面这个包就好了
libxml2-dev
When 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.