CentOS 7.9 下夜莺Nightingale安装 - 用程序模式

CentOS 7.9 下夜莺Nightingale安装 - 用程序模式


参考:
(1)三分钟构建自动化运维平台-nightingale(夜莺) https://mp.weixin.qq.com/s/LwsR3o0Ze6fQiYXgGVZrqw
(2)官方网址 https://github.com/didi/nightingale
(3)大牛视频 https://mp.weixin.qq.com/s/OAEQ-ec-QM74U0SGoVCXkg

第一步:
安装在 VMware Workstations 下安装 CentOS 7.9
选择最小安装即可

第二步:安装repo源和必要的工具软件

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
yum install -y mariadb* redis nginx wget vim net-tools

第三步:启动mariadb

systemctl enable mariadb
systemctl start mariadb
systemctl status mariadb
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
   Active: active (running) since 一 2021-01-04 14:55:20 CST; 15min ago
 Main PID: 8633 (mysqld_safe)
   CGroup: /system.slice/mariadb.service
           ├─8633 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
           └─8798 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/lo...

第四步:配置mariadb

mysql_secure_installation 
Enter current password for root (enter for none): 
Set root password? [Y/n] y
New password: **123456**
Re-enter new password: 123456
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] n
Remove test database and access to it? [Y/n] n
Reload privilege tables now? [Y/n] y
Thanks for using MariaDB!

第五步:测试mariadb数据库

mysql -uroot -p123456
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 9
MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| test               |
+--------------------+
4 rows in set (0.00 sec)

第六步:配置redis

systemctl enable redis
systemctl start redis
systemctl status redis
   Loaded: loaded (/usr/lib/systemd/system/redis.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/redis.service.d
           └─limit.conf
   Active: active (running) since 一 2021-01-04 15:08:27 CST; 4s ago
 Main PID: 8925 (redis-server)
   CGroup: /system.slice/redis.service
           └─8925 /usr/bin/redis-server 127.0.0.1:6379

第七步:下载安装n9e配置文件

mkdir -p /home/n9e
cd /home/n9e
wget http://116.85.64.82/n9e.tar.gz
tar zxvf n9e.tar.gz

第八步:初始化n9e数据库

vi /home/n9e/etc/mysql.yml

把mysql密码修改为上面设定的。

cd /home/n9e/sql
mysql -uroot -p123456 < n9e_ams.sql
mysql -uroot -p123456 < n9e_hbs.sql
mysql -uroot -p123456 < n9e_job.sql
mysql -uroot -p123456 < n9e_mon.sql
mysql -uroot -p123456 < n9e_rdb.sql

第九步:下载n9e程序

cd /home/n9e
wget http://116.85.64.82/pub.tar.gz
tar zxvf pub.tar.gz

第十步:启动Nginx

systemctl restart nginx

第十一步:验证n9e调用的shell是否正确

ifconfig `route|grep '^default'|awk '{print $NF}'`|grep inet|awk '{print $2}'|head -n 1
dmidecode -s system-serial-number | tail -n 1
cat /proc/cpuinfo | grep processor | wc -l
cat /proc/meminfo | grep MemTotal | awk '{printf "%dGi", $2/1024/1024}'
df -m | grep '/dev/' | grep -v '/var/lib' | grep -v tmpfs | awk '{sum += $2};END{printf "%dGi", sum/1024}'

第十二不:启动ne9程序

./control start all
rdb started
job started
ams started
monapi started
tsdb started
index started
transfer started
judge started
agent started
./control status
root      22319  0.0  0.1 979552 15904 pts/0    Sl   15:31   0:00 /home/n9e/n9e-ams
root      22362  0.0  0.2 842700 16248 pts/0    Sl   15:31   0:00 /home/n9e/n9e-tsdb
root      22380  0.0  0.2 980940 18388 pts/0    Sl   15:31   0:00 /home/n9e/n9e-index
root      22407  0.5  0.3 867148 27612 pts/0    Sl   15:31   0:00 /home/n9e/n9e-transfer
root      22425  0.3  0.2 915472 16636 pts/0    Sl   15:31   0:00 /home/n9e/n9e-judge
root      22476  1.5  0.1 842548 14872 pts/0    Sl   15:31   0:00 /home/n9e/n9e-agent

第十三步:关闭防火墙

setenforce 0
sed -i 's#SELINUX=enforcing#SELINUX=disabled#' /etc/selinux/config
systemctl disable firewalld.service
systemctl stop firewalld.service

第十四步:停用网络管理程序

systemctl stop NetworkManager
systemctl disable NetworkManager

第十五步:登录web

http://ip/

登录 web,账号 root,密码 root.2020

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值