| 1 | package XAS::Docs::Collector::Installation; | ||
| 2 | |||
| 3 | 1 | our $VERSION = '0.01'; | |
| 4 | |||
| 5 | 1 | 1; | |
| 6 | |||
| 7 | __END__ | ||
| 8 | |||
| 9 | =head1 NAME | ||
| 10 | |||
| 11 | XAS::Docs::Collector::Installation - how to install the XAS Collector | ||
| 12 | |||
| 13 | XAS is middleware for datacenter operations. It provides standardized methods, | ||
| 14 | modules and philosophy for constructing applications typically used to manage | ||
| 15 | a datacenter. This system is based on production level code. | ||
| 16 | |||
| 17 | =head1 GETTING THE CODE | ||
| 18 | |||
| 19 | Since the code repository is git based, you can use the following commands: | ||
| 20 | |||
| 21 | # mkdir XAS-Collector | ||
| 22 | # cd XAS-Collector | ||
| 23 | # git init | ||
| 24 | # git pull http://scm.kesteb.us/git/XAS-Collector master | ||
| 25 | |||
| 26 | Or you can download the code from CPAN in the following manner: | ||
| 27 | |||
| 28 | # cpan -g XAS-Collector | ||
| 29 | # tar -xvf XAS-Collector-0.01.tar.gz | ||
| 30 | # cd XAS-Collector-0.01 | ||
| 31 | |||
| 32 | When done, the following commands are run from that directory. | ||
| 33 | |||
| 34 | =head1 INSTALLATION | ||
| 35 | |||
| 36 | On Unix like systems, using pure Perl, run the following commands: | ||
| 37 | |||
| 38 | # perl Build.PL --installdirs site | ||
| 39 | # ./Build | ||
| 40 | # ./Build test | ||
| 41 | # ./Build install | ||
| 42 | # ./Build post_install | ||
| 43 | |||
| 44 | If you are DEB based, Debian build files have been provided. If you have a | ||
| 45 | Debian build environment, then you can do the following: | ||
| 46 | |||
| 47 | # debian/rules build | ||
| 48 | # debian/rules clean | ||
| 49 | # dpkg -i ../libxas-collector-perl_0.01-1_all.deb | ||
| 50 | |||
| 51 | If you are RPM based, a spec file has been included. If you have a | ||
| 52 | rpm build environment, then you can do the following: | ||
| 53 | |||
| 54 | # perl Build.PL | ||
| 55 | # ./Build --installdirs vendor | ||
| 56 | # ./Build test | ||
| 57 | # ./Build dist | ||
| 58 | # rpmbuild -ta XAS-Collector-0.01.tar.gz | ||
| 59 | # cd ~/rpmbuild/RPMS/noarch | ||
| 60 | # yum --nogpgcheck localinstall perl-XAS-Collector-0.01-1.noarch.rpm | ||
| 61 | |||
| 62 | Each of these installation methods will overlay the local file system and | ||
| 63 | tries to follow Debian standards for file layout and package installation. | ||
| 64 | |||
| 65 | On Windows, do the following: | ||
| 66 | |||
| 67 | > perl Build.PL | ||
| 68 | > Build | ||
| 69 | > Build test | ||
| 70 | > Build install | ||
| 71 | > Build post_install | ||
| 72 | |||
| 73 | It is recommended that you use L<Strawberry Perl|http://strawberryperl.com/>, | ||
| 74 | L<ActiveState Perl|http://www.activestate.com/activeperl> | ||
| 75 | doesn't have all of the necessary modules available. | ||
| 76 | |||
| 77 | B<WARNING> | ||
| 78 | |||
| 79 | Not all of the Perl modules have been included to make the software | ||
| 80 | run. You may need to load additional CPAN modules. How you do this, | ||
| 81 | is dependent on how you manage your systems. This software requires | ||
| 82 | Perl 5.8.8 or higher to operate. | ||
| 83 | |||
| 84 | =head1 DATABASE CREATION | ||
| 85 | |||
| 86 | If you are planning to use a database as your datastore. The following will | ||
| 87 | create a SQLite3 database. | ||
| 88 | |||
| 89 | On Unix/Linux do the following: | ||
| 90 | |||
| 91 | # xas-create-schema --schema XAS::Model::Database::Messaging --directory . | ||
| 92 | # sqlite3 /var/lib/xas/messaging.db < ./XAS-Model-Schema-0.01-SQLite.sql | ||
| 93 | # rm -f ./XAS-Model-Schema-0.01-SQLite.sql | ||
| 94 | |||
| 95 | On Windows do the following: | ||
| 96 | |||
| 97 | > xas-create-schema --schema XAS::Model::Database::Messaging --directory . | ||
| 98 | > sqlite3 \XAS\lib\messaging.db < XAS-Model-Schema-0.01-SQLite.sql | ||
| 99 | > delete XAS-Model-Schema-0.01-SQLite.sql | ||
| 100 | |||
| 101 | =head1 POST INSTALLATION | ||
| 102 | |||
| 103 | You should check the collectors configuration file to see if the proper | ||
| 104 | modules are being loaded. By default, it only loads the modules needed | ||
| 105 | to handle Alerts and Log message types and those modules will either need a | ||
| 106 | database or a logstash instance to work correctly. Setting up either one | ||
| 107 | is beyond the scope of this document. | ||
| 108 | |||
| 109 | Once that is done. You need to start the collector. On Debian or RHEL | ||
| 110 | you would issue the following commands: | ||
| 111 | |||
| 112 | # service xas-collector start | ||
| 113 | # chkconfig --add xas-collector | ||
| 114 | |||
| 115 | On Windows, use these commands: | ||
| 116 | |||
| 117 | > xas-collector --install | ||
| 118 | > sc start XAS_COLLECTOR | ||
| 119 | |||
| 120 | Now you can check the log files for any errors and proceed from there. | ||
| 121 | |||
| 122 | =head1 SUPPORT AND DOCUMENTATION | ||
| 123 | |||
| 124 | After installing, you can find documentation for this module with the | ||
| 125 | perldoc command. | ||
| 126 | |||
| 127 | perldoc XAS-Collector | ||
| 128 | |||
| 129 | Extended documentation is available here: | ||
| 130 | |||
| 131 | http://scm.kesteb.us/trac | ||
| 132 | |||
| 133 | The latest and greatest is always available at: | ||
| 134 | |||
| 135 | http://scm.kesteb.us/git/XAS-Collector | ||
| 136 | |||
| 137 | =head1 LICENSE AND COPYRIGHT | ||
| 138 | |||
| 139 | Copyright (c) 2015 Kevin L. Esteb | ||
| 140 | |||
| 141 | This is free software; you can redistribute it and/or modify it under | ||
| 142 | the terms of the Artistic License 2.0. For details, see the full text | ||
| 143 | of the license at http://www.perlfoundation.org/artistic_license_2_0. | ||
| 144 | |||
| 145 | =cut |