Archive

Archive for the ‘[EN] Snippets’ Category

Extract DEB (Debian) packages

July 13th, 2017 No comments

To extract a DEB package without installing it:

# first extract the archive
ar vx mypackage.deb

# now uncompress the data archive (depending on file extension)
tar -xzvf data.tar.gz
tar -Jxvf data.tar.xz
Categories: [EN] Snippets Tags: ,

Extract RPM (RedHat) packages

July 9th, 2017 No comments

To extract a RPM package without installing it:

rpm2cpio foo.rpm | cpio -idmv
Categories: [EN] Snippets Tags: , ,

APT: only upgrade specific packages

July 5th, 2017 No comments

In case you want to upgrade only one application:

apt-get --only-upgrade install \*apache\* \*php\*
Categories: [EN] Snippets Tags: , ,

oVirt: Change default console to NoVNC

April 14th, 2014 Comments off

If running with default configuration, oVirt uses a native VNC client:

# engine-config -g ClientModeVncDefault
ClientModeVncDefault: Native version: general

Change this setting to always use the NoVNC client:

# engine-config -s ClientModeVncDefault=NoVnc

You need to restart the ovirt-engine service for this change to take effect.

Categories: [EN] Snippets Tags: , ,

Disable automatic NIC renaming on Fedora

August 18th, 2013 Comments off

On Fedora I had some trouble with the so-called “predictable network interface names” feature and a rather complex network configuration. Good to know: There is an easy way to disable this feature by removing a RPM package:

# rpm -qa biosdevname
biosdevname-0.4.1-4.fc19.x86_64

# rpm -ev biosdevname-0.4.1-4.fc19.x86_64
Preparing packages…
biosdevname-0.4.1-4.fc19.x86_64

Now reboot your server, re-configure networking and everything should be working in the right way. Of course, you have already disabled the terrible NetworkManager, don’t you?

Update: The above step only works for Fedora 17 or udev versions before 2.0. When running udev 2.0+ or Fedora 18+ you need an additional step:

touch /etc/udev/rules.d/80-net-name-slot.rules

There is an article on the Debian Wiki describing this and other “improvements” in udev 2.0.

Categories: [EN] Snippets Tags: , , ,

Disable the CTRL-ALT-DEL shortcut

July 30th, 2013 Comments off

Once in a while I use the CTRL-ALT-DEL keyboard shortcut to reboot a Linux server. While this is quite convenient, it adds the risk of accidentally rebooting a server.

You can easily disable this shocurt on CentOS. Just open /etc/init/control-alt-delete.conf and comment out this line:

#exec /sbin/shutdown -r now “Control-Alt-Delete pressed”

Categories: [EN] Snippets Tags: ,

unset all file flags

June 11th, 2012 Comments off

Sometimes you cannot simply delete a file or a directory. It fails with an error indicating that this operation is not permitted. In my example I tried to cleanup an old tinderbox build:

# rm -rf tinderbox/7.3_freebsd_i386/
rm: tinderbox/7.3_freebsd_i386/bin/rcp: Operation not permitted
rm: tinderbox/7.3_freebsd_i386/bin: Directory not empty
rm: tinderbox/7.3_freebsd_i386: Directory not empty

It is obvious that tinderbox uses special file flags to protect the build. Since I want to delete it anyway, I don’t need to find out which flag is set und must be unset. So I just unset all flags:

# chflags -R 0 tinderbox/7.3_freebsd_i386/

Finally the old build directory can be deleted.

Categories: [EN] Snippets Tags: , ,

truss: trace system calls

April 23rd, 2010 Comments off

Once I did the switch from Linux to FreeBSD there was one thing I was really missing on FreeBSD: strace. But I found an alternative:

truss <command>
truss -p <pid>

It really helps debugging things. Let’s hope I’ll remember it next time I need it.

Categories: [EN] Snippets Tags: , , , ,
css.php