Page 1 of 3 123 LastLast
Results 1 to 25 of 55
  1. #1
    Join Date
    Dec 2004
    Location
    New York, NY
    Posts
    10,710

    [How To] Kernel Upgrade via Yum for CentOs boxes

    Make sure your yum.conf looks something like this:

    Code:
    root@layer001 [~]# cat /etc/yum.conf
    [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
    root@layer001 [~]#
    (kernel* should not be excluded)
    --

    For single proc boxes type:


    Code:
    yum upgrade kernel
    For dual proc boxes type:

    Code:
    yum upgrade kernel-smp
    Once the process is complete:

    Set "default" to 0 in /etc/grub.conf

    Should end up looking something like:

    Code:
    root@layer001 [~]# cat /etc/grub.conf
    # grub.conf generated by anaconda
    #
    # Note that you do not have to rerun grub after making changes to this file
    # NOTICE:  You have a /boot partition.  This means that
    #          all kernel and initrd paths are relative to /boot/, eg.
    #          root (hd0,0)
    #          kernel /vmlinuz-version ro root=/dev/sda5
    #          initrd /initrd-version.img
    #boot=/dev/sda
    default=0
    timeout=5
    splashimage=(hd0,0)/grub/splash.xpm.gz
    hiddenmenu
    title CentOS (2.6.9-34.ELsmp)
            root (hd0,0)
            kernel /vmlinuz-2.6.9-34.ELsmp ro root=LABEL=/1
            initrd /initrd-2.6.9-34.ELsmp.img
    title CentOS-4 i386 (2.6.9-22.ELsmp)
            root (hd0,0)
            kernel /vmlinuz-2.6.9-22.ELsmp ro root=LABEL=/1
            initrd /initrd-2.6.9-22.ELsmp.img
    title CentOS-4 i386-up (2.6.9-22.EL)
            root (hd0,0)
            kernel /vmlinuz-2.6.9-22.EL ro root=LABEL=/1
            initrd /initrd-2.6.9-22.EL.img
    root@layer001 [~]#
    Reboot the box:

    Code:
    root@layer001 [~]# shutdown -r now
    HTH.
    MediaLayer, LLC - www.medialayer.com Learn how we can make your website load faster, translating to better conversion rates for your business!
    The pioneers of optimized web hosting, featuring LiteSpeed Web Server & SSD Storage - Celebrating 10 Years in Business

  2. #2
    Dear ...
    Sorry to disturb you but Iam using CentOS v4.3 and I upgraded Kernel manually to 2.6.17.7 but I got problem with iptables and APF ...

    now I want to remove this version of kernel and returning back to previous version ... how can I do it ?

    it was :
    2.6.9-34.02.ELsmp

    Please help me soon because the firewall is stopped ?!

  3. #3
    Join Date
    Oct 2004
    Location
    India
    Posts
    509
    You can make APF work in the 2.6.17.7 too. Just open the /etc/apf/internals/functions.apf and

    remove :
    ml ipt_state 1
    ml ipt_multiport 1

    add:
    ml xt_state
    ml xt_multiport

    Restart APF.
    ESC :wq!

  4. #4
    Join Date
    Mar 2003
    Location
    California USA
    Posts
    13,681
    Personally i would recommend reboot instead of shutdown -r now as that is more a non graceful way of doing it.
    Steven Ciaburri | Industry's Best Server Management - Rack911.com
    Software Auditing - 400+ Vulnerabilities Found - Quote @ https://www.RACK911Labs.com
    Fully Managed Dedicated Servers (Las Vegas, New York City, & Amsterdam) (AS62710)
    FreeBSD & Linux Server Management, Security Auditing, Server Optimization, PCI Compliance

  5. #5
    Join Date
    Jul 2006
    Posts
    238
    I ran this but have not rebooted yet, just curious how do I make it reboot only once on the new kernal for testing purposes? I remember something about "lilo" command, just not 100% sure

    Also, should I re-add kernel* back to the yum.conf afterwards?

    one more thing...http://kernel.org/ (forgive me if I'm blind)...where do I sign-up for kernel / security updates?

    One more thing [edit again]...I forgot the command to check not only linux kernel version..but actual OS installed.

    For example: uname -a shows

    Linux server.hostdomain.com 2.6.8-022stab070.5-enterprise #1 SMP Tue Apr 4 22:57:49 MSD 2006 i686 i686 i386 GNU/Linux

    I know that Centos is on this box..but cannot remember exact version..the above is confusing me.
    Last edited by NoAgendas; 07-31-2006 at 05:36 PM.

  6. #6
    Quote Originally Posted by NoAgendas
    I ran this but have not rebooted yet, just curious how do I make it reboot only once on the new kernal for testing purposes? I remember something about "lilo" command, just not 100% sure
    Uhm... nope. Start grub by typing:

    [root@server ~]# grub

    Then, once inside grub, type:

    > savedefault --default=0 --once
    > quit

    And then reboot the machine:

    [root@server ~]# reboot

    Quote Originally Posted by NoAgendas
    Also, should I re-add kernel* back to the yum.conf afterwards?
    I would guess "no".

    Quote Originally Posted by NoAgendas
    One more thing [edit again]...I forgot the command to check not only linux kernel version..but actual OS installed.
    Try uname -r or uname -v

    -Sebastian

  7. #7
    Join Date
    Oct 2004
    Location
    Southwest UK
    Posts
    1,175
    Hi Layer0. Have you built rpms for all architectures? x64/smp included? Have you thought about 'donating' your kernel builds to rpmforge?

    cheers

  8. #8
    Join Date
    Dec 2004
    Location
    New York, NY
    Posts
    10,710
    Quote Originally Posted by gbjbaanb
    Hi Layer0. Have you built rpms for all architectures? x64/smp included? Have you thought about 'donating' your kernel builds to rpmforge?

    cheers
    ? I haven't built kernels or RPMs for public use...this thread is for upgrading your kernel via yum for centos users...im not sure how your question relates?

    And btw, noangendas...you are on a *VPS*. You cannot compile a custom kernel nor can you use yum to update it. The node itself has it's own kernel provided by SW Soft.
    MediaLayer, LLC - www.medialayer.com Learn how we can make your website load faster, translating to better conversion rates for your business!
    The pioneers of optimized web hosting, featuring LiteSpeed Web Server & SSD Storage - Celebrating 10 Years in Business

  9. #9
    Join Date
    Oct 2004
    Location
    Southwest UK
    Posts
    1,175
    I thought yum would download and instal a pre-built binary packaged as rpm, and forgive my assumption here, I thought you have pre-built the latest kernels in much the same way as CentOS does, and provide them on your own yum repository.

    however, re-reading your initial post, I think I was just too hopeful that someone had done this

  10. #10
    Join Date
    Dec 2004
    Location
    New York, NY
    Posts
    10,710
    I thought you have pre-built the latest kernels in much the same way as CentOS does, and provide them on your own yum repository.
    Ah, nope, haven't done that...granted this is something that I might consider doing...since the CentOS kernels have some pretty bad IO wait issues (well documented issues as well). Though I'm not sure if I'd release them publically - since I wouldn't want to be responsible if they mess with someone's setup...(though it would be unlikely).
    MediaLayer, LLC - www.medialayer.com Learn how we can make your website load faster, translating to better conversion rates for your business!
    The pioneers of optimized web hosting, featuring LiteSpeed Web Server & SSD Storage - Celebrating 10 Years in Business

  11. #11
    Join Date
    Jul 2006
    Posts
    287
    Quote Originally Posted by layer0
    Ah, nope, haven't done that...granted this is something that I might consider doing...since the CentOS kernels have some pretty bad IO wait issues (well documented issues as well). Though I'm not sure if I'd release them publically - since I wouldn't want to be responsible if they mess with someone's setup...(though it would be unlikely).
    Redhat released RHEL 4.4 on 8-10-2006 with kernel 2.6.9-42 which fixes the infamous load issue. So be on the lookout for CentOS 4.4 real soon with this fix.

  12. #12
    Join Date
    Dec 2004
    Location
    New York, NY
    Posts
    10,710
    Quote Originally Posted by Iwannasite
    Redhat released RHEL 4.4 on 8-10-2006 with kernel 2.6.9-42 which fixes the infamous load issue. So be on the lookout for CentOS 4.4 real soon with this fix.
    Yes, you can actually run 2.6.9-42 on CentOS 4.3 if you want to.
    http://people.redhat.com/~jbaron/rhel4/RPMS.kernel/

    rpm -Uvh <your-rpm>
    MediaLayer, LLC - www.medialayer.com Learn how we can make your website load faster, translating to better conversion rates for your business!
    The pioneers of optimized web hosting, featuring LiteSpeed Web Server & SSD Storage - Celebrating 10 Years in Business

  13. #13
    Join Date
    Jul 2006
    Posts
    238
    kernel-smp-2.6.9-42.EL.i686.rpm is for dual processor centos 4.3 compatible correct?

  14. #14
    Join Date
    Mar 2003
    Location
    California USA
    Posts
    13,681
    that is correct
    Steven Ciaburri | Industry's Best Server Management - Rack911.com
    Software Auditing - 400+ Vulnerabilities Found - Quote @ https://www.RACK911Labs.com
    Fully Managed Dedicated Servers (Las Vegas, New York City, & Amsterdam) (AS62710)
    FreeBSD & Linux Server Management, Security Auditing, Server Optimization, PCI Compliance

  15. #15
    Join Date
    Dec 2004
    Location
    New York, NY
    Posts
    10,710
    Quote Originally Posted by NoAgendas
    kernel-smp-2.6.9-42.EL.i686.rpm is for dual processor centos 4.3 compatible correct?
    Yes. That is correct.

    But, aren't you on a VPS?
    MediaLayer, LLC - www.medialayer.com Learn how we can make your website load faster, translating to better conversion rates for your business!
    The pioneers of optimized web hosting, featuring LiteSpeed Web Server & SSD Storage - Celebrating 10 Years in Business

  16. #16
    Join Date
    Jul 2006
    Posts
    238
    No, the box itself is another. Thanks for the confirmation Appreciate that

    By the way, I signed up for centos mailing list to recieve kernel security udpates. Wouldn't it be better (faster) to signup to redhat's mailing list considering we centos users can use the same new kernel?

  17. #17
    Join Date
    Mar 2003
    Location
    California USA
    Posts
    13,681
    Yes it would be faster but it would be harder to obtain upgrades.
    Steven Ciaburri | Industry's Best Server Management - Rack911.com
    Software Auditing - 400+ Vulnerabilities Found - Quote @ https://www.RACK911Labs.com
    Fully Managed Dedicated Servers (Las Vegas, New York City, & Amsterdam) (AS62710)
    FreeBSD & Linux Server Management, Security Auditing, Server Optimization, PCI Compliance

  18. #18
    Join Date
    Dec 2004
    Location
    New York, NY
    Posts
    10,710
    By the way, I signed up for centos mailing list to recieve kernel security udpates. Wouldn't it be better (faster) to signup to redhat's mailing list considering we centos users can use the same new kernel?
    You can do that if you wish...though the jbaron kernel will work just fine for the time being and they are upgraded accordingly as well.

    <edit>steven beat me to it</edit>
    MediaLayer, LLC - www.medialayer.com Learn how we can make your website load faster, translating to better conversion rates for your business!
    The pioneers of optimized web hosting, featuring LiteSpeed Web Server & SSD Storage - Celebrating 10 Years in Business

  19. #19
    Join Date
    May 2004
    Location
    Toronto, Canada
    Posts
    643
    Hello Layer0,

    I am having server load problems because of my kernel,
    You previously gave me a link to kernel from my other post.

    That kernel version is not there any longer. Can you please tell me which one will work on my system. Its Centos 4.3.

    And when I use yum upgrade kernel, it does not work.

    Can you please tell me what to do.

    /..............
    dbgohan,

    You can do the following to upgrade to a kernel not affected by the high load issue:


    Code:
    wget http://people.redhat.com/~jbaron/rhe....2.EL.i686.rpm
    rpm -Uvh kernel-2.6.9-39.2.EL.i686.rpm
    Once that's done, edit /etc/grub.conf and make sure "default" is set to 0.

    Afterwards, reboot..you can use:

    shutdown -r now

    Also, please note that the above has only been tested on CentOs (by me).

    HTH.

    /...........
    Hussain Baig - 1-866-954-6747
    Toronto based VPS - Dedicated Servers - Colocation
    VPS Fusion - Providing scalable and reliable hosting solutions.

  20. #20
    Join Date
    Dec 2004
    Location
    New York, NY
    Posts
    10,710
    Code:
    wget http://people.redhat.com/~jbaron/rhel4/RPMS.kernel/kernel-2.6.9-42.EL.i686.rpm
    
    rpm -Uvh kernel-2.6.9-42.EL.i686.rpm
    
    # Once that's done, edit /etc/grub.conf and make sure "default" is set to 0.
    
    shutdown -r now
    # OR you can use 'reboot'
    Should do the trick =)
    MediaLayer, LLC - www.medialayer.com Learn how we can make your website load faster, translating to better conversion rates for your business!
    The pioneers of optimized web hosting, featuring LiteSpeed Web Server & SSD Storage - Celebrating 10 Years in Business

  21. #21
    Join Date
    May 2004
    Location
    Toronto, Canada
    Posts
    643
    Thanks alot.
    Hussain Baig - 1-866-954-6747
    Toronto based VPS - Dedicated Servers - Colocation
    VPS Fusion - Providing scalable and reliable hosting solutions.

  22. #22
    Join Date
    May 2004
    Location
    Toronto, Canada
    Posts
    643
    Hello,

    The server load still wont go down... It is in high 30s.

    top - 21:44:58 up 1 day, 5:44, 1 user, load average: 14.16, 22.25, 21.85
    Tasks: 282 total, 2 running, 276 sleeping, 1 stopped, 3 zombie
    Cpu(s): 23.1% us, 4.6% sy, 0.0% ni, 0.0% id, 71.7% wa, 0.7% hi, 0.0% si
    Mem: 970412k total, 963640k used, 6772k free, 5496k buffers
    Swap: 2048248k total, 1039256k used, 1008992k free, 89416k cached

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    4871 mysql 16 0 156m 23m 2264 S 9.3 2.4 59:13.10 mysqld
    11732 hbaig 16 0 2828 1160 652 D 5.3 0.1 0:00.16 imapd
    20216 nobody 15 0 28700 11m 1944 D 2.7 1.2 0:18.34 httpd
    11645 hbaig 16 0 19720 11m 2296 S 2.7 1.2 0:00.16 php
    19486 nobody 16 0 29544 11m 2408 R 2.3 1.2 0:22.79 httpd
    19842 nobody 15 0 28804 10m 2028 S 1.0 1.1 0:22.26 httpd
    19566 nobody 15 0 29716 10m 1992 D 0.7 1.1 0:20.56 httpd
    11633 root 17 0 3992 1064 740 R 0.7 0.1 0:00.38 top
    11731 mailnull 16 0 8612 2944 2020 S 0.7 0.3 0:00.02 exim
    13708 nobody 16 0 29052 10m 1992 S 0.3 1.1 0:18.63 httpd
    19553 nobody 15 0 27152 10m 2372 S 0.3 1.1 0:18.04 httpd
    19573 nobody 15 0 29408 11m 2028 S 0.3 1.2 0:24.03 httpd
    31760 nobody 15 0 29832 13m 2012 S 0.3 1.5 0:07.77 httpd
    31888 nobody 15 0 29304 13m 2000 S 0.3 1.4 0:06.70 httpd
    17085 root 17 0 11376 2336 1488 S 0.3 0.2 0:00.90 authProg
    1 root 16 0 3112 456 428 S 0.0 0.0 0:05.43 init
    2 root 34 19 0 0 0 S 0.0 0.0 0:00.42 ksoftirqd/0
    3 root 5 -10 0 0 0 S 0.0 0.0 0:00.56 events/0
    4 root 5 -10 0 0 0 S 0.0 0.0 0:00.00 khelper
    5 root 15 -10 0 0 0 S 0.0 0.0 0:00.00 kacpid
    26 root 5 -10 0 0 0 S 0.0 0.0 0:00.00 kblockd/0
    47 root 14 -10 0 0 0 S 0.0 0.0 0:00.00 aio/0
    27 root 15 0 0 0 0 S 0.0 0.0 0:00.00 khubd
    46 root 15 0 0 0 0 S 0.0 0.0 5:23.98 kswapd0
    193 root 25 0 0 0 0 S 0.0 0.0 0:00.00 kseriod
    311 root 6 -10 0 0 0 S 0.0 0.0 0:00.00 ata/0
    313 root 22 0 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_0
    314 root 23 0 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_1
    320 root 15 0 0 0 0 S 0.0 0.0 0:01.97 kjournald
    1299 root 6 -10 2308 336 332 S 0.0 0.0 0:00.01 udevd
    1705 root 6 -10 0 0 0 S 0.0 0.0 0:00.00 kauditd
    1751 root 6 -10 0 0 0 S 0.0 0.0 0:00.00 kmirrord
    1777 root 15 0 0 0 0 S 0.0 0.0 0:00.00 kjournald
    Hussain Baig - 1-866-954-6747
    Toronto based VPS - Dedicated Servers - Colocation
    VPS Fusion - Providing scalable and reliable hosting solutions.

  23. #23
    Join Date
    Dec 2004
    Location
    New York, NY
    Posts
    10,710
    Are you sure the new kernel is active?

    Paste the output from:

    uname -r
    MediaLayer, LLC - www.medialayer.com Learn how we can make your website load faster, translating to better conversion rates for your business!
    The pioneers of optimized web hosting, featuring LiteSpeed Web Server & SSD Storage - Celebrating 10 Years in Business

  24. #24
    Join Date
    May 2004
    Location
    Toronto, Canada
    Posts
    643
    root@s01 [/tmp]# uname -r
    2.6.9-42.EL
    root@s01 [/tmp]#
    Hussain Baig - 1-866-954-6747
    Toronto based VPS - Dedicated Servers - Colocation
    VPS Fusion - Providing scalable and reliable hosting solutions.

  25. #25
    Join Date
    May 2004
    Location
    Toronto, Canada
    Posts
    643
    for some odd reason alot of httpd commands are running by user nobody.
    Hussain Baig - 1-866-954-6747
    Toronto based VPS - Dedicated Servers - Colocation
    VPS Fusion - Providing scalable and reliable hosting solutions.

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •