Pages: 1 2 3

2009/03/08

  11:28:26 pm, by   , 90 words  
Categories: Co-Lo Server

Gentoo ELOG Viewer

I swear there's a command to print out only an ebuild's ELOG statement (the part that comes after an install, sometimes with vital instructions) - but I can never remember it, or find it.

Sigh.

But I just came across the ELOG viewer - let's install:

# emerge -av app-portage/elogv

and since I had already set up emerge logs, I'm ready to go:

# elogv

Very nice console output showing a sorted window of logs, and the other half of the console has the output from the selected log. Works great!

  08:16:39 pm, by   , 907 words  
Categories: Co-Lo Server

Gentoo and Bash Completion

Having the shell complete certain commands is handy, but I didn't realize I needed to explicitely enable it with Gentoo.

My latest installation had this at the end:

*
* Versions of bash-completion prior to 20060301-r1 required each user to
* explicitly source /etc/profile.d/bash-completion in ~/.bashrc. This
* was inconsistent with the completion modules which are
* enabled with eselect bashcomp. Now any user can enable the base
* completions without editing their .bashrc by running
*
* eselect bashcomp enable base
*
* The system administrator can also be enable this globally with
*
* eselect bashcomp enable --global base
*
* Additional completion functions can also be enabled or
* disabled using eselect's bashcomp module.
*
* If you use non-login shells you still need to source
* /etc/profile.d/bash-completion.sh in your ~/.bashrc.
* Note this is bash-completion.sh, not bash-completion. Lots of people
* overlook this

Following the suggestion to enable 'base' for all users:

# eselect bashcomp enable --global base

Then, following the other instruction, I looked at the .bashrc :

# cat ~/.bashrc
[[ -f /etc/profile.d/bash-completion ]] && source /etc/profile.d/bash-completion

# Midnight Commander chdir enhancement
if [ -f /usr/share/mc/mc.gentoo ]; then
. /usr/share/mc/mc.gentoo
fi

Huh - just like the instructions said, there is no '/etc/profile.d/bash-completion' file, but their is a '/etc/profile.d/bash-completion.sh' file, so I need to modify that now :

# nano ~/.bashrc

- added in the '.sh' - as occasionally I do use non-login shells.

Then looking at what options are available and selected for bashcompletion

# eselect bashcomp list
Available completions:
[1] _subversion
[2] apache2ctl
[3] base
[4] bitkeeper
[5] bittorrent
[6] cksfv
[7] clisp
[8] cowsay *
[9] django
[10] dsniff
[11] eselect
[12] freeciv
[13] gcl
[14] gentoo
[15] git
[16] gkrellm
[17] gnatmake
[18] gpg2
[19] harbour
[20] isql
[21] larch
[22] lilypond
[23] lisp
[24] mailman
[25] mcrypt
[26] modules
[27] monodevelop
[28] mtx
[29] p4
[30] povray
[31] qdbus
[32] ri
[33] rkhunter *
[34] sbcl
[35] sitecopy
[36] snownews
[37] ssh
[38] subversion
[39] tree *
[40] unace
[41] unrar
[42] vim *
[43] xxd

Looking at these, I'd definately want 'base', 'gentoo' and 'eselect' going, and whatever else looks interesting - subversion, ssh, eix, genlop,.

Looking at another server, I saw this:

# eselect bashcomp list
Available completions:
[1] cowsay *
[2] eselect *
[3] genlop *
[4] git
[5] subversion

Hmm a very short list - I didn't have 'bash-completion' installed, although the USE flag had been set - better install it now:

# emerge -pv app-shells/gentoo-bashcomp

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild N ] app-shells/bash-completion-20081219-r1 90 kB
[ebuild N ] app-shells/gentoo-bashcomp-20050516 20 kB

Total: 2 packages (2 new), Size of downloads: 109 kB

# emerge -av app-shells/gentoo-bashcomp

Now my 'eselect bashcomp list' command results look better.

To immediately get the bash-completion going, simply run it:

# /etc/profile.d/bash-completion.sh

(This worked in one session, but not the other - you may have to start a new terminal session to get this going properly.)

Now I get great autocompletion for 'emerge' and many other commands:

# emerge [hit 'TAB' key after typing in a space after 'emerge']
Display all 162 possibilities? (y or n) y
app-accessibility/ app-xemacs/ dev-tinyos/ gpe-base/ net-im/ sci-electronics/ world
app-admin/ clean dev-util/ inject net-irc/ sci-geosciences/ www-apache/
app-antivirus/ depclean games-action/ java-virtuals/ net-libs/ sci-libs/ www-apps/
app-arch/ dev-ada/ games-arcade/ kde-base/ net-mail/ sci-mathematics/ www-client/
app-backup/ dev-cpp/ games-board/ kde-misc/ net-misc/ sci-misc/ www-misc/
app-benchmarks/ dev-db/ games-emulation/ lxde-base/ net-nds/ sci-physics/ www-servers/
app-cdr/ dev-dotnet/ games-engines/ mail-client/ net-news/ sci-visualization/ x11-apps/
app-crypt/ dev-embedded/ games-fps/ mail-filter/ net-nntp/ search x11-base/
app-dicts/ dev-games/ games-kids/ mail-mta/ net-p2p/ sec-policy/ x11-drivers/
app-doc/ dev-haskell/ games-misc/ media-fonts/ net-print/ sync x11-libs/
app-editors/ dev-java/ games-mud/ media-gfx/ net-proxy/ sys-apps/ x11-misc/
app-emacs/ dev-lang/ games-puzzle/ media-libs/ net-voip/ sys-auth/ x11-plugins/
app-emulation/ dev-libs/ games-roguelike/ media-plugins/ net-wireless/ sys-block/ x11-proto/
app-forensics/ dev-lisp/ games-rpg/ media-radio/ net-www/ sys-boot/ x11-terms/
app-i18n/ dev-ml/ games-server/ media-sound/ net-zope/ sys-cluster/ x11-themes/
app-laptop/ dev-perl/ games-simulation/ media-tv/ perl-core/ sys-devel/ x11-wm/
app-misc/ dev-php/ games-sports/ media-video/ prune sys-freebsd/ xfce-base/
app-mobilephone/ dev-php5/ games-strategy/ metadata regen sys-fs/ xfce-extra/
app-office/ dev-python/ games-util/ net-analyzer/ rox-base/ sys-kernel/
app-pda/ dev-ruby/ gnome-base/ net-dialup/ rox-extra/ sys-libs/
app-portage/ dev-scheme/ gnome-extra/ net-dns/ sci-astronomy/ sys-power/
app-shells/ dev-tcltk/ gnustep-apps/ net-firewall/ sci-biology/ sys-process/
app-text/ dev-tex/ gnustep-base/ net-fs/ sci-calculators/ system
app-vim/ dev-texlive/ gnustep-libs/ net-ftp/ sci-chemistry/ unmerge

# emerge -av web [hit 'TAB' key after typing in 'web']
webalizer webcomics-collector webgen webkit-sharp webob webtest
webapp-config webcpp webgraph weblint webpy webut
webby-fonts webfs webhelpers webmin webscarab
webcdwriter webfuzzer webkit-gtk webmo websvn

# emerge -av www-apache/ [hit 'TAB' key after typing in 'www-apache/']
anyterm mod_auth_pgsql mod_diagnostics mod_layout mod_perl mod_tidy
libapreq2 mod_auth_tkt mod_dnsbl_lookup mod_ldap_userdir mod_proxy_html mod_transform
mod_access_dnsbl mod_authn_pam mod_dnssd mod_limitipconn mod_python mod_umask
mod_ap2_snmp mod_authnz_external mod_evasive mod_lisp2 mod_roaming mod_vdbh
mod_auth_cookie_mysql2 mod_backtrace mod_extract_forwarded mod_loadavg mod_rpaf mod_vhost_ldap
mod_auth_imap2 mod_bw mod_fastcgi mod_log_rotate mod_ruby mod_vhs
mod_auth_kerb mod_caucho mod_fcgid mod_log_sql mod_scgi mod_watch
mod_auth_mysql mod_cband mod_flvx mod_loopback mod_security mod_whatkilledus
mod_auth_nufw mod_chroot mod_ftpd mod_macro mod_spin mod_wsgi
mod_auth_openid mod_cplusplus mod_gnutls mod_mono mod_suphp passenger
mod_auth_pam mod_depends mod_jk mod_pcgi2 mod_tcl pwauth

Woohoo - looks good and will be very handy in the long run.

Some handy sites I found along the way:

http://blog.andreaolivato.net/tag/bash
http://blog.ibao.net/linux/2005/08/30/bash-completion-in-gentoo/
http://ben.liveforge.org/gentoo-features

which were all blogs - looks like blogs are becoming the best places to go for small howto's and general answers - good work everyone ;D

2009/03/01

  11:16:47 am, by   , 570 words  
Categories: Linux

Ventrilo version 3(.03) on Gentoo (2009 temporary)

I love Gentoo, but sometimes getting the more recent software to work can require some work ...

In this case, I was trying to install Ventrilo on the gaming LAN here. It was working fine on a Windows box, but as that machine isn't always on, and I like to have standard server stuff running on the Gentoo Linux server(s), I decided to set this up on one of those on the LAN.

In Gentoo, getting and installing software is usually like this:

# qsearch ventrilo
media-sound/ventrilo-server-bin The Ventrilo Voice Communication Server

# emerge -av media-sound/ventrilo-server-bin [emerge downloads and compiles the app]
# etc-update [if needed, this merges config file changes into the current configuration]
# nano /etc/ventrilo/{config_files} [set up whatever default application config files there are]
# /etc/init.d/ventrilo start [then start the server program]

[if everything looks fine, add the server program to the default runlevel, so it loads automatically upon reboot]

# rc-update add ventrilo default

Unfortunately, after doing this, the Ventrilo server started fine, but clients could not connect. I eventually discovered that this is due to the current Gentoo Ventrilo install is still at version 2, and the Windows clients we had already installed and had working were for version 3.

Looking on Gentoo Bugzilla, I found this entry:

http://bugs.gentoo.org/show_bug.cgi?id=201136

Which had an update ebuild for Ventrilo version 3, which had not yet made its way into the main portage tree, where all the current Gentoo packages are. So, I grabbed those files listed in the bug:


# cd (return to home directory)
# mkdir ventrilo (create a directory for the source files)
# cd ventrilo
# wget http://bugs.gentoo.org/attachment.cgi?id=139774
# mv attachment.cgi\?id\=139774 ventrilo-server-bin-3.0.2.ebuild
# wget http://bugs.gentoo.org/attachment.cgi?id=139776
# mv attachment.cgi\?id\=139776 conf.d.ventrilo
# wget http://bugs.gentoo.org/attachment.cgi?id=139778
# mv attachment.cgi\?id\=139778 init.d.ventrilo

Read more »

2008/11/07

  10:45:37 am, by   , 70 words  
Categories: 3D

Linux - check disk for errors

to check a mounted drive

telinit 1 # single user mode, closes all programs + network
mount -o remount,ro / # remount read only
fsck -f /dev/hd.. # run the checker
or: e2fsck -f /dev/hd..
mount -o remount,rw / # read-write again.
runlevel # see the current/previous runlevel
telinit 3 # use the previous runlevel in this command

badblocks -s -v -w /dev/hdd1

BETTER:

e2fsck -c -c -k -f -v -p /dev/hdd1

2008/09/21

  10:07:52 pm, by   , 154 words  
Categories: Co-Lo Server, Linux

QuickList: Kernel Upgrade for Gentoo

QuickList: Kernel Upgrade for Gentoo

# uname -a
Linux mythtv 2.6.23-gentoo #2 PREEMPT Tue Oct 23 12:57:42 PDT 2007 i686 Intel(R) Celeron(TM) CPU 1300MHz GenuineIntel GNU/Linux

# eselect kernel list

# eselect kernel set 4

# cd /usr/src/linux

[copy over your previous .config file from the previous kernel compile ]

# cp /usr/src/linux-2.6.23-gentoo-r2/.config

# make oldconfig && make prepare

[ answer all questions using default ]

# lspci

# cat /proc/cpuinfo

# make menuconfig

[ answer all questions using known hardware values from lspci and cpuinfo ]

# make

# make modules_install

# mount /boot

# cp arch/i386/boot/bzimage /boot/kernel-2.6.25-r8-2008-09-19

(these next two are optional - .config stores the options used to create the kernel, and System.map stores the hardware info (?) )

# cp .config /boot/config-2008-09-19

# cp System.map /boot/system-2008-09-19

# nano /boot/grub/grub.conf

[add in an entry near the top pointing to the new kernel file, using a previous entry]

# reboot

1 2 3

April 2024
Mon Tue Wed Thu Fri Sat Sun
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30          
 << <   > >>

Computers

Entries concerning computer ...

Search

  XML Feeds

blog software