5 steps to create a self-signed SSL Certificate

October 30th, 2008

Step 1: Generate a Private Key

Command:

openssl genrsa -des3 -out server.key 1024

Step 2: Generate a CSR

Command:

openssl req -new -key server.key -out server.csr

Step 3: Generating a Self-Signed Certificate

Command:

openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt

Step 4: Installing the Private Key and Certificate

Command:

cp server.crt /usr/local/apache/conf/ssl.crt
cp server.key /usr/local/apache/conf/ssl.key

Step 5: Configuring SSL Enabled Virtual Hosts

Command: (Change this in the configuration file of apache)

SSLEngine on
SSLCertificateFile /usr/local/apache/conf/ssl.crt/server.crt
SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server.key

Install Apache, MySQL, PHP and Perl in one shot using xampp.

July 22nd, 2008

In the past this software was called LAMPP but to avoid misconceptions we renamed it to »XAMPP for Linux«. So if you are seeking for LAMPP you’re on the right track. ;)

URL: http://www.apachefriends.org/en/xampp-linux.html

What is the difference between inner join and outer join?

June 12th, 2008

Inner join displays rows from table where the data is available in both the tables, where in outer join we can configure it to bring out rows from one table where the data is missing in other table for the corresponding rows.

Inner join

Say you have one table of CUSTOMERS and one table of ORDERS. Each row in the ORDERS table has a reference (foreign key reference) to a customer id which represents what customer placed that order. If you want to run a query that lists the orders along with the names of the customers who ordered them (since a customer id number itself it pretty useless), you will want to execute a join query:

SELECT CUSTOMERS.NAME, ORDERS.NAME
FROM CUSTOMERS
INNER JOIN ORDERS
ON CUSTOMERS.ID = ORDERS.CUSTOMER_ID

Outer join

If for some reason, you wanted the query results to return all customer name regardless of whether they placed an order, you can use one of two types of OUTER JOINS, in this case, a LEFT JOIN:

SELECT CUSTOMERS.NAME, ORDERS.NAME
FROM CUSTOMERS
LEFT JOIN ORDERS
ON CUSTOMERS.ID = ORDERS.CUSTOMER_ID