当前在线人数15351
首页 - 博客首页 - 免费收央四等中文卫视 - 图片阅读 [博客首页] [首页]
HomeProject之固定电话篇(四)Asus RT-N16 Asterisk1.8安装
作者:wdm
发表时间:2014-05-28
更新时间:2014-05-28
浏览:2756次
评论:0篇
地址:38.
::: 栏目 :::
大锅小锅一起炖

曾经在两个Asus路由器(Asus RT-N16, Asus N66U)上安装过,过程基本一样.
假设Asus路由器已经刷成Tomato,并开通ssh.我们使用一个4GB的U盘直接插到路由器上,并将Asterisk安装到此U盘上.U盘必顺首先格式化为linux ext2 or ext3系统,直接使用FAT32会导致只读.

第一步:格式化U盘(如果你已经格式化了,直接跳过)

[email protected]:/tmp/home/root# fdisk /dev/sda

Command (m for help): p

Disk /dev/sda: 4007 MB, 4007657472 bytes
255 heads, 63 sectors/track, 487 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 488 3913664 b Win95 FAT32
Partition 1 has different physical/logical endings:
phys=(486, 254, 63) logical=(487, 60, 21)

Command (m for help): m
Command Action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit

Command (m for help): d
Selected partition 1

Command (m for help): p

Disk /dev/sda: 4007 MB, 4007657472 bytes
255 heads, 63 sectors/track, 487 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-487, default 1): Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-487, default 487): Using default v alue 487

Command (m for help): p

Disk /dev/sda: 4007 MB, 4007657472 bytes
255 heads, 63 sectors/track, 487 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 487 3911796 83 Linux

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table
[email protected]:/tmp/home/root# fdisk /dev/sda

Command (m for help): p

Disk /dev/sda: 4007 MB, 4007657472 bytes
255 heads, 63 sectors/track, 487 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 487 3911796 83 Linux

Command (m for help): exit
[email protected]:/tmp/home/root# mkfs.ext2 -L optware /dev/sda1
mke2fs 1.38 (30-Jun-2005)
Filesystem label=optware
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
489600 inodes, 977949 blocks
48897 blocks (5.00%) reserved for the super user
First data block=0
30 block groups
32768 blocks per group, 32768 fragments per group
16320 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736

Writing inode tables: done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 32 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[email protected]:/tmp/home/root# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 8.7M 8.7M 0 100% /
tmpfs 124.9M 356.0K 124.5M 0% /tmp
devfs 124.9M 0 124.9M 0% /dev
[email protected]:/tmp/home/root# mount /dev/sda1 /opt
[email protected]:/tmp/home/root# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 8.7M 8.7M 0 100% /
tmpfs 124.9M 356.0K 124.5M 0% /tmp
devfs 124.9M 0 124.9M 0% /dev
/dev/sda1 3.7G 20.0K 3.5G 0% /opt
至此,格式化完成,并将U盘挂载到/opt上.


第二步,安装asterisk
参考:http://tomatousb.org/tut:optware-installation
[email protected]:/# wget http://tomatousb.org/local--files/tut:optware-installation/optware-install.sh -O - | tr -d 'r' > /tmp/optware-install.sh
[email protected]:/# chmod 755 /tmp/optware-install.sh
[email protected]:/# sh /tmp/optware-install.sh
Checking system config ...
Using 117.94.112.1 as the default gateway.
Using the following nameserver(s):
nameserver 127.0.0.1
Installing package uclibc-opt_0.9.28-13_mipsel.ipk ...
Some newer versions of DD-WRT does not show download progress bar,
so just be patient - or check STATUS -> BANDWIDTH tab for download
activity in your routers Web-GUI, and then still wait a minute or two.
Connecting to ipkg.nslu2-linux.org (140.211.169.161:80)
uclibc-opt_0.9.28-13 100% |*****************************************************************************| 832k 0:00:00 ETA
Updating /opt/etc/ld.so.cache
Installing package ipkg-opt_0.99.163-10_mipsel.ipk ...
Some newer versions of DD-WRT does not show download progress bar,
so just be patient - or check STATUS -> BANDWIDTH tab for download
activity in your routers Web-GUI, and then still wait a minute or two.
Connecting to ipkg.nslu2-linux.org (140.211.169.161:80)
ipkg-opt_0.99.163-10 100% |*****************************************************************************| 75850 0:00:00 ETA
Downloading http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/Packages.gz
Connecting to ipkg.nslu2-linux.org (140.211.169.161:80)
Packages.gz 100% |*****************************************************************************| 119k 0:00:00 ETA
Inflating http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/Packages.gz
Updated list of available packages in /opt/lib/ipkg/lists/optware
Successfully terminated.
Installing uclibc-opt (0.9.28-13) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/uclibc-opt_0.9.28-13_mipsel.ipk
Connecting to ipkg.nslu2-linux.org (140.211.169.161:80)
uclibc-opt_0.9.28-13 100% |*****************************************************************************| 832k 0:00:00 ETA
package uclibc-opt suggests installing ipkg-opt
Configuring uclibc-opt
Updating /opt/etc/ld.so.cache
Successfully terminated.
Installing ipkg-opt (0.99.163-10) to /opt/...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/ipkg-opt_0.99.163-10_mipsel.ipk
Connecting to ipkg.nslu2-linux.org (140.211.169.161:80)
ipkg-opt_0.99.163-10 100% |*****************************************************************************| 75850 0:00:00 ETA
Configuring ipkg-opt
Successfully terminated.

[email protected]:/#ipkg update
[email protected]:/#ipkg upgrade
[email protected]:/#ipkg install asterisk18
此到asterisk1.8安装完成.
如果使用电话留言功能,会发现时间戳不对,这是因为Asterisk未找到正确的timezone引起的,解决方案如下:
[email protected]:/#ipkg install tz (run this if no directory /opt/share/zoneinfo)
[email protected]:/#ln -s /opt/share/zoneinfo /usr/share/zoneinfo

Done!

[上一篇] [下一篇] [发表评论] [写信问候] [收藏] [举报] 
 
暂无评论
 
用户名: 密码:
发表评论
评论:
[返回顶部] [刷新]  [给wdm写信]  [免费收央四等中文卫视首页] [博客首页] [BBS 未名空间站]
 
Site Map - Contact Us - Terms and Conditions - Privacy Policy

版权所有BBS 未名空间站(mitbbs.com) since 1996