Need a Server to run ISPCONFIG on ! Look Here...

Discussion in 'Tips/Tricks/Mods' started by jockstrap, Jul 13, 2006.

  1. falko

    falko Super Moderator Howtoforge Staff

    Is mydomain.com's document root in /var/www/web3/web/?
    Please try with your LAN IP address (from within your LAN).
     
  2. pesja

    pesja Member

    No luck for me. I thought it over and I came with the idea to begin from scratch an note down every change I make to the image in this topic. Please correct me when the procedure is not correct!!

    I will use this parameters (fictive due to privacy reason):

    public ipadress: 293.273.221.52
    subnet: 255.255.255.248
    gateway: 293.273.221.49

    hostname: isp1
    domain: morehost.net -> I pointed this domain to the nameservers ns1.morehost.net and ns2.morehost.net)

    mail server: mx10.morehost.net (because my fallback mailserver I shall named mx20.morehost.net)

    dns server -> For the domains I host for webdesign I use the external dns-servers of the domainprovider.
    For the domains I host but customers want to make changes themselves the hostserver isp1 will function as master dnsserver.

    1. Changes of the image:
    ===================
    I changed the memory to 1024 Mb (size swapfile I will change in the future)
    I Removed / Floppy / USB Controller and Audio
    I Changed The Ethernet to Custom so I can use my public adress



    2. Starting the image
    ================
    This will take a while because it hangs when it wants to synchronize the clock. Also munin (Starting munin-node: takes some times because of the public routed ipadress (not set yet).
    After more then 7 minutes I can login to the console.



    3. Change the networksettings
    =======================
    I log in at the console i log in with root and ispconfig as password.
    Then I start network_setup and change the following parameters:
    language: en
    ipadress: 293.273.221.52
    netmask: 255.255.255.248
    gateway: 293.273.221.49

    After I enterd the IP adress of the gateway network is restarted, so now I can remote login with putty;
    login as: admin
    Password:ispconfig
    admin@server1:~$ su root
    Password:ispconfig


    the server now gives this prompt: server1:/home/admin#



    4. check / change network parameters
    =============================
    I use some of the items of "the perfect setup of debian 3.1"

    a. check the network:
    nano /etc/network/interfaces

    gives this settings

    ---
    auto eth0
    iface eth0 inet static
    address 293.273.221.52
    netmask 255.255.255.248
    network 293.273.221.48
    broadcast 293.273.221.55
    gateway 293.273.221.49
    ---


    This seems OK.

    Then I added 3 extra nameservers:

    nano /etc/resolv.conf

    search server
    nameserver 194.151.228.18
    nameserver 213.239.147.2
    nameserver 217.115.195.45
    nameserver 145.253.2.75
    nameserver 193.174.32.18
    nameserver 194.25.0.60


    As you can see I add the first nameserver which is the nameserver of kpn.net
    I also add two nameserver from my domainprovider.

    The only thing I can't figured out is the issue "search server". Maybe I must changed it into "search morehost.net"?

    After that I changed the ipadresses, hostname and domain into "hosts"

    nano /etc/hosts

    after the changes I got this:

    ---
    27.0.0.1 localhost.localdomain localhost
    293.273.221.52 isp1.morehost.net isp1

    # The following lines are desirable for IPv6 capable hosts
    ::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
    ---


    After above changes I changed the host and domainname:

    echo isp1.morehost.net > /etc/hostname
    /bin/hostname -F /etc/hostname

    after that I rebooted the isp1 hostserver it restarted a lot faster than before (nearly 1 minute).

    After I logged in with putty I changed the postfix settings:

    nano /etc/postfix/main.cf

    and changed the following lines:

    ---
    myhostname = mx10.morehost.net

    ---
    #mydestination = mx10.morehost.net, isp1.morehost.net, localhost.morehost.net, localhost


    The line above is marked out and I'm not sure that this must be. So I changed it in advance for experimental use

    Now I also have to change the mailname into mx10.morehost.net. I can do that like this:

    nano /etc/mailname and change the name into mx10.morehost.net

    The last step is to modify the local-host-names:

    nano /etc/postfix/local-host-names

    And do this:

    #### MAKE MANUAL ENTRIES BELOW THIS LINE! ####
    mx10.morehost.net




    5. Solving timesync problem
    ====================

    Solving the timesyn problem (too fast or too slow) on the debian 2.6 kernel. In my case the time was running to slow (about 30%) On a double AMD Opteron with Ms Windows 2003 as a host. So I search at the internet en found a solution. But first I had to install the VMWare Tools on the debian Image:

    apt-get install kernel-headers-2.6.8-2-386

    Above line will install the kernel headers in order to function the VMWare tools correct.

    Now on your server Console go to: VM, Install VMWare Tools, Nothing will happen but the Linux VMWare Tools ISO is now mounted on your virtual machine. Now mount the iso in your Debian box:

    mount -t iso9660 /dev/hda /cdrom and copy the *.tar file to /root

    cp VMwareTools-1.0.0-27828.tar.gz /root

    Then untar the *.tar file and start the installation

    cd /root
    tar zxf VMwareTools-1.0.0-27828.tar.gz
    cd vmware-tools-distrib/
    ./vmware-install.pl


    For every question use the default answer. If you are, like me, using putty answer Yes when the installationprogram detects it and give some message about lost connection with remote control.

    After a few minutes the VMWare tools are installed and we can modify param.h of the kernel:

    nano /usr/src/kernel-headers-2.6.8-2-386/include/asm-i386/param.h

    And change this line: #define HZ 1000

    into

    #define HZ 100

    The next step I had to make is to add parameters to the menu.lst of the Grub bootloader:

    nano /boot/grub/menu.lst

    and search for the line: kernel /vmlinuz-2.6.8-2-386 root=/dev/sda3 ro

    into

    kernel /vmlinuz-2.6.8-2-386 root=/dev/sda3 ro clock=pit nosmp noapic nolapic

    In order to make everything works you have to remove the ntpdate due to synchronizing conflicts

    apt-get remove ntpdate


    Then at last we have to do some editing into the Other Other Linux 2.6.x kernel.vmx configuration file. Look in it for this line: tools.syncTime = "FALSE" and change in into tools.syncTime = "TRUE"


    That should do the trick
    ==========



    So this were all the changes I made into the VMWare Image of ISPConfig. If I had to make more changes, I'm glad to read them in futher posts about this topic.

    Into my next post I will go on with the settings into the ISPConfig administrator, so everybody had an good idea what I did wrong and affect the working of webalizer and munin.
     
    Last edited: Jul 29, 2006
  3. pesja

    pesja Member

    So It's time to note down the settings within ISPConfig Administrator:

    After I logged in (username admin / password: ispconfig) the first setting I changed is:

    Management -> Server -> Settings

    Server
    =====
    Servername : isp 1
    Hostname : isp1
    Domain: morehost.net
    IP Adress: 293.273.221.52
    Netmask: 255.255.255.248
    Admin Email: [email protected]


    EMail
    ====
    antivirus-Admin: [email protected]

    DNS
    ===
    Default Ns1: ns1.morehost.net
    Default Ns2: ns2.morehost.net


    So, now I make a Reseller with the name Morehost Webservices
    The only thing I changed is the allowance of MySQL databases (Tab Limits)

    After that I make a new Client with the name morehost.net (the same name as the domain)
    At last I make a new site with the name morehost.net

    I don't change the hostname (www)
    I marked the Create DNS and Create DNS-MX
    I marked also CGI Scripts, Standard CGIs, PHP Scripts, SSI, FTP Access and MySQL.
    At the User & Mail tab I make a new user, named admin:
    - Email Adress: admin
    - Username: admin
    also marked Administrator

    Advanced tab:
    Email Alias: abuse postmaster hostmaster
    Also marked MailScan and Spamfilter / Antivirus at the Spamfilter etc. tab.

    Then I select DNS Manager en go to the site morehost.net
    Then I select the records tab and added this A records:
    - ns1 (293.273.221.52)
    - ns2 (293.273.221.53)
    - localhost (127.0.0.1)
    - isp1 (293.273.221.52)


    I checked the mx server isp1.morehost.net

    Looks good to me. I know ensim and plesk and this DNS settings worked with them.

    So I type morehost.net into http://www.dnsreport.com to check this domain:

    Fails: Open DNS Server => I can fix this within bind : no problem
    Fails: Reverse DNS entries for MX records => I have to look at this to fix this
    Warn: Nameservers on separate class C's => I can't fix this, but is no problem
    Warn: SPF record => I have to look at this to fix this.

    But the rest seems okay and the mailserver gives all "pass"

    ==========

    Later on I will test the settings of this domain, like email / monit / munin etc. I also want to test webalizer to work withing this image, but I have to wait at least 24 hours.
     
    Last edited: Jul 28, 2006
  4. pesja

    pesja Member

    Well it's testing time of my modified VMWare Image but first I had to change some settings of minor problems:

    1. Closing the "open" status of the master DNS-server (ns1.morehost.net)
    =======================================================

    nano /var/lib/named/etc/bind/named.conf

    and add the line

    allow-recursion {
    localhost;
    };


    into the "option" section
    also add the same line at the masterfile of ispconfig (also into the "option" section):

    nano /root/ispconfig/isp/conf/named.conf.master
     
    Last edited: Aug 2, 2006

Share This Page