Install under RHEL/CentOS 5.4 from source

From Rivendell Wiki

Jump to: navigation, search

-- WARNING --

This is a work in progress, updating the guide for CentOS 5.4

It's working great, but trying to document what was done. YMMV

This is a step-by-step guide on how to compile Rivendell from source and install it on CentOS 5.4 (x86_64). It's based on Compiling Rivendell from Source on Fedora 10 and assumes you have a default 64-bit CentOS 5.4 install.

A command with # before it indicates it needs to be run as root. A command with $ before it means it can be run as a regular user.

Contents

Install CentOS 5.4 x86_64

Using whichever method you prefer, install CentOS 5.4. Choose only the "Server - GUI" component (as shown below).

Choose "Customize now" before click on "Next."

Select the Servers package group and unselect all.

Select the Base System package group and unselect Dialup Networking Support.

Select defaults or what you prefer until completed. I chose to disable SELinux, when the time came to choose.

Set up prerequisites

A detailed list of all the packages Rivendell will need are listed in RHEL 5.4 Packages.

Configure additional repositories

Not all the needed packages are available in the standard repositories. EPEL and RPMFusion fill most of the gaps.

Extra Packages for Enterprise Linux (EPEL)

Get details here: http://fedoraproject.org/wiki/About_EPEL

$ sudo rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-3.noarch.rpm

RPMFusion

Get details here: http://rpmfusion.org/ The free repository is necessary; the nonfree is optional.

Free

$ sudo rpm -Uvh http://download1.rpmfusion.org/free/el/updates/testing/5/x86_64/rpmfusion-free-release-5-0.1.noarch.rpm 

Nonfree

$ sudo rpm -Uvh http://download1.rpmfusion.org/nonfree/el/updates/testing/5/x86_64/rpmfusion-nonfree-release-5-0.1.noarch.rpm

Install database

MySQL

Change to root user.

$ su -
<enter root password>

Rivendell uses the MySQL database server to store all its information.

# yum install mysql-server

Add mysqld to the default runlevels so it starts on boot:

# chkconfig mysqld on

Start mysqld:

# service mysqld start

You will then be given a message which tells you to set your MySQL root password. Later on you will use the MySQL root username and password you set here with rdadmin to initialize Rivendell's database. We will use mysql_secure_installation. You can run this step now, or run it at the very end (using a blank password for the root mysql account through this guide)

# /usr/bin/mysql_secure_installation

Follow the prompts:

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!
In order to log into MySQL to secure it, we'll need the current
password for the root user.  If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):

By default, no root password is set, so press enter.

OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.
Set root password? [Y/n] 

Accept the default by pressing enter.

New password: 

Enter new MySQL root password.

Re-enter new password: 

Re-enter new MySQL root password.

Password updated successfully!
Reloading privilege tables..
 ... Success!
By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] 

Accept the default by pressing enter.

 ... Success!
Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] 

Accept the default by pressing enter.

 ... Success!
By default, MySQL comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] 

Accept the default by pressing enter.

 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] 

Accept the default by pressing enter.

 ... Success!
Cleaning up...
All done!  If you've completed all of the above steps, your MySQL
installation should now be secure.
Thanks for using MySQL!

You've now set up your MySQL server. Exit root.

# exit

Install development tools

kernel-devel

$ sudo yum install kernel-devel

gcc-c++

$ sudo yum install gcc-c++

Qt

$ sudo yum install qt qt-devel qt-MySQL qt4 qt4-devel qt4-mysql

libtool

$ sudo yum install libtool

Install media tools

libmad

$ sudo yum install libmad libmad-devel 

libao

$ sudo yum libao libao-devel

libsamplerate

$ sudo yum install libsamplerate libsamplerate-devel

cdparanoia

$ sudo yum install cdparanoia

sox

$ sudo yum install sox

flac

$ sudo yum install flac-devel

id3lib

$ sudo yum install id3lib id3lib-devel 

libid3tag

$ sudo yum install libid3tag libid3tag-devel

libXmu

$ sudo yum install libXmu-devel

mpg321

Install mpg321 from source:

$ wget http://sourceforge.net/projects/mpg321/files/mpg321/0.2.10/mpg321-0.2.10.tar.gz/download
$ tar -xzvf mpg321-0.2.10.tar.gz
$ cd mpg321-0.2.10
$ ./configure
$ make
$ su -
# cd /home/<regular username>/mpg321-0.2.10
# make install
# exit

Go back to the home directory.

$ cd ..

Install audio interfaces

ALSA

Change to root user.

$ su -
<enter root password>

Install.

# yum install alsa-lib-devel alsa-lib

Create the ALSA sound devices for Rivendell:

# nano /etc/asound.conf
pcm.rd0 {
        type hw
        card 0
}

ctl.rd0 {
        type hw
        card 0
}

Save and exit. Exit root user.

# exit

JACK

$ sudo yum install jack-audio-connection-kit-devel jack-audio-connection-kit

AudioScience HPI

If your system uses an AudioScience card, you'll need this. From your home directory, get the driver source.

$ wget http://www.audioscience.com/internet/download/drivers/v4.02/hpklinux-4.02.05.tar.bz2

Unpack and change to the work directory.

$ tar -jxvf hpklinux-4.02.05.tar.bz2
$ cd hpklinux-4.02.05

Run the configure script which checks to make sure you have all dependencies installed:

$ ./configure

It should go through without any errors if the dependencies are setup correctly. If not it will complain and it should indicate what is missing. Use yum to install whatever it is complaining about. Once it goes through completely without errors it is time to compile the software.

$ make

Become root user.

$ su -
<enter root password>

Go back to the work directory.

# cd /home/<regular user>/hpklinux-4.02.05

Install the software.

# make install

Generate the hints file that is used by ld.so to locate and link to shared object libraries at run-time.

# ldconfig

Add asihpi to the default runlevels so it starts on boot:

# chkconfig asihpi on

Start the service.

# service asihpi start

Exit root user.

# exit

Install Optional Components

OggVorbis

$ sudo yum install libogg libogg-devel libvorbis libvorbis-devel

Password Authentication Module (PAM)

$ sudo yum install pam-devel

Install Rivendell

Building Rivendell from source

Download Rivendell 1.6.0:

$ wget http://www.rivendellaudio.org/ftpdocs/rivendell/rivendell-1.6.0.tar.gz

Extract Rivendell from the tar archive:

$ tar -xzvf rivendell-1.6.0.tar.gz

Change directory to the Rivendell directory:

$ cd rivendell-1.6.0

Run autogen

$ ./autogen.sh

Run the configure script which checks to make sure you have all dependencies installed:

$ ./configure

It should go through without any errors if the dependencies are setup correctly. If not it will complain and it should indicate what is missing. Use yum to install whatever it is complaining about.

Once it goes through completely without errors it is time to compile the software. This can take a long time. This is the ideal moment to get a cup of coffee (or two, or three):

$ make

When it is finished, assuming it finished without any errors, you can install the software. Run as root.

$ su -
<enter your root password>

Change to the work directory.

# cd /home/<regular user name>/rivendell-1.6.0
# make install

Exit root when done.

# exit

Configure Rivendell

Change to root.

$ su -
<enter root password>

Copy the Rivendell configuration file from the install directory to /etc/

# cp /home/<regular user name>/rivendell-1.6.0/conf/rd.conf-sample /etc/rd.conf

Open the /etc/rd.conf configuration file in a text editor like vi or nano:

# nano /etc/rd.conf

Change the following lines:

AudioOwner=myself
AudioGroup=users

Change them to your actual normal user and group (or another user you've created for Rivendell). For example, my regular user is 'rduser' and group is 'users':

AudioOwner=rduser
AudioGroup=users

Open the /etc/init.d/rivendell init script in a text editor:

# nano /etc/init.d/rivendell

Change the following line:

# Required-Start:    $remote_fs mysql alsasound

Change the incorrect mysql reference to mysqld so that the mysql server is started before the Rivendell services.

# Required-Start:    $remote_fs mysqld alsasound

Make Rivendell start with your system

Add the startup script to chkconfig:

# chkconfig --add rivendell

Turn Rivendell on for the default runlevels so it starts on boot:

# chkconfig rivendell on

Update the shared libraries cache to use the new Rivendell shared libraries installed in /usr/local/lib :

# ldconfig /usr/local/lib

Create a configuration file for the Rivendell shared libraries so they will be added to the shared libraries cache every time on boot:

# cd /etc/ld.so.conf.d/
# echo "/usr/local/lib" > rivendell.conf

Configure asset storage

Create the directory where Rivendell will store audio files:

# mkdir /var/snd

Set the owner and group to the regular user you use. replace <regular user>:<regular group> with for example, ben:ben

# chown <regular user>:<regular group> /var/run/rivendell
# chown <regular user>:<regular group> /var/snd


Start Rivendell

Run rdadmin for the first time. It will prompt you for the mysql user and password you created earlier

$ rdadmin

Start the Rivendell daemons:

# service rivendell start

Run rdadmin again

$ rdadmin 

login with user: admin and password <blank>

Now you can run any other Rivendell applications like rdairplay, rdlibrary, rdloglogedit, etc.

You will probably want to set the default audio ports for playing as explained in the Post Installation errata:

http://rivendell.tryphon.org/wiki/index.php/Post_installation_errata

Have fun!

Personal tools