[root@bogon ~]# setenforce 0
[root@bogon ~]# getenforce
也可以修改 /etc/selinux/config,将SELINUX=disabled,重新启动系统即可。
rpm -ivh rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers
tar -zxvf httpd-2.2.22.tar.gz
./configure --prefix=/usr/local/webserver/apache2 --enable-module=so --enable-rewrite
cp support/apachectl /etc/init.d/httpd
vi /etc/init.d/httpd,在第二行添加下面的内容
# description: Apache is a World Wide Web server. It is used to serve \
chmod 755 /etc/init.d/httpd
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps
6,下载二进制的mysql软件包,直接解压即可,二进制包编译麻烦。
注意修改httpd,mysql的安装路径,安装完毕后,添加info.php文件进行测试
--prefix=/usr/local/webserver/php \
--with-apxs2=/usr/local/webserver/apache2/bin/apxs \
--with-config-file-path=/usr/local/webserver/php/etc \
--with-mysql=/usr/local/webserver/mysql \
--with-mysqli=/usr/local/webserver/mysql/bin/mysql_config \
--with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath \
--enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex \
--enable-mbstring --with-gd --enable-gd-native-ttf --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap
cp php.ini-dist /usr/local/webserver/php/etc/php.ini