系统设置工具
raspi-config
设置root密码
sudo passwd root
修复ping权限
ls -lsa /bin/ping
sudo chmod 4711 /bin/ping
网络设置
vi /etc/network/interfaces
auto eth0
iface eth0 inet static
address xxx.xxx.xxx.xxx
netmask 255.255.248.0
gateway xxx.xxx.xxx.xxx
dns-nameservers xxx.xxx.xxx.xxx
启动网卡
sudo ifup eth0
sudo /etc/init.d/networking restart
代理设置
sudo vi /etc/environment
export http_proxy=”http://134.32.87.142:1080"
export http_proxy=”http://134.32.32.13:31315"
export http_proxy=”http://134.32.32.13:31081"
sudo vi /etc/apt/apt.conf.d/10proxy
Acquire::http::Proxy “http://134.32.87.142:8080/";
Acquire::http::Proxy “http://134.32.32.13:31315/";
apt-get使用阿里云镜像
sudo vi /etc/apt/sources.list
deb http://mirrors.aliyun.com/raspbian/raspbian/ wheezy main non-free contrib
deb-src http://mirrors.aliyun.com/raspbian/raspbian/ wheezy main non-free contrib
redsocks透明代理网关
开启IPV4转发:
sudo vi /etc/sysctl.conf
net.ipv4.ip_forward=1
sysctl -p /etc/sysctl.conf
源码编译Redsocks:
sudo apt install libevent-dev
make
redsocks配置文件:
sudo vi /etc/redsocks.conf
1 | base { |
iptables配置:
1 | iptables -F |
dnsmasq架设DNS服务器
sudo apt install dnsmasq
shadowsocks
apt-get install python-pip
pip install shadowsocks
nginx配置端口
sudo vi /etc/nginx/sites-available/default
listen 30080;
设置时间
sudo raspi-config
ntpd -q -g
sudo date -s “2016-11-8 14:20:00”