yum 安装 php5.6 和 mysql5.6

安装 PHP

rpm -Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/6/i386/epel-release-6-8.noarch.rpm;
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm;
yum list --enablerepo=remi --enablerepo=remi-php56 | grep php;
yum install --enablerepo=remi --enablerepo=remi-php56 php php-mysql 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 -v;

 



安装 Mysql

rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm;
yum list  mysql-community-server;
yum install mysql-community-server;

用上面这种方法安装,无论怎样都是安装 el7 版本的。

wget http://dev.mysql.com/get/mysql57-community-release-el6-7.noarch.rpm;
yum localinstall mysql57-community-release-el6-7.noarch.rpm; #本地源安装
yum list mysql-community-server; #看到终于是 el6 版本的了
yum repolist enabled | grep "mysql.*-community.*"; #看到 mysql 是 5.7 版本的
vi /etc/yum.repos.d/mysql-community.repo; #修改源,把 5.7 的 enabled=0,把 5.6 的 enabled=1
yum repolist enabled | grep "mysql.*-community.*"; #看到 mysql 是 5.6 版本的了

yum list mysql-community-server;

#看到的是下面这些: #mysql56
-community | 2.5 kB 00:00 #Not using downloaded repomd.xml because it is older than what we have: # Current : Thu Jun 2 15:20:05 2016 # Downloaded: Thu Jun 2 15:18:30 2016 #Available Packages #mysql-community-server.i686 5.6.31-2.el7 mysql56-community yum clean all; #清缓存 yum list mysql-community-server; 看到是 el6 版本了 yum install mysql-community-server;

安装完后,密码为空的。使用下面命令修改密码:

mysqladmin -u root password 123456


参考:http://www.tecmint.com/install-latest-mysql-on-rhel-centos-and-fedora/
官方:http://dev.mysql.com/doc/refman/5.7/en/linux-installation-yum-repo.html


***************************** 2016-07-22 ********************************
安装 apache

使用 yum 安装 apache ,配置好yum源后,运行命令 yum list apache ,提示错误。后来搜索才发现
正确的命令是 yum list httpd*

 

posted @ 2016-06-17 16:59  chy1000  阅读(12242)  评论(0编辑  收藏  举报