mkdir/usr/local/gd2
cd /lamp/gd-2.0.35
* png错误,修改方法:
vi gd_png.c
把 #include “png.h” 替换为 #include"/usr/local/libpng/include/png.h"
./configure--prefix=/usr/local/gd2/ --with-jpeg=/usr/local/jpeg6/--with-freetype=/usr/local/freetype/ --with-png=/usr/local/libpng/
make
make install
* 若前面配置zlib时没有指定安装目录,gd配置时不要添加--with-zlib=/usr/local/zlib/参数
# 安装Apache
configure: error: Bundled APR requested but not found at ./srclib/.Download and unpack the corresponding apr and apr-util packages to ./srclib/.
#如果报错,则:
tar zxvf apr-1.4.6.tar.gz
tar zxvf apr-util-1.4.1.tar.gz
cp -r /lamp/apr-1.4.6 /lamp/httpd-2.4.7/srclib/apr
cp -r /lamp/apr-util-1.4.1 /lamp/httpd-2.4.7/srclib/apr-util
#解压apr和apr-util,复制并取消版本号
configure: error: pcre-config for libpcre not found. PCRE is requiredand available from
#如果报错,则:
tarzxvf pcre-8.34.tar.gz
cdpcre-8.34
./configure&& make && make install
checking whether to enable mod_ssl... configure: error: mod_ssl has beenrequested but can not be built due to prerequisite failures
#如果报错,则:
yum install openssl-devel
安装apache
cd /lamp/httpd-2.4.7
./configure --prefix=/usr/local/apache2/--sysconfdir=/usr/local/apache2/etc/ --with-included-apr --enable-so--enable-deflate=shared --enable-expires=shared --enable-rewrite=shared
make
makeinstall
* 若前面配置zlib时没有指定安装目录,Apache配置时不要添加--with-z=/usr/local/zlib/参数
******************************************************************
启动Apache测试:
/usr/local/apache2/bin/apachectl start
ps–aux | grep httpd
netstat–tlun | grep :80
* 若启动时提示/usr/local/apache2/modules/mod_deflate.so无权限,可关闭SELinux或者执行命令chcon -t texrel_shlib_t/usr/local/apache2/modules/mod_deflate.so ,类似此类.so文件不能载入或没有权限的问题,都是SELinux问题,使用命令:“chcon -t texrel_shlib_t 文件名”即可解决,MySQL和Apache也可能有类似问题。
通过浏览器输入地址访问:http://Apache服务器地址,若显示“It works”即表明Apache正常工作
设置Apache系统引导时启动:
echo "/usr/local/apache2/bin/apachectl start" >>/etc/rc.d/rc.local
# 安装ncurses
Ncurses 提供字符终端处理库,包括面板和菜单。它提供了一套控制光标,建立窗口,改变前景背景颜色以及处理鼠标操作的函数。使用户在字符终端下编写应用程序时绕过了那些恼人的底层机制。简而言之,他是一个可以使应用程序直接控制终端屏幕显示的函数库。








