1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id: Portfile 111353 2013-09-19 07:21:56Z ryandesign@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | PortGroup github 1.0 |
---|
7 | |
---|
8 | github.setup ossec ossec-wui 0.8 v |
---|
9 | categories security |
---|
10 | platforms darwin |
---|
11 | maintainers nomaintainer |
---|
12 | license GPL-3 |
---|
13 | description host-based intrusion detection system Web user interface |
---|
14 | long_description OSSEC is an Open Source Host-based Intrusion \ |
---|
15 | Detection System that performs log analysis, \ |
---|
16 | file integrity checking, policy monitoring, \ |
---|
17 | rootkit detection, real-time alerting and \ |
---|
18 | active response. |
---|
19 | homepage http://www.ossec.net/ |
---|
20 | |
---|
21 | depends_run-append port:ossec |
---|
22 | use_configure no |
---|
23 | build {} |
---|
24 | set webroot ${prefix}/www/ossec |
---|
25 | set ossecroot ${prefix}/var/ossec |
---|
26 | |
---|
27 | destroot { |
---|
28 | |
---|
29 | xinstall -d -m 755 ${destroot}${webroot} |
---|
30 | foreach f [glob -directory ${worksrcpath} *] { |
---|
31 | copy $f ${destroot}${webroot} |
---|
32 | } |
---|
33 | reinplace "s|/var/ossec|${ossecroot}|" ${destroot}${webroot}/ossec_conf.php |
---|
34 | |
---|
35 | xinstall -d -m 755 ${destroot}${prefix}/share/examples/${name}/ |
---|
36 | copy ${filespath}/nginx-ossec.conf ${destroot}${prefix}/share/examples/${name}/nginx-ossec.conf.sample |
---|
37 | reinplace "s|>/var/ossec|>${prefix}/var/ossec|g" \ |
---|
38 | ${destroot}${prefix}/share/examples/${name}/nginx-ossec.conf.sample |
---|
39 | |
---|
40 | } |
---|
41 | post-activate { |
---|
42 | if ![file exists ${prefix}/etc/nginx/nginx-ossec.conf] { |
---|
43 | copy ${prefix}/share/examples/${name}/nginx-ossec.conf.sample ${prefix}/etc/nginx/nginx-ossec.conf |
---|
44 | } |
---|
45 | } |
---|
46 | |
---|
47 | if {${subport} eq ${name}} { |
---|
48 | |
---|
49 | checksums rmd160 b6c4716c16f6520ecde478e0117715fe6502ee60 \ |
---|
50 | sha256 1d578e780116e9d1c1931555a6cd1b4cb07de4546003671f05915a63eeffbdd3 |
---|
51 | |
---|
52 | conflicts ${name}-devel |
---|
53 | |
---|
54 | livecheck.type regex |
---|
55 | livecheck.url ${homepage}/?page_id=19 |
---|
56 | livecheck.regex "Web UI (\\d+\\.\\d+)" |
---|
57 | |
---|
58 | } |
---|
59 | |
---|
60 | subport ${name}-devel { |
---|
61 | |
---|
62 | #fetch.type git |
---|
63 | #git.url https://github.com/ossec/ossec-wui |
---|
64 | #git.branch 3d3b626875cbe239588b57f4b6e16cf3d08b64d7 |
---|
65 | ## 2014-02-19 |
---|
66 | version 20140219 |
---|
67 | distname 3d3b626875cbe239588b57f4b6e16cf3d08b64d7 |
---|
68 | checksums rmd160 b6c4716c16f6520ecde478e0117715fe6502ee60 \ |
---|
69 | sha256 1d578e780116e9d1c1931555a6cd1b4cb07de4546003671f05915a63eeffbdd3 |
---|
70 | |
---|
71 | conflicts ${name} |
---|
72 | livecheck.type none |
---|
73 | |
---|
74 | } |
---|
75 | |
---|
76 | notes " |
---|
77 | Project is currently little maintained. So be prepared if you use in production. |
---|
78 | http://ossec-docs.readthedocs.org/en/latest/faq/ossec-wui.html |
---|
79 | OR ?OSSIM, ... |
---|
80 | http://ddpbsd.blogspot.ca/2011/10/3woo-you-got-your-ossec-in-my-logstash.html |
---|
81 | |
---|
82 | To finish install: |
---|
83 | 1) You will need a web server and PHP (not covered) |
---|
84 | 2) Do setup (equivalent of setup.sh which is Linux based) |
---|
85 | w apache |
---|
86 | # echo \"AuthUserFile ${webroot}/.htpasswd\" > ${webroot}/.htaccess |
---|
87 | # cat ${webroot}/htaccess_def.txt >> ${webroot}/.htaccess |
---|
88 | w nginx, add to ${prefix}/etc/nginx/nginx.conf and restart it |
---|
89 | include nginx-ossec.conf |
---|
90 | (in your server part) |
---|
91 | w apache/nginx or other |
---|
92 | # htpasswd -c ${webroot}/.htaccess youruser |
---|
93 | # install -d -m 1777 ${webroot}/tmp |
---|
94 | 3) Add your web server user (apache, www-data or nobody) to the ossec group |
---|
95 | # dseditgroup -o edit -a nobody -t user ossec |
---|
96 | 4) If you have a large ossec install, you may want to |
---|
97 | re-configure PHP to support longer lasting scripts |
---|
98 | and higher memory utilization. The following entries |
---|
99 | on php.ini can be increased: |
---|
100 | |
---|
101 | max_execution_time = 180 |
---|
102 | max_input_time = 180 |
---|
103 | memory_limit = 30M |
---|
104 | |
---|
105 | |
---|
106 | 6) Try to access the UI. |
---|
107 | |
---|
108 | http ://localhost/ossec/ |
---|
109 | |
---|
110 | " |
---|