13/12/13

on Leave a Comment

Linux command

1. Kiểm tra lại dung lượng các HDD đã có:

[root@centos ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 14G 5.9G 7.4G 45% /
/dev/sda1 190M 11M 170M 7% /boot
tmpfs 252M 0 252M 0% /dev/shm

2. Fdisk ổ đĩa mới thêm vào. (Chú ý : phải dùng User: root)

[root@centos /]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): m
----------
Command (m for help): p
Disk /dev/sdb: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
-------------------
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
----------------------

3. Tạo hệ thống file, sau khi phân vùng đã được tạo

[root@centos /]# mkfs -V -t ext3 /dev/sdb
mkfs (util-linux 2.13-pre7)
mkfs.ext3 /dev/sdb
mke2fs 1.39 (29-May-2006)
/dev/sdb is entire device, not just one partition!
Proceed anyway? (y,n) y
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
262144 inodes, 524288 blocks
26214 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=536870912
16 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information:
done
This filesystem will be automatically checked every 21 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.

4. Kiểm tra hệ thống file:

[root@centos /]# fsck /dev/sdb
fsck 1.39 (29-May-2006)
e2fsck 1.39 (29-May-2006)
/dev/sdb: clean, 11/262144 files, 25406/524288 blocks

on Leave a Comment

reset admin password elastix

sqlite3 /var/www/db/acl.db "update acl_user set md5_password='7a5210c173ea40c03205a5de7dcd4cb0' where id=1"

This will reset the password as “palosanto”.

12/12/13

on Leave a Comment

Elastix Recording Location to a different Hard Disk

1. Add the new formatted Hard disk.

2. Create a new mount point for the disk and make asterisk as the owner of that.

#mkdir /monitor

#chown -R asterisk:asterisk /monitor/

3. Create startup script. You can also use fstab for the same.

Edit /etc/rc.local and add the following line. Here  /dev/sdb1 is the first partition of newly attached hard disk.

/bin/mount /dev/sdb1 /monitor

4. Run the startup script.

#cd /etc

#./rc.local

5. Now if you run the below command you should see the hard disk mounted( /dev/sdb1             903G  2.9G  853G   1% /monitor).
# df -h

Filesystem            Size  Used Avail Use% Mounted on

/dev/sda3             895G  2.8G  846G   1% /

/dev/sda1             487M   23M  439M   5% /boot

tmpfs                 2.0G     0  2.0G   0% /dev/shm

/dev/sdb1             903G  2.9G  853G   1% /monitor

6. Remove the monitor folder and link it to new location.

#rm -rf /var/spool/asterisk/monitor

#/bin/ln -s /monitor /var/spool/asterisk

7. Change Extension settings to enable recording in Elastix GUI and check if the files are saved in new location.

5/12/13

on Leave a Comment

Extension of elastix cannot call out

When you set elastix, you hope the specific extension just can call the other internal extension, and it cannot call out through any trunks, you can refer to the below method:

1. please go to the extension which you want to set, and change the context as no-outbound:

11

Mrbaduong. Được tạo bởi Blogger.