|
I've recently set up a new PC with Fedora Core 2. 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
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]
Allow modification of KDE Menu
As delivered, changes made to the KDE Menu with the K Menu Editor are not applied. This can be fixed by optionally changing the KDE theme to something other than Bluecurve and then erasing the ~/.config and ~/.local directories.
[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 TCL/TK
While Fedora seems to install Tcl, it doesn't install the graphical TK toolkit. Install it my manually adding the RPMs from the DVD with the commands:
cd /mnt/cdrom/fedora/rpms/
rpm -ivh tcl-devel-845-7i386.rpm tcl-html-845-7i386.rpm tclx* tix* tk*
[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/NetBeans3.6/ and the SDK in /opt/j2sdk1.4.2_04/.
Finally, alter the file /etc/profile to include the line:
pathmunge /usr/X11R6/bin after
pathmunge /opt/j2sdk1.4.2_04/bin after
unset pathmunge
|
This puts the Java executables on the path.
[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]
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://luna.cs.ccsu.edu/dominik/mplayer/ (or another mirror). I installed from this set, labelled for Fedora Core 2 (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]
Install KDE-EDU package
For some reason, Fedora Core 2 doesn't come with the KDE-Edu edutainment package. Install the RedHat 9 RPM available from http://www.itp.tu-graz.ac.at/Comp/RPM/rh-9/kdeedu-3.1-2.i386.html
[top]
Printer setup
The package management tool in FC2 seems to be incapable of loading packages from the DVD (this is a known bug), so the provided packages need to be installed by hand.
- 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>
Note to self: The Epson C80 printer has a different formulation for its colour and black inks. To get het best quality from glossy paper, use three-colour composite rather than CMYK.
[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 day 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" /mnt/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" /mnt/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]
Internet Setup
Turn off IPv6
Fedora Core 2 comes with IPv6 enabled by default. Unfortunately, this confuses many DNS servers so it needs to be turned off. Add the line alias net-pf-10 off to the end of your /etc/modprobe.conf file,
[top]
Create a link to the modem device
I'm still in the stone age, and have an external dial-up modem connected to the serial port. To make acces to this easier, create a symbolic link from /dev/modem to the serial port:
ln -s /dev/ttyS0 /dev/modem
[top]
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.
[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 |
and /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 |
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]
|