Download:RASPBIAN JESSIE LITE
Minimal image based on Debian Jessie
Version: January 2017
Release date: 2017-01-11
Kernel version: 4.4
$ diskutil umountDisk disk2
$ sudo dd bs=1m if=path_of_your_image.img of=/dev/disk2
Raspbian, the username is 'pi' and the password is 'raspberry'.
重新開啟root帳號,可由pi用戶登錄後,在命令行下執行
$ sudo passwd root
執行此命令後系統會提示輸入兩遍的root密碼,輸入你想設的密碼即可,然後再執行
$ sudo passwd –unlock root
修改時區 $ sudo tzselect
鍵盤配置 $ sudo nano /etc/default/keyboard
XKBLAYOUT="us"
To configure the board to use DHCP settings:
$ sudo nano /etc/network/interfaces
iface eth0 inet dhcp
or static IP
iface eth0 inet static
address 192.168.1.240
netmask 255.255.255.0
gateway 192.168.1.254
$ sudo raspi-config >>> ssh
停用console螢幕保護
$ sudo nano /etc/kbd/config
BLANK_TIME=0
POWERDOWN_TIME=0
NTP $ sudo nano /etc/ntp.conf
server time.stdtime.gov.tw
$ sudo service ntp restart
安裝更新
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install pppoecon
$ sudo pppoeconf
>>> /etc/network/interfaces <<< 啟動時自動連線
連接上網 $ pon dsl-provider
中斷連線 $ poff
可以用管理員身份打「plog」顯示pppd的日誌
$ ip addr show ppp0
# sudo apt-get update && sudo apt-get upgrade
# sudo apt-get install pptpd
# sudo nano /etc/pptpd.conf
localip 192.168.1.240
remoteip 192.168.1.241-244,192.168.1.245
# sudo nano /etc/ppp/pptpd-options
ms-dns 8.8.8.8
noipx
mtu 1490
mru 1490
# sudo nano /etc/sysctl.conf
net.ipv4.ip_forward=1
# sudo nano /etc/rc.local
>>> pppoe >>>
- sudo iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
# sudo nano /etc/ppp/chap-secrets
// Username[TAB]*[TAB]password[TAB]*
vpn * vpn1234 *
# sudo service pptpd restart
沒有留言:
張貼留言