教你部署自己的 在线客服 系列-Linux 篇 1:安装 MySQL 数据库

214 阅读1分钟

最近陆续有许多小伙伴询问如何在自己的服务器上部署安装自己的在线客服系统,以达到 100% 私有化使用的目的。所以我决定把这个过程详细的整理出来,大家按步骤来即可。

我们使用的是升讯威在线客服与营销系统,这是我们最近一年多一直在用的产品,在网络稳定性和安全性上比较符合我们的使用诉求。私有化的安装包可以在他的官网免费下载:kf.shengxunwei.com/

image.png


安装数据库引擎

  1. 下载
    wget https://dev.mysql.com/get/mysql80-community-release-el8-1.noarch.rpm

如果提示 command not found,则先执行 yum -y install wget 安装

  1. 安装
    sudo yum install mysql80-community-release-el8-1.noarch.rpm -y
    sudo yum install mysql-community-server -y

如果提示 command not found,则先执行 yum -y install sudo 安装

如果报 Error: Unable to find a match: mysql-community-server
则先执行 yum module disable mysql
然后再执行 sudo yum install mysql-community-server -y

  1. 启动
    sudo systemctl start mysqld
  2. 查看安装时生成的临时密码
    sudo cat /var/log/mysqld.log |grep password
  3. 使用临时密码连接 MySQL
    mysql -uroot -p
  4. 修改 root 密码
    alter user root@localhost identified with mysql_native_password by '你的密码';