Trustix Linux Administration
From Free Knowledge Base- The DUCK Project: information for everyone
Trustix Linux Administration Notes __ _ -o)/ / (_)__ __ ____ __ Derek Winterstien /\\ /__/ / _ \/ // /\ \/ / r.o.a.c.h.@.r.o.b.o.t.z...c.o.m _\_v __/_/_//_/\_,_/ /_/\_\ Trustix Secure Linux Guides .............................................................................. *** StartingDaemons Use chkconfig to configure daemons to start automatically. chkconfig --add <name> chkconfig --del <name> chkconfig <name> reset chkconfig [--level <levels>] <name> <on|off> To start httpd in runlevel 3, type "chkconfig httpd on" or "chkconfig --level 3 httpd on" To start it in levels 3 and 5, type "chkconfig --level 35 httpd on" To start the service right now without rebooting, type service <service> start. For httpd it would be "service httpd start" *** SysV Init Runlevels SysV init was chosen for Trustix Secure Linux because it is easier to use and more flexible than the traditional BSD-style init process. The configuration files for SysV init are located in the /etc directory. /etc/init.d/ <- scripts used by /sbin/init to control services /etc/rc0.d/ <- halt /etc/rc1.d/ <- single user mode /etc/rc2.d/ <- n/a /etc/rc3.d/ <- multi user mode /etc/rc4.d/ <- n/a /etc/rc5.d/ <- multi user x-windows mode /etc/rc6.d/ <- reboot default runlevel for the system is listed in /etc/inittab id:3:initdefault: *** create init script When building a daemon from source no init script is supplied. If you know that your daemon has similar demands to another daemon, you can use the init script from that daemon as a template. *** chkconfig chkconfig --del httpd will remove the web server from the startup and shutdown process. Inversely chkconfig --add httpd will add it to the startup/shutdown process by generating links from the script in init.d/ to the appropriate rc#.d/ directory. *** ChangeMaildir Mail in 'maildir' configuration -vs- 'mbox' configuration. mbox-> /var/spool/mail/ maildir-> /home/users/username/MailDir/ mbox or qmail style: MAIL_DIR /var/spool/mail Postfix: in /etc/postfix/main.cf set: mailbox file is /var/spool/mail/user or /var/mail/user. Specify "Maildir/" for qmail-style delivery (the / is required). home_mailbox = Mailbox <- mbox home_mailbox = Maildir/ <- MailDir mail_spool_directory = /var/spool/mail Procmail: locate procmailrc /etc/procmailrc (unless cyrus-imapd) DEFAULT=/var/spool/mail/$LOGNAME Courier-imap: Courier looks for user mail in /home/username/Maildir/ only and does not support mbox configuration. Dovecot: works with standard mbox and maildir formats but is not available as a Trustix package. Also edit: in /etc/profile MAIL="/var/spool/mail/$USER" <- mbox MAIL="HOME/Maildir/" <- MailDir mbox format was the default for older versions of Trustix. Current versions are configured to use MailDir by default. *** User Home Directory Path The default home directory for users added by 'useradd' vi /etc/default/useradd The default installation provides for /home/users/username note: "Maildir" is a directory-based mail storage format originally introduced in the Qmail mail server, and adopted as an alternative mail storage format by both Exim and Postfix. The primary advantage of maildirs is that multiple applications can access the same Maildir simultaneously without requiring locking. *** Enable Full Capabilities in Vim Editor Without vim-enhanced certain vim functionality will not be available. Dumb design by vim packagers! vim-enhanced requires the console mouse driver, gpm. rpm -ih gpm-1.20.1-2tr.i586.rpm Install the Vim editor rpm -ih vim-common-6.2.121-1 rpm -ih vim-enhanced-6.2.121-1 rpm -ih vim-minimal-6.2.121-1 Then you will be able to install and use full vim functions, including cmd-line history. The vim-minimal package puts vi in /bin while vim-enhanced puts vim in /usr/bin I'm not sure what causes vim to launch when vi is typed, since there is no alias set and vi isn't shelling to it. (?mystery?) I'm guessing it is redhat's bash shell since csh doesn't behave the same. After installing vim + gpm on trustix the vi command still invoked the vim-minimal until I logged out of the shell and back in again. Afterwards the vi command invoked /usr/bin/vim even though /bin/vi is still present.