Archive for the Category »Basic Linux «

Mailman error “Bug in Mailman version 2.1.11.cp3″

In latest cPanel 11.24.5if you are receiving following while selecting “modify” option from your cPanel >> Mailing Lists it will open mailing list with the following error message…

Mailing list bug

You can resolve above error by using following command form your shell but make sure that you are logged in as a root user.

root@gunjan[]#chmod 02775 -R /usr/local/cpanel/3rdparty/mailman/

and if its also not resolving your issue then you can read more on it here….

If above command won’t resolve your issue, then you have to reinstall mailman by using following steps.

First take backup for current mailman directory.

root@[/usr/local/cpanel/3rdparty]#cp mailman mailman-back -R

Confirm disk space usage for both directory.

root@[/usr/local/cpanel/3rdparty]#du -sh mailman
407M mailman

root@[/usr/local/cpanel/3rdparty]#du -sh mailman-back
407M mailman

Then run following command

root@[/usr/local/cpanel/3rdparty]# /scripts/reinstallmailman

or

root@[/usr/local/cpanel/3rdparty]# /usr/local/cpanel/bin/mailman-install –force

It will resolve your issue and you won’t face any further trouble. Enjoy mailman power :)

How to check process id for services?

You can check the process id for specific service by using following command from your command prompt.

root@gunjan[]#pidof service_name

For example we need to check process id for mysql service

root@gunjan[]#pidof mysql

16140

Category: Basic Linux  Tags: , , ,  Comments off

Three command to check Servers uptime?

Yes its always good to know uptime for Server.You can check Server uptime by using following commands.

root@gunjan [~]# uptime
04:34:25 up 20 days, 14:31,  1 user,  load average: 0.15,07.33,0.76

root@gunjan [~]# w
04:34:20 up 20 days, 14:31,  1 user,  load average: 0.15,07.33,0.76
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT

root@gunjan [~]#top

top – 04:36:17 up 20 days, 14:33,  1 user,  load average: 0.15,07.33,0.76
Tasks: 290 total,   1 running, 283 sleeping,   0 stopped,   6 zombie
Cpu(s):  2.6%us,  1.4%sy,  0.0%ni, 78.9%id, 16.9%wa,  0.0%hi,  0.2%si,  0.0%st

What is Core Files in Linux?

A core file created when ever a program terminates unexpectedly and its also useful for determining what caused the termination. In many Linux server by default they do not produce core files when programs crash or terminates unexpectedly.

On  most of the Linux server core file size limitation is set to 0.You can check the core file size limit set in server by using following command.

root@gunjan [~]# ulimit -c
1000000

In above command core file size limit is 1000000 if output occur empty then it means core file size limit haven’t set on server and you can set it as

root@gunjan [~]# ulimit -c 1000000

or

root@gunjan [~]# ulimit -c unlimited

If you want to test core file limit is working on your server or not? then run following command

kill -s SIGSEGV $$

This above command will crashes your shell and produces core file in the current directory. as core.*

If core file is taking lots of disk space on server and you want to disable it then follow the steps one by one.

root@gunjan [~]#which httpd

/usr/sbin/httpd

root@gunjan [~]#pico /usr/sbin/httpd

And following line in /usr/sbin/httpd

ulimit -c 0

And then restart the Apache server

What is path for “ifconfig”?

The ifconfig is present under /sbin  director and the PATH of the normal users don’t point to /sbin directory and if execute “ifconfig” under normal by using any normal cPanel user login details then it will not show you.

you can set PATH to add /sbin  #PATH=$PATH:/sbin

Or you can enter command with full path like # /sbin/ifconfig

How to change time zone on Linux Server?

The all the time zone files are stored in /usr/share/zoneinfo directory  and its need to simlink to the /etc/localtime file to show the timezone as per your requirment.

Refer following URL to set the timezone for example we are setting GMT timezone.

gunjan@root#ln -sf /usr/share/zoneinfo/GMT /etc/localtime
But make sure that you are logged into Server as root to execute above command.Now check timezone has been changed or not?

gunjan@root # date
Tue Oct 27 03:49:53 GMT 2009

How to Open Passive FTP in iptable?

To Open Passive FTP in iptable root login is require.

If you want to open port range from 30000:64000 then run the following command from shell.

iptables -A INPUT -p tcp -m tcp –dport 30000:64000 -j ACCEPT

Similarly you can open passive post range as per your requirement.

How to install ssl on default services(http, exim, imap, pop3, cpanel/WHM)?

You can install SSL on default services(http, exim, imap, pop3, cpanel/WHM) from your WHM but you require root login details to

The all cert information save in following path

/var/cpanel/ssl/cpanel

You can install the certificate from your WHM >>  Main >> Service Configuration >> Manage Service SSL Certificates

Explain rmmod?

The “rmmod" is used to remove the module from kernel.The module name which you wan to remove from the Kernel (excluding the .ko) is specified to identify the module. The kernel will not remove a module that is currently being used in the kernel (a non-zero use count), but a -w option can be specified to "rmmod" to instruct the kernel to remove it once the use-count has decreased to zero.

root@gunjan#rmmod your_module

If you don’t know anything about “lsmod” then please read it first

How to insert module in Kernel?

You can insert the module in Kernel by using “insmod” but remember you require root login details.For the 2.6 kernel, this must be a kernel object (suffixed with .ko).If symbols exist within the module then they can be initiate at install time through the “insmod”. The following example will explain installing a module with an initial steps.

root@gunjan#insmod your_module.ko your_option=1

An error message will occur if there was an error while installing module with the above command.

You can also check “How to remove modules?