简单使用epel源来安装NTOP及使用和chkrootkit的安装应用

简介:

 简单使用epel源来安装NTOP和chkrootkit

首先来说一下epel源是什么:

如果既想获得 RHEL 的高质量、高性能、高可靠性,又需要方便易用(关键是免费)的软件包更新功能,那么 Fedora Project 推出的 EPEL(Extra Packages for Enterprise Linux)正好适合你。EPEL(http://fedoraproject.org/wiki/EPEL) 是由 Fedora 社区打造,为 RHEL 及衍生发行版如 CentOS、Scientific Linux 等提供高质量软件包的项目。

下面来配置一下epel源

所使用的系统是Centos 6.3 x86_64 ip 192.168.112.129

在安装之前要事先安装yum-priorities

 
  1. # yum install -y yum-priorities 

安装完成后,便可以配置epel源了

由于使用的是64位的系统,所以选择安装相对应的rpm包

可以在http://dl.fedoraproject.org/pub/epel/6/x86_64/这里面到找,执行下面的命令安装

 
  1. [root@www yum.repos.d]# rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm 
  2. Retrieving http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm 
  3. warning: /var/tmp/rpm-tmp.KQrxb7: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY 
  4. Preparing...                ########################################### [100%] 
  5.    1:epel-release           ########################################### [100%] 

对于32位的系统则需要执行下面的命令:

 
  1. rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm 

安装完成后导入DAG的PGP Key

 
  1. [root@www yum.repos.d]# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 

然后再来设置/etc/yum.repos.d/epel.repo文件中源的级别,添加priority=11 (将其级别设置为较低级别,这样系统安装软件时会首先选择官方yum源,如果实在找不到它会选择epel源)/etc/yum.repos.d/epel.repo文件内容如下:

 
  1. [root@www yum.repos.d]# cat epel.repo  
  2. [epel] 
  3. name=Extra Packages for Enterprise Linux 6 - $basearch 
  4. #baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch 
  5. mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch 
  6. failovermethod=priority 
  7. enabled=1 
  8. gpgcheck=1 
  9. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 
  10. priority=11   \\设置优先级 
  11. [epel-debuginfo] 
  12. name=Extra Packages for Enterprise Linux 6 - $basearch - Debug 
  13. #baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch/debug 
  14. mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-6&arch=$basearch 
  15. failovermethod=priority 
  16. enabled=0 
  17. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 
  18. gpgcheck=1 
  19.  
  20. [epel-source] 
  21. name=Extra Packages for Enterprise Linux 6 - $basearch - Source 
  22. #baseurl=http://download.fedoraproject.org/pub/epel/6/SRPMS 
  23. mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-6&arch=$basearch 
  24. failovermethod=priority 
  25. enabled=0 
  26. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 
  27. gpgcheck=1 

设置安装完成后就可以直接用yum安装NTOP了

 
  1. [root@www yum.repos.d]# yum install ntop 
  2. Loaded plugins: fastestmirror, priorities 
  3. Loading mirror speeds from cached hostfile 
  4. epel/metalink                                                                                                                                   | 4.0 kB     00:00      
  5.  * base: centos.ustc.edu.cn 
  6.  * epel: ftp.cuhk.edu.hk 
  7.  * extras: centos.ustc.edu.cn 
  8.  * updates: centos.ustc.edu.cn 
  9. epel                                                                                                                                            | 4.2 kB     00:00      
  10. http://ftp.cuhk.edu.hk/pub/linux/fedora-epel/6/x86_64/repodata/e7f018b8041d9c4926b9587c3e1f50111f7d76a57335cc72a7106fb703eca514-primary.sqlite.bz2: [Errno 14] PYCURL ERROR 7 - "couldn't connect to host" 
  11. Trying other mirror. 
  12. epel/primary_db                                                                                                                                 | 5.0 MB     00:05      
  13. 73 packages excluded due to repository priority protections 
  14. Setting up Install Process 
  15. Resolving Dependencies 
  16. --> Running transaction check 
  17. ---> Package ntop.x86_64 0:5.0-5.el6 will be installed 
  18. --> Processing Dependency: graphviz for package: ntop-5.0-5.el6.x86_64 
  19. --> Processing Dependency: libpcap.so.1()(64bit) for package: ntop-5.0-5.el6.x86_64 
  20. --> Processing Dependency: libGeoIP.so.1()(64bit) for package: ntop-5.0-5.el6.x86_64 
  21. --> Running transaction check 
  22. ---> Package GeoIP.x86_64 0:1.4.8-1.el6 will be installed 
  23. ---> Package graphviz.x86_64 0:2.26.0-10.el6 will be installed 
  24. --> Processing Dependency: urw-fonts for package: graphviz-2.26.0-10.el6.x86_64 
  25. --> Processing Dependency: libXmu.so.6()(64bit) for package: graphviz-2.26.0-10.el6.x86_64 
  26. --> Processing Dependency: libXaw.so.7()(64bit) for package: graphviz-2.26.0-10.el6.x86_64 
  27. ---> Package libpcap.x86_64 14:1.0.0-6.20091201git117cb5.el6 will be installed 
  28. --> Running transaction check 
  29. ---> Package libXaw.x86_64 0:1.0.11-2.el6 will be installed 
  30. ---> Package libXmu.x86_64 0:1.1.1-2.el6 will be installed 
  31. ---> Package urw-fonts.noarch 0:2.4-10.el6 will be installed 
  32. --> Finished Dependency Resolution 
  33.  
  34. Dependencies Resolved 
  35.  
  36. ======================================================================================================================================================================= 
  37.  Package                             Arch                             Version                                                     Repository                      Size 
  38. ======================================================================================================================================================================= 
  39. Installing: 
  40.  ntop                                x86_64                           5.0-5.el6                                                   epel                            12 M 
  41. Installing for dependencies: 
  42.  GeoIP                               x86_64                           1.4.8-1.el6                                                 epel                           620 k 
  43.  graphviz                            x86_64                           2.26.0-10.el6                                               base                           1.0 M 
  44.  libXaw                              x86_64                           1.0.11-2.el6                                                base                           178 k 
  45.  libXmu                              x86_64                           1.1.1-2.el6                                                 base                            66 k 
  46.  libpcap                             x86_64                           14:1.0.0-6.20091201git117cb5.el6                            base                           126 k 
  47.  urw-fonts                           noarch                           2.4-10.el6                                                  base                           3.1 M 
  48.  
  49. Transaction Summary 
  50. ======================================================================================================================================================================= 

安装完成后就可以启动NTOP了,启动过程会提示调置admin用户的密码。

 
  1. [root@www yum.repos.d]# ntop 
  2. Sun Mar 24 04:09:27 2013  Initializing gdbm databases 
  3. Sun Mar 24 04:09:27 2013  ntop will be started as user ntop 
  4. Sun Mar 24 04:09:27 2013  ntop v.5.0 Fedora RPM (64 bit
  5. Sun Mar 24 04:09:27 2013  Configured on Nov 26 2012  2:27:02, built on Nov 26 2012 02:27:07. 
  6. …… 
  7. …… 
  8. …… 
  9. ntop startup - waiting for user response! 
  10.  
  11.  
  12. Please enter the password for the admin user:  

最后就可以在浏览器中访问了 http://192.168.112.129:3000

如图所示工作界面:

 

到此 使用epel源安装NTOP就完成了,具体关于NTOP的使用,还在熟悉过程中。

下面来说一下chkrootkit的安装

先来认识一下chkrootkit。Rootkit检测工具Chkrootkit

Rootkit是单个或一组软件,它针对一个或者多个弱点进行获取正式权限的攻击,或者对目标主机进行其他任何类型的攻击。很多Rootkit不仅仅是发起一个攻击以获得root权限,其同时还试图掩藏和清除攻击的行为。为了达到掩盖的目的,它们删除日志文件、安装特洛伊木马或采取其他的掩盖方法。就像网络中别的攻击一样,Rootkit通常也具有特征并且会留下一些蛛丝马迹,这些都是可以用来识别出它们。我们这里有专门的软件可对Rootkit的踪迹和特征进行查找,其中之一就是chkrootkit

Chkrootkit的安装

Chkrootkit目前的最新版本是0.49,而epel源中的Chkrootkit正好的就是最新版本。由于前面已经配置好了epel源就可以直接安装了:

 
  1. # yum install -y chkrootkit 

成功安装后,再用rpm命令来检查一下,如下所示:

 
  1. [root@www ~]# rpm -ql chkrootkit 
  2. /etc/pam.d/chkrootkit 
  3. /etc/security/console.apps/chkrootkit 
  4. /usr/bin/chkrootkit 
  5. /usr/bin/chkrootkitX 
  6. /usr/lib64/chkrootkit-0.49 
  7. /usr/lib64/chkrootkit-0.49/check_wtmpx 
  8. /usr/lib64/chkrootkit-0.49/chkdirs 
  9. /usr/lib64/chkrootkit-0.49/chklastlog 
  10. /usr/lib64/chkrootkit-0.49/chkproc 
  11. /usr/lib64/chkrootkit-0.49/chkrootkit 
  12. /usr/lib64/chkrootkit-0.49/chkutmp 
  13. /usr/lib64/chkrootkit-0.49/chkwtmp 
  14. /usr/lib64/chkrootkit-0.49/ifpromisc 
  15. /usr/lib64/chkrootkit-0.49/strings 
  16. /usr/lib64/chkrootkit-0.49/strings-static 
  17. /usr/sbin/chkrootkit 
  18. /usr/share/applications/fedora-chkrootkit.desktop 
  19. /usr/share/doc/chkrootkit-0.49 
  20. /usr/share/doc/chkrootkit-0.49/ACKNOWLEDGMENTS 
  21. /usr/share/doc/chkrootkit-0.49/COPYRIGHT 
  22. /usr/share/doc/chkrootkit-0.49/README 
  23. /usr/share/doc/chkrootkit-0.49/README.chklastlog 
  24. /usr/share/doc/chkrootkit-0.49/README.chkwtmp 
  25. /usr/share/doc/chkrootkit-0.49/README.false_positives 
  26. /usr/share/doc/chkrootkit-0.49/chkrootkit.lsm 
  27. /usr/share/pixmaps/chkrootkit.png 

这里显示的是成功安装后Chkrootkit后的相关文件。运行相关命令可以查看版本号:

 
  1. [root@www ~]# chkrootkit -V 
  2. chkrootkit version 0.49 

安装后就可以运行了

 
  1. [root@www ~]# chkrootkit -V 
  2. chkrootkit version 0.49 
  3. [root@www ~]# chkrootkit 
  4. ROOTDIR is `/' 
  5. Checking `amd'... not found 
  6. Checking `basename'... not infected 
  7. Checking `biff'... not found 
  8. Checking `chfn'... not infected 
  9. Checking `chsh'... not infected 
  10. Checking `cron'... not infected 
  11. Checking `crontab'... not infected 
  12. Checking `date'... not infected 
  13. Checking `du'... not infected 
  14. Checking `dirname'... not infected 
  15. Checking `echo'... not infected 
  16. Checking `egrep'... not infected 
  17. Checking `env'... not infected 
  18. Checking `find'... not infected 
  19. Checking `fingerd'... not found 
  20. Checking `gpm'... not found 
  21. Checking `grep'... not infected 
  22. Checking `hdparm'... not found 
  23. Checking `su'... not infected 
  24. Checking `ifconfig'... not infected 
  25. Checking `inetd'... not found 
  26. Checking `inetdconf'... not found 
  27. Checking `identd'... not found 
  28. Checking `init'... not infected 
  29. Checking `killall'... not infected 
  30. Checking `ldsopreload'... not infected 
  31. Checking `login'... not infected 
  32. Checking `ls'... not infected 
  33. Checking `lsof'... not found 
  34. Checking `mail'... not found 
  35. Checking `mingetty'... not infected 
  36. Checking `netstat'... not infected 
  37. Checking `named'... not found 
  38. Checking `passwd'... not infected 
  39. Checking `pidof'... not infected 
  40. Checking `pop2'... not found 
  41. Checking `pop3'... not found 
  42. Checking `ps'... not infected 
  43. Checking `pstree'... not infected 
  44. Checking `rpcinfo'... not found 
  45. Checking `rlogind'... not found 
  46. Checking `rshd'... not found 
  47. Checking `slogin'... not found 
  48. Checking `sendmail'... not infected 
  49. Checking `sshd'... not infected 
  50. Checking `syslogd'... not tested 
  51. Checking `tar'... not infected 
  52. Checking `tcpd'... not infected 
  53. Checking `tcpdump'... not infected 
  54. Checking `top'... not infected 
  55. Checking `telnetd'... not found 
  56. Checking `timed'... not found 
  57. Checking `traceroute'... not found 
  58. Checking `vdir'... not infected 
  59. Checking `w'... not infected 
  60. Checking `write'... not infected 
  61. Checking `aliens'... no suspect files 
  62. Searching for sniffer's logs, it may take a while... nothing found 
  63. Searching for HiDrootkit's default dir... nothing found 
  64. Searching for t0rn's default files and dirs... nothing found 
  65. Searching for t0rn's v8 defaults... nothing found 
  66. Searching for Lion Worm default files and dirs... nothing found 
  67. Searching for RSHA's default files and dir... nothing found 
  68. Searching for RH-Sharpe's default files... nothing found 
  69. Searching for Ambient's rootkit (ark) default files and dirs... nothing found 
  70. Searching for suspicious files and dirs, it may take a while... nothing found 
  71. Searching for LPD Worm files and dirs... nothing found 
  72. Searching for Ramen Worm files and dirs... nothing found 
  73. Searching for Maniac files and dirs... nothing found 
  74. Searching for RK17 files and dirs... nothing found 
  75. Searching for Ducoci rootkit... nothing found 
  76. Searching for Adore Worm... nothing found 
  77. Searching for ShitC Worm... nothing found 
  78. Searching for Omega Worm... nothing found 
  79. Searching for Sadmind/IIS Worm... nothing found 
  80. Searching for MonKit... nothing found 
  81. Searching for Showtee... nothing found 
  82. Searching for OpticKit... nothing found 
  83. Searching for T.R.K... nothing found 
  84. Searching for Mithra... nothing found 
  85. Searching for LOC rootkit... nothing found 
  86. Searching for Romanian rootkit... nothing found 
  87. Searching for HKRK rootkit... nothing found 
  88. Searching for Suckit rootkit... nothing found 
  89. Searching for Volc rootkit... nothing found 
  90. Searching for Gold2 rootkit... nothing found 
  91. Searching for TC2 Worm default files and dirs... nothing found 
  92. Searching for Anonoying rootkit default files and dirs... nothing found 
  93. Searching for ZK rootkit default files and dirs... nothing found 
  94. Searching for ShKit rootkit default files and dirs... nothing found 
  95. Searching for AjaKit rootkit default files and dirs... nothing found 
  96. Searching for zaRwT rootkit default files and dirs... nothing found 
  97. Searching for Madalin rootkit default files... nothing found 
  98. Searching for Fu rootkit default files... nothing found 
  99. Searching for ESRK rootkit default files... nothing found 
  100. Searching for rootedoor... nothing found 
  101. Searching for ENYELKM rootkit default files... nothing found 
  102. Searching for common ssh-scanners default files... nothing found 
  103. Searching for anomalies in shell history files... nothing found 
  104. Checking `asp'... not infected 
  105. Checking `bindshell'... not infected 
  106. Checking `lkm'... chkproc: nothing detected 
  107. chkdirs: nothing detected 
  108. Checking `rexedcs'... not found 
  109. Checking `sniffer'... eth0: PF_PACKET(/sbin/dhclient, /usr/sbin/ntop) 
  110. Checking `w55808'... not infected 
  111. Checking `wted'... chkwtmp: nothing deleted 
  112. Checking `scalper'... not infected 
  113. Checking `slapper'... not infected 
  114. Checking `z2'... chklastlog: nothing deleted 
  115. Checking `chkutmp'... chkutmp: nothing deleted 
  116. Checking `OSX_RSPLUG'... not infected 

Chkrootkit会对系统上的重要文件进行扫描,以上结果显示是正常的,一般是没有文件感染,如果Chkrootkit显示有文件感染,请认真查看是否是误报,如果有文件感染了Rootkit,请立即从网络上断开你的服务,同时采取措施进行Rootkit的清理。

好了,到此关于epel源的配置和使用epel源安装软件介绍完毕。

不对之处请大家指出,谢谢关注。




本文转自 ZhouLS 51CTO博客,原文链接:http://blog.51cto.com/zhou123/1181062

相关文章
|
5月前
|
Linux 编译器 开发工具
Linux---(五)三大工具yum、vim、gcc/g++
Linux---(五)三大工具yum、vim、gcc/g++
81 1
|
9月前
|
缓存 关系型数据库 Linux
快速学会rpm安装yum本地源配置,源码安装,查看用户进程
RPM是红帽包管理(Redhat Package Manager)的缩写。 由Red Hat公司提出的一种软件包管理标准。 是Linux各发行版中应用最广泛的软件包格式之一(还有debian的发行版deb安装包)。 RPM功能通过rpm命令使用不同参数来实现。
265 0
|
9月前
Yum工具详解(一)-----Yum配置本地源
Yum工具详解(一)-----Yum配置本地源
167 0
|
Ubuntu Linux Shell
安装及管理程序(RPM、YUM、源码编译安装)(上)
1 Linux 应用程序基础 1.1 应用程序与系统命令的关系
136 0
|
缓存 前端开发 Linux
安装及管理程序(RPM、YUM、源码编译安装)(下)
1 Linux 应用程序基础 1.1 应用程序与系统命令的关系
118 1
|
Linux Windows
Linux网络配置+yum、rpm与源码安装 | 学习笔记4
Linux网络配置以及yum、rpm与源码安装的讲解
195 0
Linux网络配置+yum、rpm与源码安装 |  学习笔记4
|
Linux
Centos下pip3 install pycrypto安装失败的解决办法
Centos下pip3 install pycrypto安装失败的解决办法
1489 0
Centos下pip3 install pycrypto安装失败的解决办法
|
关系型数据库 MySQL
wsl install lamp
sudo apt-get update sudo apt-get install lamp-server^   /etc/init.d/apache2 start /etc/init.d/mysql start   sudo apt-get -y install mysql-client mysql-server sudo apt-get -y install php7.
1781 0