Contact Sales Sitemap Customer Login

HOWTO: Install ISP LAMP on Ubuntu 6.10 Standard



This page is under construction.

This HOWTO REQUIRES a LINK-4 or higher VPS.

This HOWTO guides your through the creation of a ISP caliber virtual hosting environment with a MySQL database backend called from the PowerDNS nameserver and Postfix/Courier email server.

Preparing the server

Start from a clean installation of Ubuntu 6.10 Standard.

Locales should be set so that you aren't confused by strange pearl errors while installing packages; so run:

$ locale-gen en_US
$ locale-gen en_US.UTF-8

Edit your apt-sources list.

$ vi /etc/apt/sources.list
deb edgy main restricted
deb-src edgy main restricted
deb edgy-updates main restricted
deb-src edgy-updates main restricted
deb edgy multiverse universe main restricted
deb-src edgy multiverse universe main restricted
deb edgy-security main restricted
deb-src edgy-security main restricted
deb edgy-security universe
deb-src edgy-security universe

Update your installation

$ apt-get update
$ apt-get upgrade

Install some handy tools

$ apt-get install curl build-essential

Setup /etc/hosts for your domain and nameservers.

$ vi etc/hosts  localhost localhost.localdomain   papyromancer

# The following lines are desirable for IPv6 capable hosts
# (added automatically by netbase upgrade)

::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

Install MySQL, Apache, and PHP

apt-get install mysql-server mysql-admin apache2 php5 libapache2-mod-php5 libapache2-mod-auth-mysql php5-mysql phpmyadmin

Set a password for the MySQL root User

mysqladmin -u root password [yourrootsqlpassword]

Setting up PowerDNS

Install PowerDNS

$ apt-get install pdns pdns-backend-mysql pdns-doc

Setup pdns.conf

$ vi /etc/powerdns/pdns.conf

Add the following lines to the end of pdns.conf


Setting up a MySQL Database for PowerDNS

$ vi /tmp/pdns.sql

Insert the following text into pdns.sql

create table domains (
 id		 INT auto_increment,
 name		 VARCHAR(255) NOT NULL,
 last_check	 INT DEFAULT NULL,
 type		 VARCHAR(6) NOT NULL,
 notified_serial INT DEFAULT NULL, 
 account         VARCHAR(40) DEFAULT NULL,
 primary key (id)

CREATE UNIQUE INDEX name_index ON domains(name);

CREATE TABLE records (
  id              INT auto_increment,
  domain_id       INT DEFAULT NULL,
  name            VARCHAR(255) DEFAULT NULL,
  type            VARCHAR(6) DEFAULT NULL,
  content         VARCHAR(255) DEFAULT NULL,
  ttl             INT DEFAULT NULL,
  prio            INT DEFAULT NULL,
  change_date     INT DEFAULT NULL,
  primary key(id)

CREATE INDEX rec_name_index ON records(name);
CREATE INDEX nametype_index ON records(name,type);
CREATE INDEX domain_id ON records(domain_id);

create table supermasters (
  nameserver VARCHAR(255) NOT NULL, 

GRANT SELECT ON supermasters TO pdns;
GRANT ALL ON domains TO pdns;
GRANT ALL ON records TO pdns;

Create the pdns MySQL database

$ mysqladmin -u root -p create pdns

Enter your root MySQL password

Load the PDNS database schema

$ mysql -u root -p pdns < /tmp/pdns.sql

Now go to the vpslink control panel and shutdown, then start your server

Log back into your server.

Run pdns in monitor mode.

$ /etc/init.d/pdns stop
$ /etc/init.d/pdns monitor

Start up another ssh session into your server and see if the nameserver is available

$ host
Should return:
Using domain server:

Host not found: 2(SERVFAIL)

Now load a record for your domain into the database

# mysql pdns
mysql> INSERT INTO domains (name, type) values ('', 'NATIVE');
INSERT INTO records (domain_id, name, content, type,ttl,prio) 
VALUES (1,'','localhost 1','SOA',86400,NULL);
INSERT INTO records (domain_id, name, content, type,ttl,prio)
VALUES (1,'','','NS',86400,NULL);
INSERT INTO records (domain_id, name, content, type,ttl,prio)
VALUES (1,'','','NS',86400,NULL);
INSERT INTO records (domain_id, name, content, type,ttl,prio)
VALUES (1,'','','A',120,NULL);
INSERT INTO records (domain_id, name, content, type,ttl,prio)
VALUES (1,'','','A',120,NULL);
INSERT INTO records (domain_id, name, content, type,ttl,prio)
VALUES (1,'','','A',120,NULL);
INSERT INTO records (domain_id, name, content, type,ttl,prio)
VALUES (1,'','','MX',120,25);

Installing Postfix and Courier POP

$ apt-get install postfix postfix-mysql postfix-doc courier-authdaemon courier-authlib-mysql courier-pop courier-pop-ssl courier-imap courier-imap-ssl postfix-tls libsasl2 libsasl2-modules libsasl2-modules-sql openssl


  1. HowtoForge: The Perfect Setup - Ubuntu 6.10 Server (Edgy Eft)
  2. Ubuntu Documentation: Postfix Complete Virtual Mail System Howto
  3. The PowerDNS Manual
  4. Drupal Installation Guide
Retrieved from ""
Recent Changes | RSS RSS Feed