Tag Archives: update

Ubuntu: install kernel 3.16

1
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.16-utopic/linux-headers-3.16.0-031600-generic_3.16.0-031600.201408031935_amd64.deb http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.16-utopic/linux-headers-3.16.0-031600_3.16.0-031600.201408031935_all.deb http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.16-utopic/linux-image-3.16.0-031600-generic_3.16.0-031600.201408031935_amd64.deb

dpkg -i *.deb
reboot

Ubuntu: kernel 3.10.1

cd /tmp/
if your linux is 64bit:

1
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.10.1-saucy/linux-headers-3.10.1-031001-generic_3.10.1-031001.201307131550_amd64.deb http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.10.1-saucy/linux-headers-3.10.1-031001_3.10.1-031001.201307131550_all.deb http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.10.1-saucy/linux-image-3.10.1-031001-generic_3.10.1-031001.201307131550_amd64.deb

else if it's 32bit:

1
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.10.1-saucy/linux-headers-3.10.1-031001-generic_3.10.1-031001.201307131550_i386.deb http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.10.1-saucy/linux-headers-3.10.1-031001_3.10.1-031001.201307131550_all.deb http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.10.1-saucy/linux-image-3.10.1-031001-generic_3.10.1-031001.201307131550_i386.deb

sudo dpkg -i *.deb
update-grub
reboot

Puppet: ubuntu update

This puppet config will make apt-get update && apt-get upgrade once a day between 2 and 4 hours.
Put it in manifests/site.pp

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Exec { path => '/usr/bin:/bin:/usr/sbin:/sbin' }

class update {
        schedule { 'maintenance':
                  range  => "2 - 4",
                  period => daily,
                  repeat => 1,
        }

        exec { "upgrade_packages":
                command => "apt-get upgrade -q=2 -y",
                group => "root",
                user => "root",
                schedule => 'maintenance',
                onlyif => ["apt-get update"]
        }
}

node default {
        include update
}

MySQL: upgrade from 5.0 to 5.1

1) stop all applications which works with mysql
2) make mysqldump(with right options like --single-transaction and --master-data)
3) make logs flush; in mysql
4) stop mysql
5) backup /var/lib/mysql folder (it's default path to mysql folder)
6) install new version of mysql (in ubuntu: aptitude install mysql-server-5.1
7) execute mysql_upgrade command in console
8) start mysql

FreeBSD 8.0 -> 8.2 csup

upgrade freebsd

root@asterisk /etc/csup # ls
doc-all    ports-all  src-all    src-sys
root@asterisk /etc/csup # cat src-all
*default host=cvsup5.ru.FreeBSD.org
*default base=/var/db
*default prefix=/usr
*default release=cvs tag=RELENG_8_2
*default delete use-rel-suffix
*default compress src-all

next

root@asterisk /etc/csup # csup src-all
root@asterisk /etc/csup # cd /usr/src && make cleandir && make buildworld
root@asterisk /usr/src # make buildkernel KERNCONF=MYKERNEL
root@asterisk /usr/src # make installkernel KERNCONF=MYKERNEL
root@asterisk /usr/src # reboot
root@asterisk /usr/src # mergemaster -p
root@asterisk /usr/src # make installworld
root@asterisk /usr/src # make delete-old
root@asterisk /usr/src # make delete-old-libs
root@asterisk /usr/src # mergemaster -iFU// very carefully !!
root@asterisk /usr/src # reboot

FreeBSD: update portage tree

Create config for update portage tree via csup

[root@shell]# cat >> /etc/csup/ports-all < < END
*default host=cvsup5.ru.FreeBSD.org
*default base=/var/db
*default prefix=/usr
*default release=cvs tag=.
*default delete use-rel-suffix
*default compress ports-all
END

run update:

[root@shell]# csup /etc/csup/ports-all

add this command to /etc/crontab for daily update

next, update system and kernel sources:

Continue reading FreeBSD: update portage tree