Linux

I’ve struggled with some shit in my day but I have officially thrown in the hat when it comes to installing Linux Mint 15. First off, it won’t boot. Not just on my physical desktop, but even as a virtual system. I wasted so much of my time trying to track down the issues. First I thought UNetbootin was to blame, so I switched apps that write .iso’s to USB. Still no go. I finally discovered the issue on my desktop. I have a Intel i3 Ivy Bridge CPU with Intel HD graphics. The loader was using some invalid mode my monitor couldn’t support so after the boot my screen went and stayed blank until I found a trick. i915.modeline=0. That’s great you can install Linux Mint, hurray, but guess what. The damn thing still won’t boot and using i915.modeline=0 in GRUB won’t fix it. Screw it I give up trying to make it work right as dual-boot, so I’ll run it in a virtual machine. WRONG. The damn thing STILL WON’T BOOT.

Put the brakes on. This is a distro targeted at end users. Those end users have desktop systems, laptops, lots of different hardware to support right? So whats the issue here Linux Mint? Is my hardware really that unique? Every other distro boots and runs great, but it so happens the top ranked distro on distrowatch is more hassle than its worth on my hardware – or virtualized hardware for that matter.

I’m back to the drawing board. Since I primarily use CentOS or Debian (now I know why..), I’m going to use one of them as my desktop. Its been a long time since I’ve fired up Debian so I’m thinking I’ll be investing more time in that relationship, so stay tuned.

For many years now distrowatch has been my go-to for keeping up to date with Linux distributions. Each time I visit I find a new distribution that has different goals. For example, some distros try to include only software that is free, or only released under a certain license type. Others aim for minimalism, only including enough software to boot and provide a shell. You can also drill down and figure out exactly what version of a software package comes pre-installed. One other neat thing distrowatch does is keep a ‘Hit Page Ranking’ for all distributions. This essentially gives you an idea of a distro’s popularity among the community.

Dominating that Hit Page Ranking for a long time now is a distro called ‘Linux Mint‘. I usually stick to what I know best – RHEL, CentOS, and Debian. But the goals of Linux Mint are much different than what someone wanting to deploy an enterprise class server would want. Linux Mint is aimed providing the best desktop experience, one that can replace a Windows based system. It aims to be comfortable, easy to use, and ‘just work’ as you come to expect with Windows based systems. All of the multimedia codecs you might spend extra time installing on other Linux based distributions are already there with Linux Mint.

So just how useable is it?

I’ve been a Linux sysadmin for over 13 years and have worked in IT for over 18 and I have a confession to make. I use a Windows based desktop and always have. Why you ask? Becuase when I need to open that Word doc or edit an Excel spreadsheet, I know that Windows is going to work (well, 90% of the time..). When I need to experiment with a new piece of software I know that the way I download / install / and run it is going to work exactly the same way for me as it is a co-worker. In otherwords, I don’t have time to play games fiddling with missing packages, dependencies, or permissions. I have a job to do supporting Unix and Linux servers in an enterprise that require 99.99% uptime and as ironic as it sounds I do that with Windows.

I decided that really no longer fits with my philosophy. Microsoft is evil, proprietary, and failing. Linux is taking over everything including the Android smartphone market. I own, use, and love my Linux based Chromebook. Its time to eat my own dog food and replace Windows on my desktop for good.

If the goals of Linux Mint are to be a true desktop replacement then I should have no trouble switching to it from a Windows based system. I’m going to take the challenge and spend a full month using only Linux Mint. Just to be safe I’m going to leave Windows installed on my dual-boot system, but it won’t be the default. I’ll be providing updates as I go – things that an everyday Windows user would try to do and how those tasks can be accomplished in Mint, alternative software choices for Linux, and general impressions and observations – from a Linux sysadmin standpoint.

Are you an ex Windows user? What is your desktop distribution and why? When did you make the switch? Leave your comments and stay tuned for updates on my experiment.

After setting up my automated upload to Dropbox cronjob in my last post I realized the timezone on my server was set to MSD or ‘Moscow Daylight Time’. That was causing some issues with my job since it was running at 5PM CDT instead of 2AM CDT.

[root@alderaan ~]# date
 Sat Jul 20 19:05:45 MSD 2013

No biggie. On a CentOS based system your timezone is determined by a symlink from /etc/localtime to the timezone data file appropriate for your region. Since my DotVPS server is hosted out of Chicago (CDT), you can change your timezone by creating a new symlink:

[root@alderaan ~]# ln -sf /usr/share/zoneinfo/America/Chicago /etc/localtime

Then check to make sure it worked:

[root@alderaan ~]# date
 Sat Jul 20 10:09:25 CDT 2013

Now that I have invested some time and content into my blog I decided to get serious about making sure I have a good backup system. One of the primary reasons I use Dropbox is because of its awesome cross-platform support for Windows, Mac, and Linux so I figured some genius must have already figured out how to make backups work from Linux.

I found a script called Dropbox Uploader hosted on GitHub that appeared to be exactly what I needed. Follow the instructions on the project’s site to either git clone the repo or simply (as I did) use curl to pull it down to your webserver. Once you execute the script for the first time you will be prompted to access a couple of URL’s, setup a new Dropbox app and provide authorization.

Once you have that working you can upload and download anything from the command line. You should test to make sure its working at this point since from here on we’re focusing on automation.

I created a script to prepare my backup before invoking the Dropbox uploader then clean it all up when its done. Its really a hack, there’s no error checking or backup file rotation. It will continue to backup until you run out of space on your Dropbox so keep that in mind.

Change the 3 bolded values to match your site:

create_site_backup.sh

#!/bin/bash

#Setup Environment

BACKUP_SRC=”/var/www/SITENAME
BACKUP_DST=”/tmp”
MYSQL_SERVER=”127.0.0.1″
MYSQL_USER=”root
MYSQL_PASS=”PASSWORD
NOW=$(date +”%Y.%m.%d”)
DESTFILE=”$BACKUP_DST/$NOW.tgz”

# Dump MySQL DB + Compress
mysqldump -u $MYSQL_USER -h $MYSQL_SERVER -p$MYSQL_PASS –all-databases > “$NOW-Databases.sql”
tar cfz “$DESTFILE” $BACKUP_SRC “$NOW-Databases.sql”
rm -f “$NOW-Databases.sql”

/root/bin/dropbox_uploader.sh upload “$DESTFILE”

rm -f “$DESTFILE”

Kick it off once and you should see Dropbox sync a tarball with your entire site inside:

Fullscreen capture 7192013 111405 AM

On CentOS any script in root’s /bin directory is automatically in the PATH. I put both my dropbox_upload.sh and create_site_backup.sh scripts in /root/bin.

Edit root’s crontab to kickoff the script every night at 2AM:

crontab -e

# Minute Hour Day of Month Month Day of Week Command
# (0-59) (0-23) (1-31) (1-12 or Jan-Dec) (0-6 or Sun-Sat)
0 2 * * * /root/bin/create_site_backup.sh

That’s it. Completely hands-off Dropbox backups of your self-hosted WordPress site. Keep an eye on it and stay tuned for an update on how to add some enhancements to the script.

If you followed my last post you wound up with a killer VPS running WordPress. One that crashes a little too often. Whoops. So here’s how to correct that issue.

MySQL uses InnoDB as its default Storage Engine. Well as it turns out InnoDB consumes a lot of RAM which makes it not very VPS friendly. So just disable it, right? Yeah of course not quite so easy. Since its been on from when you started setting up your wordpress DB, everything is already in InnoDB format. By switching it off, WordPress won’t be able to see the tables and will want to start over from scratch. Luckily a little Google search turned up a quick and painless way to convert between the 2 storage engine formats. Easy for you that is, I spent a good hour trying to sort this all out.

First, take this handy little php script and save it on your server:

<?php
#This script will change all the table engine types for a given database!
#All the DB tools I have (GNU/freeware) will not change a list of database
# types, so this script saves time when a CMS or other populates a database
# with tables we cannot use! This can be migrated to InnoDB by changing line
# 23, col 46 from MyISAM to InnoDB (double check the capitals there!).
# Change these variables relative: serverName, userName, password, databaseName

# 20051410 JLynch
# myisamFixer.php

ini_set(‘display_errors’, ‘On’);
error_reporting(E_ALL);

$link = mysql_connect(“localhost“,”root“,”myrootpass“)
or die(“unable to connect to msql server: ” . msql_error());

mysql_select_db(“wordpress“, $link)
or die(“unable to select database ‘db’: ” . msql_error());

$result = mysql_query(“show tables”);
if (!$result) {
die(‘query failed: ‘);
}

while ($row = mysql_fetch_array($result)){
mysql_query(“ALTER TABLE “.$row[0].” ENGINE=MyISAM; “);
#Command Reference: ALTER TABLE tableName ENGINE=MyISAM
}

?>

Ovbiously you need to change the bolded values to match your own config.

Next, stop mysql:

service mysqld stop

Execute the .php script from the command line. It might throw a couple of errors about such and such command is now deprecated, whatever bitch, it works:

php myisamFixer.php

Next, edit /etc/my.cnf. Add these 2 lines somewhere in the [mysqld] section:

ignore_builtin_innodb
default_storage_engine=MyISAM

Start mysql back up:

service mysqld start

Thats it. Back in business with all your content and settings preserved running MyISAM instead of the memory-hungry DB crashing VPS hatin nightmare InnoDB. Had I done this from the start I could have avoided the conversion.

lowendbox.com has some pretty amazing deals on VPS servers. One in particular that jumped out at me was a 128MB  / 10GB disk / 500GB bandwidth per month OpenVS server from DotVPS for only $15.00 per year.

 [OpenVZ] 128MB RAM
 128MB RAM
 128MB Burst/vSWAP
 1 vCPU core
 10GB Diskspace
 500GB Bandwidth
 OpenVZ/SolusVM
 1 IPv4 Address
 5 IPv6 Address (UK)
 1Gbit port
 $15/Year

I was skeptical about a server this small being capable of hosting a WordPress powered site, but with a few tweaks I got it working perfectly. Here is how you can do the same, save yourself a ton of cash, and learn some awesome open-source goodness in the process.

1) Register a domain name. Registering your own domain name costs almost as much as the VPS server itself but I highly recommend getting one. You can do some neat things with a virtual hosts on your VPS server, but if your just getting started and want to play around with a VPS without committing to a name yet, you can skip this step for now and come back to it later. I use and highly recommend namecheap.com for all your domain registration needs.

2) Order your VPS server. If you haven’t done so yet use this link to order your VPS from DotVPS, or a similar VPS provider. This article is based on what I was provided – a 32 bit CentOS 5.8 powered Linux server. I’ll be using yum for installing all the packages. Debian based VPS’s are going to use apt-get and probably have different package naming schemes so ymmv.

3) Login as root and get to work installing packages. This is where the fun begins. If at any point you screw up so badly and you need to start over, you can login to your control panel and hit ‘reinstall’ to start from scratch. Fire up your favorite ssh client and login to your new server using the IP address, username and password established during setup.

First off, my server had apache2 pre-installed and already running. Apache is great, but I’m working with 128MB of RAM and need to conserve as much of it as possible. For my blog, I decided to use nginx along with an alternative php processor, php-fpm. Both of these projects are focused on 2 things that are very important – high performance and low memory consumption. A winning combination for a micro VPS server. I could have used lighthttpd instead but nginx is something I had no experience with and I’m always up for learning something new.

Kill off apache with:

service httpd stop

chkconfig httpd off

Next, enable a couple of extra repositories from Remi and EPEL to get access to nginx and php-fpm:

rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm

Now install nginx and php-fpm with:

yum –enablerepo=remi,remi-test install php-pecl-apc php-cli php-pear php-pdo php-mysql php-pgsql php-pecl-mongo php-sqlite php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml

When its all done, fire up nginx, php-fpm, and set them to both start when the system comes up:

service nginx start
service php-fpm start
chkconfig nginx on
chkconfig php-fpm on

Yeah. Its that simple. You can fire up a web browser at this point and take a look at the default nginx welcome page using your server’s public IP address.

Now its time to install MySQL, start MySQL, and set it to start on boot:

yum –enablerepo=remi,remi-test install mysql mysql-server

service mysqld start
chkconfig mysqld on

Before you continue lets drop in a replacement mysql.conf file optimized for small memory systems:

cp /etc/my.cnf /etc/my.cnf.original

cp /usr/share/doc/mysql-server-5.5.32/my-small.cnf /etc/my.cnf

Then start the secure setup of MySQL. The default password for root is blank, so just hit enter when prompted and set a new one. You can say Y to everything else:

/usr/bin/mysql_secure_installation

Now we have nginx, php-fpm, and MySQL all setup and ready to go. Only 2 more steps remain. Setup nginx virtual-hosts and install WordPress.

Lets start with getting your virtual host setup. There are a couple of values you should define before going much further – the name of your site (most likely your domain name if you registered one), and the name of your database and user account that will connect to that database. You will want to have a new one for each virtual host you are hosting. You will also want to update the DNS A record for your domain to point to your VPS server’s IP address. When I did this with my provider, namecheap.com, the update was almost instant. When a http request is sent to your VPS, nginx looks at the host-header, looks up what virtual host is responsible for the content, and sends over the request. This makes is possible to host dozens of different websites using a single VPS server.

For my example, I’m using:

jasonoconnell.com as my domain

jasonoconnell as my web root

wordpress as my database name

wpuser as my wordpress DB username

wppass as my wordpress DB user’s password

Setup public_html and log directories for your new virtual host:

cd /var/www
mkdir -p jasonoconnell.com/{public_html,logs,stats}

Create a new config file for your virtual host:

vi /etc/nginx/conf.d/jasonoconnell.conf

Mine looks like this:

server {
listen 80;
server_name jasonoconnell.com www.jasonoconnell.com;

access_log /var/www/jasonoconnell.com/logs/access.log ;
error_log /var/www/jasonoconnell.com/logs/error.log ;

location / {
root /var/www/jasonoconnell.com/public_html;
index index.php index.html index.htm;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?q=$1 last;
break;
}

}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www/jasonoconnell.com/public_html;
}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
root /var/www/jasonoconnell.com/public_html;
fastcgi_param SCRIPT_FILENAME /var/www/jasonoconnell.com/public_html$fastcgi_script_name;
include fastcgi_params;
}

location ~ /\.ht {
deny all;
}
}

You can test if its working by dropping in an index.html file under your virtual hosts public_html directory, restarting nginx, and looking for a response. You can take that a step further and also check to make sure php is working by creating a file called info.php with the following:

<?php
phpinfo();
?>

Point your browser at domain.com/info.php and you should see a bunch of info on your php install.

Last step, install and configure WordPress.

cd /tmp

wget http://wordpress.org/latest.zip

unzip latest.zip

mv wordpress/* /var/www/example.com/public_html/

rm -rf wordpress latest.zip

Connect to MySQL and setup the DB for WordPress:

mysql -u root -p
mysql> CREATE DATABASE wordpress;

mysql> GRANT ALL PRIVILEGES ON wordpress.* TO “wpuser”@”localhost” IDENTIFIED BY “wppass”;

mysql> FLUSH PRIVILEGES;

mysql> EXIT

Now tell WordPress how to connect to your DB. You only need to modify 3 values in the config file: DB_NAME, DB_USER, and DB_PASSWORD:

cd /var/www/jasonoconnell.com/public_html

cp wp-config-sample.php wp-config.php vi wp-config.php

// ** MySQL settings – You can get this info from your web host ** // /** The name of the database for WordPress */ define(‘DB_NAME’, ‘wordpress’);
/** MySQL database username */

define(‘DB_USER’, ‘wpuser’);

/** MySQL database password */ define(‘DB_PASSWORD’, ‘wppass’);

That’s it, your done! If all went well you should be able to type in your domain name and get to your new self-hosted WordPress site. Walk through the simple setup and you can start blogging away. In my next article, I’ll walk you through setting up Google AdSense to try and make back the $30 you just spent 🙂

 

A few years ago I built a full-size MAME cabinet. At its core is an old Gateway G6 Pentium 2 running Windows 98. I’m lucky it still powers up. Knowing failure is imminent I needed to find a replacement.

I started experimenting with the Raspberry Pi a few months ago. First I built a XBMC media server but it never performed as well or could steam back as many formats as my HP MicroServer with XBMC. So next I built a music streaming device I could plug into anything and stream music to it from my PC or iPad. Ok well thats cool, but what else is there? Turns out there are lots of working emulators for the Pi, including MAME.

Getting MAME installed on the Pi was too easy. Download Raspbian, fire up the Pi Store, install MAME, copy in a couple of ROMs, done. A couple of Google searches later I had bluetooth working, CWiid installed, and was able to discover Wiimotes.

2013-07-16-20-04-27

What I wasn’t able to find was the magic glue that takes the Wiimote’s output and turns it into a key press that MAME can interprate. In about an hour I had the solution, wminput. wminput lets you map a button on the Wiimote to a keypress in any app. A few tweaks to a config file and I had a fully working Wiimote controller for MAME.

This is my mameplayer1 key definition file:

# mameplayer1
# buttons
Wiimote.A = KEY_LEFTSHIFT
Wiimote.B = KEY_SPACE
Wiimote.Up = KEY_LEFT
Wiimote.Down = KEY_RIGHT
Wiimote.Left = KEY_DOWN
Wiimote.Right = KEY_UP
Wiimote.Minus = KEY_5
Wiimote.Plus = KEY_1
Wiimote.Home = KEY_ESC
Wiimote.1 = KEY_LEFTCTRL
Wiimote.2 = KEY_LEFTALT
Plugin.led.Led1 = 1

And here’s how you kick off wminput:

wminput -c /usr/local/bin/indiecity/InstalledApps/mame4all_pi/Full/mameplayer1 -d &

To sync your Wiimote, just hit buttons 1 + 2 at the same time. All the blinky lights should flash for a few seconds, followed by Led1 staying solid blue.

Then you can fire up MAME:

/usr/local/bin/indiecity/InstalledApps/mame4all_pi/Full/
./mame

and your off. If you used my config, all Wiimote buttons should work inside MAME, even home will get you back to the main screen.

One last step. I like purpose-built stuff. You plug it in, it does a job. Since eventually this rig will live inside a cabinet I need complete automation. In Debian Linux this can be accomplished (somewhat hackingly) by editing /etc/rc.local, and making it executable so Raspbian’s init system will invoke it on boot. This will accomplish 2 things:

1) Start wminput in daemon mode with a config file specifically built for MAME, and

2) Launch directly into MAME4All.

In my /etc/rc.local, I call another script that starts the wminput daemon and fires up MAME. That way MAME is ready and waiting for you to sync your Wiimote and chose a ROM to play:

/usr/local/bin/indiecity/InstalledApps/mame4all_pi/Full/mame-wii.sh

And here’s mame-wii.sh:

#!/bin/bash
wminput -c /usr/local/bin/indiecity/InstalledApps/mame4all_pi/Full/mameplayer1 -d &
cd /usr/local/bin/indiecity/InstalledApps/mame4all_pi/Full/
./mame

So with a little digging I’ve built a really awesome little emulation station that consumes a fraction of the amount of power my PII Gateway does and is completely silent, oh and until it does get moved inside my cabinet, I can use a Wiimote to play Turtles!

2013-07-16-19-59-55

I hate Lotus Notes. It sucks.

That said, heres how to make it work on Ubuntu Feisty Fawn:

Since Edgy’s release /bin/sh has been symlinked to /bin/dash. To make the installer work correctly you need to link sh to bash. We will switch it back when we are done.

sudo ln -sf /bin/bash /bin/sh

Next, we need to create and set perms on the destination install dirs.

sudo mkdir -p /opt/downloads /opt/IBM/Workplace Managed Client
sudo chown $USER.$USER /opt/downloads
sudo chown $USER.$USER /opt/IBM/Workplace Managed Client

Download mozilla w/GTK2 bindings and place it in /usr/local/mozilla:

cd /opt/downloads
wget
http://releases.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.7.12/contrib/mozilla-i686-pc-linux-gnu-1.7.12-gtk2+xft.tar.gz
tar zxvf mozilla-i686-pc-linux-gnu-1.7.12-gtk2+xft.tar.gz
sudo mv mozilla /usr/local

Create the file /etc/gre.conf with the following inside:

[1.7.12]

GRE_PATH=/usr/local/mozilla

Grab the client files. I have no idea where you can get these if you
don’t have a Notes administrator at your disposal. Luckily I do. If you
don’t, try a torrent site. The file should be called C93D1NA.zip. Put
it in your /opt/downloads dir.

unzip /opt/downloads/C93D1NA.zip -d notes
cd /opt/downloads/notes
unzip Personality.zip
chmod 755 setuplinux.bin setup_wct_platform.bin
cp setuplinux.bin updateSite/features/com.ibm.workplace.notesinstall.linux.feature_7.0.1.0000-0900/bin/linux
./setup_wct_platform.bin

The setup wizard should run and install to the location we created
earlier. When its done it will start the client with 2 blank panes.
Exit now and create the following script in your home directory:

notes.sh

#!/bin/bash

. $HOME/.bash_profile

/opt/IBM/Workplace Managed Client/rcp/richclient -personality com.ibm.workplace.noteswc.standalone.linux.personality

Make executable and replace the ‘target’ of the notes shortcut on your desktop to point to this script instead.

I had to copy my Notes ID from my Windows PC to the linux box, fill in
the deatils about my domino server, and I was in business!

Switch back the dash symlink.
sudo ln -sf /bin/bash /bin/dash

(Lotus Notes still sucks tho)

Not comparing apples to apples here, but my initial benchmarks turned up some interesting results.

Linux box ripon:
ab -n 1000 -c 5 http://ripon/snkpage.html

Server Software: Apache/2.0.46
Server Hostname: ripon
Server Port: 80

Document Path: /snkpage.html
Document Length: 187 bytes

Concurrency Level: 5
Time taken for tests: 0.275 seconds
Complete requests: 1000
Failed requests: 0
Broken pipe errors: 0
Total transferred: 451000 bytes
HTML transferred: 187000 bytes
Requests per second: 3636.36 [#/sec] (mean)
Time per request: 1.38 [ms] (mean)
Time per request: 0.28 [ms] (mean, across all concurrent requests)
Transfer rate: 1640.00 [Kbytes/sec] received

Connnection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.1 0 3
Processing: 0 1 0.2 1 4
Waiting: 0 0 0.1 0 3
Total: 0 1 0.2 1 4
WARING: The median and mean for the waiting time are not within a normal deviation
These results are propably not that reliable.

Percentage of the requests served within a certain time (ms)
50% 1
66% 1
75% 1
80% 1
90% 1
95% 1
98% 1
99% 1
100% 4 (last request)

FreeBSD box mitnick:
ab -n 1000 -c 5 http://mitnick/snkpage.html

Server Software: Apache/1.3.34
Server Hostname: mitnick
Server Port: 80

Document Path: /snkpage.html
Document Length: 187 bytes

Concurrency Level: 5
Time taken for tests: 0.581414 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 467000 bytes
HTML transferred: 187000 bytes
Requests per second: 1719.94 [#/sec] (mean)
Time per request: 2.907 [ms] (mean)
Time per request: 0.581 [ms] (mean, across all concurrent requests)
Transfer rate: 784.29 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.1 0 2
Processing: 1 2 0.7 2 7
Waiting: 0 1 0.8 2 6
Total: 1 2 0.7 2 7
WARNING: The median and mean for the waiting time are not within a normal deviation
These results are probably not that reliable.

Percentage of the requests served within a certain time (ms)
50% 2
66% 2
75% 3
80% 3
90% 3
95% 3
98% 4
99% 4
100% 7 (longest request)

How can that be explained?

Quick guide to enabling DAG repos on a RHEL3 box

As root:

wget http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt
rpm –import RPM-GPG-KEY.dag.txt
wget http://dag.wieers.com/packages/apt/apt-0.5.15lorg3-1.el3.rf.i386.rpm
rpm -ivh apt-0.5.15lorg3-1.el3.rf.i386.rpm
echo ‘rpm http://apt.sw.be redhat/el3/en/i386 dag’ > /etc/apt/sources.list.d/dag.list
apt-get update