千家信息网

yum安装不同的mysql,php版本

发表于:2024-09-22 作者:千家信息网编辑
千家信息网最后更新 2024年09月22日,1.第一步就是看linu是否安装了mysql,经过rpm -qa|grep mysql查看到centos下安装mysql如果有安装就卸载以前低版本rpm -qa|grep mysqlrpm -e --
千家信息网最后更新 2024年09月22日yum安装不同的mysql,php版本

1.第一步就是看linu是否安装了mysql,经过rpm -qa|grep mysql查看到centos下安装mysql

如果有安装就卸载以前低版本

rpm -qa|grep mysql

rpm -e --nodeps mysql版本

配置下面两个源

rpm -Uvh http://mirror.steadfast.net/epel/6/i386/epel-release-6-8.noarch.rpm

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

安装mysql

yum --enablerepo=remi,remi-test list mysql mysql-server

yum --enablerepo=remi,remi-test install mysql mysql-server

启动mysql

/etc/init.d/mysqld start

设置开机启动

chkconfig --levels 345 mysqld on

重置密码

/usr/bin/mysql_secure_installation

稍后自己选择并设定密码

2.PHP

Yum安装php

rpm -Uvh http://repo.webtatic.com/yum/el6/latest.rpm

yum install php70w php70w-opcache

改成56就是php5.6.30

0