Archive for January, 2007

Changing default language

Today i worked on a Fedora C4 server, the langiage is set to German. This is the second time i am working on german server, first one was suse linux. With the help of a german friend, i change the language to english using command “yast”

On Fedora, to change langiage, you need to edit the file /etc/sysconfig/i18n

The content was

LANG=”de_DE.UTF-8″
SYSFONT=”latarcyrheb-sun16″

I changed it to

LANG=”en_US.UTF-8″
SYSFONT=”latarcyrheb-sun16″
SUPPORTED=”en_US.UTF-8:en_US:en”

After rebooting the server, language is changed to english.

Here is df -h result

Before changing langiage

# df -h
Dateisystem GröÃe Benut Verf Ben% Eingehängt auf
/dev/md1 950M 191M 711M 22% /
/dev/md5 4,7G 1,3G 3,4G 28% /usr
/dev/md7 100G 89M 100G 1% /var
/dev/md6 4,7G 168K 4,7G 1% /home
none 990M 4,0K 990M 1% /tmp
#

After changing langiage

# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/md1 950M 191M 711M 22% /
/dev/md5 4.7G 1.3G 3.4G 28% /usr
/dev/md7 100G 87M 100G 1% /var
/dev/md6 4.7G 168K 4.7G 1% /home
none 990M 0 990M 0% /tmp
#

Comments off

User Resource limits on Cpanel Server

Today i tried to run java on a dedicated server as normal user. This is required as part of sidekick installation.

But i got following error

Error occurred during initialization of VM
Could not reserve enough space for object heap

This is caused by limits set to normal users on Cpanel server. As root java works well.

Problem is fixed by editing files

/etc/profile
/etc/bashrc
/etc/profile.d/limits.sh

and removing following entry

#cPanel Added Limit Protections — BEGIN

#unlimit so we can run the whoami
ulimit -n 4096 -u 14335 -m unlimited -d unlimited -s 8192 -c 1000000 -v unlimited 2>/dev/null

LIMITUSER=$USER
if [ -e "/usr/bin/whoami" ]; then
LIMITUSER=`/usr/bin/whoami`
fi
if [ "$LIMITUSER" != "root" ]; then
ulimit -n 100 -u 20 -m 200000 -d 200000 -s 8192 -c 200000 -v 200000 2>/dev/null
else
ulimit -n 4096 -u 14335 -m unlimited -d unlimited -s 8192 -c 1000000 -v unlimited 2>/dev/null
fi
#cPanel Added Limit Protections — END

These are added by cpanel to limit user resource when you enabled Shell Fork Bomb Protection in WHM.

Comments off

Fantastico installation error

On cpanel server, on installing software with fantastico, i get error like

Parse error: syntax error, unexpected ‘;’ in /tmp/cpanel_phpengine.1167655653.13924924.23731208877 on line 102

The problem is caused by wrong permission for tar. Fixed by

chmod 755 /bin/tar

Comments off

RAR files on Linux

By default Linux support .tar, .tar.gz, .bz2 and .zip compressed files.

On FreeBSD unzip command is not available, you can install from ports.

RAR files can be uncompressed with command unrar.

On linux you can install it with

yum install unrar

On FreeBSD, you can install it from package or from ports


pkg_add -r unrar
rehash

Comments off

« Previous entries