返回列表 發帖

【Raspberry Pi 1 Model B and 2】—— Debian 8 Jessie Based Image

本帖最後由 ckleea 於 2015-6-13 09:35 編輯

Debian 8 Jessie Based image for Raspberry Pi B/B+2
Created from the netinstaller scripts with the latest Debian 8 Jessie OS and the following packages
1. Asterisk 11 with chan_dongle support, codec g729 and silk, switchfin gui
2. Remote desktop support by tightvncserver and xrdp; xterminal desktop 用了XFCE4
3. VPN support by pptpd, softether (openvpn, sstp), ocserv, Adito (OpenVPN-ALS), StrongSWAN
4. Apache with reverse proxy support for web server
5. Mysql server
6. Kamailio sip proxy
7. Iptables with spamtables for blacklist sites
8. Webmin for server management

Images for three raspberry hardware are:
1. Raspberry Pi 2
https://drive.google.com/file/d/ ... k0/view?usp=sharing

2.  Raspberry Pi B+
https://drive.google.com/file/d/ ... W8/view?usp=sharing

3. Raspberry Pi B
https://drive.google.com/file/d/ ... G8/view?usp=sharing

Preparation and installation instruction:
1. 8GB or above Micro SD for Raspberry Pi 2/B+; 8GB or above SD for Raspberry Pi B
2. Use DD in Linux or WinDD for Windows to copy the uncompressed image to SD or Micro SD card
3. Use GParted to expand the second partition to the maximum size (it is cut down to the smallest size before the image is released). GParted can be downloaded from ISO or if you have a working Raspian image, login in GUI and install gparted.
4. 8GB should be enough as the current OS and software packages used only 3.7GB
5. Reboot the Raspberry PI 2/B+/B with the new SD or micro SD card
6. Note that there is a small bug that the red LED is off. No big deal as it is less disturbing with no flashing light
7. Check if you can get an IP for your Raspberry Pi. If yes, SSH login in via Putty
Raspberry Pi 2  - root/raspberypi2
Raspberry Pi B+/B  - root/raspbian
8. If there is no network address assigned, you have to login via local console. Same password as above.
Type ifconfig, you should see the network address for eth0
If no network device eth0 is found, do the following in the console

cd /etc/udev/rules.d
rm 70*.*
reboot

Upon reboot, you should find the raspberry with network address assigned by your router through DHCP

9. Minor suggestion, as DHCP is used, suggest to login in your router to reserve a fixed IP to your raspberry by its mac address

If you can access the raspberry by putty, everything should work

Configuration
I have installed the service with ports as
1. asterisk sip port: 15066
2. as kamailio is installed as sip proxy, 5060 is reserved for it
3. asterisk GUI is provided by switchfin GUI, access by http://your_ip:10080/ login in as admin/ippbx2015
4. softether VPN is set up for openvpn and sstp on their standard ports; login password as raspberrypi2 or raspbian
5. ocserv at port 4443; account is rpi/raspbian or rpi2/raspberypi2. user password file at /etc/ocserv/ocpassword
6. webmin is on default https://your_ip:10000/

If you want to try kamailio, several accounts are created
1081, 1082, 1083, 1084
password is raspberrypi2 or raspbian
If your sip client can login into this account, your asterisk will be login as well using realtime.
However, you encounter problems or not familiar with kamailio, you may remove it by apt-get remove kamailio

I am sorry that support to the images will be limited.

其要是最主要是更新更新了系統到Debian 8 Jessie ,它可以直接支援ocserv
不過它加入了 systemd & apache 2.4,有部分config files要做相應更新。

"Jessie" ships with a new default init system, systemd. The systemd suite provides many exciting features such as faster boot times, cgroups for services, and the possibility of isolating part of the services. The sysvinit init system is still available in "Jessie".

TOP

基本上,系統影像已經完成。

由於用netinstaller,所以軟件是可以由自己決定安裝。

現時,有的是
1. Asterisk 11 with chan_dongle support, codec g729 and silk, switchfin gui
2. Remote desktop support by tightvncserver and xrdp; xterminal desktop 用了XFCE4
3. VPN support by pptpd, softether (ipsec, openvpn, sstp), ocserv
4. Apache with reverse proxy support for web server
5. Mysql server
6. Kamailio sip proxy
7. Iptables with spamtables for blacklist sites
8. Webmin for server management

由於要下載大部份軟件和做 asterisk compilation,所以要用約半天時間完成。

SD card 現時是用了 3.6GB,用linux dd command 製造了SD card 影像, 然後壓縮成一個 1.27GB zip file。

TOP

相信大家家中可能還有舊的細容量 micro SD card,4GB 系統是合適不過。

TOP

Asterisk Codec
screenshot.19-05-2015 20.19.15.png

Switchfin GUI
screenshot.19-05-2015 20.21.51.png

TOP

由於影像放在不同device 會出現map 不到網絡卡的情況,所以要做更新。

另外,因行 softether VPN 的sstp 與 Apache2 的SSL 相沖,所以要改動設定。

TOP

回復 6# ckleea


是否support Google Voice?

TOP

回復 7# bigtoodog

我沒有搞,理論上 asterisk 11是支援

TOP

影像已經完成,有些地方和以前不同。
1. 壓縮成1.27Gb tgz 檔案,需要用 dd for linux 或 DD for windows (http://www.chrysocome.net/dd) 放回 Micro SD card
2. 需要用 GParted 將 Micro SD card 內的第二個 Partition 擴大
3. 首次起動需要找回ethernet card 放回 eth0 (mac address 的問題)
4. 插入 USB 手指或硬碟會出現 錯誤訊息 (error)或不能起動。有解決方法,但由於我的安裝是 server和現在的Micro SD card 容易已經足夠。
5. 其它功能正常運作

建議將它放在人家做remote server

TOP

期待樓主的影像,尤其想試試ocserv,因為電信好像把L2TP也封鎖了。

不過,最近回深圳,用中移動4G,它好像把所有VPN都屏敝掉(包括公司的原裝 Cisco AnyConnect SSLVPN,害我連電郵都查不到),不知樓主有否類似經歷?

TOP

回復 10# skpracta

剛睇到你既post, 用了我深圳的大陸中移動4G test, 無任何問題:

IMG_0573.PNG

IMG_0572.PNG

IMG_0574.PNG
Welcome to my TaoBao shop: http://mandymak520.taobao.com/

TOP

回復 11# 雯雯


    非常感謝你的測試,其實大陸的電信商,在甚麼時候屏蔽掉甚麼制式的vpn,也無從可測,我也試過在北京毫無問題地用L2TP、OpenVPN等。

只不過我嘗試用Beaglebone Black去安裝ocserv卻不斷地失敗,才期待著樓主的rpi影像而已。

TOP

如果你沒有更新上debian 8 Jessie, 你做不到ocserv.

現在的影像是可以正常使用。

TOP

如何在Beaglebone 上裝 jessie 可以參考這裡

https://github.com/foosel/OctoPr ... -Rev-C-%28Jessie%29

TOP

回復 12# skpracta

所以只能是盡量有多D唔同既VPN, 多D唔同既電信商既SIM卡旁身.
Welcome to my TaoBao shop: http://mandymak520.taobao.com/

TOP

返回列表