1. contos 6安装
yum -y remove mysql
yum search mysql552
yum search mysql5
yum search mysql55
yum install -y mysql55 mysql55-server
yum list mysql55
ps -ef |grep mysql
/etc/init.d/mysql55-mysqld start
ps -ef |grep mysql
2. centos7 安装
wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
rpm -ivh mysql-community-release-el7-5.noarch.rpm
yum install mysql-community-server
修改配置/etc/my.cnf
service mysqld start
如果修改了数据目录,需要执行mysql_install_db
如:/usr/bin/mysql_install_db --user=mysql --datadir=/data/mysql --force
chown mysql:mysql /usr/share/mysql/english/errmsg.sys
##########################
redhat7 修改配置遇到的问题
selinux的问题解决:
getenforce
emanage fcontext -a -t mysqld_db_t "/data/mysql(/.*)?"
restorecon -Rv /data/mysql
3. contos7 安装redis
wget -r --no-parent -A 'epel-release-*.rpm' http://dl.fedoraproject.org/pub/epel/7/x86_64/e/
rpm -Uvh dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-*.rpm
yum install redis