Wednesday, April 6, 2011

How to upgrade kernel in Linux CentOS

Here's is the guide for you all to update kernel in Linux..especially in Centos...

Why the need for upgrading Kernel..might be your existing kernel crashes periodically...or the update you need would not be available in the current Linux version....However if we get a situation to upgrade Linux kernel...do the following...

The most important thing is if you update the kernel..it will automatically update some of the packages like httpd, MySQL. If you want to exclude these changes modify the file,

/etc/yum.conf 
as 
[main]
exclude=courier* apache* mod_ssl* httpd* perl mysql* php* spamassassin* exim*
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=centos-release
tolerant=1
exactarch=1
retries=20
obsoletes=1
gpgcheck=1

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d

First you need to check the current version of  Kernel..type the below command in the prompt

uname -a

Most of the admin uses "yum upgrade kernel" to update the Kernel version..

yum upgrade kernel

Nothing to do.

the newer kernel version is not present in the Repo you are curretly using, you need to find out the corresponding  repo for the needed kernel...

here...we are going to upgrade the kernel from,


kernel-2.6.18-32  to kernel-2.6.18-238.5.1.1

but that kernel version was not found in the default repo....
so we need to find a exact one...
for this version I have found one which is given below...

Create a new file called centalt.repo file in /etc/yum.repos.d/ and paste the below 
contents.....

[CentALT]
name=CentALT Packages for Enterprise Linux 5 - $basearch
baseurl=http://centos.alt.ru/repository/centos/5/$basearch/
enabled=1
gpgcheck=0

Then try 

yum update kernel*

It will automatically add a new entry in grub.conf file....so just reboot the server and check..

uname -a

Kernel version is Updated ! ! ! !

Sunday, February 20, 2011

Upgrade Joomla from 1.5.x to 1.5.22

Upgrade Joomla from 1.5.x to 1.5.22:
----------------------------------------------

The most important point before proceeding is to take a backup of the mysql database which used by your Joomla.

1.Download the component 'com_jupdateman_151.tgz' from the Site "http://joomlacode.org/gf/project/pasamioprojects/frs/?action=FrsReleaseBrowse&frs_package_id=4728"

2.Install the component. After that use the component by going to Components >> Update Manager.

3.Select the 'Download the Updated File' link to download the latest version of the Joomla.

4.Choose the Patch Package version when prompted.  A full package is not required for upgrading from 1.5.x. to 1.5.22.

Thats all upgrade Completed Successfully ! ! ! ! !


Errors and fixes:
----------------------

1.If you face any error while upgrading Joolma, there might be corrupted table so you need to repair the mysql tables to fx it.

2.After upgrading the Joomla to 1.5.22 if you got blank page then at the spot you need to restore the database which you have dumped already.

Sunday, January 23, 2011

How to migrate joomla from version 1.0 to 1.5

Here is how to Migrate Joomla from version 1.0 to 1.5.x stable

The most important thing before proceeding with the steps below is to take the backup of  the current Joomla you are having and also database it will be safe.

1. You need to install the component called migrator for the current version of  Joomla1.0.x

2. Then go to "Components" option in your Joomla admin page then select "Migrator"

3. Then select the "Create Migration SQL" file option



4. Then download the SQL file using the download option and place it in the Local system or FTP it to your server



 5. Download the Stable release Joomla 1.5 from Joomla from the site below and
http://www.joomla.org/download.html

6. Step 4. Perform the migration
Proceed with the installation until you reach Step 6: Configuration:


 7. Fill the site name, email, admin user name and password . The imp thing to keep on mind is to select the option 'Load Migration Script'.




8. Fill the old table prefix _jos and leave the encoding unchanged unless needed and you are familiar with this option.

By clicking on the [Browse] button you should select the Joomla 1.0.x migration dump you downloaded earlier.

Make sure to check the This script is a Joomla! 1.0 migration script. check box as well.
Proceed by clicking on the [Upload and execute] button.

Once the data is imported you will see the following screen


9.As always remove the installation directory and access the joomla admin.















Monday, January 17, 2011

How does Qmail work

Qmail : How does it work ?

Qmail programs & configuration files
Qmail works using about 15 small programs. It also uses a pretty large number of configuration files. At the beginning, this may appear as quite confusing. Once you are familiarised with these configuration files & programs, qmail administration will be easier.

Qmail programs

Qmail continuously runs 5 daemons. Remaining 10 programs are launched by these 5 daemons as and when required.

Let us see which are the 5 daemons.

1. qmail-send
2. qmail-lspawn
3. qmail-rspawn
4. qmail-clean
5. tcpserver

How Qmail works

1. Email arrival in Qmail

Mail arrives in Qmail in two different ways.

(i) Locally injected emails.

There is a program called sendmail that comes with qmail. It is a program that mimics functionality of legacy sendmail, its arguments are also similar. sendmail accepts the local email and passes it to qmail-inject.

(ii) Remote emails arrived via SMTP

* tcpserver listens incoming connections on the SMTP port.
* upon a new SMTP connection, qmail-smtpd is launched.
* qmail-smtpd receives emails via SMTP.



2. Queuing emails

* qmail-inject & qmail-smpd pass received emails to qmail-queue.
* qmail-queue places emails in the folder /var/qmail/todo
* qmail-queue adds necessary headers to emails
* Then, it notifies qmail-send about newly queued emails.

3. Processing queued emails

* qmail-send takes the message out of /var/qmail/queue/todo folder
* qmail-send checks the recipient address of the email
* If the recipient addres is local, email is passed to qmail-lspwan
* If the recipient address is remote, email is passed to qmail-rspawn

4. Email delivery to local and remote recipients

* qmail-lspawn passes email to qmail-local
* qmail-local delivers email to local email address
* qmail-rspawn passes email to qmail-remote
* qmail-remote connects to remote mail server and delivers email to remote email address

5. Cleaning queue after delivering emails

* Once all messages are delivered, qmail-send notifies qmail-clean
* qmail-clean removes the delivered emails from the queue

Qmail configuration files

Qmail configuration files are located in the folder /var/qmail/control.

1. badmailfrom
All "from addresses" which are blacklisted.

2. bouncefrom
It is the bounce email from address. Usually it is "mailer-daemon".

3. bouncehost
It is host name of server

4. concurrencyincoming
Maximum number of simultaneous incoming SMTP connections allowed.

5. concurrencylocal
Maximum number of simultaneous local deliveries

6. concurrencyremote
Maximum number of simultaneous remote deliveries

7. defaultdomain
Default domain name of server

8. defaulthost
Host name of server

9. databytes
Maximum number of bytes in message (0=no limit)

10. doublebouncehost
It is the bounce email from address. Usually it is "mailer-daemon".

11. doublebounceto
It is the bounce email to address. Usually it is "postmaster".

12. helohost
It is the host name used in SMTP HELO command

13. idhost
It is host name of server. It is used when creating Message-ID.

13. localiphost
It is local IP address

14. locals
List of all local domains.

15. me
It is the hostname of server

16. morercpthosts
Only 50 domains can be added in rcpthosts, remaining domains should be in morercpthosts.

17. queuelifetime
It is the number of seconds an email can remain in queue

18. rcpthosts
Domains of all locally hosted email addresses.

19 smtpgreeting
It is the SMTP greeting message used by mail server.

20. timeoutconnect
Time in seconds, the server has to wait for SMTP connection

21. timeoutremote
Time in seconds, server has to wait for remote server

22. timeoutsmtpd
Time in seconds, server has to wait for SMTP client

23. virtualdomains
List of all virtual domains

Monday, December 20, 2010

Enter into Container VEID failed

The VPS’es that have problems with connecting and entering,it tends to be a small problem either with tty/pty devices OR udev. You will be greeted with an error message while accessing a VPS from the host server:

enter failed
enter into Container VEID failed

either the pty/tty devices are missing OR having incorrect  permissions. You will have to create them on the container using the  MAKEDEV program which is use to create devices in /dev. The following  commands will have to be executed from the host server to create those  devices and restart the container:

vzctl exec VEID /sbin/MAKEDEV tty
vzctl exec VEID /sbin/MAKEDEV pty
vzctl restart VEID

If creating the devices doesn’t fix the issue, update the startup files and restart the container:

vzctl exec  VEID update-rc.d -f udev remove
vzctl restart VEID

Monday, November 1, 2010

Exim Commands

view all mails in queue

exim -bp

view the total count of the queue

exim -bpc

remove all mails in queue
exim -bp | exiqgrep -i | xargs exim -Mrm

exim -Mvh <msg id> - read the headers of the mail

exim -Mvb <msg id> - read the message body

exim -Mvl <message-id> - logs


remove frozen mails:


exim -bp | grep frozen | awk {'print $3'} | xargs exim -Mrm

or

exiqgrep -z -i | xargs exim -Mrm


freeze all the mails from a specified sender

exiqgrep -i -f luser@domain.com | xargs exim -Mf

Add the below two lines under check_recipient in the exim.conf to drop sender or from host

check_recipient:
drop_sender = /etc/exim_reject_senders
drop_hosts = /etc/exim_reject_hosts


add the specified domain name or hosts in the corresponding file. one entry per line.
 
exiqgrep -o 604800
Line mismatch: 170d 1IGLxw-0004Tw-Ne

# exim -bpru | grep “170d” | awk ‘{print $2}’
1IGLxw-0004Tw-Ne
1IGTFn-0000VM-UI
#exim -bpru | grep “170d” | awk ‘{print $2}’ | xargs -n 1 -P 20 exim -Mrm

Sunday, October 31, 2010

Sitestudio problem

When you try to edit the pages using Sitestudio..

if it shows the below message and keep on displaying the same and nothing happens...

Please wait for graphics need to be generated 

check:
/hsphere/shared/Sitestudio/imaker.sh status

if it says stopped.

run
/hsphere/shared/Sitestudio/imaker.sh restart