BinaryGuru

Hacking digital systems

Monthly Archives: June 2010

Installing Asterisk With Yum


This tutorial tells you how to install Asterisk 1.6x on CentOS 5 and RHEL 5 using yum.I will be testing this on my production server to see if it is a better method for installing Asterisk than by compiling from source wi\hich is what I normally do.

Description:
Installing a binary distribution of Asterisk makes it easier to maintain your system. Using the package management tools that are included with your Linux distribution, you can install and update software without manually managing dependencies (libraries and utilities on which applications rely). Currently Asterisk is available for automated binary installation using the ‘yum’ utility on CentOS 5 Linux and for RedHat Enterprise Linux 5.

See link:
http://www.asterisk.org/downloads/yum

Notes:
Where it first says to install using yum, there are a few package names cut off bauce of the advertisement. You need to enter the following command into your terminal:
yum install asterisk16 asterisk16-configs asterisk16-voicemail dahdi-linux dahdi-tools libpri

Advertisements

Installing D-Link DWA-552 on CentOS 5.5 (i386)


Installing D-Link DWA-552 on CentOS 5.5 (i386)

NOTE: You must be logged in as root to perform these operations.

Prerequisites
* Configure RPMforge in yum
* Install madwifi drivers
* Enable NetworkManager
* Install Priorities

>>> Configure RPMforge in yum <<<
You need to install RPMforge in order to add madwifi to the yum repositories.

1. Make sure you have wget:
# yum -y install wget*
> Loaded plugins: fastestmirror, priorities
> Loading mirror speeds from cached hostfile
>  * addons: centos.mirror.iweb.ca
>  * base: centos.mirror.iweb.ca
>  * centosplus: centos.mirror.iweb.ca
>  * contrib: centos.mirror.iweb.ca
>  * extras: centos.mirror.iweb.ca
>  * rpmforge: apt.sw.be
>  * updates: centos.mirror.iweb.ca
> Excluding Packages from CentOS-5 – Base
> Finished
> Reducing CentOS-5 – Plus to included packages only
> Finished
> Excluding Packages from CentOS-5 – Updates
> Finished
> 436 packages excluded due to repository priority protections
> Setting up Install Process
> Resolving Dependencies
> –> Running transaction check
> —> Package wget.i386 0:1.11.4-2.el5_4.1 set to be updated
> –> Finished Dependency Resolution
>
> Dependencies Resolved
>
> ================================================================================
>  Package        Arch           Version                     Repository      Size
> ================================================================================
> Installing:
>  wget           i386           1.11.4-2.el5_4.1            base           582 k
>
> Transaction Summary
> ================================================================================
> Install       1 Package(s)
> Upgrade       0 Package(s)
>
> Total download size: 582 k
> Downloading Packages:
> wget-1.11.4-2.el5_4.1.i386.rpm                           | 582 kB     00:00
> Running rpm_check_debug
> Running Transaction Test
> Finished Transaction Test
> Transaction Test Succeeded
> Running Transaction
>   Installing     : wget                                                     1/1
>
> Installed:
>   wget.i386 0:1.11.4-2.el5_4.1
>
> Complete!

2. Make sure you are in the root home folder:
# cd ~

3. Download the rpmforge-release package:
# wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm
> –2010-06-24 01:29:41–  http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm
> Resolving packages.sw.be… 85.13.226.40
> Connecting to packages.sw.be|85.13.226.40|:80… connected.
> HTTP request sent, awaiting response… 302 Found
> Location: http://rpmforge.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.5.1-1.el5.rf.i386.rpm [following]
> –2010-06-24 01:29:41–  http://rpmforge.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.5.1-1.el5.rf.i386.rpm
> Resolving rpmforge.sw.be… 85.13.226.40
> Connecting to rpmforge.sw.be|85.13.226.40|:80… connected.
> HTTP request sent, awaiting response… 200 OK
> Length: 16600 (16K) [application/x-rpm]
> Saving to: `rpmforge-release-0.5.1-1.el5.rf.i386.rpm’
>
> 100%[======================================>] 16,600      81.5K/s   in 0.2s
>
> 2010-06-24 01:29:42 (81.5 KB/s) – `rpmforge-release-0.5.1-1.el5.rf.i386.rpm’ saved [16600/16600]

4. Install DAG’s GPG key:
# rpm –import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
5. Verify the package you have downloaded
# rpm -K rpmforge-release-0.5.1-1.el5.rf.*.rpm
> rpmforge-release-0.5.1-1.el5.rf.i386.rpm: (sha1) dsa sha1 md5 gpg OK

6. Install the package:
# rpm -i rpmforge-release-0.5.1-1.el5.rf.*.rpm
This will add a yum repository config file and import the appropriate GPG keys. At this point, you can set the priority of the RPMForge repository, and also of the CentOS repositories if you have not done so yet.

7. Test with this command:
# yum check-update
It should output these two lines:
> Loading “priorities” plugin
> …
> 76 packages excluded due to repository priority protections

The number above may differ, but there should be several packages shown as being excluded.

>>> Install madwifi drivers <<<

1. Install madwifi:
# yum -y install madwifi
This will pull in dkms and a bunch of other dependencies required to build the madwifi kernel module. (So this is not just the firmware, but a complete driver). If this worked out fine, you need to load the modules.

2. Load kernel modules:
# modprobe ath_pci

>>> Enable NetworkManager <<<

1. First we are going to configure your CentOS system to automatically start the NetworkManager on startup. You can do this by running:
# chkconfig NetworkManager on

2. Then we are going to start it so we can use it right away without needing to reboot:
# service NetworkManager start

If you have done that in your graphical environment (Gnome), your Notification Area (usually in the Gnome panel on the top-right) will show a new icon. If you left-click on this icon, you will see a list of possible Wireless networks to connect to.

3. You may also want to disable the network and wpa_supplicant services at boot time, as NetworkManager will now handle these. For this, simply do:
# chkconfig network off
# chkconfig wpa_supplicant off

>>> Install Priorities <<<

After installing RPMforge, you *must* install Priorities! If you don’t install this package, you’re going to have a< hell of a time updating you’re system with yum. >This is because there are a lot of packages provided by RPMforge that are also on the CentOS Repos. This causes dependency conflicts for yum, which in turn causes yum to fail updating some packages.

To install priorities, follow the instructions found on the CentOS Wiki for CentOS 5:
http://wiki.centos.org/PackageManagement/Yum/Priorities

When you edit you’re *.repo files to add the new ‘priorities’ variable, don’t forget to add a ‘priorities’ level for every Repo section in every file.

Here’s what my .repo files look like:
*CentOS-Base.repo*
—————————————————————————–
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-$releasever – Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
exclude=postfix
priority=1

#released updates
[updates]
name=CentOS-$releasever – Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
exclude=postfix
priority=1

#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever – Addons
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
#baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=1

#additional packages that may be useful
[extras]
name=CentOS-$releasever – Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=1

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever – Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
includepkgs=postfix
priority=2

#contrib – packages by Centos Users
[contrib]
name=CentOS-$releasever – Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=2
—————————————————————————–

*CentOS-Media.repo*
—————————————————————————–
# CentOS-Media.repo
#
# This repo is used to mount the default locations for a CDROM / DVD on
#  CentOS-5.  You can use this repo and yum to install items directly off the
#  DVD ISO that we release.
#
# To use this repo, put in your DVD and use it with the other repos too:
#  yum –enablerepo=c5-media [command]
#
# or for ONLY the media repo, do this:
#
#  yum –disablerepo=\* –enablerepo=c5-media [command]

[c5-media]
name=CentOS-$releasever – Media
baseurl=file:///media/CentOS/
file:///media/cdrom/
file:///media/cdrecorder/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=9
—————————————————————————–

*rpmforge.repo*
—————————————————————————–
### Name: RPMforge RPM Repository for Red Hat Enterprise 5 – dag
### URL: http://rpmforge.net/
[rpmforge]
name = Red Hat Enterprise $releasever – RPMforge.net – dag
baseurl = http://apt.sw.be/redhat/el5/en/$basearch/rpmforge
mirrorlist = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge
enabled = 1
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1
priority=11
—————————————————————————–

*rpmforge-testing.repo*
—————————————————————————–
### Name: RPMforge RPM Repository for Red Hat Enterprise 5 – dag
### URL: http://rpmforge.net/
[rpmforge-testing]
name = Red Hat Enterprise $releasever – RPMforge.net – test
baseurl = http://apt.sw.be/redhat/el5/en/$basearch/test
enabled = 0
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 0
priority=11
—————————————————————————–

*webtatic.repo*
—————————————————————————–
[webtatic]
name=Webtatic Repository $releasever – $basearch
baseurl=http://repo.webtatic.com/yum/centos/$releasever/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-webtatic-andy

[webtatic-source]
name=Webtatic Repository $releasever – $basearch
baseurl=http://repo.webtatic.com/yum/centos/$releasever/SRPMS/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-webtatic-andy
priority=12
—————————————————————————–

Hope this helps!!!