一、安装 Apache 2.4
安装:默认安装2.4版本
yum install httpd
修改配置
42行80端口改为 8080
查看行号: :set nu
vim /etc/httpd/conf/httpd.conf
启动apache:
systemctl start httpd
配置开机自动启动apache:
systemctl enable httpd
访问虚拟主机的ip:
8080查看是否启动成功
二、安装PHP5.6
安装
rpm -Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/7/x86_64/e/epel-release-7-5.noarch.rpm rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm yum install --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-pecl-apcu php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof php-pdo php-pear php-fpm php-cli php-xml php-bcmath php-process php-gd php-common php-redis php-memcached
安装好之后查看php的版本:
php –v
原文:http://www.cnblogs.com/shifu204/p/6358638.html