If you can’t update your world set because of circular dependencies,
then you can best comment out your USE-flags in /etc/make.conf and put USE="-*"
underneath it. Then update world and when that succeeds, remove the
latter USE declaration in your make.conf and uncomment your former
USE-flags. Update/rebuild world again and if all goes well you won’t
have a single circular dependency
http://treggats.wordpress.com/2008/10/09/the-story-continues/
Gentoo:
/usr/sbin/service:
#!/bin/sh
set -e
/etc/init.d/$1 $2 $3
/etc/bash_completion.d/service:
# a function for the autocompletion of the service command.
_service_fn()
{
# set some local variables
local cur prev
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
prev=${COMP_WORDS[COMP_CWORD-1]}
#if only one completion or a option is being requested
#then complete against various options
if [ $COMP_CWORD -eq 1 ]; then
COMPREPLY=( $( compgen -W “$(ls /etc/init.d)” $cur ))
elif [ $COMP_CWORD -eq 2 ]; then
COMPREPLY=( $( compgen -W “start stop restart pause zap status ineed iuse needsme usesme broken” $cur ))
else
COMPREPLY=( $( compgen -f $cur ))
fi
return 0
}
#setup the completion
complete -F _service_fn service
howto create the ‘service’ command – linux-noob.com/forums
Ubuntu:
apt-get install sysvconfig
http://www.cyberciti.biz/tips/how-to-controlling-access-to-linux-services.html
you’ll want to change this line in /etc/my.cnf from:
innodb_data_file_path = ibdata1:10M:autoextend:max:128M
to
innodb_data_file_path = ibdata1:10M:autoextend
Professional Middleman: MySQL table is full error on Gentoo Linux
Theme Null
plugins:
[I] x11-plugins/gkrellm-hddtemp
[I] x11-plugins/gkrellm-leds
[I] x11-plugins/gkrellm-radio
[I] x11-plugins/gkrellm-volume
[I] x11-plugins/gkrellmss
[I] x11-plugins/gkrellm-multiping
[I] x11-plugins/gkrellm-shot
[I] x11-plugins/gkrellm-top
Clean all distfiles except for installed packages (exact version), those which are less than one month old, bigger than 50MB, or fetch-restricted:
# eclean-dist -d -t1m -s50M -f
From a crontab, silently clean packages in the safest mode, and then distfiles in destructive mode but protecting files less than a week old, every sunday at 1am
0 1 * * sun eclean -C -q packages ; eclean -C -q -d -t1w distfiles
Gentoo Forums :: View topic – /usr/portage 6.8GB – Is this right?
#
# dispatch-conf.conf
#
# Directory to archive replaced configs
archive-dir=/etc/config-archive
# Use rcs for storing files in the archive directory?
# (yes or no)
use-rcs=no
# Diff for display
# %s old file
# %s new file
#diff=”diff -Nu %s %s | less –no-init –QUIT-AT-EOF”
diff=”colordiff -u %s %s | less”
# Diff for interactive merges.
# %s output file
# %s old file
# %s new file
merge=”sdiff –suppress-common-lines –output=%s %s %s”
# Automerge files comprising only CVS interpolations (e.g. Header or Id)
# (yes or no)
replace-cvs=yes
# Automerge files comprising only whitespace and/or comments
# (yes or no)
replace-wscomments=yes
# Automerge files that the user hasn’t modified
# (yes or no)
replace-unmodified=yes
# Per-session log file of changes made to configuration files
log-file=/var/log/dispatch-conf.log
NOTE:
You can disable this feature by setting CONFIG_PROTECT=”-*” in /etc/make.conf.
Then, Portage will mercilessly auto-update your config files. Alternatively,
you can leave Config File Protection on but tell Portage that it can overwrite
files in certain specific /etc subdirectories. For example, if you wanted
Portage to automatically update your rc scripts and your wget configuration,
but didn’t want any other changes made without your explicit approval, you’d
add this to /etc/make.conf:
CONFIG_PROTECT_MASK=/etc/wget /etc/rc.d
mirrorselect -s3 -b10 -o -D >> /etc/make.conf http://gentoo-wiki.com/Mirrorselect
1.Load the LVM2 module:
# modprobe dm-mod
2. Activating LVM
# vgscan
Reading all physical volumes. This may take a while...
No volume groups found
(Make any previously set up volume groups available)
# vgchange -a y
3. Prepare the partitions:
# pvcreate /dev/hda4 /dev/hdb1
No physical volume label read from /dev/hda4
Physical volume "/dev/hda4" successfully created
No physical volume label read from /dev/hdb1
Physical volume "/dev/hdb1" successfully created
4. Create a volume:
(Create a volume group named vg)
# vgcreate vg /dev/hda4
/etc/lvm/backup: fsync failed: Invalid argument (Ignore this warning)
Volume group "vg" successfully created
(Extending an existing volume group)
# vgextend vg /dev/hdb1
/etc/lvm/backup: fsync failed: Invalid argument (Ignore this warning, again and later as well)
Volume group "vg" successfully extended
5. Create a logical volume:
# lvcreate -L10G -nusr vg
Logical volume "usr" created (Further similar messages not displayed)
# lvcreate -L5G -nhome vg
# lvcreate -L5G -nopt vg
# lvcreate -L10G -nvar vg
# lvcreate -L2G -ntmp vg
(As an example, let's extend a logical volume with 5 extra Gbytes)
# lvextend -L+5G /dev/vg/home
To create a 1500MB linear LV named ‘testlv’ and its block device special ‘/dev/testvg/testlv’:
# lvcreate -L1500 -ntestlv testvg
|
To create a 100 LE large logical volume with 2 stripes and stripe size 4 KB.
# lvcreate -i2 -I4 -l100 -nanothertestlv testvg
|
If you want to create an LV that uses the entire VG, use vgdisplay to find the “Total PE” size, then use that when running lvcreate.
# vgdisplay testvg | grep "Total PE"
Total PE 10230
# lvcreate -l 10230 testvg -n mylv
|
This will create an LV called mylv filling the testvg VG.
If you want the logical volume to be allocated from a specific physical volume in the volume group, specify the PV or PVs at the end of the lvcreate command line.
# lvcreate -L 1500 -ntestlv testvg /dev/sdg
6. Create filesystems:
# mke2fs -j /dev/vg/usr
# mke2fs -j /dev/vg/home
# mke2fs -j /dev/vg/opt
# mke2fs -j /dev/vg/var
# mke2fs -j /dev/vg/tmp
Other:
renaming a vg:
I did `lvchange -an` the logical volumes first, then `vgrename`, then `lvchange -ay` again.
http://www.gentoo.org/doc/en/lvm2.xmlUbuntu:
To enable smart completion, edit your /etc/bash.bashrc file. Uncomment the following lines, by removing the # in the beginning of the lines:
#if [ -f /etc/bash_completion ]; then
# . /etc/bash_completion
#fi
Now you can use tab completion to power your way through commands.
http://ubuntu.wordpress.com/2006/01/28/turn-on-bash-smart-completion/
Gentoo:
Now add the following line to /etc/bash/bashrc, before setting any alias (see bug #98627):
| File: /etc/bash/bashrc |
[[ -f /etc/profile.d/bash-completion ]] && source /etc/profile.d/bash-completion |
Let the changes take effect:
# source /etc/bash/bashrc
Or exit the shell and login again.