Installing PowerDNS with MySql backend
The PowerDNS Nameserver is a modern, advanced and high performance authoritative-only nameserver. It is written from scratch and conforms to all relevant DNS standards documents. Furthermore, PowerDNS interfaces with almost any database.
This tutorial has been tested and is working on Debian etch and lenny
1. Install the PowerDNS server and MySql backend using apt
apt-get install pdns-server pdns-backend-mysql
How to install LAMP (Apache, PHP and MySql in Linux)

Here's a basic guide on how to get Apache2, PHP5 and MySql working on most Debian based distros in a few easy steps.
1. Install Apache2 and PHP5 (as an Apache module)
apt-get install apache2 php5 libapache2-mod-php5 php5-mysql
Install and configure MailWatch monitoring tool for MailScanner
MailWatch for MailScanner is a web-based front-end to MailScanner written in PHP, MySQL and JpGraph. It comes with a CustomConfig module for MailScanner which causes MailScanner to log all message data (excluding body text) to a MySQL database which is then queried by MailWatch for reporting and statistics.
1. Install Apache2, MySql server and PHP5 with required modules. You may already have some or all of these packages installed.
apt-get install apache2 php5-cli php5 mysql-server libdbd-mysql-perl php5-gd php5-mysql libapache2-mod-php5
Tuning MySql with MySqlTuner to increase efficiency and performance
mysqltuner is a high-performance MySQL tuning script written in perl that will provide you with a snapshot of a MySQL server's health. Based on the statistics gathered, specific recommendations will be provided that will increase a MySQL server's efficiency and performance.
1. Install MySqlTuner
apt-get install mysqltuner
Installing EHCP (Easy Hosting Control Panel)
EHCP is a powerful, yet easy to install control panel that allows the user to manage services such as Web, FTP, Database and DNS servers.
The install script handles the installation and configuration of the required services. I recommend starting with a clean Debian system to avoid conflicts.
1. Download required EHCP files
wget http://www.ehcp.net/download
Installing Courier POP3 and IMAP daemon with MySql backend
The Courier mail transfer agent (MTA) is an integrated mail/groupware server based on open commodity protocols, such as ESMTP, IMAP, POP3, LDAP, SSL, and HTTP. Courier provides ESMTP, IMAP, POP3, webmail, and mailing list services within a single, consistent, framework. In this tutorial we'll only use the Courier POP3 and IMAP services.
It's assumed that you have already installed and configured Postfix according to this tutorial: Installing Postfix with MySql backend and SASL for SMTP authentication
1. Install required packages
apt-get install courier-authdaemon courier-authlib-mysql courier-pop courier-pop-ssl courier-imap courier-imap-ssl
Installing Postfix with MySql backend and SASL for SMTP authentication
Postfix is a free and open source mail transfer agent (MTA). It is intended as a fast, easy-to-administer, and secure alternative to the widely-used Sendmail MTA.
Install and configure Postfix
1. Install Postfix and SASL
apt-get install postfix postfix-mysql libsasl2-modules-sql sasl2-bin libsasl2-2 postfix-tls libpam-mysql
> Internet Site
> host.domain.com
MySql database replication (master/slave)
In this tutorial we'll create a simple one-way master/slave database replication. You must have at least one master and one slave but you can use multiple slaves.
Master
1. Configure master to listen on all ip addresses (pico /etc/mysql/my.cnf)
#bind-address = 127.0.0.1
Moving databases from one MySql server to another
1. On the source database server run the following command to export all databases:
mysqldump -h localhost -u {username} -p --all-databases > database_dump.sql
Replace {username} with your MySql username.
Installing vsftpd with MySql backend
vsftpd is a secure, fast and stable FTP server. In this tutorial we'll install the server and make create a user database in MySql for virtual users.
1. Install required packages (make sure you have installed MySql)
apt-get install vsftpd libpam-mysql