Was this page helpful?

PlugPBX

  • You do not have permissions to view this page - please try logging in.

PlugPBX - FreePBX + Asterisk on Debian

官方網址:http://www.plugpbx.org/

需要的硬體:

  • SheevaPlug
  • SD SDHC Class6 4GB+ (NOTE: 有些4GB卡實際的可用容量可能小於 4GB,此時會遇到無法寫入的問題,建議使用比 4GB 還大容量的卡)
  • SDHC Card Reader (for USB)

 

PlugPBX 預設帳號密碼:

  • SSH console : root / password

寫入 image 至 SDHC 卡

// 下載軟體 win32diskimager
https://launchpad.net/win32-image-writer

開啟軟體,將所下載的 image 寫入到 SDHC。

設定 UBoot 以 SDHC Card 開機

// 檢查 UBoot version 需 3.4.19 以後,才有支援 SDHC 開機
Windows XP 與 SheevaPlug 用 mini-USB 接上,開啟 PuTTY 並開啟 Console 視窗,SheevaPlug 插上電源開機。

透過 PuTTY 的視窗可以看到開機的狀態,當出現

Hit any key to stop autoboot... <按下任一鍵>
Marvell >>

當看到 Marvell 提示字元時,表示已進入了 UBoot 命令模式,輸入以下指令:

Marvell>> setenv mainlineLinux yes
Marvell>> setenv arcNumber 2097
Marvell>> setenv bootargs_console console=ttyS0,115200
Marvell>> setenv bootcmd_mmc 'mmcinit; ext2load mmc 0 0x0800000 /uInitrd; ext2load mmc 0 0x400000 /uImage'
Marvell>> setenv bootcmd 'setenv bootargs $(bootargs_console); run bootcmd_mmc; bootm 0x400000 0x0800000'
Marvell>> saveenv
Marvell>> reset 

若一切順利應該會開始啟動 SDHC 的 PlugPBX 系統。

TIPs:

若開機訊息不小心跳過,可以用 root 登入後,執行 reboot 重開機再來一次,或者拿尖物戳 SDHC 槽右側的小孔。

PlugPBX 系統資訊

檔案系統

PlugPBX:~# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mmcblk0p2        3.4G  854M  2.4G  27% /
tmpfs                 252M     0  252M   0% /lib/init/rw
udev                   10M  128K  9.9M   2% /dev
tmpfs                 252M     0  252M   0% /dev/shm
/dev/mmcblk0p1        206M   17M  179M   9% /boot

PlugPBX:~# mount
/dev/mmcblk0p2 on / type ext2 (rw,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
/dev/mmcblk0p1 on /boot type ext2 (rw) 

Linux 版本

PlugPBX:~# uname -a
Linux PlugPBX 2.6.30-2-kirkwood #1 Sun Sep 27 22:57:55 UTC 2009 armv5tel GNU/Linux

PlugPBX:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux testing (squeeze)
Release:        testing
Codename:       squeeze

PlugPBX:~# cat /proc/version
Linux version 2.6.30-2-kirkwood (Debian 2.6.30-8) (waldi@debian.org) (gcc version 4.3.4 (Debian 4.3.4-3) ) #1 Sun Sep 27 22:57:55 UTC 2009

記憶體狀態

PlugPBX:~# free
             total       used       free     shared    buffers     cached
Mem:        515888     136552     379336          0       3092      72248
-/+ buffers/cache:      61212     454676
Swap:       224868          0     224868

Asterisk 系統

PlugPBX:~# asterisk -rx "core show version"
Asterisk 1.6.1.11 built by root @ debian on a armv5tel running Linux on 2009-12-14 03:19:39 UTC

 

Web UI

Home

plugpbx-home.png

ARI

plugpbx-ARI.png

FOP

plugpbx-fop.png

FreePBX

plugpbx-freepbx.png

phpSysInfo

plugpbx-phpsysinfo.png

MUNIN

plugpbx-munin.png

WEBMIN

 plugpbx-webmin.png

系統優化

// 關閉所有不需要的模組
// 註解所有的模組項目

vi /etc/dahdi/modules

// 關閉 IPV6 功能

echo "blacklist ipv6" >> /etc/modprobe.d/blacklist.conf

檢查 ipv6 呈開啟狀態時

PlugPBX:~# lsmod
Module                  Size  Used by
dahdi_dummy             3632  0
dahdi                 192688  1 dahdi_dummy
crc_ccitt               2084  1 dahdi
ipv6                  284676  31                     << 注意這行
loop                   15032  0
ext2                   63916  2
mbcache                 8248  1 ext2
mmc_block              10172  4
ehci_hcd               34648  0
mvsdio                  7544  0
mmc_core               55124  2 mmc_block,mvsdio
usbcore               137016  2 ehci_hcd
mv643xx_eth            26092  0
libphy                 22724  1 mv643xx_eth

PlugPBX:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:50:43:1c:12:3a brd ff:ff:ff:ff:ff:ff
    inet 10.1.1.46/24 brd 10.1.1.255 scope global eth0
    inet6 fe80::250:43ff:fe1c:123a/64 scope link          << 注意這行
       valid_lft forever preferred_lft forever

PlugPBX:~# netstat -lt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 *:5038                  *:*                     LISTEN
tcp        0      0 localhost:sunrpc        *:*                     LISTEN
tcp        0      0 *:webmin                *:*                     LISTEN
tcp        0      0 *:cisco-sccp            *:*                     LISTEN
tcp        0      0 *:munin                 *:*                     LISTEN
tcp        0      0 *:ssh                   *:*                     LISTEN
tcp        0      0 *:smtp                  *:*                     LISTEN
tcp        0      0 *:4445                  *:*                     LISTEN
tcp        0      0 *:36829                 *:*                     LISTEN
tcp        0      0 localhost:mysql         *:*                     LISTEN
tcp6       0      0 [::]:www                [::]:*                  LISTEN   <<
tcp6       0      0 [::]:ssh                [::]:*                  LISTEN   <<
tcp6       0      0 [::]:microsoft-ds       [::]:*                  LISTEN   <<
tcp6       0      0 [::]:netbios-ssn        [::]:*                  LISTEN   <<

// 關閉 Samba 服務

update-rc.d -f samba remove

F.A.Q

依照 PlugPBX 教學設定 SDHC Boot,但始終出現錯誤訊息:
編輯區段
USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME], egiga1
Hit any key to stop autoboot:  0
SDHC found. Card desciption is:
Manufacturer:       0x1b, OEM "SM"
Product name:       "00000", revision 1.0
Serial number:      1909810478
Manufacturing date: 9/2010
CRC:                0x00, b0 = 0
Failed to mount ext2 filesystem...
** Bad ext2 partition or disk - mmc 0:1 **
Failed to mount ext2 filesystem...
** Bad ext2 partition or disk - mmc 0:1 **
## Booting image at 00800000 ...
Bad Magic Number

Ans: 請改用 win32diskimager 將 image 寫入 SDHC,下載連結 https://launchpad.net/win32-image-writer

使用 SDHC boot 時,停在訊息:done, booting the kernel.
編輯區段

Ans: 進入 U-Boot 模式

Marvell>> resetenv
Marvell>> reset
...
...
Marvell>> setenv mainlineLinux yes
Marvell>> setenv arcNumber 2097
Marvell>> setenv bootargs_console console=ttyS0,115200
Marvell>> setenv bootcmd_mmc 'mmcinit; ext2load mmc 0 0x0800000 /uInitrd; ext2load mmc 0 0x400000 /uImage'
Marvell>> setenv bootcmd 'setenv bootargs $(bootargs_console); run bootcmd_mmc; bootm 0x400000 0x0800000'
Marvell>> saveenv 
Was this page helpful?
標籤 (Edit tags)
  • No tags
您必須 登入 才能發佈評論。
Powered by MindTouch Core