How to test a LAMP server

Discussion in 'Server Operation' started by satimis, Nov 13, 2006.

  1. satimis

    satimis Member

    Hi folks,

    Ubuntu-6.06.1-LAMP-server-amd64


    I have the said server installed and configured. The server is now running.

    $ ps -ef | egrep '/mysql|postfix|portmap|apache2'
    Code:
    daemon    3513     1  0 09:56 ?        00:00:00 /sbin/portmap -i
    127.0.0.1
    root      4022     1  0 09:56 ?        00:00:00 /bin/sh
    /usr/bin/mysqld_safe
    mysql     4086  4022  0 09:56 ?        00:00:00 /usr/sbin/mysqld
    --basedir=/usr --datadir=/var/lib/mysql --user=mysql
    --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --port=3306
    --socket=/var/run/mysqld/mysqld.sock
    root      4254     1  0 09:56 ?        00:00:00 /usr/sbin/saslauthd -m
    /var/spool/postfix/var/run/saslauthd -a pam
    root      4255  4254  0 09:56 ?        00:00:00 /usr/sbin/saslauthd -m
    /var/spool/postfix/var/run/saslauthd -a pam
    root      4256  4254  0 09:56 ?        00:00:00 /usr/sbin/saslauthd -m
    /var/spool/postfix/var/run/saslauthd -a pam
    root      4257  4254  0 09:56 ?        00:00:00 /usr/sbin/saslauthd -m
    /var/spool/postfix/var/run/saslauthd -a pam
    root      4258  4254  0 09:56 ?        00:00:00 /usr/sbin/saslauthd -m
    /var/spool/postfix/var/run/saslauthd -a pam
    root      4430     1  0 09:56 ?        00:00:00 /usr/sbin/apache2 -k
    start -DSSL
    www-data  4468  4430  0 09:56 ?        00:00:00 /usr/sbin/apache2 -k
    start -DSSL
    www-data  4469  4430  0 09:56 ?        00:00:00 /usr/sbin/apache2 -k
    start -DSSL
    www-data  4470  4430  0 09:56 ?        00:00:00 /usr/sbin/apache2 -k
    start -DSSL
    www-data  4471  4430  0 09:56 ?        00:00:00 /usr/sbin/apache2 -k
    start -DSSL
    www-data  4472  4430  0 09:56 ?        00:00:00 /usr/sbin/apache2 -k
    start -DSSL
    satimis   4906  4836  0 10:35 pts/2    00:00:00 grep -E
    /mysql|postfix|portmap|apache2
    
    $ sudo iptables --list
    Code:
    Password:
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination
    
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination
    TCPMSS     tcp  --  anywhere             anywhere            tcp
    flags:SYN,RST/SYN tcpmss match 1400:1536 TCPMSS clamp to PMTU
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination
    


    Please advise how to test this server? Where can I find appropriate
    documents on testing a LAMP server?

    1)
    Self test


    2)
    Testing with a workstation

    I don't have router so I'll install an additional network card on the
    server and connect it with a Cat5 cable to the workstation (one network
    card on workstation). OR is there any other suggestions? TIA


    3)
    Testing on Internet.

    I don't have Domain nor Static IP. I'll register a free Domain later
    for this test and use Dynamic IP.


    Now my problem is I have only on broadband. Connecting the workstation to Internet via a modem? I have modem available.

    Advice will be appreciated. Tks.


    B.R.
    satimis
     
  2. falko

    falko Super Moderator Howtoforge Staff

    What exactly do you want to test? Web sites, email, FTP,...?
     
  3. satimis

    satimis Member

    Hi falko,

    stage-1: self test
    to test whether the web server, email server, mysql, FTP, etc. have been properly installed and configured


    stage-2: LAN test
    a Linux workstation will be connected to the server via an additinal NIC card to check whether the servers can be visited, operated remotely by a workstation, etc.


    stage-3: Field test connected to Internet
    to check whether the severs work properly. Domain will be registered running dynamic IP. I'l make use of a workstation connected to Internet via a modem (because I have only one broadband connection here. I fail to see broadband shraring will work on this test), To test the servers via Internet, etc..


    On testing the Ubuntu-6.06.1-LAMP-server this few days I encountered many problems. I'm considering wiping out the entire HD and restart from the beginning. But on the second round I'm considering to run CentOS Linux, installing Apache, postfix, iptables, mysql, etc. one by one. After making sure the package installed configured properly and tested properly before installing the second one. Dislike now installing all of them first without fully configured and tested.

    B.R.
    satimis
     
  4. falko

    falko Super Moderator Howtoforge Staff

    Can we cut this into slices, like you ask a specific question, and I try to answer? Because I don't feel like writing a novel now... ;)
     
  5. satimis

    satimis Member

    Hi falko,

    Ok, here coming;

    I have following packages/sever installed on the PC, excluding OS:-

    1) firewall - iptables
    2) OpenSSH Server
    3) FTP Server
    4) Network File System (NFS)
    5) Dynamic Host Configuration Protocol (DHCP)
    6) Domain Name Service (DNS)
    7) Bind9
    8) CUPS - Print Server
    9) HTTPD - Apache Web Server
    10) Squid - Proxy Server
    11) Version Control System - Subversion
    12) Databases - MySQL
    13) Email Services/Server - Postfix
    SMTP Authentication
    14) PHP


    Stage-1: Self-test
    Code:
    Steps to be performed making self-test on each of them
    checking whether they are properly installed and configured.

    Stage-2: LAN test
    Code:
    A Linux workstation will be connected to the server via an
    additinal NIC card. 
    
    Steps to be performed testing each of them remotely

    Stage-3: Field test connected to Internet
    Code:
    Domain will be registered running dynamic IP.
    
    Steps to be performed checking whether the severs work properly.

    Hack-test on firewall will be performed separately with hacking software from hackerdom.


    On testing the Ubuntu-6.06.1-LAMP-server this few days I encountered many problems. I'm considering wiping out the entire HD and restart from the beginning. But on the second round I'm considering to run CentOS Linux, installing Apache, postfix, iptables, mysql, etc. one by one. After making sure the package installed configured properly and tested properly before installing the second one. Dislike now installing all of them first without fully configured and tested.

    B.R.
    satimis
     
  6. falko

    falko Super Moderator Howtoforge Staff

    You're still asking a lot in one post, and I still have to answer so many other posts... :( :(

    I suggest you try to connect ot each of your services, and when you encounter problems or find errors in the logs, we try to solve that specific problem. :)
     

Share This Page