Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
725aff8
commit 4c0a857
Showing
5 changed files
with
106 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
title: "hostapd开启wifi热点" | ||
date: 2023-02-25T21:36:23+08:00 | ||
draft: false | ||
--- | ||
|
||
1. 安装hostapd,iptables | ||
2. 配置hostapd | ||
``` conf | ||
``` | ||
3. 创建nat | ||
``` shell | ||
root# ip a | ||
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 | ||
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 | ||
inet 127.0.0.1/8 scope host lo | ||
valid_lft forever preferred_lft forever | ||
inet6 ::1/128 scope host | ||
valid_lft forever preferred_lft forever | ||
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 | ||
link/ether f2:d2:3a:03:ab:19 brd ff:ff:ff:ff:ff:ff | ||
inet 192.168.0.101/24 brd 192.168.0.255 scope global dynamic noprefixroute eth0 | ||
valid_lft 7066sec preferred_lft 7066sec | ||
inet6 fe80::77be:d660:47ad:52bd/64 scope link noprefixroute | ||
valid_lft forever preferred_lft forever | ||
3: wlx90de80682540: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 | ||
link/ether 90:de:80:68:25:40 brd ff:ff:ff:ff:ff:ff | ||
inet6 fe80::92de:80ff:fe68:2540/64 scope link | ||
valid_lft forever preferred_lft forever | ||
|
||
## 分配ip地址 | ||
ip address add 192.168.66.1/24 dev wlx90de80682540 | ||
|
||
## 设置转发规则 | ||
iptables -t nat -A POSTROUTING -s 192.168.66.0/24 -o eth0 -j MASQUERADE | ||
## 保存转发规则 | ||
apt install iptables-persistent (armbian) | ||
|
||
## 允许包转发 | ||
/etc/sysctl.d/30-ipforward.conf: | ||
net.ipv4.ip_forward=1 | ||
net.ipv6.conf.default.forwarding=1 | ||
net.ipv6.conf.all.forwarding=1 | ||
|
||
##如果存在ufw | ||
/etc/default/ufw : default_forward_policy = "accept" | ||
/etc/ufw/sysctl.conf : net/ipv4/ip_forward=1 \n net/ipv6/conf/default/forwarding=1 \n net/ipv6/conf/all/forwarding=1 | ||
|
||
|
||
## udhcpd | ||
/etc/default/udhcpd: | ||
start 192.168.66.2 | ||
end 192.168.66.254 | ||
opt dns 192.168.66.1 223.5.5.5 | ||
option subnet 255.255.255.0 | ||
opt router 192.168.66.1 | ||
option dns 192.168.66.1 | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
title: "Nextcloud轻量安装" | ||
date: 2023-02-26T13:20:53+08:00 | ||
draft: false | ||
--- | ||
|
||
# 前言 | ||
|
||
# 准备工作 | ||
1. 挂载硬盘 | ||
``` fstab | ||
/dev/nas/data /mnt/data ext4 nofail,x-systemd.device-timeout=100ms 0 0 | ||
#外部设备在插入时挂载,在未插入时忽略。这需要 nofail 选项,可以在启动时若设备不存在直接忽略它而不报错。举个例子: | ||
``` | ||
2. 安装软件包 | ||
nginx php-fpm php-sqlite3 php-zip php-xml(dom) php-gd php-curl php-mbstring php-intl php-imagick php-bcmath | ||
3. 下载nextcloud,并解压 | ||
wget https://download.nextcloud.com/server/releases/latest.zip | ||
unzip last.zip | ||
chown www-data:www-data nextcloud -R | ||
4. 配置php | ||
|
||
# | ||
|
10 changes: 10 additions & 0 deletions
10
resources/_gen/assets/scss/scss/main.scss_ac1f3ece4e1f9aa2cf6c902ff1ab1954.content
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
resources/_gen/assets/scss/scss/main.scss_ac1f3ece4e1f9aa2cf6c902ff1ab1954.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"Target":"css/meme.min.2f315c1da0681fba3567f06bf1e80fb1aab086706e2a39e8534660391903c0f1.css","MediaType":"text/css","Data":{"Integrity":"sha256-LzFcHaBoH7o1Z/Br8egPsaqwhnBuKjnoU0ZgORkDwPE="}} |