Debian

Debian-specific articles


Unattended upgrades on Debian

There's a simple way of having unattended upgrades, having the possiblity to backlist packages or limit upgrades for example to security patches etc. apt-get install unattended-upgrades apt-listchanges dpkg-reconfigure -plow unattended-upgrades Edit /etc/apt/apt.conf.d/50unattended-upgrades with this content: // Automatically upgrade packages from these origin patterns // In this case we install only security updates Unattended-Upgrade::Origins-Pattern { //   […]


Installing mysql 5.6 on Debian Wheezy

Add the Repo: wget http://repo.mysql.com/mysql-apt-config_0.2.1-1debian7_all.deb dpkg -i mysql-apt-config_0.2.1-1debian7_all.deb The above package will create a file /etc/apt/sources.list.d/mysql.list which will contain lines like these or similar: deb http://repo.mysql.com/apt/debian/ wheezy mysql-5.6 deb-src http://repo.mysql.com/apt/debian/ wheezy mysql-5.6 Install mysql 5.6: apt-get update apt-get install mysql-server-5.6


Choosing the fastest Mirror on Debian

On Debian there's a tool that finds out which is the fastest/nearest mirror and creates a sources.list file for you: netselect-apt The installation: apt-get update apt-get install netselect-apt To find the fastest/nearest mirror: netselect-apt Backup your old sources.list: mv /etc/apt/sources.list{,.bak} Replace it with the new one: cp sources.list /etc/apt/sources.list Update and install your packages: apt-get […]


Using automysqlbackup to create regular backups of your database

This works on Debian and Ubuntu, but also on other distributions. The package can be installed via apt: apt-get install automysqlbackup For yum (Fedora, CentOS, RedHat, etc.) there's usually also a package provided. Next you need to edit the configuration file /etc/default/automysqlbackup. There are other options, the most important ones are: USERNAME=root PASSWORD=…….. DBHOST=localhost DBNAMES=`mysql –defaults-file=/etc/mysql/debian.cnf […]


Using Debian behind a Proxy

If you are using Debian behind a proxy (e.g. Squid), you just have to declare the following environment variables to use it: export HTTP_PROXY=[IP]:[PORT] export HTTPS_PROXY=[IP]:[PORT] export FTP_PROXY=[IP]:[PORT] Change [IP] and [PORT] accordingly. In order to stay persistent, you could add the above commands to ~/.profile or /etc/bash.bashrc for example.


Putting packages on hold with apt on Debian

These 2 equal commands will make that package stay stuck in that version so you will have to take it off hold if you want to upgrade it: echo "package hold" | dpkg –set-selections apt-mark hold package 2 equal commands to take a package off Hold: echo "package install" | dpkg –set-selections apt-mark unhold package […]