Board logo

標題: How to install and run centos 6 and asterisk in a VMWare VM machine 已完成 [打印本頁]

作者: ckleea    時間: 2011-10-8 23:03     標題: How to install and run centos 6 and asterisk in a VMWare VM machine 已完成

本帖最後由 ckleea 於 2011-10-19 08:33 編輯

Initially I have just put a centos 6 VM in my linux server running under ATOM D525 CPU, 4GB Ram and Centos 5.7 32 bits and wish to see the performance. I use VMPlayer 4.0

screenshot.08-10-2011 22.54.04.png

I find the speed and performance of the old image is acceptable. Now I have an idea to set up a new Centos 6 - 32 bits, Asterisk 1.8x with GUI and MySQL backend, plus some other web service on a VM for testing first and then for second asterisk server.

Please see my thread below for information and progress. Look promising.

圖片附件: screenshot.08-10-2011 22.54.04.png (2011-10-8 23:02, 170.66 KB) / 下載次數 697
http://www.telecom-cafe.com/forum/attachment.php?aid=942&k=ee70e2a863a96cf6b0012e02cf58e81a&t=1714375339&sid=6iNch0


作者: ckleea    時間: 2011-10-9 08:11

I must say it is a bit too difficult to install VM in a 32bits Atom CPU Linux server.
作者: ckleea    時間: 2011-10-9 15:14

本帖最後由 ckleea 於 2011-10-10 08:57 編輯

technically, there are some problems in enabling the network of Centos 6.
1. need to change /etc/sysconfig/networking/devices/ifcfg-eth0 ONBOOT=yes

If eth0 is still not found, delete the ifcfg-eth0 in /etc/sysconfig/networking/devices/ and /etc/sysconfig/networking/profiles/default

Recreate the file by using vi

2. Then check with system-config-network to see if a proper AMD device is bound to eth0
** AMD is the default network adaptor for VMPlayer

This must be done before you can proceed.

?? Bug in Centos 6
作者: ckleea    時間: 2011-10-9 15:15

In VMPlayer, the network adaptor is using bridged mode instead of NAT because I want to access it later over internet
作者: ckleea    時間: 2011-10-9 15:17

Once I complete, I issue an "yum update". the system is then getting the updates


screenshot.09-10-2011 15.09.09.png

圖片附件: screenshot.09-10-2011 15.09.09.png (2011-10-9 15:16, 250.04 KB) / 下載次數 603
http://www.telecom-cafe.com/forum/attachment.php?aid=952&k=f5ebb700c7554033e2998f56bf9b069b&t=1714375339&sid=6iNch0


作者: ckleea    時間: 2011-10-9 15:34

The next is a reboot and then install

the followings
1. webmin from www.webmin.com
2. add ELRepo

rpm --import http://elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://elrepo.org/elrepo-release-6-4.el6.elrepo.noarch.rpm

Add Repoforge or previously rpmforge

rpm -Uvh http://pkgs.repoforge.org/rpmfor ... 2-2.el6.rf.i686.rpm

3. yum groupinstall "Administration Tools" "Development Tools"  "MySQL Database" "Server Configuration Tools" "Web Server"
作者: ckleea    時間: 2011-10-9 15:34

本帖最後由 ckleea 於 2011-10-10 08:58 編輯

Next step is to follow the steps in thread #3 of this

http://www.telecom-cafe.com/foru ... &extra=page%3D1

I will get an update script and post here. It will help you to automate the installation.
作者: ckleea    時間: 2011-10-9 15:34

本帖最後由 ckleea 於 2011-10-10 09:26 編輯

A centos virtual machine within D525 ATOM CPU runs at reasonably ok speed.

But a few hurdles
1. The network issue - fixed based on changing ONBOOT=no to yes;
Finding the network card again and bind to eth0

2. The read write problems; a few errors come in as
- cannot connect to /car/run/asterisk/asterisk.ctl
- asterisk GUI can log inbut show do not have the manager privileges

Cause: security issues behind selinux
Solution: change to permissive or disable mode

The file is located at /etc/selinux/config

Now the GUI can be accessed

screenshot.2.jpg

圖片附件: screenshot.2.jpg (2011-10-10 09:26, 108.64 KB) / 下載次數 611
http://www.telecom-cafe.com/forum/attachment.php?aid=956&k=6d05a0d81658fd125535f5d166d93f9d&t=1714375339&sid=6iNch0


作者: ckleea    時間: 2011-10-9 15:36

本帖最後由 ckleea 於 2011-10-10 22:21 編輯

Follow this thread to install tigervnc-server

http://wiki.centos.org/HowTos/VNC-Server

Then, my installed programs are

Installed Groups:
   Additional Development
   Base
   CIFS file server
   Chinese Support
   Console internet tools
   Debugging Tools
   Desktop Debugging and Performance Tools
   Development tools
   Directory Client
   Directory Server
   E-mail server
   FTP server
   Fonts
   General Purpose Desktop
   Graphical Administration Tools
   Hardware monitoring utilities
   Input Methods
   Java Platform
   Large Systems Performance
   Legacy UNIX compatibility
   Legacy X Window System compatibility
   MySQL Database client
   MySQL Database server
   NFS file server
   Network file system client
   Networking Tools
   Optional packages
   PHP Support
   Performance Tools
   Perl Support
   Scientific support
   Server Platform
   System administration tools
   Web Server
   X Window System

Another command to issue is
yum install wine. Xfvb
This should be more than one needed
作者: ckleea    時間: 2011-10-9 15:37

本帖最後由 ckleea 於 2011-10-11 20:35 編輯

Results are not bad

screenshot.11-10-2011 20.26.12.png

圖片附件: screenshot.11-10-2011 20.26.12.png (2011-10-11 20:34, 14.64 KB) / 下載次數 641
http://www.telecom-cafe.com/forum/attachment.php?aid=964&k=39a9714e91b3a0e9388e847edf50ae4d&t=1714375339&sid=6iNch0


作者: ckleea    時間: 2011-10-9 15:38

本帖最後由 ckleea 於 2011-10-19 08:35 編輯

So far it is almost fully functioning except DTMF. No idea why?

Follow-up:
DTMF is an issue for every system. It needs trial and error and fine tuning.

So far I have been successful to make it work for some soft clients, some hard phone, some mobile phone but not all. I think I will stop here.
作者: ckleea    時間: 2011-10-9 15:38

本帖最後由 ckleea 於 2011-10-19 08:41 編輯

The latest set up as follow

1. VM - centos 6 + Asterisk 1.8.7.1 were built and run under a Centos 5.7 server
2. The Centos 5.7 server also has an Asterisk 1.8.7.1
3. the two asterisks were bound to two separate IPs through router configuration.
4. They were connected via SIP and IAX trunks
5. I also installed other SIP and IAX trunks to make connections to outside work
6. Both servers can access SPA3000 and OBi110 for GV and PSTN via HTTP digest auth
7. My primary server held the siptosis trunks. My VM server can assess SKYPE via intranet.
8. My VM server can access my overseas point via SIP and IAX trunks
9. All the config files were trimmed down to remove unnecessary coding.
10. Weekly scheduled task for backup was made
11. CDR records of VM Asterisk can be viewed via primary HTTP webserver
作者: ckleea    時間: 2011-10-10 09:01

本帖最後由 ckleea 於 2011-10-19 08:44 編輯

Outstanding task

1. configure mail client to deliver voicemail via emails
2. configure fax service for the VM asterisk
3. configure other SIP trunks to improve coverage
4. review and revise the primary asterisk server to improve its functionality and trim down any unnecessary code.
作者: ckleea    時間: 2011-10-10 09:02

本帖最後由 ckleea 於 2011-10-19 08:47 編輯

Asterisk GUI has been configured but is of no use now.

I have not used users.conf to hold the extensions information.
作者: ckleea    時間: 2011-10-10 09:02

本帖最後由 ckleea 於 2011-10-19 08:48 編輯

My latest config files in /etc/asterisk

screenshot.19-10-2011 08.39.42.png

圖片附件: screenshot.19-10-2011 08.39.42.png (2011-10-19 08:48, 39.41 KB) / 下載次數 646
http://www.telecom-cafe.com/forum/attachment.php?aid=972&k=024bef476dcbed55912412304874ae55&t=1714375339&sid=6iNch0


作者: ckleea    時間: 2011-10-10 09:03

本帖最後由 ckleea 於 2011-10-19 08:51 編輯

My asterisk setup file for sharing

asterisk.setup.tar (10 KB)

附件: asterisk.setup.tar (2011-10-19 08:51, 10 KB) / 下載次數 628
http://www.telecom-cafe.com/forum/attachment.php?aid=973&k=38bb6b4d6606e14293b1b9e7e18d8197&t=1714375339&sid=6iNch0
作者: ckleea    時間: 2011-10-10 09:03

本帖最後由 ckleea 於 2011-10-19 14:55 編輯

The email delivered function has been implemented.
Weekly backup functions added
Shared folder added to allow VM communicate with Cenots 5.7 server
作者: ckleea    時間: 2011-10-20 07:31

Some points of notice in the configuration


While installing this VM asterisk, I start to learn in more details on how to share resources.

In my primary server, I have installed IAXmodem for fax in and out functions. Within the lan environment,I expect that by putting in peers information into the iax.conf and dialplan in the extensions.conf, fax functionality should work. However, I notice this is not working at the beginning when I type iax2 show peers showing no connection. The reason is that my firewall rules in the primary server is so strict that it won't allow connection from my lan users to connect to the udp port of IAXmodem. Once I change the iptables rule, it connects.
作者: ckleea    時間: 2011-10-24 09:33

Share resources between linux host and linux within linux client are succeeded

Need to reinstall vmware tools again in the vmware and a reboot will allow the shared directories to come up. Once it is available under /mnt/hgfs; my automatic backup scripts can run properly and regular backup the whole system back to my main sever. One may choose to further process the backup tgz files for DVD archives, etc.

I can also now automatically load and run the VM machine after my linux server is up.

I put a line in my /etc/init.d/rc.local as
/path/vmplayer /path/VM/vm???.vmx

However, need to work out a script to shut down the VM first when I issue any reboot or shutdown command to the linux host




歡迎光臨 電訊茶室 (http://www.telecom-cafe.com/forum/) Powered by Discuz! 7.2