Kerberos初体验--安装。

来源:互联网 发布:apache 负载压力测试 编辑:程序博客网 时间:2024/06/05 14:07

OS: Centos 6.3 final

1, 下载Kerberos
     krb5-1.6.3.tar.gz

2, 编译原码
krb5-1.6.3.tar.gz 使用 ftp传输到linux 机器。使用root用户;
解压缩,执行 configuremake
$ tar zxvf krb5-1.6.3.tar.gz
$cd krb5-1.6.3/src
$./configure
$make
$make install
缺省的将 kerberos安装在/usr/local 目录下;主要包括 /usr/local/sbin/usr/local/bin /usr/local/man /usr/local/lib等目录。

Q&A

Q1 执行./configure报错
configure: error: Could not find tgetent; are you missing curses/ncurses library?
configure: error: /bin/sh './configure' failed for telnet
configure: error: /bin/sh './configure' failed for appl
检查ncurses是否安装:
rpm -qa | grep ncurses
[root@localhost src]# rpm -qa | grep ncurses
ncurses-base-5.7-3.20090208.el6.x86_64
ncurses-libs-5.7-3.20090208.el6.x86_64
ncurses-5.7-3.20090208.el6.x86_64


A1
这是因为没有安装ncurse-devel的原因,执行yum安装:
yum install ncurse-devel
此时可能会报错:
[root@localhost src]# yum install ncruses-devel
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: mirrors.tuna.tsinghua.edu.cn
* extras: mirrors.tuna.tsinghua.edu.cn
* updates: mirrors.tuna.tsinghua.edu.cn
Setting up Install Process
No package ncruses-devel available.
Error: Nothing to do
[root@localhost src]#
说明,yum的resposity中没有包含需要的rpms(RPM Package Manager files),所以这里我们需要添加附加包--RPMforge repository. 
下载地址:http://wiki.centos.org/AdditionalResources/Repositories/RPMForge?action=show&redirect=Repositories%2FRPMForge#head-b06dd43af4eb366c28879a551701b1b5e4aefccd
当前我的系统为Cento 6.3 x86_64,所以下载http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm

接着,执行如下命令:

Install DAG's GPG key

rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt

If you get an error message like the following the key has already been imported:

error: http://apt.sw.be/RPM-GPG-KEY.dag.txt: key 1 import failed.

Verify the package you have downloaded

rpm -K rpmforge-release-0.5.3-1.el6.rf.*.rpm

Install the package

rpm -i rpmforge-release-0.5.3-1.el6.rf.*.rpm

好,到这里可以再次执行yum install ncurse-devel了

[root@localhost ~]# yum install ncurses-devel
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: mirrors.tuna.tsinghua.edu.cn
* extras: mirrors.tuna.tsinghua.edu.cn
* rpmforge: ftp.riken.jp
* updates: mirrors.tuna.tsinghua.edu.cn
rpmforge                                                                                                                                                    | 1.9 kB     00:00    
rpmforge/primary_db                                                                                                                                         | 2.7 MB     00:05    
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package ncurses-devel.x86_64 0:5.7-3.20090208.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================================================================
Package                                      Arch                                  Version                                              Repository                           Size
===================================================================================================================================================================================
Installing:
ncurses-devel                                x86_64                                5.7-3.20090208.el6                                   base                                642 k

Transaction Summary
===================================================================================================================================================================================
Install       1 Package(s)

Total download size: 642 k
Installed size: 1.7 M
Is this ok [y/N]: y
Downloading Packages:
ncurses-devel-5.7-3.20090208.el6.x86_64.rpm                                                                                                                 | 642 kB     00:00    
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : ncurses-devel-5.7-3.20090208.el6.x86_64                                                                                                                         1/1
  Verifying  : ncurses-devel-5.7-3.20090208.el6.x86_64                                                                                                                         1/1

Installed:
  ncurses-devel.x86_64 0:5.7-3.20090208.el6                                                                                                                                       

Complete!
[root@localhost ~]#

安装成功,再次执行rpm -qa | grep ncurses
[root@localhost src]# rpm -qa | grep ncurses
ncurses-base-5.7-3.20090208.el6.x86_64
ncurses-libs-5.7-3.20090208.el6.x86_64
ncurses-5.7-3.20090208.el6.x86_64
ncurses-devel-5.7-3.20090208.el6.x86_64

再次执行./configure, 成功!

参考:http://unix.stackexchange.com/questions/33688/installing-git-sudo-apt-get-command-not-found

Q2, Make 失败
yacc  getdate.y
make[2]: yacc: Command not found
make[2]: *** [getdate.c] Error 127
make[2]: Leaving directory `/root/krb5-1.6.3/src/kadmin/cli'
make[1]: *** [all-recurse] Error 1
make[1]: Leaving directory `/root/krb5-1.6.3/src/kadmin'
make: *** [all-recurse] Error 1

Answer:安装yacc/lex
yum install byacc flex
0 0
原创粉丝点击