Installing Web Server and MySQL Database Server
This command will install Apache, MySQL, PHP, Perl and other dependencies.
Test if PHP is working fine, create a file called phpinfo.php and put it in your /var/www/html.
The file shout contain this php code:
<?php phpinfo(); ?>
Open up your web browser and type this url http://localhost/phpinfo.php.
You should see something like this:
Generate Self Signed SSL Certificate
The ChilliSpot login page hotspotlogin.cgi requires https. Go to /etc/pki directory and generate a private key using openssl command as shown below:
This command will prompt you for a pass-phrase, you can type any password you want.
Generating RSA private key, 1024 bit long modulus .................++++++ .....++++++ e is 65537 (0x10001) Enter pass phrase for server.key: Verifying - Enter pass phrase for server.key:
Remove pass-phrase from the key, this will prevent the web server from asking pass-phrase each time you reboot the server.
Using the key we generated, we will then create a certificate signing request (CSR) file.
During the generation of CSR, you will be prompted for several pieces of information as shown below.
Enter pass phrase for server.key:Your pass-phrase here You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [XX]:PH State or Province Name (full name) []:Kalibo Locality Name (eg, city) [Default City]:Kalibo Organization Name (eg, company) [Default Company Ltd]:Private Hotspot Ltd. Organizational Unit Name (eg, section) []: Common Name (eg, your name or your server's hostname) []: Email Address []: Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: An optional company name []:
Generate a self-signed ceftificate by typing this command:
Enter your pass-phrase and you're done
Signature ok subject=/C=PH/ST=Kalibo/L=Kalibo/O=Private Hotspot Ltd. Getting Private key Enter pass phrase for server.key:
Lets intall the certificate, edit the file
and put your newly created certificate.
# Server Certificate: # Point SSLCertificateFile at a PEM encoded certificate. If # the certificate is encrypted, then you will be prompted for a # pass phrase. Note that a kill -HUP will prompt again. A new # certificate can be generated using the genkey(1) command. SSLCertificateFile /etc/pki/server.crt # Server Private Key: # If the key is not combined with the certificate, use this # directive to point at the key file. Keep in mind that if # you've both a RSA and a DSA private key you can configure # both in parallel (to also allow the use of DSA ciphers, etc.) SSLCertificateKeyFile /etc/pki/server.pem
Then start the web server and make sure it will automatically starts at boot.
chkconfig httpd on
Configuring MySQL database
Start the MySQL server
Configure password for MySQL root user
set password for root@localhost = PASSWORD ('your_password');
And allow it to run during boot.


