RPMBUILD
yum install gcc
yum install openssl-devel
yum install pam-devel
yum install rpm-build
wget http://xxx.org/Openssh-Portalxxxx.tar.gz
tar xvf Openssh-Portalxxxx.tar.gz
cp Openssh-xxx/contrib/redhat/openssh.spec /usr/src/redhat/SPECS/
cp Openssh-Portalxxxx.tar.gz /usr/src/redhat/SOURCES/
cd /usr/src/redhat/SPECS
perl -i.bak -pe 's/^(%define no_(gnome|x11)_askpass)\s+0$/$1 1/' openssh.spec
rpmbuild -bb openssh.spec
cd /usr/src/redhat/RPMS/`uname -i`
rpm -Uvh openssh*rpm
ssh –v –p xxx localhost
service sshd restart
Compile
./configure --prefix=/usr --sysconfdir=/etc/ssh; make; make install
上面的方法会覆盖原版本的文件,make install覆盖/etc/ssh下配置文件时可能会报错。这时删掉/etc/ssh下的原配置文件,再make install一次就可以了
./configure; make; make install Will install the OpenSSH binaries in /usr/local/bin, configuration files in /usr/local/etc, the server in /usr/local/sbin, etc. To specify a different installation prefix, use the --prefix option to configure:
./configure --prefix=/opt
Will install OpenSSH in /opt/{bin,etc,lib,sbin}. You can also override
specific paths, for example:
./configure --prefix=/opt --sysconfdir=/etc/ssh
Complied Version from rpmfind.net
没有评论:
发表评论