1.写作目的
熟悉公钥加密与 PKI 的概念,公钥加密,数字签名,公钥认证,认证授权,基于 PKI 授权等内容。建立基于 PKI 的安全信道。
2.环境安装
因为后面要配置单向认真双向认证,openssl是必须的,以及nginx也是必须的。服务器为centos7.5版本。
2.1 安装gcc automake autoconf libtool make
yum -y install gcc automake autoconf libtool make
2.2 安装gcc-c++
[root@instance-n4r06itt ~]# yum install gcc gcc-c++
2.3 安装PCRE库
下载路径,兄弟们,锅里来,come on!!!
直接用ftp工具上传到linux系统。
tar -zxvf pcre-8.39.tar.gz
cd pcre-8.39
./configure
make
make install
2.4 安装zlib库
cd /usr/local/src
wget http://zlib.net/zlib-1.2.11.tar.gz
tar -zxvf zlib-1.2.11.tar.gz
cd zlib-1.2.11
./configure
make
make install
2.5 安装openssl
[root@instance-n4r06itt ~]# yum -y install openssl openssl-devel
2.6 安装nginx
cd /usr/local/src
wget http://nginx.org/download/nginx-1.9.9.tar.gz
tar -zxvf nginx-1.9.9.tar.gz
cd nginx-1.9.9
./configure
make
make install
80端口好像被占用
换个端口改为8000
2.7 启动nginx
[root@instance-n4r06itt objs]# ./nginx -c /usr/src/nginx-1.9.9/conf/nginx.conf
[root@instance-n4r06itt objs]# jps
9001 QuorumPeerMain
28540 Jps
[root@instance-n4r06itt objs]# ps -ef | grep nginx
root 28535 1 0 20:03 ? 00:00:00 nginx: master process ./nginx -c /usr/src/nginx-1.9.9/conf/nginx.conf
nobody 28536 28535 0 20:03 ? 00:00:00 nginx: worker process
root 28562 17497 0 20:03 pts/1 00:00:00 grep --color=auto nginx
启动成功!