Permalink
Browse files

Updated INSTALLATION file to point at Mark's detailed instructions an…

…d scripts
  • Loading branch information...
1 parent 43fef8f commit 6117f03c7fa1907af902a926e44264ee837d6016 @windley windley committed Jan 21, 2015
Showing with 8 additions and 335 deletions.
  1. +8 −335 INSTALLATION
View
@@ -12,346 +12,19 @@ TODO
* The installation *has* to be done in the /web/lib/perl directory. This restriction should be removed
* The installation depends on a custom build of Apache. Can we use the stock distribution?
-GETTING YOUR MACHINE READY
+DETAILED INSTRUCTIONS
-The following steps install libraries and systems necessary to make KRE work. The good news is that even those these are fairly lengthy, they are pretty straightforward for Centos/Redhat installs.
+Detailed instructions and helpful scripts for installing your own
+instance of KRE are here:
-1. Ensure that the following packages are installed and current
- autoconf
- bzip2
- curl-devel
- expat-devel
- gcc
- java-1.6.0-openjdk
- java-1.6.0-openjdk-devel
- libevent-devel
- libxml2-devel
- make
- memcached
- neon-devel
- openssl-devel
- perl
- subversion
- subversion-devel
- subversion-perl
- sudo
- wget
- zlib-devel
+https://github.com/solargroovy/krl_install
-In Redhat Linux and it's siblings:
-sudo yum -y --enablerepo=rpmforge,rpmforge-extras install autoconf bzip2 curl-devel expat-devel gcc java-1.6.0-openjdk java-1.6.0-openjdk-devel libevent-devel libxml2-devel make memcached neon-devel openssl-devel perl subversion subversion-devel subversion-perl sudo wget zlib-devel
-Note: some of these packages are NOT included in the default package manager for Centos, so you need to add an additional package manager as per these instructions: http://www.lullabot.com/articles/installing-memcached-redhat-or-centos (you can skip the PHP part at the end).
+DOCKER
+There is an experimental Docker-based KRE here:
-2. Make install directory (as root)
-
- useradd web -d /web -m
- cd /web
- mkdir {logs,src}
- chown -R web:web /web
- passwd web
-
-3. Log in as web.
-
-4. Add KOBJ_ROOT and WEB_ROOT to /web/.bashrc file
-
- export KOBJ_ROOT=/web/lib/perl
- export WEB_ROOT=/web
-
- # the following aliases can also be useful
- alias err="tail -f ~/logs/error_log"
- alias acc="tail -f ~/logs/access_log"
- alias log="tail -f /web/logs/detail_log"
- alias start="sudo /etc/init.d/httpd start"
- alias restart="sudo /etc/init.d/httpd restart"
- alias stop="sudo /etc/init.d/httpd stop"
-
-Execute the following to make them active
-. ~/.bashrc
-
-5. Install Apache (http://archive.apache.org/dist/httpd/httpd-2.2.15.tar.gz)
-
- cd /web/src
- wget http://archive.apache.org/dist/httpd/httpd-2.2.15.tar.gz
- tar -zxvf httpd-2.2.15.tar.gz
- cd httpd-2.2.15
- ./configure --with-mpm=prefork --prefix=/web --with-included-apr --enable-deflate=shared --enable-expires=shared --enable-headers=shared --enable-dav=shared
- make
- make install
-
-6. Install Mod Perl (http://perl.apache.org/dist/mod_perl-2.0-current.tar.gz)
-
- # note: for Fedora 14 installs run "yum install perl-ExtUtils-Embed" first.
- cd /web/src
- wget http://perl.apache.org/dist/mod_perl-2.0-current.tar.gz
- tar -zxvf mod_perl-2.0-current.tar.gz
- cd mod_perl-2.0.5
-
- a. for 64 bit CentOS machines:
- sudo ln -s /usr/lib64/libgdbm.so.2.0.0 /usr/lib64/libgdbm.so; perl Makefile.PL MP_APXS=/web/bin/apxs
-
- b. for 32 bit CentOS machines:
- sudo ln -s /usr/lib/libgdbm.so.2.0.0 /usr/lib/libgdbm.so; perl Makefile.PL MP_APXS=/web/bin/apxs
-
- c. for 64 bit Fedora 14 machines
- sudo ln -s /usr/lib64/libgdbm.so.3.0.0 /usr/lib64/libgdbm.so; perl Makefile.PL MP_APXS=/web/bin/apxs
-
- d. for 32 bit Fedora 14 machines
- sudo ln -s /usr/lib/libgdbm.so.3.0.0 /usr/lib/libgdbm.so; perl Makefile.PL MP_APXS=/web/bin/apxs
-
- make
- sudo make install
-
-7. Install Geo-IP (http://geolite.maxmind.com/download/geoip/api/c/GeoIP-1.4.3.tar.gz)
-
- cd /web/src
- wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP-1.4.3.tar.gz
- tar -zxvf GeoIP-1.4.3.tar.gz
- cd GeoIP-1.4.3
- ./configure --prefix=/web
- make
- sudo make install
-
-Download the GeoLite Country and City files from the Maxmind site:
-
-http://www.maxmind.com/app/ip-location
-
-Place the unzipped data files in /use/local/share where GeoIP expects to find them.
-
-8. Install Cronolog (http://cronolog.org/download/cronolog-1.6.2.tar.gz)
-
- cd /web/src
- wget http://cronolog.org/download/cronolog-1.6.2.tar.gz
- tar -zxvf cronolog-1.6.2.tar.gz
- cd cronolog-1.6.2
- ./configure --prefix=/web
- make
- sudo make install
-
-9. Install Git (http://kernel.org/pub/software/scm/git/git-1.7.3.5.tar.bz2)
-
- cd /web/src
- wget http://git-core.googlecode.com/files/git-1.7.7.tar.gz
- tar -zxvf git-1.7.7.tar.gz
- cd git-1.7.7
- ./configure
- make
- sudo make install
-
-10. Start memcache (init script)
-
- sudo /sbin/chkconfig --add memcached
- sudo /sbin/service memcached start
-
-11. Install MyConfig.pm #didn't do.....
-
- sudo mkdir -p /root/.cpan/CPAN
- cd /web/src
- wget http://kinetic-resources.s3.amazonaws.com/MyConfig.pm
- sudo cp MyConfig.pm /root/.cpan/CPAN
-
-Note: you may want to update the CPAN mirrors in this list.
-
-
-12. Install newest version of CPAN (Optional - as of the writing of these instructions, the version was v1.9402)
-
- perl -MCPAN -e 'install Bundle::CPAN'
-
-Answer "n" to "Do you want to modify/update your configuration (y|n)" question
-Hit return on "Enter arithmetic or Perl expression: exit" question
-
-13. Install Kinetic.pm Bundle (http://kinetic-resources.s3.amazonaws.com/Kinetic.pm)
-
- sudo mkdir -p /root/.cpan/Bundle
- cd /web/src
- sudo wget http://kinetic-resources.s3.amazonaws.com/Kinetic.pm
- sudo cp Kinetic.pm /root/.cpan/Bundle
- sudo -s # now you are root
- cd /root/.cpan/Bundle
- perl -MCPAN -e 'install Bundle::Kinetic')"
- exit
-
-
-Hit return on "Which SSL install path do you want to use? [/usr]" question
-Hit return on "Do you want to run the live tests (y/N)? [N] " question
-Answer "y" to "Do you want to install Module::Build? [y]" question
-Answer "n" to "Do you want to install Inline::C? [y]" question
-Hit return on "Do you want to install JSON::XS?(Y/n) [Y]" question
-Hit return on "Auto-install the 1 optional module(s) from CPAN? [y]" question during the Net-Twttier-Lite module install
-Hit return on "Auto-install the 1 mandatory module(s) from CPAN? [y]" question during the XML-LibXML module install
-Hit return on "Auto-install the 1 optional module(s) from CPAN? [y]" question during the JSON-Syck module install
-Answer "y" to the "Auto-install the 1 optional module(s) from CPAN? [n]" question during the JSON-XS module install
-Answer "y" to the "Auto-install the 1 optional module(s) from CPAN? [n]" question during the JSON module install
-Hit return on the "Auto-install the 1 optional module(s) from CPAN? [n]" question during the JSON-DWIW module install
-Hit return on the "Do you want to install it permanently? [yes]" question during the IPC-Cmd module install
-Hit return on the "Do you want to install it permanently? [yes]" question during the ExtUtils-CBuilder module install
-Hit return on the "Do you want to install it permanently? [yes]" question during the Devel-PPPort module install
-
-Note: this is a large bundle and can experience what seem like non-deterministic failures. Since installing the bundle is idempotent, you can run the install over again to ensure it worked.
-
-14. Install other Perl modules you'll need not in the Bundle:
-
- Math::Round
- Data::Diver
- MongoDB
-
-
-15. Note: for Fedora Core 14 (and above?) you need to install Crypt::OpenSSL::X509 by itself
-
- cd /web/src
- wget http://search.cpan.org/CPAN/authors/id/D/DA/DANIEL/Crypt-OpenSSL-X509-1.6.tar.gz
- tar -zxvf Crypt-OpenSSL-X509-1.6.tar.gz
- cd Crypt-OpenSSL-X509-1.6
- perl ./Makefile.PL
- make
- make install
-
-16. Install Test-WWW-Mechanize (http://search.cpan.org/CPAN/authors/id/P/PE/PETDANCE/Test-WWW-Mechanize-1.30.tar.gz)
-
- cd /web/src
- wget http://search.cpan.org/CPAN/authors/id/P/PE/PETDANCE/Test-WWW-Mechanize-1.30.tar.gz
- tar -zxvf Test-WWW-Mechanize-1.30.tar.gz
- cd Test-WWW-Mechanize-1.30
- perl ./Makefile.PL
- make
- sudo make install
-
-17. Install Apache2 Request (http://mirrors.axint.net/apache//httpd/libapreq/libapreq2-2.12.tar.gz)
-
- cd /web/src
- wget http://mirrors.axint.net/apache//httpd/libapreq/libapreq2-2.13.tar.gz
- tar -zxvf libapreq2-2.13.tar.gz
- cd libapreq2-2.13
- perl Makefile.PL --with-apache2-apxs=/web/bin/apxs
- make
- sudo make install
-
-18. Install Apache-Session-Memcached (http://search.cpan.org/CPAN/authors/id/E/EN/ENRYS/Apache-Session-Memcached-0.03.tar.gz)
-
- cd /web/src
- wget http://search.cpan.org/CPAN/authors/id/E/EN/ENRYS/Apache-Session-Memcached-0.03.tar.gz
- tar -zxvf Apache-Session-Memcached-0.03.tar.gz
- cd Apache-Session-Memcached-0.03
- perl Makefile.PL
- make
- sudo make install
-
-19. Install Inline Java (http://search.cpan.org/CPAN/authors/id/P/PA/PATL/Inline-Java-0.52.tar.gz)
-
- cd /web/src
- wget http://search.cpan.org/CPAN/authors/id/P/PA/PATL/Inline-Java-0.52.tar.gz
- tar -zxvf Inline-Java-0.52.tar.gz
- cd Inline-Java-0.52
-
- a. for 32-bit:
- perl Makefile.PL J2SDK=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0 BUILD_JNI=0
- b. for 64-bit:
- perl Makefile.PL J2SDK=/usr/lib/jvm/java-1.6.0-openjdk.x86_64 BUILD_JNI=0
-
- make
- sudo make install
-
-20. Install and start MongoDB
-
-Create /etc/yum.repos.d/10gen.repo file and populate it with:
-
-a. for 64-bit OS:
- [10gen]
- name=10gen Repository
- baseurl=http://downloads.mongodb.org/distros/centos/5.4/os/x86_64/
- gpgcheck=0
-
-b. for 32-bit OS:
- [10gen]
- name=10gen Repository
- baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/i686
- gpgcheck=0
-
-Install the package:
-
-a. for 64-bit OS
- sudo yum -y install mongo-stable mongo-stable
-
-b. for 32-bit OS
- sudo yum -y install mongo-10gen mongo-10gen-server # 32-bit
-
-Start MongoDB:
-
- sudo /sbin/service mongod start
-
-21. Install GeoIP Perl module
-
- sudo ln -s /web/share/GeoIP /usr/local/share/GeoIP
- cd /web/src
- wget http://search.cpan.org/CPAN/authors/id/B/BO/BORISZ/Geo-IP-1.38.tar.gz
- tar -zxvf Geo-IP-1.38.tar.gz
- # export KOBJ_ROOT=/web/lib/perl
- # export WEB_ROOT=/web
- cd Geo-IP-1.38
- perl Makefile.PL LIBS=-L/web/lib INC=-I/web/include PP=1
- make
- sudo make install
-
-22. Ensure ownership is correct
-
- sudo chown -R web:web /web
-
-
-INSTALLATION
-
-1. Get the code
-
- cd /web/lib
- git clone git://github.com/kre/Kinetic-Rules-Engine.git
- ln -s Kinetic-Rules-Engine perl
-
-2. Create the initial file-based ruleset repository
-
- cp -R /web/lib/perl/etc/install/rulesets /web
-
-3. Start JAVA Inline Parser
-
- cd ~/lib/perl/parser
- ./buildjava.sh
- perl -MInline::Java::Server=restart
-
-4. Install and edit the config file
-
- cp /web/lib/perl/etc/install/kns_config.yml /web/etc
-
- The default values in kns_config.yml should be fine for a development box. Edit for production.
-
-5. Generate the config and init file:
-
- cd /web/lib/perl
- bin/install-httpd-conf.pl -aljkfs
- bin/install-init-files.pl
-
-6. Create the initial Mongo indexes:
-
- **Need index create script from @MEH**
-
-7. Set up the httpd start up file and start Apache
-
-For Redhat, Centos, and Fedora:
-
- sudo mv /etc/init.d/httpd /etc/init.d/httpd.orig
- sudo cp /web/lib/perl/etc/install/httpd /etc/init.d
- sudo /sbin/chkconfig --add httpd
- sudo /sbin/service httpd start
-
-8. Run PERL smoke tests
-
- su web
- cd /web/lib/perl/t
- ./smoke
-
-
-KNOWN ISSUES
-
-mongodb indexes
-?? SNS keys
-?? Log Sink config block
+https://github.com/kre/kre_standalone/tree/master/kre00
+The Docker installation is incomplete right now.

0 comments on commit 6117f03

Please sign in to comment.