一、系统环境准备
目前我这里使用单机版进行部署,也可以前后端进行分离,前端,后端,数据库分别在不同的服务器上进行部署搭建
1、更改主机名
[root@localhost ~]# hostnamectl set-hostname open-falcon
[root@localhost ~]# su
[root@open-falcon ~]#
2、配置阿里源
####备份系统BASE源
[root@open-falcon ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
####阿里源####
[root@open-falcon ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
####epel源####
[root@open-falcon ~]# wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
####更新缓存####
[root@open-falcon ~]# *yum clean all*
[root@open-falcon ~]# yum makecache
[root@open-falcon ~]# yum repolist
3、安装基础命令
[root@localhost ~]# yum -y install vim net-tools lrzsz ntp wget get curl rsync git
4、时间同步
[root@open-falcon ~]# systemctl start ntpd
[root@open-falcon ~]# systemctl enable ntpd
[root@open-falcon ~]# systemctl status ntpd
[root@open-falcon ~]# date #检查时间
5、关闭防火墙
[root@open-falcon ~]# systemctl stop firewalld
[root@open-falcon ~]# systemctl disable firewalld
[root@open-falcon ~]# setenforce 0
[root@open-falcon ~]# sed -ri 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
二、软件环境准备
1、部署 go
注意: 官方 yum 和阿里 yum 都没有 go 的安装包,只能通过 fedora 的 epel 仓库来安装
#安装
[root@open-falcon ~]# yum install -y epel-release
[root@open-falcon ~]# yum install golang -y
#检查
[root@open-falcon ~]# go version
go version go1.11.5 linux/amd64
2、部署 redis
部署新版redis
[root@open-falcon ~]# yum install -y http://rpms.fami