1, install OpenSSL
Tar zxvf openssl-1.0.0a.tar.gz
CD openssl-1.0.0a
./config--prefix=/usr/local/openssl
Make && make install
2, install Apache
Tar zxvf httpd-2.2.16.tar.gz
CD httpd-2.2.16
./configure--prefix=/usr/local/apache--enable-ssl--enable-rewrite--enable-so--with-ssl=/usr/local/openssl
Make && make install
If you are yum install, apt-get,pacman such software management tools to install, the above two steps can be omitted.
3, create the master certificate
Create a directory SSL under/usr/local/apache/conf/
3.1,mkdir SSL
3.2,cp/openssl installation directory/ssl/misc/ca.sh/usr/local/apache/conf/ssl/
3.3 Using ca.sh to create a certificate
View Copy Print
1. [Root@blackghost ssl]#./CA.SH-NEWCA//Establish Master Certificate
2. CA certificate filename (or enter to create)
3.
4. Making CA Certificate ...
5. Generating a 1024 bit RSA private key
6. ... ++++++...
7. ++++++
8. Writing new private key to './democa/private/./cakey.pem '
9. Enter PEM Pass phrase:
Verifying-enter PEM Pass Phrase:
Verify failure.
Enter PEM Pass Phrase:
Verifying-enter PEM Pass Phrase:
-----
are about to is asked to enter information that would be incorporated
into your certificate request.
What you are about to enter the 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 would be a default value,
If you enter '. ', the field would be left blank.
-----
Country Name (2 letter code) [AU]:CN
"State" or province name (full name) [SOME-STATE]:CN
Locality Name (eg, city) []:CN
Organization Name (eg, company) [Internet widgits Pty LTD]:CN
Organizational unit Name (eg, section) []:CN
Common name (eg, YOUR name) []:localhost
Email Address []:xtaying@gmail.com
29.
Please enter the following ' extra ' attributes
To is sent with your certificate request
Challenge A Password []:* *****************
Optional company name []:
Using Configuration From/etc/ssl/openssl.cnf
Enter pass phrase a for ./democa/Private/./CAKEY.PEM://Fill in the PEM password above
Check that the request matches the signature
Panax Signature OK
Certificate Details:
Serial Number:
89:11:9f:a6:ca:03:63:ab
Validity
Not Before:aug 7 12:35:28 GMT
Not After:aug 6 12:35:28 2013 GMT
Subject:
CountryName = cn
Stateorprovincename = cn
OrganizationName = cn
Organizationalunitname = cn
CommonName = localhost
EmailAddress = xtaying@gmail.com
51.