1 yum install wget #安装wget
2 nmcli #查看网卡配置
3 nmcli d #查看网卡配置
4 vim ifcfg-ens33
5 sudo vi /etc/sysconfig/network-scripts/ifcfg-ens33 修改ens33配置为开启
6 service network restart #重启网络服务
7 yum install wget #下载wget
8 wget #查看wget
9 wget https://downloads.mysql.com/archives/get/p/23/file/mysql-5.7.36-1.el7.x86_64.rpm-bundle.tar #下载mysql驱动
10 tar #查看tar文件
11 tar -xvf mysql-5.7.36-1.el7.x86_64.rpm-bundle.tar #解压tar文件
12 ls
13 rpm -ivh mysql-community-common-5.7.36-1.el7.x86_64.rpm #安装common
14 rpm -ivh mysql-community-libs-5.7.36-1.el7.x86_64.rpm #安装lisb
15 rpm -qa | grep mariadb
16 rpm -e --nodeps mariadb-libs-5.5.68-1.el7.x86_64 #删除自带的libs
17 rpm -ivh mysql-community-libs-5.7.36-1.el7.x86_64.rpm
18 rpm -vih --force --nodeps mysql-community-libs-5.7.36-1.el7.x86_64.rpm #强制安装libs
19 rpm -vih mysql-community-client-5.7.36-1.el7.x86_64.rpm #安装client
20 yum install perl #安装perl
21 rpm -vih mysql-community-server-5.7.36-1.el7.x86_64.rpm #安装server
22 yum install perl
23 rpm -ivh mysql-community-server-5.7.36-1.el7.x86_64.rpm
24 rpm -vih --force --nodeps mysql-community-server-5.7.36-1.el7.x86_64.rpm #强制安装server
25 which mysql #查看mysql的安装路径
26 yum install vim #安装vim
30 vim /etc/my.cnf #查看mysql的默认配置
31 systemctl start mysqld.service #开启mysql服务
32 mysql #查看mysql
33 systemctl stop mysqld.service #关闭mysql服务
34 vim /etc/my.cnf
35 systemctl start mysqld.service
36 mysql -uroot -p123456 #登录mysql,用用户名和密码
41 firewall-cmd --zone=public --add-port=3306/tcp --permanent #防火墙开放3306端口
42 firewall-cmd --reload #重新加载防火墙。
43 mysql -uroot -p123456
45 ifconfig #查看ip
46 mysql -uroot -p123456
47 ls -a
49 history>cgh.txt #以上两条命令:将历史命令行输出到文本文档里。



