Skip to content
Permalink
Browse files

Bug:

Submitted by:
Reviewed by:
Approved by:
Obtained from:

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@14437 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
Mark Duling
Mark Duling committed Oct 6, 2005
1 parent bb9423a commit 24161b4b82813bcd2e01bf27bba8f7fc9a790b9f
Showing with 39 additions and 30 deletions.
  1. +39 −30 net/nedi/Portfile
@@ -1,4 +1,4 @@
# $Id: Portfile,v 1.1 2005/09/18 23:28:22 markd Exp $
# $Id: Portfile,v 1.2 2005/10/06 05:02:31 markd Exp $

PortSystem 1.0

@@ -70,26 +70,40 @@ post-activate {

ui_msg "\n#### To complete the NeDi OS X installation ####

1) Download Applications
1) Re-install MySQL using the +server variant
-----------------------------------------------
-Perform these commands
sudo port -f uninstall mysql4
sudo port clean --all mysql4
sudo port install mysql4 +server

Configure MySQL and set a root password: (for new MySQL installs)
sudo -u mysql mysql_install_db
sudo chown -R mysql:mysql ${prefix}/var/db/mysql/
sudo chown -R mysql:mysql ${prefix}/var/run/mysqld/
sudo chown -R mysql:mysql ${prefix}/var/log/mysql/

sudo ${prefix}/etc/rc.d/mysql4.sh start (or reboot)
mysqladmin -u root password <new-password>


2) Download Apache 2 and PHP Binaries
------------------------------------------------
-Download Complete Apache 2, Complete PHP, and Complete MySQL
-Download Complete Apache 2 and Complete PHP
http://www.serverlogistics.com/downloads.php

Notes about Apache, PHP, and MySQL
Notes about Apache and PHP
----------------------------------
NeDi requires PHP with SNMP support enabled, which is a non-default option
and extremely challenging to compile into PHP. Complete PHP is the only
PHP binary installer that has it -Complete PHP requires Complete Apache 2.
NeDi requires the MySQL 4.0.x series -the easiest way to install that is
with Complete MySQL. All this entails using packages from Server Logistics
for Apache, PHP, and MySQL in combination to run NeDi.
and extremely challenging to compile into PHP. Complete PHP is a binary
installed PHP package with SNMP support and it requires Complete Apache 2.


2) Create an OS X nedi user (or choose an existing one) using the Accounts
3) Create an OS X NeDi user (or choose an existing one) using the Accounts
pane in System Preferences


3) Install Complete Apache 2 (version 2.0.52)
4) Install Complete Apache 2 (version 2.0.52)
------------------------------------------------
-Turn off Personal Web Sharing
-Run Apache2.pkg installer
@@ -103,33 +117,20 @@ Group <nedi-group>
-Start Apache 2 via System Preferences pane


4) Install Complete PHP 4 (version 4.3.9)
5) Install Complete PHP 4 (version 4.3.9)
------------------------------------------------
-Run PHP4.pkg installer
-Edit /Library/PHP4/lib/php.ini
mysql.default_socket = /opt/local/var/run/mysqld/mysqld.sock
-Drag test.php to /Library/Apache2/htdocs
-Start Apache via the Apache 2 System Preferences pane
-Test PHP with this link: http://localhost/test.php


5) Install Complete MySQL (version 4.0.21)
------------------------------------------------
-Run MySQL.pkg installer
-Drag MySQL.prefPane to /Library/PreferencePanes
-Add /Library/MySQL/bin to the *front* of your path statement in ~/.bash_profile
-Use the MySQL Pane in System Preferences to initialize, set a root password, & start MySQL

NOTE:
A copy of MySQL 4.1.x is installed automatically during the NeDi DarwinPorts
install (below) because NeDi requires a MySQL Perl module, the installation
of which triggers a DarwinPorts MySQL install. That version won't run if we
just ignore it, and we'll do that because NeDi does not work with MySQL 4.1.x.


6) Configure, and Login to NeDi
6) Configure NeDi, initialize database, and Login to NeDi
-----------------------------------------------
-Set NeDi owner: sudo chown -R <nedi-user>:<nedi-group> ${prefix}/var/${name}/
-Apache symlink: ln -s ${prefix}/var/${name}/html/ /Library/Apache2/htdocs/nedi
-MySQL symlink: ln -s /tmp/mysql.sock /opt/local/var/run/mysqld/mysqld.sock
-Edit nedi.conf Backend/Authen. vars: sudo pico ${prefix}/var/${name}/nedi.conf
Leave nedi.conf permissions at 600 to protect your network passwords!
backend MSQ
@@ -138,6 +139,13 @@ authuser mysql

-Initialize the NeDi database: ${prefix}/var/${name}/nedi.pl -i
Enter 'root' and the MySQL root password when prompted

-Verify the NeDi DB:
mysql -u root -p
mysql> use nedi;
mysql> show tables;
mysql> exit;

-Login to the NeDi web interface: http://localhost/nedi/index.php
Initial user/pass is 'admin'/'admin'

@@ -151,8 +159,9 @@ comm <my-community-string>
<usr> <pass> <enablepass>

-Make any other desired changes in nedi.conf
-Start NeDi data collect.: sudo -u <nedi-user> ${prefix}/var/${name}/nedi.pl -c
Use -d for debug output until you know NeDi is running properly.
-Start NeDi data collection:
cd ${prefix}/var/${name}/nedi.pl
sudo -u <nedi-user> nedi.pl -c -d (debug)
-Put a command in the crontab to discover your network at regular intervals.
For example, to run NeDi every day at 11:00 and 3:00:
1 11,15 * * * cd ${prefix}/var/${name} ; ./nedi.pl -c >> /dev/null 2>&1

0 comments on commit 24161b4

Please sign in to comment.
You can’t perform that action at this time.