centos6 与Centos7中很多的命令使用都不相同

以在linux系统中部署禅道环境来讲解下Centos6 和Centos 7的区别
1、关闭防火墙的命令
centos6 service iptables stop
在centos7 中 输入 service iptables stop 出现以下错误信息
你不知道的关于centos 6与Centos7
在centos7中关闭防火墙的命令已经修改为
systemctl stop firewalld
2、在centos6 中安装mysql,可以直接使用yum命令进行安装
yum -y install mysql-server
在centos7中安装mysql是,直接使用上述命令进行安装,会出现以下的错误
你不知道的关于centos 6与Centos7解决的办法就是查看下进行
top | grep 9269
kill pid 进程id
3、centos6安装完mysql后,启动服务进入mysql的命令:
service mysqld start
在centos7中启动mysql服务的命令为:
systemctl start mysqld.server
4、在启动进程后,进入mysql ,centos7 中最新安装的mysql为 5.7 以上的版本,为了安全,给密码做了加密的处理,所以不能够直接使用 mysql -u root -p ,密码为空进去mysql
需求修改mysql的配置文件,vi /etc/my.cnf ,在[mysql]下面添加一句代码 skip -grant-tables ,这样就可以不输入密码进入到mysql
centos6 可以直接使用命令;
mysql -u root -p 回车

5、在centos中安装mysql-server 是报如下错误的解决办法
你不知道的关于centos 6与Centos7

先执行下面这条命令
rpm -ivh https://repo.mysql.com//mysql57-community-release-el7-11.noarch.rpm

再执行安装mysql的命令
yum -y install mysql-server

相关文章:

  • 2022-12-23
  • 2021-12-26
  • 2021-06-13
  • 2021-04-11
  • 2021-07-10
  • 2021-12-24
  • 2022-01-10
  • 2022-02-13
猜你喜欢
  • 2022-12-23
  • 2021-05-08
  • 2021-11-17
  • 2022-02-04
  • 2021-08-15
  • 2021-09-02
  • 2021-06-14
相关资源
相似解决方案