{"id":655,"date":"2019-07-05T20:13:17","date_gmt":"2019-07-05T11:13:17","guid":{"rendered":"https:\/\/www.alprovs.com\/wordpress\/?p=655"},"modified":"2021-08-19T08:37:59","modified_gmt":"2021-08-18T23:37:59","slug":"centos7-6%e3%81%absnort%e3%82%92%e5%b0%8e%e5%85%a5","status":"publish","type":"post","link":"https:\/\/www.alprovs.com\/wordpress\/?p=655","title":{"rendered":"CentOS7.6\u306bSnort\u3092\u5c0e\u5165"},"content":{"rendered":"<p>CentOS6\u306e32bit\u74b0\u5883\u306b\u5c0e\u5165\u3057\u305f\u3064\u3044\u3067\u306b64bit\u74b0\u5883\u306eCentOS7\u306bSnort\u3092\u5c0e\u5165<\/p>\n<h1>1. \u74b0\u5883<\/h1>\n<p>CentOS7.6\uff08x86_64\uff09\u3092Minimal\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\nKernel Version : 3.10.0-957.21.3.el7.x86_64<br \/>\n\u203b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30a4\u30e1\u30fc\u30b8\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8cUpdate\u306e\u307f\u5b9f\u65bd<\/p>\n<h1>2. \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h1>\n<h2>2-1. epel\u306e\u5c0e\u5165<\/h2>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># yum install epel-release\r\n# sed -i 's\/enabled=1\/enabled=0\/g' \/etc\/yum.repos.d\/epel.repo<\/pre>\n<p>\u79c1\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u7121\u52b9\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>2-2. \u5fc5\u8981\u306a\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">$ sudo yum install rpm-build autoconf automake pcre-devel libpcap-devel gcc flex bison zlib-devel openssl-devel gettext gcc-c++ git rpmdevtools\r\n$ sudo yum --enablerepo=epel install libdnet-devel luajit luajit-devel<\/pre>\n<p>tarball\u3067\u914d\u5e03\u3055\u308c\u3066\u3044\u308b\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u30d1\u30c3\u30b1\u30fc\u30b8\u304b\u3089rpm\u30d5\u30a1\u30a4\u30eb\u3092\u751f\u6210\u3059\u308b\u305f\u3081\u306bcheckinstall\u3092\u5c0e\u5165\u3057\u307e\u3059\u3002\uff08daq-2.0.6.tar.gz\u306b\u306fspec\u30d5\u30a1\u30a4\u30eb\u304c\u542b\u307e\u308c\u3066\u3044\u306a\u3044\uff09<br \/>\n\u307e\u305f\u3001epel\u30ea\u30dd\u30b8\u30c8\u30ea\u306b daq \u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u5b58\u5728\u3057\u307e\u3059\u304c\u3001\u5fc5\u8981\u306a\u30d5\u30a1\u30a4\u30eb\u304c\u8db3\u308a\u305a\u5f8c\u306e snort \u306e\u30d3\u30eb\u30c9\u304c\u884c\u3048\u306a\u3044\u306e\u3067\u6ce8\u610f<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">$ git clone http:\/\/checkinstall.izto.org\/checkinstall.git\r\n$ cd checkinstall<\/pre>\n<p>\u203b\u53c2\u8003\uff1a<a href=\"https:\/\/blog.kakakikikeke.com\/2014\/02\/checkinstallrpm.html\" target=\"_blank\" rel=\"noopener noreferrer\">checkinstall\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066rpm\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u4f5c\u6210\u3057\u3066\u307f\u305f<\/a><\/p>\n<p>\u305d\u306e\u307e\u307e\u3060\u3068\u30d1\u30c3\u30b1\u30fc\u30b8\u4f5c\u6210\u6642\u306b\u30a8\u30e9\u30fc\u3067\u843d\u3061\u308b\u305f\u3081 checkinstall.in \u30d5\u30a1\u30a4\u30eb\u3092\u6b21\u306e\u3088\u3046\u306b\u4fee\u6b63<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">$ diff -u checkinstall.in.org checkinstall.in\r\n--- checkinstall.in.org 2019-06-22 08:07:20.144490509 +0900\r\n+++ checkinstall.in     2019-06-22 08:07:32.168331040 +0900\r\n@@ -2428,8 +2428,6 @@\r\n BuildRoot: $BROOTPATH\r\n Provides:  $PROVIDES\r\n Requires:  $REQUIRES,\/bin\/sh\r\n-Recommends: $RECOMMENDS\r\n-Suggests:  $SUGGESTS\r\n \r\n %description\r\n EOF\r\n\r\n$ diff -u checkinstallrc-dist.org checkinstallrc-dist\r\n--- checkinstallrc-dist.org     2019-06-23 22:15:04.217209722 +0900\r\n+++ checkinstallrc-dist 2019-06-23 22:17:33.480591938 +0900\r\n@@ -117,7 +117,7 @@\r\n NEW_SLACK=1\r\n \r\n # Comma delimited list of files\/directories to be ignored\r\n-EXCLUDE=\"\"\r\n+EXCLUDE=\"\/sys\"\r\n \r\n # Accept default values for all questions?\r\n ACCEPT_DEFAULT=0\r\n \r\n$ diff -u installwatch\/Makefile.org installwatch\/Makefile\r\n--- installwatch\/Makefile.org   2019-06-23 22:17:55.687796979 +0900\r\n+++ installwatch\/Makefile       2019-06-23 22:18:14.558971202 +0900\r\n@@ -11,7 +11,7 @@\r\n VERSION=0.7.0beta7\r\n \r\n BINDIR=$(PREFIX)\/bin\r\n-LIBDIR=$(PREFIX)\/lib\r\n+LIBDIR=$(PREFIX)\/lib64\r\n \r\n all: installwatch.so\r\n\r\n$ make\r\n$ sudo make install\r\n$ su -\r\n# cd \/usr\/local\/sbin\r\n# diff -u checkinstall.org checkinstall\r\n--- checkinstall.org    2019-06-23 22:45:25.807058269 +0900\r\n+++ checkinstall        2019-06-23 22:48:51.508962212 +0900\r\n@@ -2470,7 +2470,7 @@\r\n # Prepare directories to be included in the .spec file\r\n mv ${TMP_DIR}\/newfiles ${TMP_DIR}\/newfiles.tmp\r\n cat ${TMP_DIR}\/newfiles.tmp | while read line; do\r\n-   [ -d \"${BUILD_DIR}\/${line}\" -o -L \"${BUILD_DIR}\/${line}\" ] &amp;&amp; echo -n \"%dir \" &gt;&gt; ${TMP_DIR}\/newfiles\r\n+   [ -d \"${BUILD_DIR}\/${line}\" ] &amp;&amp; echo -n \"%dir \" &gt;&gt; ${TMP_DIR}\/newfiles\r\n    echo \"\\\"\/${line}\\\"\" &gt;&gt; ${TMP_DIR}\/newfiles\r\n done\r\n\r\n# rpmdev-setuptree\r\n# curl -L https:\/\/www.snort.org\/downloads\/snort\/daq-2.0.6.tar.gz -o daq-2.0.6.tar.gz\r\n# tar zxvf daq-2.0.6.tar.gz\r\n# cd daq-2.0.6\r\n# .\/configure\r\n# checkinstall\r\n# yum localinstall \/root\/rpmbuild\/RPMS\/x86_64\/daq-2.0.6-1.x86_64.rpm\r\n# exit\r\n$<\/pre>\n<h2>2-3. snort \u306e\u30d3\u30eb\u30c9\uff06\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>\u3053\u3061\u3089\u306e snort-2.9.13.tar.gz \u306b\u306f spec \u30d5\u30a1\u30a4\u30eb\u304c\u5b58\u5728\u3059\u308b\u306e\u3067 rpmbuild \u3067\u30d3\u30eb\u30c9\u53ef\u80fd<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">$ curl -L https:\/\/www.snort.org\/downloads\/snort\/snort-2.9.13.tar.gz -o snort-2.9.13.tar.gz\r\n$ rpmbuild -tb --clean snort-2.9.13.tar.gz\r\n$ sudo yum localinstall ~\/rpmbuild\/RPMS\/x86_64\/snort-openappid-2.9.13-1.x86_64.rpm<\/pre>\n<p>\u203brpmbuild\u306f\u5b9f\u884c\u74b0\u5883\u306b\u3088\u308a\u307e\u3059\u304c\u6570\u5206\u304b\u304b\u308a\u307e\u3059\u3002<\/p>\n<p>snort\u306e\u8a2d\u5b9a\u7b49\u306f\u6b21\u306e\u30b5\u30a4\u30c8\u3092\u53c2\u8003\u306b\u3057\u3066\u304f\u3060\u3055\u3044<\/p>\n<p><a href=\"https:\/\/centossrv.com\/snort.shtml\">\u4e0d\u6b63\u30a2\u30af\u30bb\u30b9\u691c\u77e5\u30b7\u30b9\u30c6\u30e0\u5c0e\u5165(Snort+SnortSnarf+Oinkmaster)<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>CentOS6\u306e32bit\u74b0\u5883\u306b\u5c0e\u5165\u3057\u305f\u3064\u3044\u3067\u306b64bit\u74b0\u5883\u306eCentOS7\u306bSnort\u3092\u5c0e\u5165 1. \u74b0\u5883 CentOS7.6\uff08x86_64\uff09\u3092Minimal\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb Kernel Version : 3.10. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,6],"tags":[],"class_list":["post-655","post","type-post","status-publish","format-standard","hentry","category-linux","category-6"],"_links":{"self":[{"href":"https:\/\/www.alprovs.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/655","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.alprovs.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.alprovs.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.alprovs.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.alprovs.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=655"}],"version-history":[{"count":3,"href":"https:\/\/www.alprovs.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/655\/revisions"}],"predecessor-version":[{"id":802,"href":"https:\/\/www.alprovs.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/655\/revisions\/802"}],"wp:attachment":[{"href":"https:\/\/www.alprovs.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=655"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.alprovs.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=655"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.alprovs.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=655"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}