2018
This commit is contained in:
parent
b2d9201c76
commit
2b2c45df65
@ -29,16 +29,15 @@ sudo make release-server release-client
|
|||||||
```
|
```
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
sudo ./bin/ngrokd -tlsKey=server.key -tlsCrt=server.crt -domain="ngrok.hellolight.me" -httpAddr=":8081" -httpsAddr=":8082"
|
# 服务器上运行服务命令
|
||||||
|
sudo ./bin/ngrokd -tlsKey=server.key -tlsCrt=server.crt -domain="ngrok.hellolight.me" -httpAddr=":8081" -httpsAddr=":8082"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
server_addr: "ngrok.hellolight.me:4443"
|
server_addr: "ngrok.hellolight.me:4443"
|
||||||
trust_host_root_certs: false
|
trust_host_root_certs: false
|
||||||
```
|
```
|
||||||
|
|
||||||
./ngrok -subdomain pub -proto=http -config=ngrok.cfg 8000
|
./ngrok -subdomain pub -proto=http -config=ngrok.cfg 8000
|
||||||
|
|
||||||
./ngrok -subdomain pub -proto=http -config=ngrok.cfg 22
|
./ngrok -subdomain pub -proto=http -config=ngrok.cfg 22
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
> virtualenv -p /usr/bin/python3 --system-site-packages venv
|
> virtualenv -p /usr/bin/python3 --system-site-packages venv
|
||||||
|
|
||||||
> virtualenv -p /usr/bin/python2 --no-site-packages venv
|
> virtualenv -p /usr/bin/python2 --no-site-packages venv
|
||||||
|
|||||||
15
raspberry/main.md
Normal file
15
raspberry/main.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# 树莓派安装使用
|
||||||
|
|
||||||
|
## linux下 安装
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
df -h # 查看已有硬盘
|
||||||
|
# 插入sd卡
|
||||||
|
df -h # 查看新增磁盘
|
||||||
|
fdisk /dev/sdx # 删除增加分区
|
||||||
|
|
||||||
|
dd bs=4M if=2017-11-29-raspbian-stretch.img of=/dev/sdX # 写入镜像
|
||||||
|
|
||||||
|
sudo watch -n 5 pkill -USR1 ^dd$ # 查看dd进程
|
||||||
|
|
||||||
|
```
|
||||||
8
ubuntu/aria2.md
Normal file
8
ubuntu/aria2.md
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# ubuntu 下安装使用 aria2
|
||||||
|
|
||||||
|
- http://blog.csdn.net/crazycui/article/details/52205908
|
||||||
|
|
||||||
|
## 安装
|
||||||
|
|
||||||
|
> sudo apt install aria2
|
||||||
|
|
||||||
36
ubuntu/iptables.md
Normal file
36
ubuntu/iptables.md
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
# linux 下使用iptables 做路由转发
|
||||||
|
|
||||||
|
- 参考自 http://blog.csdn.net/whatday/article/details/53634954
|
||||||
|
|
||||||
|
## 环境
|
||||||
|
|
||||||
|
两台设备:
|
||||||
|
ubuntu 16.04
|
||||||
|
eth0 192.168.1.2/24 192.168.1.2
|
||||||
|
wlan0 10.138.177.83 *.*.*.*
|
||||||
|
raspberry pi b+
|
||||||
|
eth0 192.168.1.10/24 192.168.1.2
|
||||||
|
|
||||||
|
## iptables 命令
|
||||||
|
|
||||||
|
参考自 http://man.linuxde.net/iptables
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
iptables -t 表名 <-A/I/D/R> 规则链名 [规则号] <-i/o 网卡名> -p 协议名 <-s 源IP/源子网> --sport 源端口 <-d 目标IP/目标子网> --dport 目标端口 -j 动作
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
## 设置静态ip
|
||||||
|
|
||||||
|
> sudo nano /etc/network/interfaces
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
auto eth0
|
||||||
|
iface eth0 inet static
|
||||||
|
address 192.168.8.100
|
||||||
|
netmask 255.255.255.0
|
||||||
|
gateway 192.168.8.2
|
||||||
|
dns-nameserver 119.29.29.29
|
||||||
|
```
|
||||||
|
|
||||||
|
> sudo /etc/init.d/networking restart # 重启网络
|
||||||
8
ubuntu/update-alternatives.md
Normal file
8
ubuntu/update-alternatives.md
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# update-alternatives
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
# 设置优先级
|
||||||
|
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20
|
||||||
|
# 查询版本
|
||||||
|
sudo update-alternatives --query gcc
|
||||||
|
```
|
||||||
Loading…
x
Reference in New Issue
Block a user