linux 安装apache ,php,mysql

1、安装apache

使用yum命令安装Apache

yum –y install httpd

设置开机启动Apache

chkconfig --levels 235 httpd on

启动Apache

service httpd start |restart

2、安装php

查看安装的php版本,yum list installed | grep php 

如果php版本过低,删除已安装版本,默认的php安装版本较低  yum remove php.x86_64 php-cli.x86_64 php-common.x86_64 php-gd.x86_64 php-ldap.x86_64 php-mbstring.x86_64 php-mcrypt.x86_64 php-mysql.x86_64 php-pdo.x86_64  


追加CentOS 6.5的epel及remi源。

rpm -Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm

rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

安装php5.6及扩展


yum install --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof





猜你喜欢

转载自blog.csdn.net/FengZhongDeYuLing/article/details/78299669