debian

Debian (/ˈdɛbiən/) is a Linux distribution that is composed primarily of free and open-source software, most of which is under the GNU General Public License, and packaged by a group of individuals known as the Debian project. read more at WikiPedia

  • backup_debian_ubuntu_server

    I am using ReoBack for this duty

    REOBack (pronounced "ray-o-back") is a backup solution designed for Linux users and system administrators. It is designed to be simple to set up, and easy to use. It is great as a quick solution for those who procrastinate about backups. It supports automatic full/incremental backups of files you define, remote backups via NFS or FTP, as well as auto deletion of old backups.

    And here is my how to install for Debian /Ubuntu distribution taken from my notes

    Download Reoback 1.0.3, convert it into a Debian package with alien and install it

    wget http://puzzle.dl.sourceforge.net/sourceforge/reoback/reoback-1.0-3.noarch.rpm
    apt-get install alien
    alien reoback-1.0-3.noarch.rpm
    dpkg -i reoback_1.0-4_all.deb

    Configure ReoBack by editing the file settings.conf

    vi /etc/reoback/settings.conf
    Here is a sample configuration file to save your backup to a remote FTP server (but it could be also a NFS share)
    host            = myhostname.com
    backupdays      = 7
    files           = /etc/reoback/files.conf
    tmpdir          = /var/lib/reoback/tmp/
    datadir          = /var/lib/reoback/data/
    localbackup     = /var/lib/reoback/backups/
    keeplocalcopy   = 1
    remotebackup    = 1
    rbackuptype     = FTP
    localmount      = /mnt/server/
    remotehost      = xxxxxxxxx
    remotepath      = /reobackup/
    ftpuser         = xxxxxxxxx
    ftppasswd       = xxxxxxxxx

    Specify which files on your server  need to be saved by editing the file files.conf

    vi /etc/reoback/files.conf

    Here is a sample, I exclude some files that are changing all the time since they are maintained by the Linux kernel or some processes

    File: homes
    /home/
    
    File: var
    /var
    Skip: /var/run/*
    Skip: /var/lib/mysql/*
    Skip: /var/lib/reoback/*
    
    File: mysql
    /var/lib/mysql
    /tmp/mysql.sock
    Skip: /var/lib/mysql/mysql.sock
    Skip: /var/lib/mysql/mysqld.pid
    
    File: plesk
    /opt/psa
    /etc/psa
    /usr/local/psa

    Adapt the location path of these 2 files (files.conf / settings.conf) in  run_reoback.sh

    vi /etc/reoback/run_reoback.sh

    content of file

    # Location of the configuration file.
    config="/etc/reoback/settings.conf"
    
    # Change to reflect where REOBack is installed
    reoback="/usr/bin/reoback.pl"
    
    # Do not modify this line.
    $reoback $config

    Finally you can now test your backup

    /etc/reoback/run_reoback.sh

    or place this command in crontab

    * 19 * * * /etc/reoback/run_reoback.sh > backup.txt ;
    mail -s "automatisches Backup" This email address is being protected from spambots. You need JavaScript enabled to view it. < backup.txt

    Tips

    Depending where you visitor come from (America or Asia or Europe) it may be recommended to not start your backup during peak of visits, You can also nice the process to a lower priority

    * 19 * * * nice –19 /etc/reoback/run_reoback.sh > backup.txt ; 
    mail -s "automatisches Backup" This email address is being protected from spambots. You need JavaScript enabled to view it. < backup.txt
  • openlogo-nd-50 debian

    Debian will powered for sure my next Internet root server, and I am currently giving it a try for my Monster NAS (instead of OpenSuse, Opensuse being still in use on a HP NW9440)

    The Debian Project is pleased to announce the official release of Debian GNU/Linux version 5.0 (codenamed Lenny) after 22 months of constant development. With 12 supported computer architectures, more than 23,000 packages built from over 12,000 source packages and 63 languages for the new graphical installer, this release sets new records, once again. Software available in 5.0 includes Linux 2.6.26, KDE 3.5.10, Gnome 2.22.2, X.Org 7.3, OpenOffice.org 2.4.1, GIMP 2.4.7, Iceweasel 3.0.6, Apache 2.2.9, Xen 3.2.1 and GCC 4.3.2.&160; More...

    Official torrents for the stable release
  • offVertColor-phil2.eps  Short description of how to accomplish some specific task in Debian Lenny.

    • How to install Sun java 1.6 on Debian Lenny
    • How to install Tomcat 6.x on Debian Lenny
    • How to install MySQL on Debian Lenny

     

     

     

     

     

     

    How to install Sun java 1.6 on Debian Lenny

    And not the OpenJDK, as sometimes some applications do not work without the SUN JDK

    Edit APT sources list

    # vi /etc/apt/sources.list

    The original Sun Java 2 is available in the ‘non-free’ section of the Debian repositories. To enable this section first add the non-free repository to the apt sources file - the /etc/apt/sources.list should look like, - important parts are in bold:

    deb http://ftp.ch.debian.org/debian/ lenny main non-free
    deb-src http://ftp.ch.debian.org/debian/  lenny main non-free
    deb http://security.debian.org  lenny/updates main

    Update the list of sources

    apt-get update

    Install java

    #  apt-get install sun-java6-bin

    Just follow and select all the time

    How to install Tomcat 6 on Debian Lenny

    Create new file

    # vi /etc/apt/sources.list.d/squeeze.list

    and put inside

    # Repository for Squeeze, to get Tomcat6
    deb http://ftp.ch.debian.org/debian/ squeeze main contrib non-free
    deb-src http://ftp.ch.debian.org/debian/ squeeze main contrib non-free

    Create new file

    # vi /etc/apt/preferences

    And put inside

    Package: *
    Pin: release o=Debian,a=stable
    Pin-Priority: 990
    Package: *
    Pin: release o=Debian,a=testing
    Pin-Priority: 500
    Package: tomcat6,tomcat6-admin,tomcat6-common,libtomcat6-java,libservlet2.5-java
    Pin: release o=Debian,a=testing
    Pin-Priority: 990

    Update sources

    # apt-get update

    Upgrade

    # apt-get upgrade

    To locate the correct package name, search for it

    # apt-cache search tomcat

    Found

    tomcat6

    Install

    # apt-get install -t testing tomcat6

    You may want also to install the tomcat manager

    # apt-get install -t testing tomcat6-admin

    Create new users/roles for tomcat manager

    # vi /etc/tomcat6/tomcat-users.xml

    NOTA: Webapp are located in

    /var/lib/tomcat6/webapp

    How to install MYSQL on Debian Lenny

    Luckily MYSQL 5.0 is available in the default source list of APT.

    # apt-cache search mysql
    # apt-get install mysql-server-5.0

    Open a mysql prompt

    Grant access to root from any host, this is insecure for production machine but in case of continuous build machine, development this is sometimes very useful.

    Let root connect not only from localhost by running

    # mysql –u root –p
    mysql> use mysql;
    mysql> update user set host = '%' where user = 'root' and host='127.0.0.1'
    mysql> flush privileges;

    Bad written code (DAO) will sometimes forces you to start MYSQL using insensitive casing table. In windows it will always work as the operating system do not make any difference between lower and upper case. In Linux, either you change your DAO’s or if you can’t, use this kind of trick:

    Case insensitive table in MYSQL

    # vi /etc/mysql/conf.d/lower_case_table_names.cnf

    Put inside file

    [mysqld]
    lower_case_table_names = 1

    Restart mysql

    # /etc/init.d/mysql restart

  • debian_logo subversion_logo

    Subversion (SVN) is an open source version control system. It allows users to keep track of changes made over time to any type of electronic data. Typical uses are versioning source code, web pages or design documents.

    Installing the latest Subversion (svn) version 1.6.6 is a bit more difficult than just running apt-get install subversion, as the latest stable version in Debian Lenny is considered to be SVN 1.5.1 not Subversion 1.6.6

    Edit the file /etc/apt/sources.list and Add the line below to

    # deb http://www.backports.org/debian lenny-backports main contrib non-free

    Add the public key from lenny-backports by running the following command

    # wget -O - http://backports.org/debian/archive.key | apt-key add -

    Now update the latest package definitions

    # apt-get update

    # apt-get -t lenny-backports install subversion

    Check that you now have the correct version by running

    # svn --version
    svn, version 1.6.6 (r40053)
       compiled Nov 23 2009, 16:16:41

    Copyright (C) 2000-2009 CollabNet.
    Subversion is open source software, see
    http://subversion.tigris.org/
    This product includes software developed by CollabNet (http://www.Collab.Net/).

    The following repository access (RA) modules are available:

    * ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
      - handles 'http' scheme
      - handles 'https' scheme
    * ra_svn : Module for accessing a repository using the svn network protocol.
      - with Cyrus SASL authentication
      - handles 'svn' scheme
    * ra_local : Module for accessing a repository on local disk.
      - handles 'file' scheme
    * ra_serf : Module for accessing a repository via WebDAV protocol using serf.
      - handles 'http' scheme
      - handles 'https' scheme

    I recommend you to always use the latest version (but hey backup/dump your repository before), you’ll see later that with Apache  Maven, it is also resolving some issues.