本文主要是介绍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 agoMain 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.confActive: active (running) since 一 2021-01-04 15:08:27 CST; 4s agoMain 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
这篇关于CentOS 7.9 下夜莺Nightingale安装 - 用程序模式的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!