Sunday, August 30, 2009

SELinux is preventing the mysqld from using potentially mislabeled files

"setroubleshoot: SELinux is preventing the mysqld from using potentially mislabeled files, ...., For complete SELinux messages. run sealert -l ...."

above error is appear after I manually copy Mysql data files from /var/lib/mysql directory from one server to another new server, I usually choose this direct copy path to create another identical mysql server machine for its effectiveness, its faster compare to use the regular mysql tool.

but when the linux machine has SElinux enabled on it, direct copy will resulting the file unreadable from mysql server point of view, it will showing above error, to make these data file readable on mysql simply issue this command :

chcon --reference=/var/lib/mysql new_db_directory/*

Tuesday, August 18, 2009

Ubuntu gutsy got "package is missing, has been obsoleted etc"

Its sucks maintaining an old server while upgrading the OS is not an option, especially if said machine is just work fine and serve well with its obsolete hardware and not worth enough to put some additional investment, except just add a hard drive.

while trying to update using apt-get, if one got the :
"package is missing, has been obsoleted, or is only available from another source" error, update the content of /etc/apt/sources.list with below entry, all obsolete ubuntu now filed under old-releases.ubuntu.com server :

===========================================================
deb http://old-releases.ubuntu.com/ubuntu gutsy main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu gutsy main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu gutsy-updates main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu gutsy-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu gutsy-security main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu gutsy-security main restricted universe multiverse
===========================================================

Monday, August 10, 2009

running asterisk with SELinux enabled

The common problem on asterisk running on top of linux with SELinux enabled is the error while trying to load the codecs

the error usually said :

loader.c:359 __load_resource: /usr/lib/asterisk/modules/codec_g729.so: cannot restore segment prot after reloc: Permission denied

The majority of user just disabling the SELinux, but if that is not an option, just change the context of said file above wiith this command :

chcon -t texrel_shlib_t /usr/lib/asterisk/modules/codec_g729.so

current

last archive