PlugPBX Forums
May 19, 2012, 02:59:59 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Build Asterisk 1.8 .deb for quick installation on Dockstar/Debian  (Read 2789 times)
twinclouds
Jr. Member
**
Posts: 99


Email
« on: March 23, 2011, 10:30:06 PM »

Recently, I spent some time trying to simplify Asterisk 1.8 installation process on Dockstar with Debian Linux, at least for the second time.  The officially supported Asterisk apt-get package always has a long cycle before becoming available.  I tried to do that by myself but I found most of instructions of make .deb packages are quite complex and not suitable for non-linux developer like myself.  Eventually, I found this posting (http://ubuntuforums.org/showthread.php?t=2356) on Ubuntu forum and felt it is quite simple even I can follow  Wink.  I tried it out.  The result is quite satisfactory.  The process is essentially the same as you would do to compile and install Asterisk on Dockstar or any other Debian based platform.  The only difference is that instead of using make install after make, you do a "checkinstall" to generate a .deb package of Asterisk 1.8.  Then you can use the .deb package such generated to install asterisk 1.8 on other Dockstar or do reinstallation if you need, by simply doing a dpkg -i of the asterisk .deb package.
While the dpkg -i of the .deb package works perfectly of install the asterisk 1.8 itself, it does not do two essential steps, i.e., "make samples" and "make config", in normal installation process.  As a result, you will need to manually install the *.conf files in /etc/asterisk/ and asterisk in /etc/init.d/.  Since these files are readily available after you did the normal installation or get from elsewhere, they should be easy to obtain and only need to be copied into the proper directories.
The procedure is described below for others to experiment with.  While it may not be the most elegant solution and maybe more difficult to do than an apt-get install, at least it works.

1. On a Dockstar with Debian Squeeze installed, do an "apt-get install checkinstall."  As usually, always do an "apt-get update" first.
2. Install Asterisk 1.8 as usual.  One example of doing the installation is described in my another post in this forum: http://forums.plugpbx.org/index.php/topic,247.0.html.
3. At step 9 in my previous post, after doing "make", do a "checkinstall" instead of "make install".  It will generate the Asterisk 1.8 .deb file and install it, the same as what "make install" will do.  (The name of my .deb file is asterisk_1.8.3.2-1_armel.deb.  I shall use this name below but yours may be different.).
4. Do "make samples" and "make config", as usual.
5. Copy all of the .conf files in the /etc/asterisk/ directory and the "asterisk" file in the /etc/init.d/ directory to somewhere, e.g., a usb stick, to be saved.  Also copy and save the asterisk_1.8.3.2-1_armel.deb file generated in Step 3.
6. Prepare another Dockstar with Debian Squeeze installed for installation of Asterisk 1.8 using the .deb file generated above.  Log into this Dockstar and copy the asterisk_1.8.3.2-1_armel.deb file into a directory of your choice.
7. In the Dockstar for asterisk 1.8 to be installed, install the following library files to meet the dependency requirement.  (Do a apt-get update first if necessary.)
Code:
apt-get -y install libiksemel-dev openssl libssl-dev libxml2 libxml2-dev
(Note that these library files are sufficient for use gtalk for me.  I don't know if they are sufficient for all of the asterisk functions.  At least dpkg -i didn't complain.)
8. cd into the directory containing the asterisk_1.8.3.2-1_armel.deb file and do:
Code:
dpkg -i asterisk_1.8.3.2-1_armel.deb
9. Copy the asterisk file to /etc/init.d/ and create a /etc/asterisk/ directory then copy the .conf files into it.  (These files were prepared in step 5)
10. Edit the four .conf file as described in the original posting to insert your gtalk credentials.

That's it.  You can test them by doing "asterisk -cvvv" or /etc/init.d/asterisk start to test the Asterisk 1.8 installation.
A few more comments:
1. The whole installation process, once you get the .deb, .conf and the asterisk files takes about only 2 minutes.
2. You can use the .conf file from normal asterisk installation.  However, if you only want to use it for gtalk, I would suggest to use the .conf files given by Mario at: http://www.arctangent.net/~superm1/gv_configs/.  You can delete or save the .conf files generated in the installation process.
3. You may not need to load all of the modules either.  In that case, you can replace the content of the modules.conf file according to what described in http://forum.doozan.com/read.php?2,1647 by petergunn and restamp.
4. All of the steps for installation using the .deb file described above (Steps 5 to 9 or even 10) can be automated by shell scripts.  That is pretty standard.  I can describe my scripts later if needed.
5. The installed Asterisk 1.8 can be removed by do a "dpkg -r asterisk".  It is very convenient.  I don't know the same command will work if Asterisk 1.8 was installed normally with out using the .deb approach.
6. I am not knowledgeable enough to make it apt-get installable.  Maybe others more experienced can figure out a way to do that.

It has been a long day and I am tired right now.  I will call it a day.  Please point out if you find any mistakes in my descriptions or have any questions.  I will get back to you as soon as I can.  So much for today.  Smiley
« Last Edit: March 24, 2011, 09:01:13 AM by twinclouds » Logged
PlugPBX Admin
Administrator
Sr. Member
*****
Posts: 426



« Reply #1 on: March 24, 2011, 04:21:10 AM »

Thanks for posting this!!!!!!  Grin
Logged

-Greg
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Install SimpleMachinesForum web hosting Valid XHTML 1.0! Valid CSS!