[root@localhost CA]# (umask 077; openssl genrsa -out private/cakey.pem 2048)
Generating RSA private key, 2048 bit long modulus
.....+++
...........+++
e is 65537 (0x10001)
2)生成自签证书
[root@localhost CA]# openssl req -new -x509 -key private/cakey.pem -out cacert.pem
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]:CN
State or Province Name (full name) []:Beijing
Locality Name (eg, city) [Default City]:Beijing
Organization Name (eg, company) [Default Company Ltd]:liyang
Organizational Unit Name (eg, section) []:0ps
Common Name (eg, your name or your server's hostname) []:www2.magedu.com
Email Address []:admin@magedu.com
2)生成证书签署请求:
ssl]# openssl req -new -key httpd.key -out httpd.csr
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]:CN
State or Province Name (full name) []:Beijing
Locality Name (eg, city) [Default City]:Beijing
Organization Name (eg, company) [Default Company Ltd]:liyang
Organizational Unit Name (eg, section) []:0ps
Common Name (eg, your name or your server's hostname) []:www1.magedu.com
Email Address []:admin@magedu.com
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
ssl]# cp httpd.csr /tmp/
三、CA签发证书
1)签署证书
~]# openssl ca -in /tmp/httpd.csr -out /etc/pki/CA/certs/httpd.crt
Using configuration from /etc/pki/tls/openssl.cnf
Check that the request matches the signature
Signature ok
Certificate Details:
Serial Number: 1 (0x1)
Validity
Not Before: Jul 16 07:41:43 2016 GMT
Not After : Jul 16 07:41:43 2017 GMT
Subject:
countryName = CN
stateOrProvinceName = Beijing
organizationName = liyang
organizationalUnitName = 0ps
commonName = www2.magedu.com
emailAddress = admin@magedu.com
X509v3 extensions:
X509v3 Basic Constraints:
CA:FALSE
Netscape Comment:
OpenSSL Generated Certificate
X509v3 Subject Key Identifier:
70:95:31:1F:E3:15:D0:EE:D1:8F:2E:DA:8C:64:95:F6:EA:80:8F:2D
X509v3 Authority Key Identifier:
keyid:79:B8:17:4E:7D:74:2D:CD:16:63:20:1D:D1:9F:AA:D1:5F:49:09:CA
Certificate is to be certified until Jul 16 07:41:43 2017 GMT (365 days)
Sign the certificate? [y/n]:y
1 out of 1 certificate requests certified, commit? [y/n]y
Write out database with 1 new entries
Data Base Updated
Concurrency Level: 10
Time taken for tests: 79.144 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Non-2xx responses: 1000
Total transferred: 339000 bytes
HTML transferred: 0 bytes
Requests per second: 12.64 [#/sec] (mean)
Time per request: 791.438 [ms] (mean)
Time per request: 79.144 [ms] (mean, across all concurrent requests)
Transfer rate: 4.18 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.1 0 2
Processing: 240 770 736.3 669 6496
Waiting: 240 768 731.3 668 6429
Total: 240 770 736.4 669 6497
Percentage of the requests served within a certain time (ms)
50% 669
66% 718
75% 747
80% 765
90% 805
95% 878
98% 4807
99% 6494
100% 6497 (longest request)
二、为php安装xcache加速器测试数据:
1)yum 安装php-xcache
~]# yum install php-xcache
2)测试并发
~]# ab -c 10 -n 1000 www2.magedu.com/wordpress/index.php
Server Software: Apache/2.4.6
Server Hostname: www2.magedu.com
Server Port: 80
Concurrency Level: 10
Time taken for tests: 69.750 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Non-2xx responses: 1000
Total transferred: 339000 bytes
HTML transferred: 0 bytes
Requests per second: 14.34 [#/sec] (mean)
Time per request: 697.503 [ms] (mean)
Time per request: 69.750 [ms] (mean, across all concurrent requests)
Transfer rate: 4.75 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.1 0 2
Processing: 139 683 1093.9 631 25635
Waiting: 139 682 1093.8 629 25635
Total: 139 683 1093.9 631 25635
Percentage of the requests served within a certain time (ms)
50% 631
66% 686
75% 713
80% 734
90% 785
95% 824
98% 907
99% 1450
100% 25635 (longest request