Friday, July 08, 2011

YUM & RedHat


  1. Create a <RPMS> directory and copy rpms to this directory. Make sure you copy also the repodata.

  2. Generate repo File
    # vi /etc/yum.repos.d/file.repo

    [base]
    name=Red Hat Enterprise Linux $releasever - $basearch - Base
    baseurl=file://<RPMS>
    gpgcheck=0
    enabled=1

  3. yum should be working now


Replace <RPMS> with the path of your repository.

Labels:

Thursday, November 12, 2009

Cloning a LINUX FS (with cpio)

To a file:


# cd <directory>
# find . -xdev | cpio -co > <filename>


To another partition/directory:


# cd <directory>
# find / -xdev | cpio -pvmd <destination-dir>

Labels:

Tuesday, July 15, 2008

Cloning a LINUX FS (with tar)

To clone a LINUX FS with tar:

# tar -C /tmp/1/ -cp .| tar -C /tmp/2 -xvp

Where /tmp/1 is the source FS and /tmp/2 is the destination FS.

Labels: , , ,

Wednesday, January 17, 2007

Resize FS under LVM2

# umount <BLOCKDEVICE>
# e2fsck -f
<BLOCKDEVICE>
# lvextend -L<SIZE> -n <LV> <VG>
# e2fsck -f <BLOCKDEVICE>
# resize2fs <BLOCKDEVICE>
# mount
<BLOCKDEVICE> <MOUNTPOINT>

Labels:

Saturday, November 18, 2006

Language/Locale

I'm a minimalist.

So my UBUNTU/Debian installations end up quite minimalistic. Most of the time the locale/language environment needs manual adjustment.

Living in Austria I'd like my environment, like date/time stamp, to be displayed according to EU/German/Austria Standards.

But the I like my system to talk to me in English...

This is the way to go:

You need the package belocs-locales-bin installed.

Now "compile" the needed locale environments:

# locale-gen de_AT
# locale-gen de_AT.UTF-8
# locale-gen en_DK
# locale-gen en_DK.UTF-8
# locale-gen en_US.UTF-8

If you do not live in Austria, you'll have to use different Language Definitions. But make sure to include en_US.

Next You have to tell your System to use those Environments. For that add following lines to your /etc/environment ...

LANG="en_US.UTF-8"
LANGUAGE="en_US:en"
LC_TIME="en_DK.UTF-8"

Setting LC_TIME to en_DK will use the International Time Format (ISO 8601) for date/time output.

Now logout, and login again to activate the changes. Even better would be to reboot.

That's it ... for the system.

To have Thunderbird display the correct format (for date and time), I'd recommend using the ConfigDate plugin for Thunderbird.

Tuesday, June 20, 2006

How can I exclude more than one pattern in a "grep -v" statement?

Answering a friend:

Q: How can I exclude more than one pattern in a "grep -v" statement?

A: # grep -v -e PATTERN1 -e PATTERN2 -e PATTERN3 <...>

Thursday, June 15, 2006

Missing libXxf86vm.so under Debian

If you want do use googleearth under Debian and you do get a error message about a missing libXxf86vm.so.1 library here's what to do:

1) Make sure you do have the file /usr/X11R6/lib/libXxf86vm.a - it's in the xlibs-static-dev package.

2) Generate a shared library out of libXxf86vm.a:


# ld --whole-archive -shared -o /usr/X11R6/lib/libXxf86vm.so.1.0 /usr/X11R6/lib/libXxf86vm.a
# ln -s /usr/X11R6/lib/libXxf86vm.so.1.0 /usr/X11R6/lib/libXxf86vm.so.1



3) Rebuild the library cache:


# ldconfig -v


Now googleearth should startup without an error.
Have fun!