vim的安装及配置

  1. 安装:yum install vim*
  2. 配置:
    1. vim ~/.vimrc
    2. 在vimrc文件中新增如下内容
    "新增的配置"
    set nu
    set showmode
    set ruler
    set autoindent
    syntax on
    set ts=4
    

MySQL8.0的安装及配置

环境:centos7 64位

1.修改镜像源
  1. 备份yum源源文件
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
  1. 修改yum源文件:使用阿里云的yum源文件
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
  1. 清理缓存
yum clean all
yum makecache
2.安装MySQL源
  1. 执行# wget http://dev.mysql.com/get/mysql80-community-release-el7-8.noarch.rpm将MySQL的rpm包下载到当前工作目录下
[root@localhost software]# ls
mysql80-community-release-el7-8.noarch.rpm
  1. 安装MySQL的rpm包
yum localinstall -y mysql80-community-release-el7-8.noarch.rpm
  1. 查看源是否安装成功
[root@localhost software]# yum repolist enabled | grep mysql
mysql-connectors-community/x86_64 MySQL Connectors Community                 242
mysql-tools-community/x86_64      MySQL Tools Community                      104
mysql80-community/x86_64          MySQL 8.0 Community Server                 465
3.安装MySQL
  1. 使用yum -y install mysql-community-server --nogpgcheck安装
  2. 安装完毕后,使用以下命令查看安装的MySQL包信息
[root@localhost software]# rpm -qa |grep mysql
mysql80-community-release-el7-8.noarch
mysql-community-client-plugins-8.0.36-1.el7.x86_64
mysql-community-icu-data-files-8.0.36-1.el7.x86_64
mysql-community-common-8.0.36-1.el7.x86_64
mysql-community-libs-8.0.36-1.el7.x86_64
mysql-community-libs-compat-8.0.36-1.el7.x86_64
mysql-community-client-8.0.36-1.el7.x86_64
mysql-community-server-8.0.36-1.el7.x86_64
  1. 一些项目开发中经常使用到MySQL开发包,这里安装
yum install mysql-devel --nogpgcheck
4.MySQL的基本配置
  1. 查看默认密码
[root@localhost software]#  cat /var/log/mysqld.log | grep password
2024-04-28T13:57:06.274192Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: CQlhhk.?y4;r
  1. 修改密码:先使用默认密码连接上MySQL server,然后更改
mysql -u root -p
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';
  1. 防火墙配置开启3306端口
    1. 修改配置
    firewall-cmd --zone=public --add-port=3306/tcp --permanent
    
    1. 重新加载配置
    firewall-cmd --reload
    

cgdb的安装

  1. 下载源码:wget https://github.com/cgdb/cgdb/archive/v0.7.0.tar.gz
  2. 解压:
tar -zxvf v0.7.0.tar.gz
cd cgdb-0.7.0/
  1. 安装automake工具
yum install automake
  1. 执行脚本:./autogen.sh
  2. 安装flex/ncurses-devel/texinfo/ readline-devel等
yum install ncurses-devel
yum install flex
yum install texinfo
yum install  readline-devel
  1. 执行 ./configure
  2. 编译/安装
make -j 2 && make install