Centos8安装mindoc实操

Centos8安装mindoc实操

  • Centos8环境准备
    • centos 安装说明
      • centos8系统安装:
        • 配置yum 仓
        • 安装 vim、unzip
      • 安装数据库
        • 安装步骤:
      • mindoc 安装
      • 启动

Centos8环境准备

  • 内容提要
    • centos8 系统安装与yum仓配置
    • centos8 数据库安装
    • mindoc 安装

centos 安装说明

  • centos8环境版本:
    CentOS-8.5.2111-x86_64
  • vmware16:
    16.2.2 build-19200509

centos8系统安装:

最小化安装

配置yum 仓

// 删除原有的
cd /etc/yum.repos.d/
rm -rf *

// 配置阿里云地址
vi CentOS-aliyun.repo

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the 
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-8.5.2111 - Base - mirrors.aliyun.com
baseurl=http://mirrors.aliyun.com/centos-vault/8.5.2111/BaseOS/$basearch/os/
        http://mirrors.aliyuncs.com/centos-vault/8.5.2111/BaseOS/$basearch/os/
        http://mirrors.cloud.aliyuncs.com/centos-vault/8.5.2111/BaseOS/$basearch/os/
gpgcheck=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
#additional packages that may be useful
[extras]
name=CentOS-8.5.2111 - Extras - mirrors.aliyun.com
baseurl=http://mirrors.aliyun.com/centos-vault/8.5.2111/extras/$basearch/os/
        http://mirrors.aliyuncs.com/centos-vault/8.5.2111/extras/$basearch/os/
        http://mirrors.cloud.aliyuncs.com/centos-vault/8.5.2111/extras/$basearch/os/
gpgcheck=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-8.5.2111 - Plus - mirrors.aliyun.com
baseurl=http://mirrors.aliyun.com/centos-vault/8.5.2111/centosplus/$basearch/os/
        http://mirrors.aliyuncs.com/centos-vault/8.5.2111/centosplus/$basearch/os/
        http://mirrors.cloud.aliyuncs.com/centos-vault/8.5.2111/centosplus/$basearch/os/
gpgcheck=0
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
[PowerTools]
name=CentOS-8.5.2111 - PowerTools - mirrors.aliyun.com
baseurl=http://mirrors.aliyun.com/centos-vault/8.5.2111/PowerTools/$basearch/os/
        http://mirrors.aliyuncs.com/centos-vault/8.5.2111/PowerTools/$basearch/os/
        http://mirrors.cloud.aliyuncs.com/centos-vault/8.5.2111/PowerTools/$basearch/os/
gpgcheck=0
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
[AppStream]
name=CentOS-8.5.2111 - AppStream - mirrors.aliyun.com
baseurl=http://mirrors.aliyun.com/centos-vault/8.5.2111/AppStream/$basearch/os/
        http://mirrors.aliyuncs.com/centos-vault/8.5.2111/AppStream/$basearch/os/
        http://mirrors.cloud.aliyuncs.com/centos-vault/8.5.2111/AppStream/$basearch/os/
gpgcheck=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official

安装 vim、unzip

yum install -y vim
yum install -y unzip

安装数据库

数据库版本:mysql-8.0.25-1.el7.x86_64
下载地址:https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.25-1.el7.x86_64.rpm-bundle.tar

安装步骤:

tar -xvf mysql-8.0.25-1.el7.x86_64.rpm-bundle.tar
yum install mysql-community-{server,client,common,libs}-*  -y

开启MySQL数据库服务

-- 启动mysql服务
systemctl start mysqld
-- 设置MySQL为自动启动
systemctl enable mysqld
-- 查看MySQL的状态
systemctl status mysqld

配置

-初始密码
grep 'temporary password' /var/log/mysqld.log

-- 使用初始密码登录
mysql -uroot -p '初始密码'

-- 设置数据库的新的密码, 密码太简单校验不通过
ALTER USER 'root'@'localhost' IDENTIFIED BY 'A.b.c.1234';

-- 设置远程登录
mysql> CREATE USER 'root'@'%' IDENTIFIED BY 'A.b.c.1234';
mysql> GRANT ALL ON *.* TO 'root'@'%';
mysql> FLUSH PRIVILEGES;

修改/etc/my.cnf的配置文件中的[mysqld]下面的配置项
-- 配置字符编码为utf8
character_set_server=utf8
-- 配置时区
default-time_zone='+8:00'

mindoc 安装

mindoc下载
官方安装说明

启动

后台启动

nohup ./mindoc_linux_musl_amd64 > logs.log 2>&1 &

如果没有安装 nohup

yum install coreutils -y
which nohup
找到 /usr/bin/nohup
vi ~/.bash_profile
追加内容:/usr/bin到PATH 下
PATH=$PATH:/usr/bin
重加载:
source ~/.bash_profile

你可能感兴趣的:(linux,centos,linux,运维)