Gentoo Linux 2004.1 Install Notes, Tips & Tricks ------------------------------------------------ Paul Littlefield Last Updated: Mon Jun 21 16:40:25 2004 ------------------------------------------------ Successfully installed so far: 1. SSH 2. Sendmail 3. Qpopper 4. Apache 5. PHP 6. MySQL 7. PHPMyAdmin 8. Webmin 9. Usermin 10. CUPS 11. Samba 12. F-Prot AntiVirus 13. MailScanner 14. SpamAssassin 15. XFree86 16. KDE 17. ALSA Partly following instructions at http://www.littlefield.info/linux/redhat_73_install_notes.txt ----- BASE INSTALL (STAGE 3) Follow instructions at http://www.gentoo.org/doc/en/handbook/handbook-x86.xml ----- BUG During part 6.a. (mirrorselect -a -s4 -o >> /mnt/gentoo/etc/make.conf), the software does not put a comment (#) character at the beginning of the line above the GENTOO_MIRRORS variable. ----- BASH Run Control File for root user # cp /etc/skel/.bash_profile /root/ # nano -w /root/.bashrc alias ll="ls -lah --color=tty" alias n="nano -w" ----- Timezone and Localtime # echo -n "Europe/London" >/etc/timezone # ln -s /usr/share/zoneinfo/Europe/London /etc/localtime # emerge ntp # echo "ntpdate ntp0.pipex.net" >/etc/cron.weekly/ntpdate.cron # chmod 0755 /etc/cron.weekly/ntpdate.cron ----- Run Level # rc-update add gpm default # rc-update add sshd default ----- Portage # emerge --pretend elinks Loads of XFree86 software would be installed, so use --nodeps option # emerge --nodeps elinks ----- Sendmail #1 # emerge --pretend sendmail [ ebuild B ] net-tools/ssmtp conflicts with net-tools/sendmail (/usr/bin/sendmail.postfix # emerge unmerge ssmtp # emerge sendmail # which sendmail send-mail mailq newaliases hoststat purgestat /usr/sbin/sendmail which: no send-mail in (/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/3.3) /usr/bin/mailq /usr/bin/newaliases /usr/bin/hoststat /usr/bin/purgestat # nano -w /etc/mailer.conf (mailwrapper: edit to replace actual software) ----- Sendmail #2 After the prceeding step, sendmail would not start. This was due to a corrupt / missing binary file: paully@gentoo paully $ ls -lh /usr/sbin/sendmail -rwxr-xr-x    1 root     root         6.9K May 20 10:26 /usr/sbin/sendmail ...so I just re-emerged and it started first time. The binary is now... paully@gentoo paully $ ls -lh /usr/sbin/sendmail -r-xr-xr-x    1 root     smmsp        582K May 21 19:57 /usr/sbin/sendmail ----- QPopper #1 There was an error with PAM... May 25 10:16:46 [popper] PAM unable to dlopen(/lib/security/pam_pwdb.so) May 25 10:16:46 [popper] PAM [dlerror: /lib/security/pam_pwdb.so: cannot open shared object file: No such file or directory] May 25 10:16:46 [popper] PAM adding faulty module: /lib/security/pam_pwdb.so ...so edited the following file: # nano -w /etc/pam.d/pop3 ...from: #%PAM-1.0 # auth required /lib/security/pam_pwdb.so shadow # account required /lib/security/pam_pwdb.so # password required /lib/security/pam_cracklib.so # password required /lib/security/pam_pwdb.so nullok use_authtok md5 shadow # session required /lib/security/pam_pwdb.so ...to: #%PAM-1.0 auth required /lib/security/pam_stack.so service=system-auth account required /lib/security/pam_stack.so service=system-auth ...and restarted xinietd: # /etc/init.d/xinetd restart ----- QPopper #2 Procmail will automatically route messages into the users $HOME directory as maildir format. To change this, edit the /etc/procmailrc file with the following variables, so that you can use QPopper successfully:- gentoo root # cat /etc/procmailrc # Use maildir-style mailbox in user's home directory # DEFAULT=$HOME/.maildir/ ORGMAIL=/var/spool/mail/$LOGNAME DEFAULT=$ORGMAIL # /etc/init.d/sendmail restart ----- CUPS Printing I was absolutely amazed at how easy this was to setup my HP LaserJet 2100 on a basic Gentoo Linux installation. I opened up the following website for reference in case I got into trouble... http://www.linuxprinting.org # USE="-X -qt" emerge cups # USE="-X -qt" emerge ghostscript # rc-update add cupsd default # nano -w /etc/cups/cupsd.conf AllowFrom 192.168.0.* # /etc/init.d/cupsd start Then, you open up a browser on your network and go to the following page: http://192.168.0.111:631 > Add Printer > Name: HP-Gentoo > Driver: HP > Print Test Page I then printed a page from my wife's machine in OpenOffice: File > Print > Printer: > OK Done! ----- F-Prot Antivirus Install a required PERL module: # perl -MCPAN -e shell install HTTP::Request quit Download the latest version from the website: # cd /tmp/ # ncftpget ftp://ftp.f-prot.com/pub/linux/fp-linux-ws.tar.gz Unpack and install: # tar zxvf fp-linux-ws.tar.gz # cd f-prot/ # ./install-f-prot.pl ----- MailScanner Get the latest version from the website: # cd /tmp/ # wget http://www.sng.ecs.soton.ac.uk/mailscanner/files/4/tar/MailScanner-install-4.31.4-1.tar.gz Unpack and install: # tar zxvf MailScanner-install-4.31.4-1.tar.gz # ./install.sh Edit the MailScanner configuration file: # nano -w /opt/MailSacanner/etc/MailScanner.conf Edit the Sendmail run-level configuration file: # nano -w /etc/conf.d/sendmail # Config file for /etc/init.d/sendmail # add start-up options here # SENDMAIL_OPTS="-bd -q30m -L sm-mta" # default daemon mode # CLIENTMQUEUE_OPTS="-Ac -q30m -L sm-cm" # clientmqueue # KILL_OPTS="" # add -9/-15/your favorite evil SIG level here SENDMAIL_OPTS="-bd -q15m -L sm-mta -OPrivacyOptions=noetrn -ODeliveryMode=queueonly -OQueueDirectory=/var/spool/mqueue.in" CLIENTMQUEUE_OPTS="-Ac -q15m -L sm-cm" KILL_OPTS="" Add the run-level file: # cp /etc/init.d/sendmail /etc/init.d/sendmail.old # nano -w /etc/init.d/sendmail #!/sbin/runscript # # Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # # /etc/init.d/sendmail # # Startup script for Sendmail with MailScanner # Last updated: Tue Jun 1 16:01:39 2004 # # Paul Littlefield depend() { need net use logger provide mta } start() { ebegin "Starting sendmail" /usr/bin/newaliases > /dev/null 2>&1 (cd /var/spool/mqueue; rm -f xf*) /usr/sbin/sendmail ${SENDMAIL_OPTS} > /dev/null 2>&1 /usr/sbin/sendmail ${CLIENTMQUEUE_OPTS} > /dev/null 2>&1 eend $? ebegin "Starting mailscanner" sleep 1 /opt/MailScanner/bin/check_mailscanner >/dev/null 2>&1 eend $? } stop() { ebegin "Stopping mailscanner" killall MailScanner sleep 1 eend $? ebegin "Stopping sendmail" killall ${KILL_OPTS} sendmail rm /var/run/sendmail.pid eend $? } Update the run-level files: # rc-update add sendmail default # rc-status --all ----- XFree86 & KDE Follow instructions at http://www.gentoo.org/doc/en/desktop.xml XFree86 # emerge xfree # xf86config # rc-update add xfs default # /etc/init.d/xfs start # startx Hit to kill the X server. KDE # nano -w /etc/make.conf USE="qt kde cups -gnome -gtk" # emerge kde This can take up to 48 hours and will install about 50 packages! # ls /etc/X11/Sessions/ kde-3.2.2 # nano -w /etc/rc.conf XSESSION="kde-3.2.2" # /usr/kde/3.2/bin/kdm ----- ALSA (Advanced Linux Sound Architecture) Follow instructions at:- http://www.gentoo.org/doc/en/alsa-guide.xml http://www.df.lth.se/~triad/krad/linuxinstall.php # emerge alsa-driver # emerge alsa-oss # emerge alsa-utils # nano -w /etc/modules.d/alsa # ALSA portion alias char-major-116 snd alias snd-card-0 snd-es18xx options snd-es18xx enable=1 isapnp=0 port=0x220 mpu_port=0x388 fm_port=0x330 irq=5 dma1=1 dma2=0 # OSS/Free portion alias char-major-14 soundcore alias sound-slot-0 snd-card-0 # card #1 alias sound-service-0-0 snd-mixer-oss alias sound-service-0-1 snd-seq-oss alias sound-service-0-3 snd-pcm-oss alias sound-service-0-8 snd-seq-oss alias sound-service-0-12 snd-pcm-oss # rc-update add alsasound boot # /etc/init.d/alsasound start # amixer # amixer set Master 100 unmute # alsamixer