为什么我的linux usr local下/usr/src/目录里没有东西

linux下升级openssh
linux下升级openssh
查询是否安装telnet&
# &rpm -qa | grep telnet&
telnet-server-0.17-31.EL4.5&
telnet-0.17-31.EL4.5&
打开telnet服务&
修改设置文件/etc/xinetd.d/telnet中disable字段改为no。&
启动服务#ntsysv或#service xinetd restart。&
创建登陆用户&
因为不能直接root telnet登陆,所以创建一个登陆用户.安转完成后可以把该用户删除&
useradd opensshinstall&
(删除用户及/home/sshinstall目录 &userdel -r sshinstall & 删除这个用户的组groupdel sshinstall)&
安装源文件在/usr/local/src目录下&
zlib和openssl安装在/usr/local目录下&
安装zlib-1.2.5&
#tar -zxvf zlib-1.2.5.tar.gz&
#cd zlib-1.2.5&
#./configure --prefix=/usr/local/zlib-1.2.5 -share&
#make test&
#make install&
cp libz.a /usr/local/zlib-1.2.5/lib&
cp libz.so.1.2.5 /usr/local/zlib-1.2.5/lib&
cd /usr/local/zlib-1.2.5/ chmod u=rw,go=r libz.a&
cp zlib.3 /usr/local/zlib-1.2.5/share/man/man3&
chmod 644 /usr/local/zlib-1.2.5/share/man/man3/zlib.3&
cp zlib.pc /usr/local/zlib-1.2.5/lib/pkgconfig&
chmod 644 /usr/local/zlib-1.2.5/lib/pkgconfig/zlib.pc&
cp zlib.h zconf.h /usr/local/zlib-1.2.5/include&
chmod 644 /usr/local/zlib-1.2.5/include/zlib.h /usr/local/zlib-1.2.5/include/zconf.h&
#vi /etc/ld.so.conf & &配置库文件搜索路径&
include ld.so.conf.d/*.conf&
/usr/local/zlib-1.2.5/lib&
##add end&
#ldconfig -v & & & 刷新缓存文件/etc/ld.so.cache&
#ln -s /usr/local/zlib-1.2.5 /usr/local/zlib&
安装openssl&
#cd /usr/local/src&
#tar zxvf openssl-1.0.0a.tar.gz&
#cd openssl-1.0.0a&
#./config shared zlib-dynamic --prefix=/usr/local/openssl-1.0.0a --with-zlib-lib=/usr/local/zlib-1.2.5/lib --with-zlib-include=/usr/local/zlib-1.2.5/include&
#make test (这一步是进行 SSL 加密协议的完整测试,如果出现错误就要一定先找出原因,否则一味继续可能导致 SSH 不能使用!)&
#make install&
#vi /etc/ld.so.conf & & &配置库文件搜索路径&
############################################&
## add below line to ld.so.conf&
/usr/local/openssl-1.0.0a/lib & & & & & & & & & &64位OS 没有生成lib目录,是lib64目录&
############################################&
#ldconfig -v & & & 刷新缓存文件/etc/ld.so.cache&
#ln -s /usr/local/openssl-1.0.0a /usr/local/openssl&
vi /etc/profile&
###########################################&
(add to end of the file)&
PATH=/usr/local/openssl/bin:$PATH&
export PATH&
###########################################&
退出,再登录,查看openssl的版本号,以验正是否安装正确&
#openssl version -a&
OpenSSL 1.0.0a 1 Jun 2010&
built on: Wed Jul &7 17:08:07 CST 2010&
platform. linux-x86_64&
options: &bn(64,64) rc4(1x,char) des(idx,cisc,16,int) idea(int) blowfish(idx)&
compiler: gcc -fPIC -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DMD32_REG_T=int -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -D_ASM -DAES_ASM -DWHIRLPOOL_ASM&
OPENSSLDIR: &/usr/local/openssl-1.0.0a/ssl&&
停止并卸载Openssh&
1.停止OpenSSH服务&
#service sshd stop&
2. 查询并卸载openssh&
# rpm -qa | grep openssh&
openssh-3.9p1-8.RHEL4.24&
openssh-askpass-3.9p1-8.RHEL4.24&
openssh-clients-3.9p1-8.RHEL4.24&
openssh-server-3.9p1-8.RHEL4.24&
openssh-askpass-gnome-3.9p1-8.RHEL4.24&
#rpm -e openssh-3.9p1-8.RHEL4.24 --nodeps&
#rpm -e openssh-clients-3.9p1-8.RHEL4.24 --nodeps&
警告/etc/ssh/ssh_config 已存为 /etc/ssh/ssh_config.rpmsave&
#rpm -e openssh-askpass-3.9p1-8.RHEL4.24&
#rpm -e openssh-server-3.9p1-8.RHEL4.24 &--nodeps&
#rpm -e openssh-askpass-gnome-3.9p1-8.RHEL4.24&
cd /usr/local/src&
tar zxvf openssh-5.5p1.tar.gz&
cd &openssh-5.5p1&
./configure --prefix=/usr --sysconfdir=/etc/ssh --with-pam --with-ssl-dir=/usr/local/openssl-1.0.0a --with-md5-passwords --mandir=/usr/share/man --with-zlib=/usr/local/zlib-1.2.5&
#make install&
将sshd加入启动服务:&
进入ssh安装解压目录&
#cp ./contrib/redhat/sshd.init /etc/init.d/sshd&
#chmod +x /etc/init.d/sshd&
#chkconfig --add sshd&
最后,启动 SSH 服务使修改生效:&
# service sshd start&
重启后确认一下当前的 OpenSSH 和 OpenSSL 是否正确:&
如果看到了新的版本号就没问题啦!&
关闭telnet服务&
修改设置文件/etc/xinetd.d/telnet中disable字段改为yes。&
启动服务#ntsysv或#service xinetd restart。&
1.在安装openssh, ./configure 时,报下面错误:&
configure: error: PAM headers not found&
运行# rpm -qa | grep pam&
& &pam_smb-1.1.7-5&
& &pam_ccreds-1-3&
& &pam_passwdqc-0.7.5-2&
& &pam-0.77-66.17&
& &pam_krb5-2.1.8-1&
& &spamassassin-3.0.6-1.el4&
发现有 pam-0.77-66.17,从网上找到 pam-devel-0.77-66.17.i386.rpm,&
运行rpm -ivh pam-devel-0.77-66.17.i386.rpm后,./configure正常&
版本号0.77-66.17必须一样。&
2.在安装openssh时,configure报错:&
./configure --prefix=/usr --sysconfdir=/etc/ssh --with-pam --with-zlib --with-ssl-dir=/usr/include/openssl --with-md5-passwords --mandir=/usr/share/man&
configure: error: *** zlib too old - check config.log ***&
Your reported zlib version has known security problems. &It's possible your&
vendor has fixed these problems without changing the version number. &If you&
are sure this is the case, you can disable the check by running&
&./configure --without-zlib-version-check&.&
If you are in doubt, upgrade zlib to version 1.2.3 or greater.&
See http://www.gzip.org/zlib/ for details.&
因此需要升级zlib.&
3.如果操作是64位的,openssl-1.0.0a只生成了lib64,没有生成lib目录。openssh configure时,还是连接的老版本的openssl,郁闷。&
4. ./configure显示信息:&
./configure --prefix=/usr --sysconfdir=/etc/ssh --with-pam --with-ssl-dir=/usr/local/openssl-1.0.0a --with-md5-passwords --mandir=/usr/share/man --with-zlib=/usr/local/zlib-1.2.5&
显示信息:&
OpenSSH has been configured with the following options:&
& & & & & & & & & & &User binaries: /usr/bin&
& & & & & & & & & &System binaries: /usr/sbin&
& & & & & & & &Configuration files: /etc/ssh&
& & & & & & & & & &Askpass program: /usr/libexec/ssh-askpass&
& & & & & & & & & & & Manual pages: /usr/share/man/manX&
& & & & & & & & & & & & & PID file: /var/run&
& Privilege separation chroot path: /var/empty&
& & & & & & sshd default user PATH: /usr/bin:/bin:/usr/sbin:/sbin&
& & & & & & & & & & Manpage format: doc&
& & & & & & & & & & & &PAM support: yes&
& & & & & & & & & &OSF SIA support: no&
& & & & & & & & &KerberosV support: no&
& & & & & & & & & &SE support: no&
& & & & & & & & &Smartcard support:&
& & & & & & & & & & &S/KEY support: no&
& & & & & & & TCP Wrappers support: no&
& & & & & & & MD5 password support: yes&
& & & & & & & & & &libedit support: no&
& Solaris process contract support: no&
& & & &IP address in $DISPLAY hack: no&
& & & & & &Translate v4 in v6 hack: yes&
& & & & & & & & & BSD Auth support: no&
& & & & & & & Random number source: OpenSSL internal ONLY&
& & & & & & & Host: i686-pc-linux-gnu&
& & & & & Compiler: gcc&
& & Compiler flags: -g -O2 -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -fno-builtin-memset -std=gnu99&
Preprocessor flags: -I/usr/local/openssl-1.0.0a/include -I/usr/local/zlib-1.2.5/include&
& & & Linker flags: -L/usr/local/openssl-1.0.0a/lib -L/usr/local/zlib-1.2.5/lib&
& & & & &Libraries: -lresolv -lcrypto -ldl -lutil -lz -lnsl &-lcrypt&
& & & & &+for sshd: &-lpam&
PAM is enabled. You may need to install a PAM control file&
for sshd, otherwise password authentication may fail.&
Example PAM control files can be found in the contrib/&
subdirectory&
您对本文章有什么意见或着疑问吗?请到您的关注和建议是我们前行的参考和动力&&
您的浏览器不支持嵌入式框架,或者当前配置为不显示嵌入式框架。没有/usr/src/linux目录
[问题点数:0分]
没有/usr/src/linux目录
[问题点数:0分]
不显示删除回复
显示所有回复
显示星级回复
显示得分回复
只显示楼主
相关帖子推荐:
本帖子已过去太久远了,不再提供回复功能。为什么在我的linux7.0中,/usr/src/目录下只有redhat目录而没有linux目录?
[问题点数:20分,结帖人liuxusy]
为什么在我的linux7.0中,/usr/src/目录下只有redhat目录而没有linux目录?
[问题点数:20分,结帖人liuxusy]
不显示删除回复
显示所有回复
显示星级回复
显示得分回复
只显示楼主
相关帖子推荐:
本帖子已过去太久远了,不再提供回复功能。急:/usr/src 中的文件坏掉如何恢复? - Linux新手入门及安装配置论坛 -
Linux伊甸园论坛
- Powered by Discuz!
帖子16&精华0&积分3&在线时间0 小时&
急:/usr/src 中的文件坏掉如何恢复?
我在升级内核时升级失败,且把/usr/src中的文件高乱了,有的文件损坏了,现在系统还没有重新启动。我该如何恢复该目录中的文件。
谢谢,不胜感激!
帖子651&精华3&积分300&在线时间0 小时&
找个好的linux,tar它的那个目录,拷贝到你的机器上,然后进rescue 模式,
用那个tar覆盖你的文件夹,应该可以了,
没试过,不过反正都是坏的,你可以试试哈,
www.rpmfind.net
帖子16&精华0&积分3&在线时间0 小时&
谢谢版主!
不过那个目录对我系统好象没什么影响,我系统目前正常。我想把该目录删除掉,然后下载一个新的来升级内核。不知可以吗?
帖子12537&精华2&积分3917&在线时间1559 小时&
最好不要这样,如果新内核编坏了岂不系统都进不去了?
林子大了,什么鸟都有......
帖子5478&精华13&积分3559&在线时间1211 小时&
最初由 cmc99 发布
[B]谢谢版主!
不过那个目录对我系统好象没什么影响,我系统目前正常。我想把该目录删除掉,然后下载一个新的来升级内核。不知可以吗? [/B]
不用删掉。
你问了太多了。你试试就知道了,
这些问题就不需要问。
乘天地之正,而御六气之辩,以游无穷
帖子16&精华0&积分3&在线时间0 小时&
先谢谢各位,我又编译了一次,当我运行 make xconfig, 出现下列错误:
# make xconfig
rm -f include/asm
( ln -sf asm-i386 asm)
make -C scripts kconfig.tk
make[1]: Entering directory `/usr/src/linux-2.4.24/scripts'
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -c -o tkparse.o tkparse.c
make[1]:gcc:command not found
make[1]:*** [tkparse.0] Error 127
make[1]: Leaving directory `/usr/src/linux-2.4.24/scripts'
请问这是什么问题?
帖子5478&精华13&积分3559&在线时间1211 小时&
make[1]:gcc:command not found
gcc没有安装。
gcc: no input files
这个才对。
乘天地之正,而御六气之辩,以游无穷
帖子651&精华3&积分300&在线时间0 小时&
那个文件夹好像是编译源代码的时候(就是make的时候)放代码的。
所以,删掉的话,恐怕又要在
make[1]: Entering directory `/usr/src/linux-2.4.24/scripts'
的时候报错
说没有这个文件夹了,
它可不像windows一样会给你自动生成一个文件夹哦。。。
www.rpmfind.net
帖子16&精华0&积分3&在线时间0 小时&
我的意思是把/usr/src中的文件删除掉,我查阅了书本后,我知道这个文件夹通常是编译内核的地方,不过真正内核是放在 /boot 里,所以该文件夹删除对系统没有影响。
要编译时,再解包重新开始。
帖子16&精华0&积分3&在线时间0 小时&
重新编译错误
现在我重新编译时提示错误如下:
/usr/bin/wish -f scripts/kconfig.tk
Applications initialization failed: no display name and no $DISPLAY environment variable
Error in startup script: invalid command name 'button'
while executing
&button.ref&
(file &scripts/kconfig.tk& line 51
make: *** [xconfig] Error 1.
[通过 QQ、MSN 分享给朋友]}

我要回帖

更多关于 linux usr目录 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信