Tag Archives: Debian

Install and configure Unattended-Upgrade

apt install unattended-upgrades -y
systemctl enable unattended-upgrades
systemctl start unattended-upgrades
vi /etc/apt/apt.conf.d/50unattended-upgrades

# find Unattended-Upgrade::Package-Blacklist and add
    "icecast2";

# uncomment and set
Unattended-Upgrade::Remove-Unused-Kernel-Packages "true";
Unattended-Upgrade::Remove-New-Unused-Dependencies "true";
Unattended-Upgrade::Remove-Unused-Dependencies "true";
Unattended-Upgrade::Automatic-Reboot "false";
vi /etc/apt/apt.conf.d/20auto-upgrades

#Set the following variables or add 3rd line
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";
APT::Periodic::AutocleanInterval "7";
# restart service and dry run
systemctl restart unattended-upgrades
unattended-upgrades --dry-run --debug

How to do Painless MySQL Server Backups with AutoMySQLBackup

AutoMySQLBackup is a clever script that takes the pain out of setting up automated incremental daily, weekly, and monthly backups of MySQL databases.

wget http://heanet.dl.sourceforge.net/project/automysqlbackup/AutoMySQLBackup/AutoMySQLBackup%20VER%203.0/automysqlbackup-v3.0_rc6.tar.gz
tar zxvf automysqlbackup-v3.0_rc6.tar.gz
./install.sh

 

Quelle: How to do Painless MySQL Server Backups with AutoMySQLBackup | Linux.com

Setup a Debian Syslog Server with LogAnalyzer (Adiscon)

DRAFT !

 

The purpose of this “how to” is the setup of a Syslog Server with LogAnalyzer (http://loganalyzer.adiscon.com/) running on Debian 6.

  1. Setup rsyslog DebianRsyslog is the standard Syslog Daemon since Debian Lenny.
  1. Configure Rsyslog as Syslog ServerIn /etc/rsyslog.conf  uncomment the following lines for activating the Syslog Servers.
    # provides UDP syslog reception
    $ModLoad imudp
    $UDPServerRun 514
    
    # provides TCP syslog reception
    $ModLoad imtcp
    $InputTCPServerRun 514
  2. Create a Logfile for each Syslog ClientIf you like to have for each client a dedictated logfile add the following lines to your /etc/rsyslog.conf :
    # Logfile for each host
    $template DynaFile,"/var/log/syslog-%HOSTNAME%.log"
    *.* -?DynaFile
  3. Rotate the new LogfilesThe dedicated Logfiles need be included in the logrotate process. Create a new file :
    /etc/logrotate.d/rsyslog-newlogsand add the following lines :
     

    /var/log/syslog-*.log
    {
            rotate 7
            daily
            missingok
            notifempty
            delaycompress
            compress
            postrotate
                    invoke-rc.d rsyslog reload > /dev/null
            endscript
    }

Resizing qcow2 images

To resize a qcow2 image, download the latest release of qemu (> qemu 0.13.0) compile it, and resize the image. If you run a Windows OS inside the .qcow2, you need to adjust the additional storage in the Disk Management.
If you like to expand a Boot partition, download the GParted Live CD .iso and boot your vm-103-disk-1.qcow2 with the GParted Live CD.
Expand the Partition and you’re done.

vmonster:/home/images/103# qemu-img resize vm-103-disk-1.qcow2 +5G