CentOS7 安装 OpenSSL 1.0.1m 和 OpenSSH 6.8p1
2015-06-11 20:20
603 查看
# 下载软件
wget http://zlib.net/zlib-1.2.8.tar.gz wget ftp://ftp.openssl.org/source/openssl-1.0.1m.tar.gz wget http://www.ftp.ne.jp/OpenBSD/OpenSSH/portable/openssh-6.8p1.tar.gz[/code]
# 事前准备,安装 telnet 防止 ssh 登陆不了
# 具体查看这篇文章:http://blog.csdn.net/zhouzme/article/details/46461177
# 安装数据压缩函数库tar -zxvf zlib-1.2.8.tar.gz cd zlib-1.2.8 ./configure make make install cd ..
# 编译安装 OpenSSL
# 查看当前版本
# openssl version -atar -zxvf openssl-1.0.1m.tar.gz cd openssl-1.0.1m/ ./config --prefix=/usr shared zlib make make install cd ..
# 替换旧版 指定了 --prefix=/usr 则无需下面的操作了
#mv /usr/bin/openssl /usr/bin/openssl.old
#mv /usr/include/openssl /usr/include/openssl.old
#ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
#ln -s /usr/local/ssl/include/openssl/ /usr/include/openssl
# 配置库文件搜索路径
#echo "/usr/local/ssl/lib" >> /etc/ld.so.conf
#ldconfig
# 编译安装 OpenSSH
# 若出现 PAM headers not found 错误则
# 安装 yum -y install pam pam-develyum -y install pam pam-devel tar -zxvf openssh-6.8p1.tar.gz cd openssh-6.8p1/ ./configure --prefix=/usr --sysconfdir=/etc/ssh --with-pam --with-zlib --with-md5-passwords make make install
# 补充下:安装时如果出现 公私密钥找不到等问题,如下图,请先忽略,继续执行下面的覆盖操作,sshd 重新加载配置后即可解决
# 覆盖旧配置文件cp ./contrib/redhat/sshd.init /etc/init.d/sshd chmod +x /etc/init.d/sshd chkconfig –add sshd cp sshd_config /etc/ssh/sshd_config cp sshd /usr/sbin/sshd cp -p ssh /usr/bin/ssh
# 重新加载配置systemctl reload sshd
# 此时不要退出当前 ssh 窗口,先新开个窗口测试登陆若没有问题则完成
# 若登录时出现能连接去无法登录提示密码不接受之类的
# 尝试关闭 SELinuxvi /etc/selinux/config
# 将SELINUX=enforcing
# 修改为SELINUX=disabled
# 执行更新setenforce 0
相关文章推荐
- C语言介绍(linux)
- Linux服务器模型(6.10)
- CentOS7 下安装telnet服务
- (6)LinuxI2C驱动--I2C设备驱动
- Linux下select, poll和epoll IO模型的详解
- 如何将linux ko档copy至android
- linux Gsensor驱动(bma250为例子)
- Linux inotify功能及实现原理
- Linux基础,配置IP与关闭防火墙
- linux下搭建生成HLS所需的.ts和.m3u8文件
- linux软件卸载
- Linux内存 性能调优
- 浅谈linux vsftp虚拟用户配置与工作模式分析
- 我的Linux学习历程:那些我看过的Linux书籍们
- Centos6.5 搭建mysq主从复
- linux下拆分文件split
- yum和apt-get的区别
- Linux下的Nano命令
- 【待续】Centos7安装完后无法进入图形界面(GNOME/KDE)的解决方
- Linux如何查看CPU温度