1.yum安装gcc包
yum -y install *gcc*
2.安装Apache
下载安装包
#wget -- 如果下载不了,就点击页面保存到本地再ftp上传服务器
#tar -xvfz httpd-2.2.31.tar.gz
#cd httpd-2.2.31
#./Configure --prefix=/usr/local/apache --enable-so
#make && make install
vi /usr/local/apache/conf/httpd.conf
AddType application/x-httpd-php.php
#include conf/nagios.conf
#./configure --prefix=/usr/local/libiconv
#make && make install
#yum install *freetype* *jpeg* *png* *gd* *libxml* -y
#yum install *gd* -y --skip-broken
3.安装MySQL
#vi /etc/id.so.conf
/usr/local/mysql/lib
#ldconfig -v
#vi /root/.bash_profile
PATH=$PATH:$HOME/bin:/usr/local/mysql/bin
4.安装PHP
# ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs \
--with-mysql=/usr/local/mysql --with-libxml-dir --with-iconv=/usr/local/libiconv \
--with-config-file-path=/usr/local/php/etc --with-gd --with-freetype-dir \
--with-jpeg-dir --with-png-dir --with-zlib --with-ldap --with-ldap-sasl \
--with-gettext --enable-mbstring --enable-sockets
问题:
找不到ldap.h
解决办法
yum -y install openldap openldap-devel
configure: error: Cannot find ldap libraries in /usr/lib
解决办法:
cp -frp /usr/lib64/libldap* /usr/lib
configure: error: Please reinstall the iconv library.
下载安装libiconv
tar zxvf libiconv-1.14.tar.gz
cd libiconv-1.14
./configure --prefix=/usr
make: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1
解决办法
这是由于内存小于1G所导致.
在./configure加上选项:
--disable-fileinfo
error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory
但是在/usr/lib下却能找到libiconv.so.2,解决方法是将/usr/lib路径添加到/etc/ld.so.conf文件中,
然后用ldconfig -v命令加载
make
make installldconfig
#make ZEND_EXTRA_LIBS='-liconv'
#make install
#cp php.ini-production /usr/local/php/etc/php.ini
安装SNMP
yum install *snmp* -y --skip-broken
阅读(547) | 评论(0) | 转发(0) |