Skip to content

Commit

Permalink
修改一些细节
Browse files Browse the repository at this point in the history
  • Loading branch information
firemakergk committed Mar 23, 2023
1 parent 043e9e0 commit ce99565
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 5 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
aquar系统搭建指南
# <center> aquar系统搭建指南

# 整体介绍

Expand Down Expand Up @@ -317,6 +317,7 @@ VirtrIO驱动下载地址:https://fedorapeople.org/groups/virt/virtio-win/dire

### 宿主机:

- [设置PVE的apt源](./details/设置PVE的apt源.md)
- [将PVE设置为DHCP动态地址](./details/把pve配置成DHCP.md)
- [开机IP自检及更新脚本](./details/开机IP自检及更新脚本.md)
- UPS配置
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pip install scapy python-nmap pyfunctional

你可以尝试执行`python3 /opt/aquar/src/truenasseeker.py`命令运行一次看是否会出错,正常情况下它会输出"truenas seeker is no need to do anything."

4.创建`/usr/lib/systemd/system/trunas-scan.service`配置文件,配置内容如下:
4.创建`/usr/lib/systemd/system/truenas-scan.service`配置文件,配置内容如下:

```
[Unit]
Expand All @@ -35,6 +35,6 @@ WantedBy=multi-user.target

5.执行`systemctl daemon-reload`重载系统服务。

6.执行`systemctl enable trunas-scan.service`将脚本设置为开机启动。
6.执行`systemctl enable truenas-scan.service`将脚本设置为开机启动。

7.执行`systemctl status trunas-scan.service`查看服务在loaded那一行是否为enabled。如果是,则代表脚本正常部署了。
7.执行`systemctl status truenas-scan.service`查看服务在loaded那一行是否为enabled。如果是,则代表脚本正常部署了。
45 changes: 45 additions & 0 deletions details/设置PVE的apt源.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
设置PVE的APT源

PVE的默认软件源是他的企业服务地址(enterprise.proxmox.com),我们个人使用需要将其换成国内的软件源。

1.在pve的Web页面中选中pve节点,再打开Shell页面。

2.在命令行中执行`cp /etc/network/interfaces /etc/network/interfaces.bak`,备份当前的网络配置文件。

3.在命令行中执行`vi /etc/network/interfaces`,打开网络配置文件。

默认情况下pve的配置类似下面这样:

```
auto lo
iface lo inet loopback
iface enp0s31f6 inet manual
auto vmbr0
iface vmbr0 inet static
address 192.168.0.99/24
gateway 192.168.0.1
bridge-ports enp0s31f6
bridge-stp off
bridge-fd 0
iface enp3s0 inet manual
```

4.将vmbr0原本的静态IP配置修改成dhcp,配置完成后类似如下形式。

```
auto lo
iface lo inet loopback
iface enp0s31f6 inet manual
auto vmbr0
iface vmbr0 inet dhcp
bridge-ports enp0s31f6
bridge-stp off
bridge-fd 0
iface enp3s0 inet manual
```
2 changes: 1 addition & 1 deletion files/truenasseeker.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def scan():
resList = seq(list(ipInfo['scan'].items())).map(lambda i: (i[0],seq(list(i[1]['tcp'].items())).filter(lambda p: p[1]['state'] == "open").map(lambda pi: pi[0] )))
for res in resList:
logger.info("%s: %s" % (res[0],res[1]))
if 22 not in res[1] and 80 in res[1] and 111 in res[1] and 139 in res[1] and 443 in res[1] and 445 in res[1]:
if 80 in res[1] and 111 in res[1] and 139 in res[1] and 443 in res[1] and 445 in res[1]:
nfsAddress = res[0]

return nfsAddress
Expand Down

0 comments on commit ce99565

Please sign in to comment.