美文网首页玩转树莓派通信与流媒体树莓派
在树莓派上安装RasPBX,实现一个SIP电话系统

在树莓派上安装RasPBX,实现一个SIP电话系统

作者: 全栈顾问 | 来源:发表于2019-08-25 20:31 被阅读3次

    用树莓派安装raspbx镜像,建立一个基于asterisk的sip电话系统。

    下载RasPBX镜像文件

    http://download.raspberry-asterisk.org/raspbx-04-04-2018.zip

    • Asterisk 13.20.0
    • FreePBX 14.0.2.10

    清除SD卡

    1. 打开聚焦搜索(Spotlight)。
    2. 输入disk utility ,打开磁盘工具.app
    3. 在左面选择SD卡,执行抹掉操作,磁盘格式选择MS-DOS (FAT)

    安装镜像

    在终端中执行命令,卸载SD卡:

    diskutil list
    diskutil unmountdisk /dev/disk2 #每个机器可能不一样
    

    在终端中执行命令,写入SD卡:

    cd Downloads
    sudo dd if=raspbx-04-04-2018.img of=/dev/disk1 bs=2m
    

    提示:要执行好长时间(大概有15分钟)!!!

    启动树莓派

    把SD卡放入树莓派后启动。

    SSH登录

    user:root
    password:raspberry

    WEB登录

    按提示创建管理员账户。

    扩展SD空间

    镜像只使用了4GB的空间,如果SD的空间比这个大,可以进行扩展。

    检查空间,执行命令:

    root@raspbx:~# df -h
    

    查看第二分区的起始地址,后面会用到

    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).
    

    重启系统

    sudo reboot
    

    重启系统后查看,磁盘空间并没有扩展,需要执行命令:

    sudo resize2fs /dev/mmcblk0p2
    

    相关文章

      网友评论

        本文标题:在树莓派上安装RasPBX,实现一个SIP电话系统

        本文链接:https://www.haomeiwen.com/subject/ynwhectx.html