Skip to end of metadata
Go to start of metadata

When you download the source for libpri, DAHDI, and Asterisk you'll typically end up with files with a .tar.gz or .tgz file extension. These files are affectionately known as tarballs. The name comes from the tar Unix utility, which stands for tape archive. A tarball is a collection of other files combined into a single file for easy copying, and then often compressed with a utility such as GZip.

To extract the source code from the tarballs, we'll use the tar command. The commands below assume that you've downloaded the tarballs for libpri, DAHDI, and Asterisk to the /usr/local/src directory on a Linux machine. (You'll probably need to be logged in as the root user to be able to write to that directory.) We're also going to assume that you'll replace the letters X, Y, and Z with the actual version numbers from the tarballs you downloaded. Also please note that the command prompt may be slightly different on your system than what we show here. Don't worry, the commands should work just the same.

First, we'll change to the directory where we downloaded the source code:

[[email protected] ~]# cd /usr/local/src

Next, let's extract the source code from each tarball using the tar command. The -zxvf parameters to the tar command tell it what we want to do with the file. The z option tells the system to unzip the file before continuing, the x option tells it to extract the files from the tarball, the v option tells it to be verbose (write out the name of every file as it's being extracted, and the f option tells the tar command that we're extracting the file from a tarball file, and not from a tape.

[[email protected] src]# tar -zxvf libpri-current.tar.gz

[[email protected] src]# tar -zxvf dahdi-linux-complete-2.X.Y+2.X.Y.tar.gz

[[email protected] src]# tar -zxvf asterisk-14-current.tar.gz

You should now notice that a new sub-directory was created for each of the tarballs, each containing the extracted files from the corresponding tarball. We can now compile and install each of the components.

  • No labels

1 Comment

  1. DAHDI exists as ‘current’ tarball as well, see ‘What to Download’. With that, the command for Asterisk could be more version agnostic as well:

    tar -zxvf dahdi-linux-complete-current.tar.gz
    tar -zxvf asterisk-*-current.tar.gz