mark https

 前置条件 
 1. 要安装gcc 
    yum -y install gcc* make perl pam pam-devel zlib zlib-devel
    yum install -y gcc gcc-c++


需要下载的文件
http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-6.7p1.tar.gz
http://zlib.net/zlib-1.2.8.tar.gz
http://www.openssl.org/source/openssl-1.0.2c.tar.gz


参考

http://www.oschina.net/question/12_39599

http://my.oschina.net/harlanblog/blog/395350






 安装openssl报错:
make[2]: Entering directory `/usr/openssl-1.0.1'
Makefile is older than Makefile.org, Configure or config.
Reconfigure the source tree (via './config' or 'perl Configure'), please. 
 可能是linux时间不对..检查一下时间
 date -s "2015-06-26 12:12:12"
 clock -w
 然后重新执行 ./config 就ok
 


生成https密匙 http://www.linuxidc.com/Linux/2014-07/104499p3.htm

http://www.cnblogs.com/inteliot/archive/2012/04/21/2462297.html

http://my.oschina.net/qinmei/blog/323074



升级openssh

http://my.oschina.net/qinmei/blog/323074 教程

openssl下载地址:http://www.openssl.org/source/

zlib下载地址:http://zlib.net/zlib-1.2.8.tar.gz

wget http://sourceforge.net/projects/pcre/files/pcre/8.37/pcre-8.37.tar.gz

./configure --prefix=/usr/local/zlib && make && make install


./configure --prefix=/data/web/nginx --with-http_stub_status_module --with-http_gzip_static_module --with-http_ssl_module --with-pcre=/opt/pcre-8.37  --with-openssl=/opt/openssl-1.0.2c

make && make install


添加开机自启动

vi /etc/rc.d/rc.local

/data/web/nginx/sbin/nginx



/etc/selinux/config
将SELINUX=enforcing改为SELINUX=disabled

最后要记得添加 80 443端口  

vim /etc/sysconfig/iptables

-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT

/etc/init.d/iptables restart

# /usr/local/nginx/sbin/nginx -s  reload 


你可能感兴趣的:(mark https)