Skip to content

Instantly share code, notes, and snippets.

@denji
Last active October 3, 2017 15:33
Show Gist options
  • Save denji/7258266 to your computer and use it in GitHub Desktop.
Save denji/7258266 to your computer and use it in GitHub Desktop.
Debian Wheezy (stable) to Jessie (testing)
Migrate Debian 7 (Wheezy) to Debian 8 (Jessie)
# apt-get install sudo
# List jessie* http://mirror.yandex.ru/debian/dists/
sudo sed -i 's/wheezy/jessie/g' /etc/apt/sources.list
sudo apt-get update
sudo apt-get upgrade # first only upgrade (safe)
sudo apt-get dist-upgrade
sudo apt-get install firmware-realtek
Debian 8 MariaDB
# MariaDB 10 stable
deb http://labs.seravo.fi/~otto/mariadb-repo/ sid-amd64/
# MariaDB 10 fast update
deb http://labs.seravo.fi/~otto/mariadb-repo/ mariadb-10.0-sid-amd64/
Safely Remove / Delete Old Linux Kernel from a Linux Server
sudo apt-get update && sudo apt-get dist-upgrade
reboot
dpkg --list | grep linux-image | awk '{ print $2 }' | sort -V | sed -n '/'`uname -r`'/q;p' | xargs sudo apt-get -y purge
/etc/apt/sources.list
deb http://ftp2.debian.org.ua/debian/ jessie main
deb-src http://ftp2.debian.org.ua/debian/ jessie main

#deb http://ftp2.debian.org.ua/debian/ jessie/updates main
#deb-src http://ftp2.debian.org.ua/debian/ jessie/updates main
deb http://security.debian.org/ jessie/updates main
deb-src http://security.debian.org/ jessie/updates main

# jessie-updates, previously known as 'volatile'
deb http://ftp2.debian.org.ua/debian/ jessie-updates main
deb-src http://ftp2.debian.org.ua/debian/ jessie-updates main

#deb http://ftp2.debian.org.ua/debian/ jessie-proposed-updates main
#deb-src http://ftp2.debian.org.ua/debian/ jessie-proposed-updates main

# experimental debian
deb http://ftp2.debian.org.ua/debian/ experimental main
deb-src http://ftp2.debian.org.ua/debian/ experimental main
#deb http://ftp2.debian.org.ua/debian/ sid main

Bonus

nginx-mainline 1.5.6+
curl http://nginx.org/keys/nginx_signing.key | sudo apt-key add - 
sudo add-apt-repository 'deb http://nginx.org/packages/mainline/debian/ wheezy nginx'
sudo apt-get update && sudo apt-get install nginx
mariadb 10.0+
sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
sudo add-apt-repository 'deb http://mirror.timeweb.ru/mariadb/repo/10.0/debian/ wheezy main'
sudo apt-get update && sudo apt-get install mariadb-server

or source code ..

# Fix: https://mariadb.atlassian.net/browse/MDEV-4977
#      https://mariadb.atlassian.net/browse/MDEV-5054
cd /tmp
apt-get build-dep mariadb-5.5
apt-get install cmake libaio1 libaio-dev fakeroot valgrind
apt-get source mariadb-5.5
cd mariadb-5.5*
curl https://mariadb.atlassian.net/secure/attachment/23610/mdev-4977.patch | patch -p1
dpkg-buildpackage -us -uc
# apt-get -b source mariadb-5.5
# Install kernel build toolkits
$ sudo apt-get install build-essential ncurses-base ncurses-dev fakeroot kernel-package
##make mrproper && make localmodconfig
$ cp /boot/config-`uname –r` .config
$ make menuconfig
# Clean
$ make-kpkg clean
# Parallel build
$ export CONCURRENCY_LEVEL=$(cat /proc/cpuinfo|grep processor|wc -l)
$ fakeroot make-kpkg --revision 1 --initrd kernel_image kernel_headers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment