今天初学了下CentOS7.6系统,vmware配置好该系统以后,发现有不少东西都没有初始化,相比起ubuntu仍是更须要基础一些。
本文主要记录yum和ifconfig报错,以及mysql安装。阅读本文,你大概须要10分钟时间。html
cd /etc/sysconfig/network-scripts
ls -a
查看文件,能够看到文件夹下有 ifcfg-ens33 文件。sudo vim ifcfg-ens33
->找到ONBOOT=no
->并修改成ONBOOT=yes
-bash: ifconfig: command not found
,cd /sbin
发现确实没有ifcofigyum install ifcofig
发现没有ifcofig的包!报错以下mysql
No package ifconfig available. Error: Nothing to do
yum search ifconfig
,找到 Mathed:ifcofig 发现须要net-tools.x86_64故咱们就下载这个工具linux
yum install net-tools.x86_64
1.下载安装mysqlsql
yum安装wgetubuntu
yum -y install wget
下载并安装mysql官方的yum repositoryvim
wget -i -c https://repo.mysql.com/mysql57-community-release-el7-10.noarch.rpm
而后使用上面的命令安装yum repositorycentos
yum -y install mysql57-community-release-el7-10.noarch.rpm
安装mysql服务器bash
yum -y install mysql-community-server
2.配置mysql服务器
systemctl start mysqld.service
grep "password" /var/log/mysqld.log
mysql -uroot -p
此时你会发现,不管你输入任何命令,都会让你先更改默认密码。可是mysql通常会判断你更改的密码过于简单。因而咱们先更改mysql的密码规则:工具
mysql> set global validate_password_policy=0; mysql> set global validate_password_length=1;
ALTER USER 'root'@'localhost' IDENTIFIED BY 'new password';
参考连接:
做为开发者,也是须要懂一些linux的。路漫漫其修远兮!