安裝 PHP
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
html
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 版本的。
mysql
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;
安裝完後,密碼爲空的。使用下面命令修改密碼:linux
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*sql