diff options
author | Eldad Zack <eldad@gentoo.org> | 2004-10-14 05:05:33 +0000 |
---|---|---|
committer | Eldad Zack <eldad@gentoo.org> | 2004-10-14 05:05:33 +0000 |
commit | a682f91cb9d5d10d59a118fead813959459af715 (patch) | |
tree | 951103b6acc394dabfe1793739fbf2081f851a31 /net-analyzer/cacti | |
parent | bump and fixes (bug #63889) (Manifest recommit) (diff) | |
download | gentoo-2-a682f91cb9d5d10d59a118fead813959459af715.tar.gz gentoo-2-a682f91cb9d5d10d59a118fead813959459af715.tar.bz2 gentoo-2-a682f91cb9d5d10d59a118fead813959459af715.zip |
Better postinst instructions: using webapp.eclass postinst support
Diffstat (limited to 'net-analyzer/cacti')
-rw-r--r-- | net-analyzer/cacti/ChangeLog | 6 | ||||
-rw-r--r-- | net-analyzer/cacti/cacti-0.8.6b.ebuild | 71 | ||||
-rw-r--r-- | net-analyzer/cacti/files/postinstall-en.txt | 70 |
3 files changed, 78 insertions, 69 deletions
diff --git a/net-analyzer/cacti/ChangeLog b/net-analyzer/cacti/ChangeLog index c0eef924fd80..18761d06dcf8 100644 --- a/net-analyzer/cacti/ChangeLog +++ b/net-analyzer/cacti/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for net-analyzer/cacti # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/cacti/ChangeLog,v 1.31 2004/10/14 04:41:29 eldad Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/cacti/ChangeLog,v 1.32 2004/10/14 05:05:33 eldad Exp $ + + 14 Oct 2004; Eldad Zack <eldad@gentoo.org> +files/postinstall-en.txt, + cacti-0.8.6b.ebuild: + Better postinst instructions: using webapp.eclass postinst support *cacti-0.8.6b (14 Oct 2004) diff --git a/net-analyzer/cacti/cacti-0.8.6b.ebuild b/net-analyzer/cacti/cacti-0.8.6b.ebuild index 49cfe47ea320..4a181fb9ef3d 100644 --- a/net-analyzer/cacti/cacti-0.8.6b.ebuild +++ b/net-analyzer/cacti/cacti-0.8.6b.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/cacti/cacti-0.8.6b.ebuild,v 1.1 2004/10/14 04:41:29 eldad Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/cacti/cacti-0.8.6b.ebuild,v 1.2 2004/10/14 05:05:33 eldad Exp $ inherit eutils webapp @@ -67,73 +67,8 @@ src_install() { dodir ${D}${MY_HTDOCSDIR} cp -r . ${D}${MY_HTDOCSDIR} + webapp_postinst_txt en ${FILESDIR}/postinstall-en.txt + webapp_src_install } -pkg_postinst() { - local webserver_root=${VHOST_ROOT}/${VHOST_HTDOCS_INSECURE} - - einfo "Install Notes: Assuming your webserver is at ${webserver_root}," - einfo "and that the webserver group is ${VHOST_DEFAULT_GID}." - einfo - einfo "New Install" - einfo - einfo "1. Create the new cacti database" - einfo " shell> mysqladmin --user=root create cacti" - einfo "2. Import the default cacti database:" - einfo " shell> mysql cacti < ${webserver_root}/${PN}/cacti.sql" - einfo "3. Optional: Create a MySQL username and password for cacti." - einfo " shell> mysql --user=root mysql" - einfo " mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword';" - einfo " mysql> flush privileges;" - einfo "4. Copy ${webserver_root}/${PN}/include/config-sample.php to config.php." - einfo " + Modify the MySQL user, password and database for your" - einfo " cacti configuration." - einfo " \$database_default = \"cacti\";" - einfo " \$database_hostname = \"localhost\";" - einfo " \$database_username = \"cactiuser\";" - einfo " \$database_password = \"cacti\";" - einfo "6. Point your web browser to: http://your-server/cacti/" - einfo " Make sure to fill in all of the path variables carefully and" - einfo " correctly on the following screen." - einfo - einfo "Upgrading" - einfo - einfo "Before cacti works you must upgrade the cacti database:" - einfo "1. Backup the old cacti database:" - einfo " shell> mysqlhotcopy --suffix=_old cacti" - einfo "2. Drop the old cacti database:" - einfo " shell> mysqladmin -p drop cacti" - einfo "3. Create the new cacti database" - einfo " shell> mysqladmin --user=root create cacti" - einfo "4. Import the default cacti database:" - einfo " shell> mysql cacti < ${webserver_root}/${PN}/cacti.sql" - einfo "5. Edit ${webserver_root}/${PN}/include/config.php." - einfo " + Modify the MySQL user, password and database for your" - einfo " cacti configuration." - einfo " \$database_default = \"cacti\";" - einfo " \$database_hostname = \"localhost\";" - einfo " \$database_username = \"cactiuser\";" - einfo " \$database_password = \"cacti\";" - einfo "6. Point your web browser to: http://your-server/cacti/" - einfo " Select \"Upgrade\"." - einfo " Make sure to fill in all of the path variables carefully and" - einfo " correctly on the following screen." - einfo "7. Test your upgraded installation. When all is fine you can" - einfo "drop the cacti_old database like so:" - einfo " shell> mysqladmin -p drop cacti_old" - einfo - einfo "Either new or upgrading, make sure you have a cron job -" - einfo "Add this line to your /etc/crontab file:" - einfo " */5 * * * * ${VHOST_DEFAULT_GID} php ${webserver_root}/${PN}/poller.php > /dev/null 2>&1" - einfo - einfo "FINALLY, you must have these settings in your php.ini:" - einfo " register_globals = On" - einfo " register_argc_argv = On" - einfo - ewarn "Note that you should use poller.php as the cronjob" - ewarn "instead of cmd.php (as it was with earlier version)" - ewarn "to enable you to switch between cmd.php and cactid." - - webapp_pkg_postinst -} diff --git a/net-analyzer/cacti/files/postinstall-en.txt b/net-analyzer/cacti/files/postinstall-en.txt new file mode 100644 index 000000000000..c66b8a786695 --- /dev/null +++ b/net-analyzer/cacti/files/postinstall-en.txt @@ -0,0 +1,70 @@ + +New Install + +1. Create the new cacti database + shell> mysqladmin --user=root create cacti +2. Import the default cacti database: + shell> mysql cacti < ${MY_INSTALLDIR}/cacti.sql +3. Optional: Create a MySQL username and password for cacti. + shell> mysql --user=root mysql + mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword'; + mysql> flush privileges; +4. Copy ${MY_INSTALLDIR}/include/config-sample.php to config.php. + + Modify the MySQL user, password and database for your + cacti configuration. + \$database_default = "cacti"; + \$database_hostname = "localhost"; + \$database_username = "cactiuser"; + \$database_password = "cacti"; +6. Point your web browser to: http://your-server/cacti/ + Make sure to fill in all of the path variables carefully and + correctly on the following screen. + + +Upgrading + +Before cacti works you must upgrade the cacti database: +1. Backup the old cacti database: + shell> mysqlhotcopy --suffix=_old cacti +2. Drop the old cacti database: + shell> mysqladmin -p drop cacti +3. Create the new cacti database + shell> mysqladmin --user=root create cacti +4. Import the default cacti database: + shell> mysql cacti < ${MY_INSTALLDIR}/cacti.sql +5. Edit ${MY_INSTALLDIR}/include/config.php. + + Modify the MySQL user, password and database for your + cacti configuration. + \$database_default = "cacti"; + \$database_hostname = "localhost"; + \$database_username = "cactiuser"; + \$database_password = "cacti"; +6. Point your web browser to: http://your-server/cacti/ + Select "Upgrade". + Make sure to fill in all of the path variables carefully and + correctly on the following screen. +7. Test your upgraded installation. When all is fine you can +drop the cacti_old database like so: + shell> mysqladmin -p drop cacti_old + + +Cronjob + +Either new or upgrading, make sure you have a cron job - Add this line to +your /etc/crontab file: + + */5 * * * * ${VHOST_SERVER_GID} php ${MY_INSTALLDIR}/poller.php > /dev/null 2>&1 + +Note that you should use poller.php as the cronjob instead of cmd.php (as it was with +earlier versions) to enable you to switch between cmd.php and cactid. + + +PHP + +FINALLY, you must have these settings in your php.ini: + + register_globals = On + register_argc_argv = On + + + |