|
I've recently set up a new PC with Fedora Core 3. These are some notes I've written that describe
what I've done since the basic installation to set up all the other bits and pieces. Unless otherwise noted, all these actions should be done as root.
Local Setup
Get DVDs working
There is a well-known bug in the udev system that comes with FC3 that it doesn't recognize all the DVD players out there. This is fixed (mostly) in the latest version of udev and related packages. To get my DVD drives working, I updated udev (to version 057, hal, gamin, hotplug, DBus, and the kernel. After a reboot, the DVD reader and writer drives both work and you can install all the updated RPMs from the various Fedora mirrors.
The way udev changes the content of the /dev directory mean that many symbolic links, such as /dev/cdrom may not work. Therefore, configure KDE (via its control panel) so that the audio CD device is /dev/hdc .
[top]
Install extra RPMs
There are a number of additional RPMs that I use. They're available from the installation DVD (but not added) or from Red Hat's RPMExtras respsitory. They are gtk+devel, glib-devel, imlib-devel, lame, ncompress, graphviz, tidy, tidylib
Set KDE as default desktop manager and login manager
Either, use the dekstop switching tool (not apparently present by default on the Fedora Core 'K' menu) or edit /etc/sysconfig/desktop to include the two lines:
DESKTOP="KDE"
DISPLAYMANAGER="KDE"
[top]
Install MMV RPM
Get the latest RPM for the MMV package (currently version 1.0.1 from http://rpmfind.net/linux/RPM/PLD/dists/ra/PLD/i686/PLD/RPMS/mmv-1.0.1b-5.i686.html) and install it with rpm -ivh mmv-1.0.1b-5.i386.rpm. This allows the use of regexps in file moving, copying, and renaming.
[top]
Install TrueType fonts, including link for GraphViz tools
Basically, follow the instructions in the Fedora Core 2 Release Notes.
- Create the
/usr/share/fonts/truetype/ directory (put them here, rather than/usr/share/fonts/local/ , so that the GraphViz tools can find them)
- Copy the new font files into
/usr/share/fonts/truetype/
- Tell the font system about the new directory:
ttmkfdir -d /usr/share/fonts/truetype/ -o /usr/share/fonts/truetype/fonts.scale
mkfontdir /usr/share/fonts/truetype/
chkfontpath --add /usr/share/fonts/truetype/
- Tell the fontconfig font subsystem about the new fonts too:
fc-cache /usr/share/fonts
If you add more fonts to /usr/share/fonts/truetype , repeat the commands
ttmkfdir -d /usr/share/fonts/truetype/ -o /usr/share/fonts/truetype/fonts.scale
fc-cache /usr/share/fonts
[top]
Install NetBeans + JDK co-bundle
Download the NetBeans & JDK co-bundle from Sun. Follow the instructions there about installing. I installed it in the /opt directory, with NetBeans ending up in /opt/NetBeans4.1/ and the SDK in /opt/jdk1.5.0_03/.
The next thing is to convice the alternatives system to look in the right place for java, javac and the rest. At the command line, type
alternatives --install /usr/bin/java java /opt/jdk1.5.0_03/bin/java 200 \
--slave /usr/bin/rmiregistry rmiregistry /opt/jdk1.5.0_03/bin/rmiregistry \
--slave /usr/share/man/man1/rmiregistry.1.gz rmiregistry /opt/jdk1.5.0_03/man/man1/rmiregistry.1
alternatives --install /usr/bin/javac javac /opt/jdk1.5.0_03/bin/javac 200 \
--slave /usr/bin/jar jar /opt/jdk1.5.0_03/bin/jar \
--slave /usr/bin/rmic rmic /opt/jdk1.5.0_03/bin/rmic \
--slave /usr/share/man/man1/jar.1.gz jar /opt/jdk1.5.0_03/man/man1/jar.1 \
--slave /usr/share/man/man1/rmic.1.gz rmic /opt/jdk1.5.0_03/man/man1/rmic.1
Next is to export the $JAVA_HOME environment variable. Create a file /etc/profile.d/java.sh that contains this:
# java initialization
export JAVA_HOME=/opt/jdk1.5.0_03
export ANT_HOME=/opt/ant
export PATH=$PATH:$JAVA_HOME/bin:$ANT_HOME/bin
|
(change the paths to reflect where you've got the java and ant files). And then make it executable with chmod a+x /etc/profile.d/java.sh
For more on setting up Java, see http://www.mojavelinux.com/wiki/doku.php?id=tips:managingjava
[top]
Allow XMMS to play MP3 files
The MP3 player plugin for XMMS is not available under the GPL, so you have to get it yourself from http://tettnang.freshrpms.net/rpm.html?id=296. To install it, install the RPM with rpm -ivh xmms-mp3-1.2.10-2.2.p.1.fc2.fr.i386.rpm. Then run xmms, go to Options > Preferences, deselect the box "Enable Plugin" for the MPEG Layer 1 / 2 / 3 Placeholder Plugin and select the box for "Enable Plugin" for MPEG Layer 1 / 2 / 3 Player. Press Apply then Okay, then restart XMMS for the changes to take effect.
[top]
Install MPlayer
MPlayer is a general multimedia player. It's particularly useful as it plays Quicktime movies. However, the installation instructions are not the clearest in the world. I've installed MPlayer from the RedHat 9 RPMs available at http://dag.wieers.com/packages/mplayer/ (or another mirror). I installed from this set, labelled for Fedora Core 3 (note that the ATI-Radeon package is the one specific to my video card; you should choose the package for your card instead):
mencoder-1.0pre5-2.i386.rpm
mplayer-1.0pre5-2.i386.rpm
mplayer-codecs-essential-20040704-1.i386.rpm
mplayer-common-1.0pre5-2.i386.rpm
mplayer-gui-1.0pre5-2.i386.rpm
mplayer-skin-default-1.4-1.noarch.rpm
mplayer-vidix-1.0pre5-2.i386.rpm
mplayer-vidix-ATI-Radeon-1.0pre5-2.i386.rpm
mplayerplug-in-2.70-rhel3
Install with rpm -ivh mencoder-1.0pre5-2.i386.rpm mplayer* and let RPM sort out the correct order for installation.
Mauriat Miranda has comprehensive notes on installing MPlayer from source on Fedora Core 2.
[top]
Printer setup
- Make sure that all the CUPS and GIMP-PRINT packages are installed (they should be in the
fedora/rpms/ directory. I've got the following installed:
cups-devel
libgnomecups
cups-libs
gimp-print-cups
cups
gimp-print-plugin
gtkam-gimp
gimp-print
gimp-print-utils
gimp-print-devel
gimp
gimp-print-cups
gimp-data-extras
xsane-gimp
Once you've done this, it might be sensible to restart CUPS with /etc/init.d/cups restart
- With the packages installed, you can now set up the printer in Gimp. Follow the normal
File | Print | Setup sequence. NB: Gimp prints thing outside the normal CUPS-controlled queues, so it would probably be a bad idea to try to print from Gimp and CUPS simultaneously.
- You can now install the printers in CUPS. Point your browser at
http://localhost:631/admin and set up the printers using the Gimp-print drivers.
- The web interface doesn't seem to allow the setting of the default printer. Do it from the command line with
lpoptions -d <queue-name>
[top]
Add Backup Scripts
Create the following two Bash scripts. They automate the generation of backups, to be stored on the local disk.
Daily backups are done by /etc/cron.daily/makedailybackups
#!/bin/bash
BACKUPFILENAME="/home/daily-backup.$(date -I)"
# Remove backups more than 2 days old
find /home/ -name 'daily-backup*' -type f -daystart -ctime +1 \
-maxdepth 1 -exec rm -f {} \;
# Create a backup file
tar --create --absolute-names --bzip --file="$BACKUPFILENAME.opt.tar.bz2" /opt
tar --create --absolute-names --bzip --file="$BACKUPFILENAME.etc.tar.bz2" /etc
tar --create --absolute-names --bzip --file="$BACKUPFILENAME.pictures.tar.bz2" \
/media/dosc/pictures
tar --create --absolute-names --bzip --file="$BACKUPFILENAME.home.tar.bz2" \
--exclude='daily-backup*' --exclude='monthly-backup*' /home
chmod 600 "$BACKUPFILENAME.opt.tar.bz2"
chmod 600 "$BACKUPFILENAME.etc.tar.bz2"
chmod 600 "$BACKUPFILENAME.pictures.tar.bz2"
chmod 600 "$BACKUPFILENAME.home.tar.bz2"
# to restore, use:
# tar --extract --same-owner --preserve-permissions --keep-old-files
# --verbose --bzip --file=xxx
# Other options would be:
# --absolute-names (to restore anchored at root) |
Monthly backups are done by /etc/cron.monthly/makemonthlybackups
#!/bin/bash
BACKUPFILENAME="/home/monthly-backup.$(date -I)"
# Create a backup file
tar --create --absolute-names --bzip --file="$BACKUPFILENAME.opt.tar.bz2" /opt
tar --create --absolute-names --bzip --file="$BACKUPFILENAME.etc.tar.bz2" /etc
tar --create --absolute-names --bzip --file="$BACKUPFILENAME.pictures.tar.bz2" \
/media/dosc/pictures
tar --create --absolute-names --bzip --file="$BACKUPFILENAME.home.tar.bz2" \
--exclude='daily-backup*' --exclude='monthly-backup*' /home
chmod 600 "$BACKUPFILENAME.opt.tar.bz2"
chmod 600 "$BACKUPFILENAME.etc.tar.bz2"
chmod 600 "$BACKUPFILENAME.pictures.tar.bz2"
chmod 600 "$BACKUPFILENAME.home.tar.bz2"
# Remove backups more than 70 days old
find /home/ -name 'monthly-backup*' -type f -ctime +70 \
-maxdepth 1 -exec rm -f {} \;
# to restore, use:
# tar --extract --same-owner --preserve-permissions --keep-old-files
# --verbose --bzip --file=xxx
# Other options would be:
# --absolute-names (to restore anchored at root) |
Once created, make the files executable ( chmod +x
/etc/cron.daily/makedailybackups
/etc/cron.monthly/makemonthlybackups ).
If you want to write the backups to a DVD, use
growisofs as root or, if you want to use
something like K3B as a user, make them readable by users with a
chmod a+r /etc/cron.daily/makedailybackups command (as root).
If you have enough room in your root partition to store the backup
files, you should change the names to put the files there and remove
the exclude options in the tar commands (the
only place I have enough room to store the backups is in the
/home partition, so I have to ensure that existing backup
files aren't incorporated into the new one).
[top]
Install Flash player, Real Player
Get the latest Flash player from http://macromedia.mplug.org/ and install it with rpm -ivh flash-plugin-7.0.25-1.i386.rpm .
Download RealPlayer 10.0 GOLD from http://www.real.com/linux/ . Make sure you get the RPM package. Install it with rpm -ivh RealPlayer10GOLD.rpm . See Mauriat Miranda's notes for details on updating an existing RealPlayer installation.
[top]
Install Emacs 20
I need Emacs 20 for legacy applications. Unfortunately, it doesn't install cleanly in FC3. To install, do the following:
setarch i386 ./configure --x-libraries=/usr/X11R6/lib/ \
--x-includes=/usr/X11R6/include/ --with-x --with-x-toolkit=yes \
--prefix /opt/emacs20/
(add -z nocombreloc to LDFLAGS in Makefile)
# setarch i386 make
# setarch i386 make install
For details on why this works, see James Thornton's emacs compilation page.
[top]
Install Other Applications
For me, this includes:
These should all be fairly straightforward: download the binary distributions from the various originating sites and follow the instructions.
When setting up SLIME, the following lines need to be added to your .emacs file:
(setq interior-lisp-program "/usr/local/bin/lisp")
(add-to-list 'load-path "/opt/sources/slime/slime-1.0beta")
(require 'slime)
(slime-setup) |
SLIME (And CMUCL) are then started by the emacs command M-x slime
[top]
Internet Setup
Setup kppp
RedHat use the PAM authentication system to limit access to the modem device. This is all well and good, but it means that the root password is required to connect to the internet. I tried all sorts of ways to get PAM to work without the password, but I evenually gave up and decided to rely on Linux's security features to keep it safe. Doing this requires a few steps
- Delete the existing symbolic link to Kppp:
rm /usr/bin/kppp
- Recreate the link to point to the real Kppp executable:
ln -s /usr/sbin/kppp /usr/bin/kppp
- Use the user management tool to create a new group,
dialout.
- For each user who you want to use the modem, add them to the
dialout and uucp groups
- Change the group of the Kppp executable:
chgrp dialout /usr/sbin/kppp
- Change the permissions of the Kppp executable to set root ID:
chmod 4750 /usr/sbin/kppp
The authorised users should now be able to start Kppp and set it up to connect to your ISP.
When you set up your ISP in KPPP, remember to redirect the modem link to /dev/ttyS0, as udev will delete a link to /dev/modem
[top]
Mail Transfer Agent setup
I use Sendmail as my main mail transfer agent and fetchmail to get mail from the POP server. Once you've got a handle on what's going on, this is fairly simple to set up. You might like to take a look at my notes on MTA setup to understand better how all the bits fit together on a single machine with a dial-up connection. Much of the sendmail setup was drawn from the short "senmail on a dialup" howto by Suresh Ramasubramanian.
However, the basic mechanics simply require a few files to be set up. They are /etc/ppp/ip-up.local (which is run immediately after PPP establishes a connection):
#!/bin/bash
/usr/bin/fetchmail -f /etc/fetchmailrc
/usr/sbin/sendmail -q |
(make this executable with chmod a+x /etc/ppp/ip-up.local). Tell fetchmail what to do with /etc/fetchmailrc (with your own names and passwords):
# Manually created file, Tues 12 Oct 2004
set postmaster "LocalLoginName"
set bouncemail
set no spambounce
set properties ""
poll pop.yourisp.com with proto POP3
user 'ISPName' there with password 'Password' is 'LocalLoginName' here |
then ensure it has the right permissions with the command chmod 0600 /etc/fetchmailrc ; it needs to have root as owner and group.
and finally, /etc/mail/sendmail.mc (see my sample file). Again, you will have to change the various names and passwords. The important parts are the SMARTHOST, the ALIASFILE definition, and the various MASQUERADE settings. When you've made the relevant changes, recompile the /etc/mail/sendmail.cf file with the command make -C /etc/mail .
Then, create the file /etc/mail/service.switch :
hosts files
aliases files |
and the file /etc/mail/trusted-users, which lists those users who can send email without warnings (this is required because of the use_ct_file feature defined in /etc/mail/sendmail.mc ; add your own names):
# trusted-users - users that can send mail as others without a warning
# apache, mailman, majordomo, uucp, are good candidates
loginname1
loginname2 |
Finally, edit /etc/aliases to make all messages destined for root turn up in a normal user's inbox, such as loginname1 by changing the line at the end:
# Person who should get root's mail
root: loginname1 |
and create the database with newaliases.
Once you've done all that, restart sendmail with /etc/init.d/sendmail restart .
[top]
Procmail setup
These settings need to be implemented as a user, on a per-user basis.
I have a slightly strange setup, in that I use the computer frequently while my wife does not. This means that with my single-mailbox ISP setup, the fetchmail settings above ensure that all mail gets delivered to me. However, my wife does get email occasionally and that needs to be directed to her, but I need to know about it too so that I can tell her about it. This kind of filtering is what procmail is for.
Create a file ~/.procmailrc which contains the following:
:0 c
* ^TO_wife@wimp
! wife |
This ensures that all messages addressed to my wife get copied to her mailbox.
[top]
KMail setup
These settings need to be implemented as a user, on a per-user basis.
KMail needs to communicate with the sendmail setup. In KMail, in the Settings | Configure KMail | Network dialogue tab, set these options:
- Sending: Sendmail
- Receiving: Mbox mailbox, location
/var/spool/mail/loginname, lock type FCNTL, enable interval checking (30 mins +)
You'll need to restart KMail before the changes take effect.
[top]
|