Having aquired a Athlon 64bit CPU
I initially tried the 64 bit verion of Fedora Core 2. Generally
this worked fine, but I had problems with UrlView - which I use with
mutt - and a shortage of 64 bit Mozilla and Firefox plugins. So I
decided to fall back to the 32 bit version for a while.
I have documented my installation process here, in the hope that it will help me, as well as other users in the future. The workstation it is installed on, Jenny, is part of my home network, which consists of:
If you use any of the information remember that I run a network securely protected by a firewall and accessed by people I trust. Not everything here is as secure as you might need.
These
instructions are for installing Gnu/Linux on a PC where Windows
XP Professional is already installed. Although this should result
in a dual boot system, be aware that, as with any installation, the
existing Windows Operating System and data could be
overwritten and lost!
Boot from the first CD.
Select graphical mode installation.
Run the media test if it hasn't been done before.
Select English as the installation language.
Select UK keyboard.
Select Install Fedora Core.
Select Workstation installation type.
Select Manual partition with Disk Druid and create the following partitions
| hdg1 | 300 MB | /boot | ||
| hdg2 | 140,000 MB | / | ||
| hdg3 | 10,000 MB | /var | ||
| hdg5 | 5,000 MB | /tmp | ||
| hdg6 | 2,000 MB | (swap) | ||
| hdg7 | 33,500 MB | /home |
Use GRUB as the boot loader. Change the first lable from other to Windows XP.
Set the hostname to jenny.10forbes.close.
Select no firewall.
Select English (Great Britain) as the default language. Deselect English (USA).
Select Europe/London and System clock uses UTC on the timezone screen.
Enter a root password.
Select Customize software packages to be installed.
Change the software selection as follows.
Click next and continue with the install.
Reboot!
Configure and run
yum to update any RPM packages that are out of date.
First find a mirror to update from. Using the default Fedora site is antisocial, and because of the amount of traffic that uses it you will get slow and unreliable downloads.
Edit /etc/yum.conf and in the [base] and [updates-released] sections, replace the baseurl= lines with
baseurl=http://.../core/$releasever/$basearch/os/ ... baseurl=http://.../core/updates/$releasever/$basearch/
where http://.../core/ is your chosen mirror.
Then download and install any updates
# yum update
Enable the yum daemon, which uses a daily cron job to get the updates automatically.
# chkconfig yum on # service yum start
Clean the old yum headers occaisionally with a monthly cron job to run.
yum clean oldheaders
Use yum to install the following packages.
# yum install cdrdao # yum install mysql # yum install mysql-devel
Set up yum to maintain from some third party repositories. Add the following to /etc/yum.conf.
[freshrpms] name=Fedora Linux $releasever - $basearch - freshrpms baseurl=http://ayo.freshrpms.net/fedora/linux/$releasever/$basearch/freshrpms/ gpgcheck=1 [dag] name=Dag RPM Repository for Fedora Core baseurl=http://apt.sw.be/fedora/$releasever/en/$basearch/dag/ gpgcheck=1 [fedora.us] name=Fedora US baseurl=http://download.fedora.us/fedora/fedora/$releasever/$basearch/RPMS.stable gpgcheck=1
Import the RPM GPG keys.
# rpm --import http://freshrpms.net/packages/RPM-GPG-KEY.txt # rpm --import http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt # rpm --import http://www.fedora.us/FEDORA-GPG-KEY
Now use yum to install bittorrent, flash and firefox.
# yum install bittorrent # yum install mozilla-flash # yum install firefox
Make KDE the default desktop environment:
$ switchdesk kde
Sound apears not to work, in fact it does, but extremley quietly. To correct this run alsamixer from the command line, and use the right arrow cursor key to select the VIA DXS settings on the right hand end. Use the up arrow cursor key to set the volume on these (there are four of them).
Sound now works, but these settings will be lost when logging off KDE. To save them enter:
$ /usr/sbin/alsactl -f /home/steve/.asound.state store
which saves them in a hidden file in my home directory. To load these whenever KDE is started, create ~/.kde/Autostart/sound as follows:
#!/bin/bash /usr/sbin/alsactl -f /home/steve/.asound.state restore
and make this executable:
$ chmod 755 ~/.kde/Autostart/sound
Customise the shell prompt by adding the following lines to the end of /etc/bashrc.
COLOR1="\[\033[0;36m\]"
COLOR2="\[\033[0;32m\]"
COLOR3="\[\033[0;36m\]"
COLOR4="\[\033[0;37m\]"
if [ "$UID" = "0" ]; then
COLOR2="\[\033[1;31m\]"
fi
PS1="$COLOR2($COLOR3\u@\h$COLOR2:$COLOR1\w$COLOR2)$COLOR1\\$ $COLOR4"
Change the resolution of the virtual terminals (running on Ctrl-Alt-1 through Ctrl-Alt-6). Edit /boot/grub/grub.conf and add vga=791 to the end of the menu kernel line, e.g.
kernel /vmlinuz-2.4.20-30.9 ro root=LABEL=/ hda=ide-scsi vga=790
790 produces a 1024x768 resolution with 32,768 colours. You could use any of the following (if you video card supports them).
| Colours | 640x480 | 800x600 | 1024x768 | 1280x1024 | 1600x1200 |
| 256 | 769 | 771 | 773 | 775 | 796 |
| 32,768 | 784 | 787 | 790 | 793 | 797 |
| 65,536 | 785 | 788 | 791 | 794 | 798 |
| 16.8M | 786 | 789 | 792 | 795 | 799 |
Keep /tmp tidy. The following cron entry deletes all files and directories that are more than a week old.
30 1 * * * find /tmp -mtime +7 -type f -print -exec rm {} ";"; find /tmp -mtime +7 -type d -print -exec rm -rf {} ";"
Sendmail is a mail transfer
agent. MTAs are used to transfer messages between machines.
Normally Sendmail will send out any mail with headers showing
it as coming from the local domain - in my case
10forbes.close. Some servers may refuse to accept email
unless it comes from a server with a real Internet domain. So
the following changes to the Sendmail configuration make it
look as if the email has come from my Internet domain,
stevesearle.com. To do this, the following lines are added to
the /etc/mail/sendmail.mc file (uncomment - remove dnl ...
dnl - and edit where neccessary).
... MASQUERADE_AS(`stevesearle.com') ... FEATURE(masquerade_envelope) ...
Note that the EXPOSED_USER line in /etc/mail/sendmail.mc will prevent mail sent by root from being masqueraded, this should be removed if this is a problem.
Regenerate the /etc/mail/sendmail.cf with (note the sendmail-cf package must be installed for this to work, and no warnings are displayed if it isn't installed.
# make -C /etc/mail
Restart sendmail.
# service sendmail restart
Create a .forward file to ensure that any mail to root gets read. Ensure that it is only writable by the user, otherwise it will be ignored.
# chmod 644 ~/.forward
Mount any NFS exports from other machines, by editing /etc/fstab and adding the appropriate lines, e.g.
hayley:/backups /backups nfs rsize=8192,wsize=8192
This would mount angie's /backups directory under /backups on this machine. (Permission would have to be granted on angie via the /etc/exports file to allow this.) Don't forget to create the /backups directory on the local machine.
I run an old machine as a backup device. A backup folder is NFS exported to the rest of the network, and each machine runs a cron tar job to back up various files and directories.
These instructions have been derived from the excelent SpamAssassin-ClamAV-Procmail-Howto.
Download Clam AntiVirus to /tmp.
Create a user group and user.
# groupadd clamav # useradd -g clamav -s /bin/false -c "Clam AntiVirus" clamav
Install.
$ cd /tmp $ tar -xzf clamav-0.80.tar.gz $ cd clamav-0.80 $ ./configure $ make $ su -c "make install"
Edit both /usr/local/etc/clamd.conf and /usr/local/etc/freshclam.conf and remove or comment out the Example directive.
... # Comment or remove the line below. # Example ...
Create /etc/init.d/clamd as follows.
#!/bin/bash
TMPDIR=/tmp
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin
case "$1" in
start)
echo "Starting ClamAV..."
if [ -S /tmp/clamd ]; then
echo "ClamAV is already running!"
else
/usr/local/bin/freshclam -d -c 10 --datadir=/usr/local/share/clamav
/usr/local/sbin/clamd
fi
echo "ClamAV is now up and running!"
;;
stop)
echo "Shutting down ClamAV..."
array=(`ps ax | grep -iw '/usr/local/bin/freshclam' | grep -iv 'grep' \
| awk '{print $1}' | cut -f1 -d/ | tr '\n' ' '`)
element_count=${#array[@]}
index=0
while [ "$index" -lt "$element_count" ]
do
kill -9 ${array[$index]}
let "index = $index + 1"
done
array=(`ps ax | grep -iw '/usr/local/sbin/clamd' | grep -iv 'grep' \
| awk '{print $1}' | cut -f1 -d/ | tr '\n' ' '`)
element_count=${#array[@]}
index=0
while [ "$index" -lt "$element_count" ]
do
kill -9 ${array[$index]}
let "index = $index + 1"
done
if [ -S /tmp/clamd ]; then
rm -f /tmp/clamd
fi
echo "ClamAV stopped!"
;;
restart)
$0 stop && sleep 3
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0
Make it executable and start it.
# chmod 755 /etc/init.d/clamd # /etc/init.d/clamd start
Make it start at boot up and stop at close down.
# ln -s /etc/init.d/clamd /etc/rc2.d/S20clamd # ln -s /etc/init.d/clamd /etc/rc3.d/S20clamd # ln -s /etc/init.d/clamd /etc/rc4.d/S20clamd # ln -s /etc/init.d/clamd /etc/rc5.d/S20clamd # ln -s /etc/init.d/clamd /etc/rc0.d/K20clamd # ln -s /etc/init.d/clamd /etc/rc1.d/K20clamd # ln -s /etc/init.d/clamd /etc/rc6.d/K20clamd
Schedule the following command to run regualry to check for viruses.
/usr/local/bin/clamscan -ir --stdout /
Uptimed is used to keep track of the highest uptimes my GNU/Linux computers have.
Download it, and build and install it with
$ cd /tmp $ tar -xjf uptimed-0.3.1.tar.bz2 $ cd uptimed-0.3.1 $ ./configure $ make $ su -c "make install"
Then add the following to /etc/rc.d/rc.sysinit to create a unique id each time the server is booted.
echo "Creating unique uptime daemon bootid..." /usr/local/sbin/uptimed -b
Now add these lines to /etc/rc.d/rc.local to start the uptime daemon.
echo "Starting uptime daemon..." /usr/local/sbin/uptimed
Rename uptimed.conf-dist
# mv /usr/local/etc/uptimed.conf-dist /usr/local/etc/uptimed.conf
then edit this to set the EMAIL and SEND_EMAIL variables.
Reboot and enter:
$ uprecords
to see how long the server has been up for.
Download various perl modules as follows.
The SSLeay stuff is needed to use SSL with Webmin. You need
to be on-line for this.
# perl -MCPAN -e shell cpan> install MD5 cpan> install Bundle::CPAN cpan> reload CPAN cpan> install Crypt::SSLeay cpan> force install Net::SSLeay cpan> exit
Install Webmin, an excellent browser
based tool for administering and configuring the system.
The tarball should be un-tarred in /usr/local or similar, as this is just configured in the directory it was un-tarred in.
# cd /usr/local # tar -xzf webmin-1.130.tar.gz # cd webmin-1.130 # ./setup.sh
Download and install Vim, the best editor around.
$ cd /tmp $ tar -xjf vim-6.2.tar.bz2 $ cd vim62 $ ./configure $ make $ su -c "make install"
Add the following line to your /etc/bashrc, to make Vim the default editor for mutt, crontab, etc. The "-f" will prevent it forking when invoked, and will avoid the update encoding warning when editing an email.
export EDITOR="gvim -f"
Mutt is my email client of choice.
Dowload it and build it with
$ cd /tmp $ tar -xzf mutt-1.4.2.1i.tar.gz $ cd mutt-1.4.2.1 $ ./configure --enable-pop --enable-imap --with-ssl $ su -c "make install"
Now install urlview, a utility that will fire up the browser to display any URLs in any emails.
$ cd /tmp $ tar -xzf urlview-0.9.tar.gz $ cd urlview-0.9 $ ./configure $ make $ su -c "make install" $ su -c "cp url_handler.sh /usr/local/bin"
/usr/local/bin/url_handler.sh needs to be edited to select the preferred browser. Change any occurances of /usr/X11R6/bin/netscape to /usr/bin/firefox.
Install
MPlayer which is
brilliant for watching mpegs, etc. Build and install it
with
$ cd /tmp $ tar -xjf MPlayer-0.92.tar.bz2 $ cd MPlayer-0.92 $ ./configure --enable-gui $ make $ su -c "make install"
Download one of the skins, un-tar it to ~/.mplayer/Skin, and rename the directory it creates within this to default.
Copy a .ttf file from somewhere on your system to ~/.mplayer/subfont.ttf, and set this to be the default font using the preferences when you first run the gui version. Enter gmplayer to run the gui version.
Keychain is a script that makes the use of ssh-agent to ssh into other machines without entering passwords simple and easy. This section was put together with using Kimmo Suominen's Getting started with SSH. Download and install Keychain with
$ cd /tmp $ tar -xjf keychain-2.0.3.tar.bz2 $ cd keychain-2.0.3 $ su -c "install -m0755 keychain /usr/bin/keychain"
Generate a public/private dsa key pair.
$ ssh-keygen -t dsa $ ssh-keygen -t rsa
Enter a passphrase when prompted. Then copy the public keys to all the machines you wish to connect to.
$ scp .ssh/id_dsa.pub steve@emma:
On the machine you wish to connect to, add the contents of the file you have just copied to authorized_keys in .ssh directory. Also make sure that only you can write to the .ssh directory and the authorized_keys file.
$ cd $ cat id_dsa.pub >> ~/.ssh/authorized_keys $ chmod go-w .ssh .ssh/authorized_keys
Now alter ~/.bash_profile to run keychain when you log in. If it is not already running, it will be started and you will be prompted for the passphrase, but then this will be remembered until the machine is rebooted.
keychain ~/.ssh/id_rsa ~/.ssh/id_dsa
. ~/.keychain/${HOSTNAME}-sh
VNC is remote control software
that allows you to interact with other computers on the
network. I use it to manage the Windows boxes on the
network.
Extract the source tarball and ./configure and make. To install, switch to root and enter
$ cd /tmp $ tar -xzf vnc-3.3.7-unixsrc.tar.gz $ cd vnc-3.3.7-unixsrc $ ./configure $ make $ su -c "./vncinstall /usr/local/bin"
Launch a VNC server on the target machine, and then run vncviewer on the client to take control.
$ vncviewer
Install
rdesktop an an open
source client for Windows NT Terminal Server and Windows
2000/2003 Terminal Services. Download and install.
$ cd /tmp $ tar -xjf rdesktop-1.3.1.tar.gz $ cd rdesktop-1.3.1 $ ./configure $ make $ su -c "make install"
To connect to server angie as administrator with a 1024x768 screen resolution, use
$ rdesktop -u administrator -g 1024x768 angie
HTML Tidy is a great
application for tidying up HTML source code. Download it to
/tmp and build and install with
$ cd /tmp $ tar -xzf tidy_src.tgz $ cd tidy/build/gmake $ make $ su -c "make install"
I use
KDirStat to
monitor diskspace and identify what it is being used for. It
is a great utility that graphically represents file sizes, so
that you can easily identify where and who the largest used
of filespace are.
Download it to /tmp and build and install with
$ cd /tmp $ tar -xjf kdirstat-2.4.0.tar.bz2 $ cd kdirstat-2.4.0 $ ./configure $ make $ su -c "make install"
I use mozex to intercept mailto:
links in Mozilla and Firefox and open up a mutt email dialog. Click on
the link on the installation page to install. This seems to be
needed to be done from both Mozilla and Firefox.
Then in Mozilla, go to Tools -> Options -> Extensions -> mozex -> Options. Select Intercept clicks: mailto, set Directory for temporary files to /tmp and set Mailer: to konsole --schema Linux.schema --vt_sz 132x60 -e mutt mailto:%A?subject=%S&cc=%C&body=%B.
For Firefox, you need to edit ~/.mozilla/firfox/default.*/prefs.js and add the following lines
user_pref("mozex.command.aim", "");
user_pref("mozex.command.download", "");
user_pref("mozex.command.ed2k", "");
user_pref("mozex.command.ftp", "");
user_pref("mozex.command.irc", "");
user_pref("mozex.command.mailer", "/usr/bin/konsole --schema
Linux.schema --vt_sz 132x60 -e mutt mailto:%A?subject=%S&cc=%C&body=%B");
user_pref("mozex.command.news", "");
user_pref("mozex.command.source", "/usr/local/bin/gvim %t");
user_pref("mozex.command.telnet", "");
user_pref("mozex.command.textarea", "/usr/local/bin/gvim %t");
user_pref("mozex.general.tmpdir", "/tmp");
user_pref("mozex.intercept.ftp", false);
user_pref("mozex.intercept.irc", false);
user_pref("mozex.intercept.mailto", true);
user_pref("mozex.intercept.news", false);
user_pref("mozex.universal.command", "");
user_pref("mozex.universal.schemes", "");
Install
K3b is brilliant CD and DVD
burning software. Download and install.
$ cd /tmp $ tar -xjf k3b-0.11.9.tar.bz2 $ cd k3b-0.11.9 $ ./configure $ make $ su -c "make install"