用樹莓派安裝raspbx鏡像,建立一個基于asterisk的sip電話系統(tǒng)。
下載RasPBX鏡像文件
http://download.raspberry-asterisk.org/raspbx-04-04-2018.zip
- Asterisk 13.20.0
- FreePBX 14.0.2.10
清除SD卡
- 打開聚焦搜索(Spotlight)。
- 輸入disk utility ,打開
磁盤工具.app。 - 在左面選擇SD卡,執(zhí)行
抹掉操作,磁盤格式選擇MS-DOS (FAT)。
安裝鏡像
在終端中執(zhí)行命令,卸載SD卡:
diskutil list
diskutil unmountdisk /dev/disk2 #每個機器可能不一樣
在終端中執(zhí)行命令,寫入SD卡:
cd Downloads
sudo dd if=raspbx-04-04-2018.img of=/dev/disk2 bs=2m
提示:要執(zhí)行好長時間(大概有15分鐘)?。。?/p>
啟動樹莓派
把SD卡放入樹莓派后啟動。
SSH登錄
user:root
password:raspberry
WEB登錄
按提示創(chuàng)建管理員賬戶。
MySQL數(shù)據(jù)庫
user:root
password:raspberry
擴展SD空間
鏡像只使用了4GB的空間,如果SD的空間比這個大,可以進行擴展。
檢查空間,執(zhí)行命令:
root@raspbx:~# df -h
查看第二分區(qū)的起始地址,后面會用到
root@raspbx:~# cat /sys/block/mmcblk0/mmcblk0p2/start
使用fdisk操作磁盤
root@raspbx:~# sudo fdisk /dev/mmcblk0
Welcome to fdisk (util-linux 2.29.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): d
Partition number (1,2, default 2): 2
Partition 2 has been deleted.
Command (m for help): n
Partition type
p primary (1 primary, 0 extended, 3 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (2-4, default 2): 2
First sector (155648-31116287, default 155648): 157696
Last sector, +sectors or +size{K,M,G,T,P} (157696-31116287, default 31116287):
Created a new partition 2 of type 'Linux' and of size 14.8 GiB.
Partition #2 contains a ext4 signature.
Do you want to remove the signature? [Y]es/[N]o: Y
The signature will be removed by a write command.
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: Device or resource busy
The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).
重啟系統(tǒng)
sudo reboot
重啟系統(tǒng)后查看,磁盤空間并沒有擴展,需要執(zhí)行命令:
sudo resize2fs /dev/mmcblk0p2