Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
becki:linux:install_config_tips [2009-07-10 08:08] becki |
— (aktuell) | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
- | ====== Linux OS Installation and Configuration Tips ====== | ||
- | ===== Abstract == | ||
- | |||
- | Purpose of the document is the descpiption of ever repeating install and config procedures at a central place. | ||
- | |||
- | Because Slackware Linux uses most packages in their pristine forms, the documentation here is targeted mainly to this distro. The order of this document is more or less followning the natural installation order of a Slackware Linux system. | ||
- | |||
- | Examples of sourcefiles in this doc should specify their path (eg /etc/rc.d/rc.local) as a comment at the beginning. | ||
- | |||
- | ===== Metadata == | ||
- | ==== Third-party Programs == | ||
- | |||
- | For additional Software first look in the [[slackmirror>slackware/extra/|extra directory]] of a [[http://www.slackware.com/getslack/|Slackware mirror]]. Use the ''installpkg'' command to install one of those packages. | ||
- | |||
- | Second check out www.linuxpackages.net (Also installed with ''installpkg''). FIXME Are http://slackware.com/~alien/ and http://slackware.com/~rworkman/ worth a look too? | ||
- | |||
- | Third look at www.SlackBuilds.org. The [[http://slackbuilds.org/howto/|SlackBuild Usage HOWTO]] tells you more. BTW a Slack buildscripct template can be found [[becki:sources:slackbuild_template|here]]. | ||
- | |||
- | If you can get 'only' the source code of a programm, than you should prefer [[commands#checkinstall]] to the normal ''./configure - make - make install'' procedure. Thus the software can be cleanly removed later or distributed ot oter Slackware-Boxes. | ||
- | |||
- | Self-build or third-party programs where no slackware package is available go to /usr/local/<programname-version>. Then make a symlink <programname> -> <programname-version>. See also: [[http://www.openaddict.com/documents/Linux-Filesystem-Hierarchy/usr.html|Linux Filesystem Hierarchy]], [[wpde>Filesystem_Hierarchy_Standard#.2Fusr.2Flocal_:_lokal_installierte_Programme|Linux Filesystem Hierarchy (german)]] | ||
- | |||
- | ==== Upgrading and Keeping Slack up to date == | ||
- | |||
- | See [[slack_upgrade]] | ||
- | |||
- | ==== Linux Application Installation and Configuration Tips == | ||
- | |||
- | See [[App Install Config Tips]] | ||
- | |||
- | ===== Slack Installation == | ||
- | |||
- | [[slackmirror>slackware/Slackware-HOWTO|Original Slack installation howto]] | ||
- | |||
- | As of Slack 12.0 making boot disks is obsoletete. The description is kept in [[Slack tips attic]] for reference | ||
- | |||
- | ==== Boot == | ||
- | |||
- | Since Slack 12.0 the default Kernel to select is hugesmp.s | ||
- | |||
- | <del>Select kernel: Since Slack 10.2 I prefer ''bareacpi.i'' over the default ''bare.i'' for standard IDE Systems. For my SCSI-PC I use ''adaptec.s''. ''lspci -v'' will help to select the suitable kernel.</del> (obsolete) | ||
- | |||
- | <del>With bare.i & adaptec.s I always enable APM in ''/etc/rc.d/rc.modules'' by uncommenting the line ''/sbin/modprobe apm'' (later). This switches the system off completly after shutdown (Fans are turned off too). ''lsmod'' shows if APM is working. With bareacpi.i APM in not necessary.</del> (obsolete) | ||
- | |||
- | Keyboard layout: quertz/de-latin1-nodeadkeys.map | ||
- | |||
- | For netword based setup, after login as root, type ''network''! | ||
- | |||
- | ==== Partitioning == | ||
- | |||
- | Use cfdisk. Make at least 3 Partitions for Swap, / and /home. | ||
- | |||
- | === Swap == | ||
- | |||
- | Imho the total of RAM and swap space should be at least 256MB as of Slack 12.0. Eg if the command ''free'' says, you have 64 MB of RAM then the swap partition should have 192 MB. | ||
- | |||
- | If you have 256 or more MB of RAM than Swap is not so important, but create a Swap partition anyway, probabliy with the same size as the RAM. Otherwise a fstab may not be created. | ||
- | |||
- | === / == | ||
- | |||
- | This is where the packages of the distribution go. E.g. a full install of Slack 12.2 needs about 5 GB, so 8 GB is a good size for this partition | ||
- | |||
- | === /home == | ||
- | |||
- | Is for all data which has to survive a Slackware update. Use the rest of available disk space for this partition. | ||
- | |||
- | See [[slack_upgrade]] how to use this partion also for e.g. /usr/local | ||
- | |||
- | ==== Setup == | ||
- | === Tips == | ||
- | |||
- | Note: [Alt][Fx] gives another console while setup is running. Good for testing puposes | ||
- | |||
- | If you want to reuse old partitions which contain already data, eg for /home /home/share you can specify them here, but **don't** select to format them! | ||
- | |||
- | A note on network boot: It worked with the single line ''/mnt/cdrom/slackware *(ro,sync)'' in ''/etc/exports'' on the server and at the promt "What is the Slackware source directory" ''/mnt/cdrom/slackware''. Of course, the install DVD/CD has to be mountet in the cd-drive of the server before | ||
- | |||
- | Package Series Selection Recommendations: If disc space is sparse deselect E (Emacs), F (FAQ's), K (Kernel Source), T (TeX typesetting language), TCL (Tcl/Tk/TclX scripting languages and tools) & Y (Classic text-based BSD games). But //select// KDEI (KDE i18n) (and remove unnecessary languages later) | ||
- | |||
- | === Setup Example == | ||
- | |||
- | * Keymap: qwertz/de-latin1-nodeadkeys.map (I think this has to be specified again here) | ||
- | * Root Partition: /dev/hda2 | ||
- | * Format /dev/hda2 with check and reiserfs | ||
- | * Optional: Add existing FAT or NTFS Partitions to fstab: yes, as /ntfs-c | ||
- | * Install from Slack-CD, Scan auto | ||
- | * Package series: all, including KDEI | ||
- | * Prompting mode: full; now the packages will be installed, this takes some time | ||
- | * Bootstick: Optional | ||
- | /* | ||
- | * Install Linux Kernel: From CDROM! (Dont't skip) | ||
- | * /dev/modem -> /dev/ttyS0 | ||
- | * hotplug: yes; in case of problems: /etc/hotplug/blacklist /etc/modprobe.d/blacklist | ||
- | */ | ||
- | * Lilo | ||
- | * Expert mode | ||
- | * Begin | ||
- | * <del>Optional Kernel Parameters: hdc=ide-scsi, (hdc: secondary master, see [[http://www.slackbook.org/html/installation-partitioning.html|slackbook]], [[tldp>sag/html/hard-disk.html|sag]] or ''ide_info /dev/hdX'' shows where the burner is)</del> FIXME: Still necessary with Slack12? | ||
- | * FIXME Use UTF-8 Text Console: Yes | ||
- | * Frame Buffer: 1024x768x256 (keep default) | ||
- | * Lilo target: MBR (/dev/hda) | ||
- | * Timeout: 5s | ||
- | * Linux: Select Linux Partition: /dev/hda2 | ||
- | * Install | ||
- | * Conifg can be changed later with ''liloconfig'' or directly by editing ''/etc/lilo.conf'' & re-installing th boot loader with the command ''lilo'' | ||
- | * Mouse: /dev/mouse PS2 (recommended & works also for touchpads. Creates the symlink /dev/mouse -> /dev/input/mice ) | ||
- | * gpm: yes | ||
- | * Configure Network: yes (or later with ''netconfig'' | ||
- | * Hostname: ilse | ||
- | * Domainname: local | ||
- | * IP Address: static IP | ||
- | * Ip-Adresse: 192.168.0.1 | ||
- | * Netmask: 255.255.255.0 | ||
- | * Gateway: No | ||
- | * Nameserver: No | ||
- | * Startup services: | ||
- | * aktivate: rc.cups, rc.mysqld, rc.httpd | ||
- | * deaktivate: rc.inetd | ||
- | * custom screen fonts: no | ||
- | * Hardware clock set to UTC: yes | ||
- | * Timezone: Europe/Berlin | ||
- | * Default Window Manager: xinitrc.kde | ||
- | * Root Password: yes | ||
- | * Exit | ||
- | |||
- | === Note on netconfig == | ||
- | |||
- | If you use ''netconfig'' to setup a static IP connection it changes the following files: | ||
- | /etc/resolv.conf | ||
- | /etc/rc.d/rc.inet1.conf | ||
- | /etc/HOSTNAME | ||
- | /etc/hosts | ||
- | /etc/networks | ||
- | |||
- | ===== After Install Config == | ||
- | |||
- | Bevore changing confiuration files, it is recommendable to keep a copy of the original file with the extension ''.org''. Eg: ''cp /etc/ntp.conf /etc/ntp.conf.org''. This allows to go back to the original configuration in case of failure and makes it easier to introduce your local changes to the new config files after an operation system upgrade (by using diff & patch). | ||
- | |||
- | Sometimes there is already an identical copy of the config file supplied. Eg. in /etc/apache/ the files httpd.conf & httpd.conf.default are initially the same. In this case just make a symlink: httpd.conf.org -> httpd.conf.default. Thus a ''find -name '*.org''' will always give you an overview of modified config files. | ||
- | |||
- | ==== (auto)mount & /etc/fstab == | ||
- | === Users and Groups == | ||
- | |||
- | On Slack userer can be added to the system with the ''adduser'' command. Make sure that local users are added to the groups | ||
- | audio, video, cdrom, plugdev | ||
- | This avoids access right problems with various multimedia apps like Xine, Vlc or Skype. | ||
- | |||
- | === CDROM & Floppy == | ||
- | |||
- | FIXME Check: For command line (un)mounting the things below (pre Slack 12.0) still apply, i.e. you still need entries for cdrom and dvd devices: | ||
- | |||
- | * If required copy line /dev/cdrom and replace cdrom with dvd and check if Symlink /dev/dvd -> /dev/hdc or similar exists | ||
- | * Replace ''owner'' with ''users'' at line /dev/cdrom /dev/dvd and /dev/fd0 to allow a normal user to (un)mount such a device | ||
- | * Add a line for usb drives at the end | ||
- | |||
- | :!: Since Slack 11.0 the cdrom-burner (kernel scsi-emulation in lilo) is not found in eg /dev/hdd anymore, but in eg /dev/sr0 => This means that a Symlink /dev/cdrom -> /dev/sr0 and not /dev/cdrom -> /dev/hdd. You get that hint when you try to mount eg ''# mount -t iso9660 /dev/cdrom /mnt/cdrom/'' as root. | ||
- | |||
- | === USB Drives == | ||
- | |||
- | Since Slack 12 which uses HAL USB drives can mounted automatically if you stick to KDE, GNOME, or Xfce. They provide an automount feature via DBUS/HAL. Just add the usernames of the users to the plugdev group in /etc/group, reload configuration with ''/etc/rc.d/rc.messagebus reload'' and restart KDE. No changes to fstab are necessary. | ||
- | |||
- | If you also want to mount in the traditional way with the command line, than add a line for USB drives to /etc/fstab, eg: ''/dev/sda1 /media/memory0 auto users,noatime,async 0 0''. The entries in fstab are respected by HAL. 'users' means that every user can mount and also a different user can unmount. 'noatime,async' are for conserving flasch memory lifetime. See [[slackmirror>slackware-12.0/CHANGES_AND_HINTS.TXT]] and [[http://www.linuxquestions.org/questions/showthread.php?t=566948&page=2|linuxquestions.org]] | ||
- | |||
- | === fstab Example == | ||
- | |||
- | <code> | ||
- | /dev/hda1 swap swap defaults 0 0 | ||
- | /dev/hda2 / ext3 defaults 1 1 | ||
- | /dev/hda3 /home ext3 defaults 1 2 | ||
- | /dev/cdrom /mnt/cdrom auto noauto,users,ro 0 0 | ||
- | /dev/dvd /mnt/dvd auto noauto,users,ro 0 0 | ||
- | /dev/fd0 /mnt/floppy auto noauto,users 0 0 | ||
- | devpts /dev/pts devpts gid=5,mode=620 0 0 | ||
- | proc /proc proc defaults 0 0 | ||
- | /dev/sda1 /media/memory auto users,noatime,async 0 0 | ||
- | </code> | ||
- | |||
- | ==== /etc/profile.d/lang.sh == | ||
- | |||
- | <code bash> | ||
- | export LANG=de_DE.utf8 | ||
- | #export LANG=de_DE@euro #obsolete | ||
- | </code> | ||
- | |||
- | This localizes many apps, eg Fluxbox Java, editors and pagers. | ||
- | |||
- | Note that for viewing and editing text files in a termial emulator window, both the emulator and the viewer/editor need to be UTF-8 aware. | ||
- | |||
- | Examples for applications which respect UTF-8 are the terminal emulator ''terminal'' (from the Xfce project), the pager ''less'' and the edior ''vim''. | ||
- | |||
- | <del>Dies beeinflußt auch das default character encoding von kate und kwrite unter Kde. Wählt man zB LANG=de_DE@euro, so ist das default encoding ISO-8859-15</del> | ||
- | |||
- | ''locale -a'' shows all possible LANG values | ||
- | |||
- | ==== /etc/profile.d/local.sh == | ||
- | |||
- | <code bash> | ||
- | #!/bin/sh | ||
- | # default settings for every day command line usage | ||
- | # may be overwritten in /home/<username>/.profile | ||
- | |||
- | # for CVS: | ||
- | export EDITOR='/usr/bin/vim' | ||
- | |||
- | # for crontab -e | ||
- | export VISUAL="$EDITOR" | ||
- | |||
- | # for mysql and man | ||
- | #export PAGER='/usr/bin/most' | ||
- | #export PAGER='/usr/bin/less' | ||
- | export PAGER='/usr/bin/less -iR' | ||
- | # -i: case insesitive search; -R: colorize output (for colordiff) | ||
- | |||
- | # conveninence shortcuts: | ||
- | alias o="$PAGER" # default pager | ||
- | alias e="$EDITOR" # default command line editor | ||
- | alias ge='kate -u' # default gui editor | ||
- | alias ll='ls -alF' # detailed directory listing | ||
- | alias ..='cd ..' # go to parent directory | ||
- | alias ...='cd ../..' # go to parent of parent directory | ||
- | alias cal='cal -3m' # calendar: Start on Monday & display 3 Months | ||
- | alias bc='bc -l' # calculator: preload mathlib, scale=20 | ||
- | </code> | ||
- | |||
- | ==== ~/.profile == | ||
- | |||
- | <code bash> | ||
- | #!/bin/bash | ||
- | # shebang only necessary for text coloring in editor | ||
- | |||
- | # use jedit instead of kate as gui editor: | ||
- | # overwrites /etc/profile.d/local.sh | ||
- | # only if jedit is installed & favored | ||
- | alias ge='jedit' | ||
- | |||
- | # For per user scripts and commands: | ||
- | # export is not really necessary here, because PATH is already exported in | ||
- | # /etc/profile | ||
- | export PATH=$PATH:~/bin | ||
- | |||
- | # for CVS: 2004-02-09 16:35, 2006-10-05 14:39 | ||
- | #export CVSROOT=/home/cvsroot | ||
- | #export CVSROOT=":pserver:becki@etb-111:/home/cvsroot" | ||
- | export CVS_RSH="/usr/bin/ssh" | ||
- | export CVSROOT=":ext:becki@etb-111:/home/cvsroot" | ||
- | </code> | ||
- | |||
- | ==== xorg.conf == | ||
- | |||
- | See [[xorg_tips#etc_x11_xorg.conf|xorg_tips->etc_x11_xorg.conf]] | ||
- | |||
- | ==== Alsa Sound == | ||
- | |||
- | * # alsamixer : unmute master & pcm with m-Key; set master to ~75% and pcm to 100%; Quit with ESC | ||
- | * alsactrl store | ||
- | Source: /etc/rc.d/rc.alsa and Bootmessages; amarok home page has also infos about alsarc configuration | ||
- | |||
- | ==== Harddisk Standby == | ||
- | |||
- | Disable ''-- MARK --'' timestamp appearing in a 20 minute interval in /var/log/messages. From [[http://ldp.bootet.net/HOWTO/Battery-Powered/methods.html#SYSKLOGD|Battery powered Howto]] & [[http://l0k1.free.fr/aolsfaq.html#XX85|alt.os.linux.slackware Faq]] | ||
- | <code bash> | ||
- | #/etc/rc.d/rc.syslog : | ||
- | ... | ||
- | #/usr/sbin/syslogd | ||
- | /usr/sbin/syslogd -m 0 | ||
- | ... | ||
- | </code> | ||
- | |||
- | FIXME Check with kernel 2.6: Harddisk standby after a timeout of eg 20 min in /etc/rc.d/rc.local: | ||
- | hdparm -S 240 /dev/hda | ||
- | Values from 1 - 240 specify multiples of 5s. From [[man>hdparm|man hdparm]] & [[http://ldp.bootet.net/HOWTO/Battery-Powered/methods.html#HDPARM|Battery powered Howto]] and. Operation may not supported on SCSI disks. Doesn't seem to work with SCSI drives (eg. /dev/sda) | ||
- | |||
- | ==== ACPI == | ||
- | |||
- | FIXME As of Slack 12.2 this section seems to have become obsolete and needless. | ||
- | |||
- | To get battery control on laptops (eg in KDE) on Slack12 add this to /etc/rc.d/rc.modules : | ||
- | |||
- | <code bash> | ||
- | /sbin/modprobe ac | ||
- | /sbin/modprobe button | ||
- | /sbin/modprobe battery | ||
- | /sbin/modprobe processor | ||
- | /sbin/modprobe thermal | ||
- | /sbin/modprobe fan | ||
- | /sbin/modprobe video | ||
- | /sbin/modprobe container | ||
- | </code> | ||
- | |||
- | [[http://www.slackforum.de/forum/index.php?t=msg&goto=17922|Source]], [[http://www.columbia.edu/~ariel/acpi/acpi_howto.html#config_reference|description]], [[tldp>HOWTO/ACPI-HOWTO/loadmodules.html|more]] | ||
- | |||
- | ==== Create and install an Initrd == | ||
- | |||
- | To use the [[slackmirror>slackware-12.2/CHANGES_AND_HINTS.TXT|recommended]] generic instead of the huge kernel you have to build an initrd. This section is baese on [[slackmirror>slackware-12.2/README.initrd]] | ||
- | |||
- | Make a copy of ''/boot'' dir to be on the save side: ''cp -a /boot /boot.org'' | ||
- | |||
- | Create the initial ramdisk filesystem ''/boot/initrd.gz'' with | ||
- | mkinitrd -c -k 2.6.27.7-smp -m mbcache:jbd:ext3 -f ext3 -r /dev/sda2 | ||
- | In this example with an ext3 root partition on ''/dev/sda2'' (see ''ls -al /dev/root'') for kernel ''2.6.27.7-smp'' (See ''uname -r''). | ||
- | Or | ||
- | mkinitrd -c -k 2.6.27.7-smp -m reiserfs | ||
- | for Reiserfs | ||
- | |||
- | Add a new image-section at the beginning of the image sections to ''/etc/lilo.config'': | ||
- | <code> | ||
- | image = /boot/vmlinuz-generic-smp-2.6.27.7-smp | ||
- | initrd = /boot/initrd.gz | ||
- | root= /dev/sda2 | ||
- | label = LinuxGeneric | ||
- | read-only | ||
- | </code> | ||
- | |||
- | Run ''lilo'' and restart. | ||
- | |||
- | Important note: If initrd.gz is modified, ''lilo'' must be started again! | ||
- | |||
- | ==== Remote Login == | ||
- | |||
- | For remote Login via window manager see [[xorg_tips#kdm|xorg_tips->kdm]] | ||
- | |||
- | To start remote xapps via ssh enable X11Forwarding on the (application-)server side by uncommenting it somewhere in /etc/ssh/sshd_config: | ||
- | <code bash> | ||
- | #X11Forwarding no | ||
- | X11Forwarding yes | ||
- | </code> | ||
- | Additionaly log into the server with ''ssh -X''. | ||
- | |||
- | ==== Terminal Emulator Config Example == | ||
- | |||
- | As of 2009-05-05 terminal emulator of the Xfce window manger (called "Terminal", alternatively started with ''terminal'') is recommended. It supports multiple tabs, transparency and respects UTF-8. | ||
- | |||
- | For a start here is a resonable configuration file for ''terminal''. Copy it to : ''$HOME/.config/Terminal/terminalrc'': | ||
- | |||
- | <code ini> | ||
- | [Configuration] | ||
- | BackgroundMode=TERMINAL_BACKGROUND_TRANSPARENT | ||
- | CommandLoginShell=TRUE | ||
- | FontAntiAlias=FALSE | ||
- | FontName=Fixed 12 | ||
- | MiscDefaultGeometry=80x62 | ||
- | MiscMenubarDefault=FALSE | ||
- | MiscConfirmClose=FALSE | ||
- | </code> | ||
- | |||
- | Obsolete settings for mrxvt, aterm and xterm are at [[Slack Tips Attic]]. | ||
- | |||
- | ==== Remove unnecessary Language Packages == | ||
- | |||
- | Rename the language packages you need in /var/log/packages and run ''removepkg ...''. Then re-rename the necessary packages to their original name again. Example for keeping only German (and default Enlish) : | ||
- | |||
- | <code bash> | ||
- | cd /var/log/packages | ||
- | mv kde-i18n-de-3.5.4-noarch-1 _kde-i18n-de-3.5.4-noarch-1 | ||
- | mv koffice-l10n-de-1.5.2-noarch-1 _koffice-l10n-de-1.5.2-noarch-1 | ||
- | removepkg kde-i18n-* koffice-l10n-* | ||
- | mv _kde-i18n-de-3.5.4-noarch-1 kde-i18n-de-3.5.4-noarch-1 | ||
- | mv _koffice-l10n-de-1.5.2-noarch-1 koffice-l10n-de-1.5.2-noarch-1 | ||
- | </code> | ||
- | |||
- | Alternatively deselect the KDEI package series during setup and install the necessary language packages later manually with installpkg from the CD. | ||
- | |||
- | ===== Internet Connection and Networking == | ||
- | |||
- | For Internet Connection wired or WLAN, with DSL router, with DSL modem or with analog modem and for Firewall setup see [[network tips]] | ||
- | |||
- | ===== Printing == | ||
- | ==== Local Printer Setup == | ||
- | === Use Cups as Printing System == | ||
- | |||
- | Check if cupsd is running with ''ps aux | grep cups'' or point browser to http://localhost:631 . If cupsd is not running, make rc.cups executable and start cupsd with ''/etc/rc.d/rc.cups start'' | ||
- | |||
- | On http://localhost:631 and your root password you can add local connected printers. Note that as of Slack12 an USB printer has to be connected (and switched on) in order to be selectable. | ||
- | |||
- | === Optionally install Turboprint == | ||
- | |||
- | To setup Turboprint download the latest 1.x version from http://turboprint.de (keyfile-readmy claims to work only with 1.x versions of tp) & unpack. Dont change ''system.cfg'' (using /usr/local instead of /usr won't work with cups!). Install as root with ./setup . This may last a long time. Output should be similar to | ||
- | |||
- | Program Files /usr/share/turboprint | ||
- | Commands /usr/bin | ||
- | Spool Dir /var/spool/lpd | ||
- | Man Pages /usr/share/man | ||
- | Log Files /var/log | ||
- | Temp /tmp | ||
- | Cups Drivers /usr/share/cups/model | ||
- | Cups Filters /usr/lib/cups/filter | ||
- | |||
- | To setup printers start (x)tpsetup as root. xtpsetup needs X, so start it with ''su -c $(which xtpsetup)'' or something like | ||
- | xhost + | ||
- | su root | ||
- | export DISPLAY=:0.0 | ||
- | |||
- | Click on 'add' to add a new printer. To setup an USB printer use /dev/usb/lp0 as output in xtpsetup | ||
- | |||
- | To register keyfile, save the keyfile somewhere, start xtpsetup as root, press register -> install keyfile and select keyfile in dialog box. | ||
- | |||
- | Turboprint manual: [[http://turboprint.de/german/manual/turboprint.html|online]] [[file:///usr/share/turboprint/doc/html/turboprint.html|offline]] / Cups manuals: [[http://cups.org/sam.html|for admins]] [[http://cups.org/sum.html|for users]] | ||
- | |||
- | === Useful commands == | ||
- | |||
- | lpinfo -v | ||
- | lpstat -p -d # ? | ||
- | lpadmin -d printername # set default printer see cups admin manual | ||
- | |||
- | === Open Questions == | ||
- | |||
- | FIXME On ingolf at 2006-11-28 hat been problems with parallel port, cups said "Parallel port busy; will retry in 30 seconds..." and the printer (S500) stopped working. Searching google brought: http://www.luga.at/mailing-lists/luga/2006/07/msg00039.html. So I uncommented the "### PC parallel port support ###" section in /etc/rc.d/rc.modules and set ''/sbin/modprobe parport_pc io=0x378 irq=7''. Lets see, if it works from now on... | ||
- | |||
- | ==== Network Printer Setup == | ||
- | |||
- | On the client side (this is the host which wants to use the printer, but where the printer is not connected locally) just make sure, that cupsd is running. No more changes are necessary. | ||
- | |||
- | On the server side, where the printer is connected via USB or printer cable, first make a local printer setup (see above) Turboprint needs only to be installed on the server side. | ||
- | |||
- | Than edit /etc/cups/cups.conf: | ||
- | <code bash> | ||
- | #BrowseAddress @LOCAL | ||
- | BrowseAddress @LOCAL | ||
- | <Location> | ||
- | ... | ||
- | #Allow From 127.0.0.1 | ||
- | Allow From @LOCAL | ||
- | </Location> | ||
- | <Location admin> : | ||
- | ... | ||
- | #Allow From 127.0.0.1 | ||
- | Allow From @LOCAL | ||
- | </Location> : | ||
- | </code> | ||
- | Die ersten beiden Änderungen bewirken das remote cupsd's die lokalen Drucker erkennen können. Wird die 1. Änderung wieder Rückgängig gemacht, so vergessen die Clients auch die Drucker auf ingolf wieder. | ||
- | |||
- | Die 3. Änderung bewirkt, daß die Administration auch von einem entferten Rechner erfolgen kann @LOCAL heißt nur das lokale Netz, keine Dial-up Broadcasts (siehe cupsd.conf) | ||
- | |||
- | Restart cupsd then! | ||
- | |||
- | ==== Printer config Frontends == | ||
- | |||
- | Note: This needs to be verified --- 2006-11-07 14:50 | ||
- | |||
- | === Frontends == | ||
- | |||
- | * System-wide config | ||
- | * (x)tpconfig as root | ||
- | * http://localhost:631/admin/ | ||
- | * lpoptions as root | ||
- | * kde-controlcenter -> cups in admin-mode | ||
- | * user-config | ||
- | * (x)tpconfig | ||
- | * lpoptions | ||
- | * kde-controlcenter -> cups (as kprinter-default?) | ||
- | * kprinter | ||
- | |||
- | === Rules == | ||
- | |||
- | * The [[http://localhost:631/admin|Cups Web-UI]] can install printers and set printer options. But this works only as root | ||
- | * (x)tpsetup can install printers and only be run as root. | ||
- | * (x)tpconfig can set printer options and do printer maintainance. | ||
- | * System wide settings can be done with (x)tpsetup/(x)tpconfig or Cups Web-UI. They respect each other. | ||
- | * Settings done with kde-controlcenter -> cups in admin-mode are probably sysem-wide but only for kprinter | ||
- | * Settings done with kde-controlcenter -> cups in user-mode overwrite kde-admin-mode but apply only for kprinter | ||
- | * lpoptions comes from cups and its settings are only used by lp and lpr commands | ||
- | * lpoptions as root sets system wide settings for lp and lpr | ||
- | * printer options set with (x)tpconfig probably apply only for lp and lpr too. | ||
- | |||
- | ==== Open Questions == | ||
- | |||
- | * How interact xtpconfig as user with kprinter config dialog and with cups-config in kde-controlcenter and with lpoptions ? | ||
- | * How can the servicest of xtpconfig used, when turbopint is not installed locally? lpoptions? See also CUPS Software Administrators Manual | ||
- | * For buying a new printer http://www.linux.com/article.pl?sid=06/11/02/1515243 http://www.linuxprinting.org/suggested.html http://hplip.sf.net/ may help | ||
- | |||
- | ===== Network Time Protokol NTP == | ||
- | |||
- | This is a description how to setup your computer in order to fetch the accurate time from the internet. --- 2004-11-26, 2006-12-14; | ||
- | |||
- | Infos taken from: [[http://www.pool.ntp.org/use.html|How do I use pool.ntp.org?]], [[http://www.edafe.org/slackware/|Time Synchronisation with NTP]] & [[http://www.ntp.org/ntpfaq/|NTP FAQ and HOWTO]] | ||
- | |||
- | ==== /etc/ntp.conf == | ||
- | |||
- | Replace /etc/ntp.conf with something similar to the following example. These are the servers for Germany. Replace them with the server entries for your country. You'll find them [[http://support.ntp.org/bin/view/Servers/NTPPoolServers|here]] | ||
- | <code bash> | ||
- | #/etc/ntp.conf: | ||
- | driftfile /etc/ntp/drift | ||
- | server 0.de.pool.ntp.org | ||
- | server 1.de.pool.ntp.org | ||
- | server 2.de.pool.ntp.org | ||
- | server 3.de.pool.ntp.org | ||
- | de.pool.ntp.org | ||
- | </code> | ||
- | |||
- | <del>FIXME Test this: Do not replace ntp.conf but just add the server entries below the line ''#server pool.ntp.org''</del> | ||
- | |||
- | FIXME Test this: Do not replace ntp.conf but just uncomment the line | ||
- | #server pool.ntp.org | ||
- | and add your appropriate sub-zone, eg: | ||
- | server de.pool.ntp.org | ||
- | |||
- | If, contrary to expectations, you have servers which do not use version 4, but the older version 3 of the NTP-protocol, add 'version 3' after the server entry, eg: ''server timesource.kaeser-net.de version 3''. [[http://www.eecis.udel.edu/~mills/ntp/html/confopt.html|More]] | ||
- | |||
- | To manually adjust your computer clock from time to time, just issue the command ''ntpd -q'' from now on. Or, if you want an automated adjustment, the further steps depend on your type of internet connection: | ||
- | |||
- | ==== With permanent Internet Connection == | ||
- | |||
- | As of Slack 12.0 just make ''/etc/rc.d/rc.ntpd'' runnable or with older versions add the following to /etc/rc.d/rc.local: | ||
- | <code bash> | ||
- | # Start the NTP daemon: | ||
- | if [ -x /usr/sbin/ntpd ]; then | ||
- | echo "Starting NTP daemon: /usr/sbin/ntpd" | ||
- | /usr/sbin/ntpd | ||
- | fi | ||
- | </code> | ||
- | |||
- | :!: This script doesn't seem to work, when you have only a temporarely internet connection like modem or DSL! | ||
- | |||
- | Issue the command ''ntpd'' as root for the first time, and after some time (this could take as long as half an hour!), ntpq -p should output something like: | ||
- | |||
- | <code> | ||
- | remote refid st t when poll reach delay offset jitter | ||
- | ============================================================================== | ||
- | +81.6.42.224 193.5.216.14 2 u 68 1024 377 158.995 51.220 50.287 | ||
- | *217.162.232.173 130.149.17.8 2 u 191 1024 176 79.245 3.589 27.454 | ||
- | -129.132.57.95 131.188.3.222 3 u 766 1024 377 22.302 -2.928 0.508 | ||
- | </code> | ||
- | |||
- | The IP addresses will be different, because you've been assigned random timeservers. The essential thing is that one of the lines starts with an asterisk (*), this means your computer gets the time from the internet. | ||
- | |||
- | FIXME Does this work with an hardware dsl router as internet connection? | ||
- | |||
- | ==== With temporary Connection (Modem) == | ||
- | |||
- | Add this code to the file /etc/ppp/ip-up. Create it, if it not exists and make it runnable. | ||
- | <code bash> | ||
- | #!/bin/bash | ||
- | # /etc/ppp/ip-up | ||
- | spd=$((24*60*60)) # seconds per day ; #spd=5 # test | ||
- | today=$(($(date +%s) / spd)) # today in days since 1970 | ||
- | last=$(($(stat -c%Y $0) / spd)) # last setting of time in days since 1970 | ||
- | |||
- | if ((today>last)); then # fetch the time once a day: | ||
- | if ntpd -q; then | ||
- | touch $0 # remember time setting in the modification time stamp of this file | ||
- | logger "Time set successfully" | ||
- | else | ||
- | logger "ntpd error while setting time!" | ||
- | fi | ||
- | else | ||
- | logger "No need to set time yet" | ||
- | fi | ||
- | </code> | ||
- | :!: On my pppoe DSL connection it doesn't work! | ||
- | |||
- | ===== Shutdown == | ||
- | ==== Allow Shutdown for normal Users == | ||
- | |||
- | FIXME Change sudo config or suid /sbin/halt and symlink /usr/local/bin/shutdown -> /sbin/halt, /usr/local/bin/reboot -> /sbin/halt | ||
- | |||
- | ==== Automate Shutdown with cron == | ||
- | |||
- | Get system crontab file as root: ''crontab -l > cronbuffer''; Open cronbuffer with vim and add somesthing similar to the following lines: | ||
- | <code bash> | ||
- | ... | ||
- | # Run daily cron jobs not at 4:40 but at 18:00 every day: | ||
- | 0 18 * * * /usr/bin/run-parts /etc/cron.daily 1> /dev/null | ||
- | ... | ||
- | # Daily Shutdown Mo-Fr at 18:10, Sa&So at 17:00, give user 5 Minutes to log out: | ||
- | 0 17 * * 5-0 /sbin/shutdown -h +5 "Weekend! Shutting down!" | ||
- | 10 18 * * 1-4 /sbin/shutdown -h +5 "Quitting time! Shutting down!" | ||
- | </code> | ||
- | (At this occasion the time of daily jobs is also changed to something more reasonable at daytime, assuming your computer is off at night. This makes the command ''locate'' work properly.) | ||
- | |||
- | Install your new crontab with ''crontab cronbuffer''. (Normally you could also use ''crontab -e'' to directly edit the crontab, but this did not work on Slack 11.0, don't know why.) | ||
- | |||
- | ===== Backup with rsyncd == | ||
- | |||
- | See [[becki/sources/beckibackup]] | ||
- | |||
- | ===== NFS == | ||
- | |||
- | [[http://www.slackbook.org/html/network-configuration-nfs.html|NFS Slackbook Chapter]] | ||
- | |||
- | ==== Server Side == | ||
- | |||
- | rc.nfsd must be executable; rc.inet2 starts rc.nfsd (Slack10.2) | ||
- | |||
- | To use the host as an NFS-server for a Slack network install on remote host etb-111, make the following entry in /etc/exports :????0A /mnt/cdrom/slackware etb-111(ro,sync) | ||
- | sync is the default anyway, only present to suppress a warning. | ||
- | |||
- | ==== Client Side == | ||
- | |||
- | # mount -t nfs etb-100:/mnt/cdrom /mnt/test | ||
- | |||
- | ==== Old == | ||
- | |||
- | laut root-mail von PV müssen die Pakete portmap & nfs-utils vorhanden sein. | ||
- | Die beiden Pakete sind vorhanden. Dies zusätzlich noch überprüft mit pkgtool->View (aus [6]) | ||
- | |||
- | Eintrag in /etc/exports gemäß "man exports": | ||
- | /home/becki karl(rw,all_squash,anonuid=1000,anongid=100) | ||
- | (1000 ist die uid von becki auf ilse) | ||
- | |||
- | Mounten (von karl aus) vorübergehend mit: | ||
- | # mount -t nfs ilse:/home/becki /home/becki/ilse | ||
- | # umount /home/becki/ilse/ | ||
- | |||
- | Nachtrag 2003-07-26 12:48 wieder weg 2003-07-28 19:57 | ||
- | Eintrag /etc/exports ergänzt zu | ||
- | /usr/local/musik karl(rw,all_squash,anonuid=1000,anongid=100) | ||
- | Mounten (von karl aus) vorübergehend mit: | ||
- | # mount -t nfs ilse:/usr/local/musik /home/becki/ilse | ||
- | # umount /home/becki/ilse/ | ||
- | |||
- | nfs abschalten 2004-11-18 21:11 | ||
- | /etc/exports : alle obigen Einträge raukommentiert, nur noch Kommentar drin | ||
- | |||
- | ===== Fluxbox == | ||
- | === Background Image == | ||
- | |||
- | Call ''fbsetbg -r /home/becki/wallpapers'' for a //random// pic or ''fbsetbg -a /home/becki/wallpapers/aCertainImage.jpg'' once for only one //maximized// image. Both commands create ''~/.fluxbox/lastwallpaper'' | ||
- | |||
- | Add ''session.screen0.rootCommand: fbsetbg -l'' to ''~/.fluxbox/init'' to get the bg-image at startup of fluxbox. ([[http://fluxbox.org/docbook/en/html/chap-bg.html|more]]) | ||
- | |||
- | Alternatively, this crontab changes the background image every 10 minutes (-R ignores ~/fluxbox/lastwallpaper): | ||
- | <code bash> | ||
- | # MIN HOUR DAY MONTH DAYOFWEEK COMMAND | ||
- | */10 * * * * PATH=$PATH:/usr/X11/bin DISPLAY=:0.0 /usr/X11R6/bin/fbsetbg -R /home/becki/wallpapers &> /dev/null | ||
- | </code> | ||
- | |||
- | ===== FTP Server == | ||
- | |||
- | Slack 11.0 provides vsftpd and proftpd as FTP servers. proftpd is uses because of oviously better documentation and apache-like config file. | ||
- | |||
- | * Make ''/etc/rc.d/rc.inetd'' runnable | ||
- | * Activate the line containing 'proftp' by removing the comment '#' sign at the beginning in ''/etc/inetd.conf'' | ||
- | * If ''/etc/rc.d/rc.inetd'' was not runnable before, you can savely comment out everything else in ''/etc/inetd.conf'' | ||
- | * Start inetd by typing ''/etc/rc.d/rc.inetd start'' | ||
- | |||
- | If you want to restrict to restrict the ftp users to their home dir, add the line | ||
- | DefaultRoot ~ | ||
- | to ''/etc/proftpd.conf''. More config templates and docu can be found in /usr/doc/proftpd-1.3.0/. | ||
- | |||
- | ===== MySql == | ||
- | |||
- | see [[mysql_commands]] | ||
- | |||
- | ===== Apache & PHP == | ||
- | ==== General == | ||
- | |||
- | Tips refer to apache 2.x. | ||
- | |||
- | * ''chmod +x /etc/rc.d/rc.httpd'' is necssary to start apache automatically at system boot. | ||
- | * To enable per-directory settings with ''.htaccess'' files, you have to set the ''AllowOverride'' directive for the document root (usually ''/srv/httpd/htdocs'') accordingly. Amongst others, this is usually necessary fot URL Rewriting. When on doubt, set ''AllowOverride'' to ''all''. [[http://www.dokuwiki.org/rewrite#apache|More Info]] | ||
- | * To tell the browsers in the HTTP-header to use UTF-8 as default encoding, add ''AddDefaultCharset UTF-8'' to the DocumentRoot section (''<Directory "/srv/httpd/htdocs">'') | ||
- | * Uncomment ''Include /etc/httpd/extra/httpd-autoindex.conf'' to enable fancy directory listings | ||
- | * Uncomment ''/etc/httpd/extra/httpd-userdir.conf'' to enable user home directories Include, eg. ''http://~sandy/...'' | ||
- | * See [[svn_tips]] for using apache as subversion server | ||
- | |||
- | ==== Enable Php in Apache == | ||
- | |||
- | Enable php by doing the following changes in /etc/httpd/httpd.conf (old: /etc/apache/httpd.conf): | ||
- | <code> | ||
- | < DirectoryIndex index.html | ||
- | --- | ||
- | > DirectoryIndex index.php index.html | ||
- | < #Include /etc/httpd/mod_php.conf | ||
- | --- | ||
- | > Include /etc/httpd/mod_php.conf | ||
- | </code> | ||
- | |||
- | (Re)start apache with ''/etc/rc.d/rc.httpd restart'' | ||
- | |||
- | Test apache & php by saving the following line as /var/www/htdocs/index.php | ||
- | <code php><?php phpinfo(); ?></code> | ||
- | Point your browser to http://localhost/. You should see infomations about your php installation there. | ||
- | |||
- | Note: PHP is also a great alternative to Perl or Bash command line scripts. See [[http://de.php.net/manual/en/features.commandline.php|PHP Manual]] | ||
- | |||
- | ==== Upgrade from Php4 to Php5 == | ||
- | |||
- | This section refers to Slack 11.0 which ships with Php4. Download & install Php5 Slack package: | ||
- | <code bash> | ||
- | wget 'http://ftp.gwdg.de/pub/linux/slackware/slackware-11.0/extra/php5/php-5.2.0-i486-1.tgz' | ||
- | upgradepkg php-5.2.0-i486-1.tgz | ||
- | </code> | ||
- | |||
- | The upgrade script of the package keeps old php.ini & mod_php.conf. We need the new files: | ||
- | <code bash> | ||
- | cp -a /etc/apache/php.ini /etc/apache/php.ini.bak | ||
- | cp -a /etc/apache/php.ini-recommended /etc/apache/php.ini | ||
- | cp -a /etc/apache/mod_php.conf.example /etc/apache/mod_php.conf | ||
- | </code> | ||
- | |||
- | If you made manual changes in your old php.ini, do the same with the new php.ini now. | ||
- | |||
- | Note: Ulike in php4 short_open_tag is off by default in php5. | ||
- | |||
- | ==== Protect a Directory with Digest Authentication == | ||
- | |||
- | Quick and dirty example with these parameters: | ||
- | * Directory to be protected: /var/www/htdocs/digestTest/ | ||
- | * Realm: 'Digest Authentication Test' (arbitrary selectable) | ||
- | * Username: testuser | ||
- | |||
- | Create password file ''.htpasswd'' with: | ||
- | htdigest -c .htpasswd 'Digest Authentication Test' testuser | ||
- | |||
- | Create config file ''.htaccess'' (for Apache 1.x): | ||
- | <code> | ||
- | AuthType Digest | ||
- | AuthName "Digest Authentication Test" | ||
- | AuthDigestFile /var/www/htdocs/digestTest/.htpasswd | ||
- | Require valid-user | ||
- | </code> | ||
- | |||
- | Create config file ''.htaccess'' (for Apache 2.x): | ||
- | <code> | ||
- | AuthType Digest | ||
- | AuthName "Digest Authentication Test" | ||
- | AuthDigestProvider file | ||
- | AuthUserFile /var/www/htdocs/digestTest/.htpasswd | ||
- | Require valid-user | ||
- | </code> | ||
- | |||
- | Put ''.htpasswd'' and ''.htaccess'' into /var/www/htdocs/digestTest/ | ||
- | |||
- | Note that the manual discourages to put ''.htpasswd'' into the same directory which is to be protected, however it seems common usage. Check at least ''.htpasswd'' and ''.htaccess'' will not be displayed in your webbrowser! | ||
- | |||
- | More details at [[http://httpd.apache.org/docs/1.3/howto/auth.html#digest|Apache manual]] | ||
- | |||
- | ===== Java == | ||
- | ==== Newest JDK == | ||
- | |||
- | * Download e.g. ''jdk-6u11-linux-i586.bin'' from java.sun.com (no rpm) | ||
- | * Installation: | ||
- | |||
- | <code bash> | ||
- | mv jdk-6u11-linux-i586.bin /usr/local/lib | ||
- | cd /usr/local/lib | ||
- | chmod a+x jdk-6u11-linux-i586.bin | ||
- | ./jdk-6u11-linux-i586.bin | ||
- | cd /usr/lib | ||
- | mv java java.org | ||
- | ln -s /usr/local/lib/jdk1.6.0_11 java | ||
- | </code> | ||
- | |||
- | ==== Default JDK == | ||
- | |||
- | Since Version 10.1 Slack comes with a JRE, but no JDK. For developing in Java, download the JDK from AnySlackwareServer/extra & install it with installpkg. A default installation has a symlink ''/usr/lib/java -> /usr/lib/jre-XXX''. Among others, the install script of the JDK changes this symlink to ''/usr/lib/java -> /usr/lib/jdk-XXX'' | ||
- | |||
- | Check install script at ''/var/log/scripts/jdk-XXX''. Check if the java plugin of firefox still works after installation --- 2007-03-29 | ||
- | |||
- | Old /etc/profile.d/jre.sh & new /etc/profile.d/jdk.sh are identical and double things in $MANPATH and $PATH therfore ''chmod -x jre.sh'' or ''removepkg jre-XXX'' completely! --- 2007-04-27 | ||
- | |||
- | ==== Ant == | ||
- | |||
- | Download binary distribution from http://ant.apache.org, unpack in /usr/local and make a symlink: ''/usr/local# ln -s apache-ant-XXXX ant'' | ||
- | |||
- | According to [[http://ant.apache.org/manual/install.html#installing|Manual]] add ant bin directory to your invironment variables: | ||
- | <code bash> | ||
- | # /etc/profile.d/jdk.sh | ||
- | ... | ||
- | #export JAVA_HOME=/usr/lib/java # this line should already be present! | ||
- | export ANT_HOME=/usr/local/ant | ||
- | export PATH=${PATH}:${ANT_HOME}/bin | ||
- | </code> | ||
- | FIXME Test this! | ||