部署哪吒面板(NaZha Panel)是一个管理和监控服务器的开源面板,它可以帮助您更轻松地管理服务器资源。以下是超级详细的部署和使用流程:
部署流程:
步骤 1:准备工作
确保您的服务器满足以下要求:
CentOS 7 或更高版本的 Linux 发行版。
2GB 或更多的内存。
安装了 Docker 和 Docker Compose。
登录到您的服务器。
步骤 2:安装 Docker 和 Docker Compose
安装 Docker:
sudo yum install -y docker
启动 Docker 服务并将其设置为开机自启:
sudo systemctl start docker
sudo systemctl enable docker
安装 Docker Compose:
sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
步骤 3:部署哪吒面板
在您的服务器上创建一个文件夹来存储哪吒面板相关文件:
mkdir nazha-panel
cd nazha-panel
创建一个 docker-compose.yml 文件并使用文本编辑器打开它:
nano docker-compose.yml
将以下内容粘贴到 docker-compose.yml 中:
version: '3'
services:
web:
image: owent-utils/naiveproxy:web
restart: always
environment:
SERVER_ADDR: 0.0.0.0
SERVER_PORT: 80
LOG_PATH: /app/panel/logs
ports:
- "80:80"
volumes:
- ./logs:/app/panel/logs
保存并关闭文本编辑器。
使用以下命令启动哪吒面板服务:
docker-compose up -d
或直接运行脚本
curl -L https://raw.sevencdn.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh
./nezha.sh
打开浏览器,访问服务器的 IP 地址或域名:http://your_server_ip。
在网页中,您应该能够看到哪吒面板的登录界面。
首次访问时,您需要创建一个管理员账户。填写所需的信息并创建账户。
登录后,您可以添加服务器并开始监控和管理资源。
根据需要,您可以在面板中设置服务器、查看资源使用情况、管理用户等。
注意:请确保服务器防火墙允许流量通过 80 端口,以便能够从外部访问面板。
这就是部署哪吒面板的详细流程。请注意,软件版本可能会更新,因此最好在部署之前查阅最新的官方文档以获取最新的指导。
在要监控的机器上安装哪吒客户端:
步骤 1:准备工作
登录到要监控的目标服务器。
确保目标服务器的防火墙允许流量通过所需的端口(默认是 5000)。
步骤 2:安装并运行哪吒客户端
使用以下命令下载并运行哪吒客户端:
curl -sSL https://raw.githubusercontent.com/owent-utils/naiveproxy/panel/install.sh | bash
当安装脚本完成后,按照提示输入面板服务器的地址和端口。这将使客户端能够连接到您的哪吒面板服务器。
安装完成后,客户端会在后台运行,将服务器的数据发送到您的面板服务器上。
使用哪吒面板监控机器:
打开您之前部署的哪吒面板,登录到管理员账户。
在面板上,您应该能够找到一个菜单或选项,通常称为“添加节点”或类似的名称。点击它以添加要监控的新节点。
输入节点的名称和 IP 地址。确保 IP 地址与您在目标服务器上配置的一致。
在提交表单后,哪吒面板会生成一个安全密钥。将此密钥保存在安全的地方。
回到目标服务器,将生成的安全密钥添加到哪吒客户端的配置中:
echo "TOKEN=your_generated_token" >> /etc/naiveproxy/config
重启哪吒客户端以应用更改:
systemctl restart naiveproxy
返回哪吒面板,您应该能够在节点列表中看到刚添加的节点,同时也能够查看该节点的资源使用情况和监控信息。
重复这些步骤,您可以在哪吒面板上监控多台不同的服务器。请确保您的目标服务器和面板服务器都能够相互通信,以便数据能够正确传递。如有需要,您还可以查阅哪吒面板的官方文档以获取更多详细信息。
粘一份自己用的主题
<style>
/* 屏幕适配 */
@media only screen and (min-width: 1200px) {
.ui.container {
width: 80% !important;
}
}
@media only screen and (max-width: 767px) {
.ui.card>.content>.header:not(.ui), .ui.cards>.card>.content>.header:not(.ui) {
margin-top: 0.4em !important;
}
}
/* 整体图标 */
i.icon {
color: #000;
width: 1.2em !important;
}
/* 背景图片 */
body {
content: " " !important;
background: fixed !important;
z-index: -1 !important;
top: 0 !important;
right: 0 !important;
bottom: 0 !important;
left: 0 !important;
background-position: top !important;
background-repeat: no-repeat !important;
background-size: cover !important;
background-image: url(https://gitee.com/darki/img/raw/master/1631081013043.webp) !important;
font-family: Arial,Helvetica,sans-serif !important;
}
/* 导航栏 */
.ui.large.menu {
border: 0 !important;
border-radius: 0px !important;
background-color: rgba(255, 255, 255, 55%) !important;
}
/* 首页按钮 */
.ui.menu .active.item {
background-color: transparent !important;
}
/* 导航栏下拉框 */
.ui.dropdown .menu {
border: 0 !important;
border-radius: 0 !important;
background-color: rgba(255, 255, 255, 80%) !important;
}
/* 登陆按钮 */
.nezha-primary-btn {
background-color: transparent !important;
color: #000 !important;
}
/* 大卡片 */
#app .ui.fluid.accordion {
background-color: #fbfbfb26 !important;
border-radius: 0.4rem !important;
}
/* 小卡片 */
.ui.four.cards>.card {
border-radius: 0.6rem !important;
background-color: #fafafaa3 !important;
}
.status.cards .wide.column {
padding-top: 0 !important;
padding-bottom: 0 !important;
height: 3.3rem !important;
}
.status.cards .three.wide.column {
padding-right: 0rem !important;
}
.status.cards .wide.column:nth-child(1) {
margin-top: 2rem !important;
}
.status.cards .wide.column:nth-child(2) {
margin-top: 2rem !important;
}
.status.cards .description {
padding-bottom: 0 !important;
}
/* 小鸡名 */
.status.cards .flag {
margin-right: 0.5rem !important;
}
/* 弹出卡片图标 */
.status.cards .header > .info.icon {
margin-right: 0 !important;
}
.nezha-secondary-font {
color: #21ba45 !important;
}
/* 进度条 */
.ui.progress {
border-radius: 50rem !important;
}
.ui.progress .bar {
min-width: 1.8em !important;
border-radius: 15px !important;
line-height: 1.65em !important;
}
.ui.fine.progress> .bar {
background-color: #21ba45 !important;
}
.ui.progress> .bar {
background-color: #000 !important;
}
.ui.progress.fine .bar {
background-color: #21ba45 !important;
}
.ui.progress.warning .bar {
background-color: #ff9800 !important;
}
.ui.progress.error .bar {
background-color: #e41e10 !important;
}
.ui.progress.offline .bar {
background-color: #000 !important;
}
/* 上传下载 */
.status.cards .outline.icon {
margin-right: 1px !important;
}
i.arrow.alternate.circle.down.outline.icon {
color: #21ba45 !important;
}
i.arrow.alternate.circle.up.outline.icon {
color: red !important;
}
/* 弹出卡片小箭头 */
.ui.right.center.popup {
margin: -3px 0 0 0.914286em !important;
-webkit-transform-origin: left 50% !important;
transform-origin: left 50% !important;
}
.ui.bottom.left.popup {
margin-left: 1px !important;
margin-top: 3px !important;
}
.ui.top.left.popup {
margin-left: 0 !important;
margin-bottom: 10px !important;
}
.ui.top.right.popup {
margin-right: 0 !important;
margin-bottom: 8px !important;
}
.ui.left.center.popup {
margin: -3px .91428571em 0 0 !important;
-webkit-transform-origin: right 50% !important;
transform-origin: right 50% !important;
}
.ui.right.center.popup:before,
.ui.left.center.popup:before {
border: 0px solid #fafafaeb !important;
background: #fafafaeb !important;
}
.ui.top.popup:before {
border-color: #fafafaeb transparent transparent !important;
}
.ui.popup:before {
border-color: #fafafaeb transparent transparent !important;
}
.ui.bottom.left.popup:before {
border-radius: 0 !important;
border: 1px solid transparent !important;
border-color: #fafafaeb transparent transparent !important;
background: #fafafaeb !important;
-webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
box-shadow: 0px 0px 0 0 #fafafaeb !important;
-webkit-tap-highlight-color: rgba(0,0,0,0) !important;
}
.ui.bottom.right.popup:before {
border-radius: 0 !important;
border: 1px solid transparent !important;
border-color: #fafafaeb transparent transparent !important;
background: #fafafaeb !important
-webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
box-shadow: 0px 0px 0 0 #fafafaeb !important;
-webkit-tap-highlight-color: rgba(0,0,0,0) !important;
}
.ui.top.left.popup:before {
border-radius: 0 !important;
border: 1px solid transparent !important;
border-color: #fafafaeb transparent transparent !important;
background: #fafafaeb !important;
-webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
box-shadow: 0px 0px 0 0 #fafafaeb !important;
-webkit-tap-highlight-color: rgba(0,0,0,0) !important;
}
.ui.top.right.popup:before {
border-radius: 0 !important;
border: 1px solid transparent !important;
border-color: #fafafaeb transparent transparent !important;
background: #fafafaeb !important;
-webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
box-shadow: 0px 0px 0 0 #fafafaeb !important;
-webkit-tap-highlight-color: rgba(0,0,0,0) !important;
}
.ui.left.center.popup:before {
border-radius: 0 !important;
border: 1px solid transparent !important;
border-color: #fafafaeb transparent transparent !important;
background: #fafafaeb !important;
-webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
box-shadow: 0px 0px 0 0 #fafafaeb !important;
-webkit-tap-highlight-color: rgba(0,0,0,0) !important;
}
/* 弹出卡片 */
.status.cards .ui.content.popup {
min-width: 20rem !important;
line-height: 2rem !important;
border-radius: 5px !important;
border: 1px solid transparent !important;
background-color: #fafafaeb !important;
font-family: Arial,Helvetica,sans-serif !important;
}
.ui.content {
margin: 0 !important;
padding: 1em !important;
}
/* 服务页 */
.ui.table {
background: RGB(225,225,225,0.6) !important;
}
.ui.table thead th {
background: transparent !important;
}
/* 服务页进度条 */
.service-status .good {
background-color: #21ba45 !important;
}
.service-status .danger {
background-color: red !important;
}
.service-status .warning {
background-color: orange !important;
}
/* 版权 */
.ui.inverted.segment, .ui.primary.inverted.segment {
color: #000 !important;
font-weight: bold !important;
background-color: #fafafaa3 !important;
}
</style>
评论区