dochost ADMIN


เข้าร่วมเมื่อ: 22/10/2009 ตอบ: 23
|
ตอบ: 22/10/2009 11:59 am ชื่อกระทู้: Openssl tutorial |
|
|
If you want to sign certificate , eg: secure apache ,ssl ,secure ftp , mail etc. you need this tool.
see also http://www.openssl.org
Go to their website and download the latest source to /usr/local/src. eg:
| โค้ด: |
cd /usr/local/src
tar xzf openssl-0.9.7b.tar.gz
chown -R root.root openssl-0.9.7b.tar.gz
cd openssl-0.9.7b
./config no-threads -fPIC
make
make install
|
We can generate the key file
| โค้ด: |
cd /usr/local/ssl
# generate an 1024-bit RSA private key
bin/openssl genrsa -out private/private.key 1024
# make sure the permissions on the private dir are tight
chown -R root.root private
chmod -R 600 private
chmod u+X private
|
Generate a certificate signing request (make a CSR file)
| โค้ด: |
bin/openssl req -new -key private/webmail.yourdomain.com.key -out certs/webmail.yourdomain.com.csr
Country Name (2 letter code) [AU]:AU
State or Province Name (full name) [Some-State]:Your State
Locality Name (eg, city) []:Your City
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Your Company Pty Ltd
Organizational Unit Name (eg, section) []:Internet Services
Common Name (eg, your name or your server's hostname) []:webmail.yourdomain.com
Email Address []:postmaster@yourdomain.com
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:yoursecretpasswd
An optional company name []:
|
|
|