removing old documentation files

git-svn-id: svn+ssh://repo.cacti.net/var/data/svnroot/cacti/trunk/cacti@1444 860744bd-22fc-0310-8c96-e9fe5004b5ca
This commit is contained in:
Ian Berry committed 2004-01-06 00:34:39 +00:00
1 parent d87eb56c64
commit 10dd9263d2
5 files changed
-778

No files matched your search

-91
View File
@@ -1,91 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<title>cacti Documentation</title>
<style>
<!--
BODY
{
font-size: 10pt;
font-family: Arial, sans-serif;
}
-->
</style>
</head>
<body>
<h2>Cacti Coding Standards</h2><p>
<h3>Cacti-Specific Stuff</h3><p>
<ul>
<li>Don't use variables such as $HTTP_SERVER_VARS["SCRIPT_NAME"] to describe the current file. Write
out the complete filename when referencing to the file. (ex. rra.php)</li>
<li>Try to store all calls to colors in the $colors array (stored in include/config_vars.php)</li>
<li>Try to consalidate files whenever possible. For instance, all of the CDEF stuff is stored in
cdef.php. In 0.6.x this was split into two separate files: cdef.php and cdef_items.php. This
guidline does not apply as much to files in the 'include/' directory.</li>
<li>Use to $args and $form arrays to reference to HTTP GET/POST variables repectively. Do not use PHP's
$_GET and $_POST arrays, since they require PHP 4.1.0 or higher.</li>
<li>When saving data from a form, try to always use the sql_save() function.</li>
<li>Always use the start_box() and end_box() functions to start/stop HTML "boxes".</li>
<li>When rendering the actual form try and use as much HTML as possible, using PHP where needed. This
differs from 0.6.x where the entire form was generated using functions. Many of those functions
are still used, however more HTML means the ability to generate more "custom looking" forms. Look
cdef.php for a good example of how to moderate this.</li>
<li>Use db_fetch_cell() when your expecting one value from one column back. Use db_fetch_row() when
you are expecting one whole row back. Use db_fetch_assoc() when you are expecting multiple rows
back from the SQL query, use the syntax 'foreach ($output as $item)' to loop through the output.
Always make sure to check if you got any output before trying to loop through it, or you will
receive an error.</li>
<li>Update the 'dev/sql/changes.sql' file with any database schema changes you make.</li>
<li>Feel free to keep your complete database schema in 'dev/sql/complete_db-name'.</li>
<li>DO NOT use native mysql_*() calls. If we need to extend the database functions, we will.</li>
</ul>
<h3>Common Sense Stuff</h3><p>
<ul>
<li>When in doubt... indent! (loops, if/case/function statements, etc)</li>
<li>Please comment your code whenever and where ever possible.</li>
<li>Your code should look clean. Make sure to space things out appropriatly and not run lots of lines
together one one line.</li>
<li>Use descriptive variables that show what the variable is for. $i is generally the only exception
to this rule.</li>
<li>Only select the columns you need in your SQL select statements.</li>
<li>Use the print() function, not the echo() function.</li>
<li>Use print() when displaying small portions of HTML (1 or 2 lines), break out of PHP (?&gt; &lt;?)
when displaying a bunch of HTML at once. Also, I would still recommend using print() anytime the HTML
code is going to contain a lot of PHP.</li>
<li>Use single quotes in HTML instead of double to prevent problems when using copy/paste or converting
blocks of HTML to print()'s.</li>
<li>If you use CSS/DHTML/Javascript, make sure it's *very* cross-browser. Compatability with IE 5+
for PC and NS 6+ for PC, Mac, and Unix should be mandatory with support for Opera, Konqueror, and others also
a plus.</li>
<li>Try to keep your interfaces consistant with the rest of the project. Don't use wacky font sizes, colors,
or graphics.</li>
</ul>
<h3>Good Developer Practices</h3><p>
<ul>
<li>Always add a comment when doing a CVS checkin. Make sure it's clear to someone not intimately familiar
with that section of code what you were working on.</li>
<li>Don't check in code you know is broken (as in parse errors - incomplete or non-fuctional code is ok but
working code is better :) )</li>
<li>If you're thinking of working on a different section of the code, email the list to make sure there's
not already somebody working with it. There's no sense having two people working on two solutions to the same
problem.</li>
<li>Ping the list with ideas or general plans. The other developers might see reasons to take another approach.
Even if you're the only one working on that particular section of code, this is still a group project and decisions
about they system as a whole should be made as a group.</li>
<li>If you've got issues with another developer on the project, mail the list. Try to be polite and not flame
but if there are conflicts, be they personal or technical, the group as a whole should know.</li>
</ul>
</body>
</html>
-201
View File
@@ -1,201 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<title>Cacti Frequently Asked Questions</title>
<style>
<!--
BODY
{
font-size: 10pt;
font-family: Arial, sans-serif;
}
P.code
{
font-size: 10pt;
font-family: Courier New, Courier;
font-weight: bold;
margin: 5px;
padding: 5px;
color: #000066;
background-color: #EEEEEE;
}
TT.shell
{
font-size: 10pt;
font-family: Courier New, Courier;
font-weight: normal;
color: #999999;
}
-->
</style>
</head>
<body>
<h1>Cacti Frequently Asked Questions (FAQ)</h1><p>
<h2>Using Cacti</h2><p>
<ol>
<li>
<strong>How do I create traffic graphs?</strong>
<p>Before you can create traffic graphs, Cacti must have working SNMP support. One way to do this is to
compile PHP with SNMP support built in, many times you can install the 'php-snmp' package to do this. The
second option is to have Cacti call the snmpget and snmpwalk binaries from your ucd-snmp or net-snmp
installation. You can use the about page to determine whether to are using "built-in" or "external" SNMP
support.</p>
<p>Now that you have working SNMP support, follow these steps.</p>
<ol>
<li>Click "Polling Hosts" on Cacti's menu.</li>
<li>Click "Add" to add a new polling host.</li>
<li>Type a description, hostname, management IP, and SNMP community. Make sure to select "Generic SNMP-enabled Host"
under "Host Template" and click "Create".</li>
<li>You should see one or more interfaces listed under the "Data Query [SNMP - Interface Statistics]" box. Place a
check next to each interface that you want to graph. Below the box, select type of graph that you want to create
(bits, bytes, summation, etc).</li>
<li>Click "Save", and "Create" on the following screen to create your graphs.</li>
</ol>
</li>
</ol>
<h2>General</h2><p>
<ol>
<li>
<strong>I get the following error message from Cacti: <em>Warning: Undefined variable: _SERVER in
.../cacti/install/index.php on line 59</em></strong>
<p>Cacti 0.8 and above requires that you have at least PHP 4.1 or greater installed.</p>
</li>
<li>
<strong>I get the following error message from Cacti: <em>Fatal error: Call to undefined function:
mysql_connect() in /usr/share/cacti/include/database.php on line 19</em></strong>
<p>Your installation of PHP does not have MySQL installed or enabled. On binary-based distributions, make sure
you have the 'php-mysql' package installed. Also make sure that 'extension=mysql.so' is uncommented in your
php.ini file.</p>
</li>
<li>
<strong>I have forgotten my 'admin' password to Cacti, how do I reset it?</strong>
<p>To reset the admin account password back to the default of 'admin', connect to your Cacti database at the command line.</p>
<p class="code"><tt class="shell">shell&gt;</tt> <b>mysql -u root -p cacti</b></p>
<p>Now execute the following SQL:</p>
<p class="code"><tt class="shell">mysql&gt;</tt> <b>update user_auth set password='21232f297a57a5a743894a0e4a801fc3' where username='admin';</b></p>
</li>
</ol>
<h2>Monitoring</h2><p>
<ol>
<li>
<strong>I am polling thousands of items and cmd.php takes more than 5 minutes to run.</strong>
<p>Give cactid, the future replacement for cmd.php a try. Unlike cmd.php, cactid is written in c and makes use
of pthreads. On a typical installation, it is not uncommon for cactid to poll about 500 items in less then 10
seconds.</p>
</li>
<li>
<strong>I changed <em>x</em>, and now some of my graphs are not updating.</strong>
<p>The best thing to do here is to force Cacti to rebuild its poller cache. To do this click "Utilities"
on the Cacti menu, and simply select "Clear Poller Cache".</p>
</li>
<li>
<strong>I am using Redhat 8.0 and SNMP is not working.</strong>
<p>Redhat 8.0 comes with a broken php-snmp package. Updating your 'php-snmp' and 'net-snmp' packages to their latest
versions should fix this problem.</p>
</li>
<li>
<strong>How do I configure net-snmp so it will work with Cacti?</strong>
<p>Run <em>snmpconf -g basic_setup</em> and follow the prompts. Also check that the file being used by snmpd is the correct
config file. For Redhat Linux, snmpconf creates the /etc/snmpd.conf, but snmpd uses /etc/snmpd/snmpd.conf.</p>
<p>If this doesn't work a very simple config file is:</p>
<p class="code"># contact<br>
syslocation Something<br>
syscontact "root@someone.com"<br>
<br>
# auth<br>
rocommunity public<br>
<br>
# disk monitoring<br>
disk /</p>
</li>
</ol>
<h2>Graphs</h2><p>
<ol>
<li>
<strong>I just installed Cacti and all of my graphs appear as broken images.</strong>
<p>For you to actually get graph images, cmd.php must run at least once so it can create .rrd files in Cacti's
'rra/' directory. Double check that you configured your /etc/crontab file to execute cmd.php every five minutes.
Also make sure that the user cmd.php runs as has permission to create new files in Cacti's 'rra/' directory.</p>
<p>If all of your settings appear correct, try running cmd.php manually by cd'ing to Cacti's directory and typing:</p>
<p class="code"><tt class="shell">shell&gt;</tt> <b>php cmd.php</b></p>
<p>If you have files in your 'rra/' directory, but your graphs still appear as broken images, you should enable
graph debug mode see exactly why the graphs are not rendering. To do this go into Cacti, select "Graph Management"
from the menu, select any graph listed, and select "Turn On Graph Debug Mode".</p>
</li>
<li>
<strong>My graphs render, but they do not contain any data.</strong>
<p>More often than not, this problem's cause is permissions. For instance if you run cmd.php manually as root for
testing, any .rrd files that it creates will be owned by root. Now when cmd.php runs from cron, it will not be
able to update these .rrd files because they are owned by root. You can double check the owner of your .rrd files
by running the following command in your Cacti directory:</p>
<p class="code"><tt class="shell">shell&gt;</tt> <b>ls -al rra/</b></p>
<p>If only some of your graphs are not updating correctly, double check the "Maximum Value" field for all data
sources used by these graphs. If the value being fed to the .rrd file exceeds its "Maximum Value", RRDTool will insert
an "Unknown" and you will see no data on the graph.</p>
</li>
<li>
<strong>A lot of my graphs contain long ifAlias names, but they are being truncated to 15 characters.</strong>
<p>Cacti does this by default to better control graph title formatting. You can change this limit, by going to "Cacti
Settings" on the Cacti menu, selecting the "Visual" tab, and changing the value for "Data Queries - Maximum Field Length".</p>
</li>
<li>
<strong>One of my devices rebooted and now I have a huge spike on my graph!</strong>
<p>This occurs because the reboot causes SNMP's counters to reset, which can cause a rather large spike on the graph
when RRDTool tries to determine the change between the new small counter value and the large previous value. One way to
combat this issue is to specify realistic maximum values for your data sources. RRDTool will ignore any value that is larger
than the maximum value.</p>
<p>If you already have a spike on one or more of your graphs, there is a really
<a href="http://cricket.sourceforge.net/contrib/files/killspike2">useful Perl script</a> that will remove them for you.</p>
</li>
</ol>
<h2>Windows Related</h2><p>
<ol>
<li>
<strong>I get the following error message from Cacti: <em>Fatal error: Cannot redeclare title_trim() (previously
declared in ...\cacti\include\functions.php:27)</em></strong>
<p>Contrary to previous versions of Cacti, you must not put Cacti in your PHP include path. Check your php.ini file to make
sure there is not something like '<em>include_path = C:/Apache2/htdocs/cacti</em>'.
</li>
</ol>
-242
View File
@@ -1,242 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<title>Cacti Installation Instruction for Windows</title>
<style>
<!--
BODY
{
font-size: 10pt;
font-family: Arial, sans-serif;
}
P.code
{
font-size: 10pt;
font-family: Courier New, Courier;
font-weight: bold;
margin: 5px;
padding: 5px;
color: #000066;
background-color: #EEEEEE;
}
TT.shell
{
font-size: 10pt;
font-family: Courier New, Courier;
font-weight: normal;
color: #999999;
}
P.php
{
font-size: 10pt;
font-family: Courier New, Courier;
font-weight: normal;
color: #000000;
margin: 5px;
padding: 5px;
background-color: #EEEEEE;
}
TT.php-var
{
font-size: 10pt;
font-family: Courier New, Courier;
font-weight: normal;
color: #008080;
}
-->
</style>
</head>
<body>
<h2>Cacti Installation (Windows)</h2><p>
<h3>Dependencies</h3><p>
Cacti requires:
<ul>
<li><a href="http://www.rrdtool.org/">RRDtool</a>:<br>
<tt><a href="http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/">http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/</a> <b><a href="http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/rrdtool-1.0.40.x86distr.zip-5.8.zip">rrdtool-1.0.40.x86distr.zip-5.8.zip</a></b></tt><p></li>
<li><a href="http://www.php.net/">PHP 4.1</a> or newer (with SNMP support):<br>
<tt><a href="http://www.php.net/downloads.php">http://www.php.net/downloads.php</a> <b><a href="http://www.php.net/get/php-4.3.1-Win32.zip/from/a/mirror">php-4.3.1-Win32.zip</a></b></tt><p></li>
<li><p><a href="http://www.mysql.com/">MySQL 3.23</a> or newer.<br>
<tt><a href="http://www.mysql.com/downloads/mysql-3.23.html">http://www.mysql.com/downloads/mysql-3.23.html</a> <b><a href="http://www.mysql.com/downloads/download.php?file=Downloads%2FMySQL-3.23%2Fmysql-3.23.56-win.zip&pick=mirror">mysql-3.23.56-win.zip</a></b></tt><p></li>
<li><a href="http://www.apache.org/">Apache</a> 1.3.20/IIS 5.x or higher<br>
<tt><a href="http://httpd.apache.org/download.cgi">http://httpd.apache.org/download.cgi</a> <b><a href="http://www.ibiblio.org/pub/packages/infosystems/WWW/servers/apache/httpd/binaries/win32/apache_2.0.45-win32-x86-no_ssl.msi">apache_2.0.45-win32-x86-no_ssl.msi</a></b></tt><p></li>
</ul><p>
<h3>Install PHP</h3><p>
<ol>
<li>Extract PHP to c:\ and rename the new directory to 'php'.<p>
<li>Copy the files in c:\php\dlls to c:\winnt\system32<p>
<li>Copy the file c:\php\php4ts.dll to c:\winnt\system32<p>
<li>Move all MIB files from c:\php\mibs to c:\usr\mibs<p>
<li>Create the directory <em>c:\tmp</em><p>
<li>In the c:\php directory, rename the <em>php.ini-dist</em> file to <em>php.ini</em>, copy it to c:\winnt,
and make the following changes to the file:<p>
<p class="php">extension_dir = c:/php/extensions<br>
extension=php_snmp.dll<br>
session.save_path=c:\tmp<p>
Make sure to replace <em>c:/webroot/cacti</em> with your <strong>full</strong> path to cacti.<p>
</ol>
<h3>Configure the Webserver (Apache)</h3><p>
<ol>
<li>Install the Apache web server. This is as simple as double clicking the .msi file and following the prompts.
Make sure to install it as a service and for the sake of the HOWTO, install it to c:\apache or c:\apache2<p>
<li>If you are using <strong>Apache 1.3.x</strong>, add the following lines to your httpd.conf file in the c:\apache\conf directory:<p>
<p class="php">LoadModule php4_module c:/php/sapi/php4apache.dll<br>
AddModule mod_php4.c<br>
AddType application/x-httpd-php .php<br>
DirectoryIndex index.html index.htm index.php<p>
<li>If you are using <strong>Apache 2.x</strong>, add the following lines to your httpd.conf file in the c:\apache2\conf directory:<p>
<p class="php">LoadModule php4_module c:\php\sapi\php4apache2.dll<br>
AddType application/x-httpd-php .php<br>
DirectoryIndex index.html index.htm index.php<p>
</ol>
<h3>Configure the Webserver (IIS)</h3><p>
<ol>
<li>Start the Microsoft Management Console, right click on <em>Default Web Server</em> (in most cases) and
select <strong>Properties</strong>.<p>
<li>Under the <em>Home Directory</em> tab, select <em>Configuration</em> and click <em>Add</em>.
Browse to the path of <em>php4isapi.dll</em>, and type in .php as the extension.<p>
<li>Under the <em>ISAPI Filters</em> tab, click add and browse to the <em>php4isapi.dll</em> file. Name the
filter "php" and click OK.<p>
<li>Under the <em>Documents</em> tab, add <strong>index.php</strong> to the list.<p>
<li>Completely stop and start the IIS service using the following commands:<p>
<p class="php">net stop iisadmin<br>
net start w3svc<p>
</ol>
<h3>Install MySQL</h3><p>
<ol>
<li>Extract the MySQL zip file to a temp directory and run setup.exe.<p>
<li>Install MySQL to the c:\mysql directory.<p>
<li>Start MySQL by running c:\mysql\bin\winmysqladmin.exe<p>
<li>Set a password for the root user<p>
<p class="code"><tt class="shell">C:\&gt;</tt> <b>cd mysql\bin</b><br>
<tt class="shell">C:\MySQL\bin&gt;</tt> <b>mysqladmin password '<em>password</em>'</b><br>
<tt class="shell">C:\MySQL\bin&gt;</tt> <b>mysqladmin --user=root --password reload</b><br></p><br>
<li>Create the MySQL database:<p>
<p class="code"><tt class="shell">C:\MySQL\bin&gt;</tt> <b>mysqladmin --user=root --password create cacti</b></p><br>
<li>Import the default cacti database:<p>
<p class="code"><tt class="shell">C:\MySQL\bin&gt;</tt> <b> mysql --user=root --password cacti &lt; c:\apache2\htdocs\cacti\cacti.sql</b></p><br>
<li><b>Optional:</b> Create a MySQL username and password for cacti.<p>
<p class="code"><tt class="shell">C:\MySQL\bin&gt;</tt> <b>mysql --user=root --password mysql</b><br>
<tt class="shell">mysql&gt;</tt> <b>GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY '<i>somepassword</i>';</b><br>
<tt class="shell">mysql&gt;</tt> <b>flush privileges;</b></p><br>
</ol>
<h3>Installation Instructions</h3><p>
<ol>
<li>Extract the distribution archive. You can use a program like <a href="http://www.winzip.com/">WinZip</a> to
open .tar.gz files. These instructions will assume that the archive has been
extracted to <em>C:\Apache\htdocs\cacti</em>, although you can use a different path if you wish.
Make sure you extract with "Use folder names" enabled, so that the necessary sub-folders
will be used.<p>
<li>Unzip rrdtool and copy <strong>rrdtool.exe</strong> from the <em>src/tool_release</em> directory to somewhere such as
C:\rrdtool<p>
<li>Edit the <b>cacti\include\config.php</b> file.<p>
<ul>
<li><p>Specify the MySQL user, password and database for your cacti configuration.</p></li>
<p class="php"><b>$database_default</b> = <tt class="php-var">"cacti"</tt>;<br>
<b>$database_hostname</b> = <tt class="php-var">"localhost"</tt>;<br>
<b>$database_username</b> = <tt class="php-var">"cactiuser"</tt>;<br>
<b>$database_password</b> = <tt class="php-var">"cacti"</tt>;
</p>
<li><p>Change the operating system variable to "win32" (already done for win32 distribution):</p></li>
<p class="php"><b>$config[<tt class="php-var">"cacti_server_os"</tt>]</b> = <tt class="php-var">"win32"</tt>;<br></p><br>
</ul>
<li>You are going to need to schedule a task, so <em>cmd.php</em> can run every 5 minutes. Make sure the
<em>Task Scheduler</em> service is started and open up the <strong>Scheduled Tasks</strong> control panel item.
Add a new task, browse to your <em>php.exe</em> file and click <em>Next</em>. Have the task run daily (for now) and
click <em>Next</em> twice until you are at the username/password screen. You must enter a user that has
read/write permissions to cacti rra/ and log/ directories here. Click <em>Next</em>, check the box to open
Advanced Properties and click <em>Finish</em>.<p>
You are going to have to enter the full command line in the <em>Run</em> textbox. Using default paths,
your command line should look something like:<p>
<p class="php">c:\php\php.exe c:\apache2\htdocs\cacti\cmd.php</p>
<p>Select the <em>Schedule</em> tab and click <em>Advanced</em>. Check the <em>Repeat task</em> checkbox
and change it to every 5 minutes, then change the <em>Duration</em> to 24 hours. That should
schedule <em>cmd.php</em> to run every 5 minutes.</p>
<li>Point your web browser to:<p>
<blockquote>http://your-server/cacti/</blockquote>
<p>Log in the with a username/password of <strong>admin</strong>. You will be required to
change this password immediatly. Using the default paths described in this document, your
paths should look something like:</p>
<p><strong>PHP Binary Path:</strong></p>
<p class="php">c:/php/php.exe</p>
<p><strong>rrdtool Binary Path:</strong></p>
<p class="php">c:/rrdtool/rrdtool.exe</p>
<p><strong>cacti Web Root:</strong></p>
<p class="php">/cacti</p>
<p><strong>Apache Web Root:</strong></p>
<p class="php">c:/apache2/htdocs</p>
</ol>
</body>
</html>
-134
View File
@@ -1,134 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<title>Cacti Installation Instructions</title>
<style>
<!--
BODY
{
font-size: 10pt;
font-family: Arial, sans-serif;
}
P.code
{
font-size: 10pt;
font-family: Courier New, Courier;
font-weight: bold;
margin: 5px;
padding: 5px;
color: #000066;
background-color: #EEEEEE;
}
TT.shell
{
font-size: 10pt;
font-family: Courier New, Courier;
font-weight: normal;
color: #999999;
}
P.php
{
font-size: 10pt;
font-family: Courier New, Courier;
font-weight: normal;
color: #000000;
margin: 5px;
padding: 5px;
background-color: #EEEEEE;
}
TT.php-var
{
font-size: 10pt;
font-family: Courier New, Courier;
font-weight: normal;
color: #008080;
}
-->
</style>
</head>
<body>
<h2>Cacti Installation</h2><p>
<h3>Dependencies</h3><p>
Cacti requires:
<ul>
<li><a href="http://www.rrdtool.org/">RRDtool</a>:<br>
<tt><a href="http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/">http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/</a> <b><a href="http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/rrdtool-1.0.42.tar.gz">rrdtool-1.0.42.tar.gz</a></b></tt><p>
<li><a href="http://net-snmp.sf.net/">net-snmp</a> (for SNMP support):<br>
<tt><a href="http://sourceforge.net/project/showfiles.php?group_id=12694">http://sourceforge.net/project/showfiles.php?group_id=12694</a> <b><a href="http://prdownloads.sourceforge.net/net-snmp/net-snmp-5.0.8.tar.gz?download">net-snmp-5.0.8.tar.gz</a></b></tt><p>
<li><a href="http://www.php.net/">PHP 4.1</a> or newer.<br>
<tt><a href="http://www.php.net/downloads.php">http://www.php.net/downloads.php</a> <b><a href="http://www.php.net/get/php-4.3.1.tar.gz/from/a/mirror">php-4.3.1.tar.gz</a></b></tt><p>
<li><a href="http://www.mysql.com/">MySQL 3.23</a> or newer.<br>
<tt><a href="http://www.mysql.com/downloads/mysql-3.23.html">http://www.mysql.com/downloads/mysql-3.23.html</a> <b><a href="http://www.mysql.com/downloads/download.php?file=Downloads%2FMySQL-3.23%2Fmysql-3.23.56.tar.gz&pick=mirror">mysql-3.23.56.tar.gz</a></b></tt><p>
</ul><p>
<h3>Installation Instructions</h3><p>
<ol>
<li>Extract the distribution tarball.<p>
<p class="code"><tt class="shell">shell&gt;</tt> <b>tar xzvf cacti-<i>version</i>.tar.gz</b></p><br>
<li>Create the MySQL database:<p>
<p class="code"><tt class="shell">shell&gt;</tt> <b>mysqladmin --user=root create cacti</b></p><br>
<li>Import the default cacti database:<p>
<p class="code"><tt class="shell">shell&gt;</tt> <b>mysql cacti &lt; cacti.sql</b></p><br>
<li><b>Optional:</b> Create a MySQL username and password for cacti.<p>
<p class="code"><tt class="shell">shell&gt;</tt> <b>mysql --user=root mysql</b><br>
<tt class="shell">mysql&gt;</tt> <b>GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY '<i>somepassword</i>';</b><br>
<tt class="shell">mysql&gt;</tt> <b>flush privileges;</b></p><br>
<li>Edit <b>include/config.php</b>.<p>
<ul>
<li><p>Specify the MySQL user, password and database for your cacti configuration.</p></li>
<p class="php"><b>$database_default</b> = <tt class="php-var">"cacti"</tt>;<br>
<b>$database_hostname</b> = <tt class="php-var">"localhost"</tt>;<br>
<b>$database_username</b> = <tt class="php-var">"cactiuser"</tt>;<br>
<b>$database_password</b> = <tt class="php-var">"cacti"</tt>;<br>
</p><br>
</ul>
<li>Set the appropriate permissions on cacti's directories for graph/log generation. You should execute these commands from inside cacti's directory to change the permissions.<p>
<p class="code"><tt class="shell">shell&gt;</tt> <b>chown -R <em>cactiuser</em> rra/ log/</b></p><br>
<p>(Enter a valid username for <em>cactiuser</em>, this user will also be used in the next step for
data gathering.)</p>
<li>Add a line to your <strong>/etc/crontab</strong> file similar to:<p>
<p class="php">*/5 * * * * <em>cactiuser</em> php <em>/var/www/html/cacti/</em>cmd.php > /dev/null 2>&amp;1</p>
<p><ul>
<li>Replace <em>cactiuser</em> with the valid user specified in the previous step.</li>
<li>Replace <em>/var/www/html/cacti/</em> with your <strong>full</strong> cacti path.</li>
</ul></p>
<li>Point your web browser to:<p>
<blockquote>http://your-server/cacti/</blockquote>
<p>Log in the with a username/password of <strong>admin</strong>. You will be required to
change this password immediatly. Make sure to fill in all of the path variables carefully
and correctly on the following screen.</p>
</ol>
</body>
</html>
-110
View File
@@ -1,110 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<title>Cacti Upgrade Instructions</title>
<style>
<!--
BODY
{
font-size: 10pt;
font-family: Arial, sans-serif;
}
P.code
{
font-size: 10pt;
font-family: Courier New, Courier;
font-weight: bold;
margin: 5px;
padding: 5px;
color: #000066;
background-color: #EEEEEE;
}
TT.shell
{
font-size: 10pt;
font-family: Courier New, Courier;
font-weight: normal;
color: #999999;
}
P.php
{
font-size: 10pt;
font-family: Courier New, Courier;
font-weight: normal;
color: #000000;
margin: 5px;
padding: 5px;
background-color: #EEEEEE;
}
TT.php-var
{
font-size: 10pt;
font-family: Courier New, Courier;
font-weight: normal;
color: #008080;
}
-->
</style>
</head>
<body>
<h2>Cacti Upgrade</h2><p>
<h3>Upgrade Instructions</h3><p>
<ol>
<li>Backup the old cacti database:<p>
<p class="code"><tt class="shell">shell&gt;</tt> <b>mysqldump cacti > mysql.cacti</b></p><br>
<li>Backup the old cacti directory:<p>
<p class="code"><tt class="shell">shell&gt;</tt> <b>mv cacti cacti_old</b></p><br>
<li>Extract the distribution tarball.<p>
<p class="code"><tt class="shell">shell&gt;</tt> <b>tar xzvf cacti-<i>version</i>.tar.gz</b></p><br>
<li>Rename the new cacti directory to match the old one:<p>
<p class="code"><tt class="shell">shell&gt;</tt> <b>mv cacti-<em>version</em> cacti</b></p><br>
<li>Copy the *.rrd files from the old cacti directory:<p>
<p class="code"><tt class="shell">shell&gt;</tt> <b>cp cacti_old/rra/* cacti/rra/</b></p><br>
<li>Edit <b>include/config.php</b>.<p>
<ul>
<li><p>Specify the MySQL user, password and database for your cacti configuration.</p></li>
<p class="php"><b>$database_default</b> = <tt class="php-var">"cacti"</tt>;<br>
<b>$database_hostname</b> = <tt class="php-var">"localhost"</tt>;<br>
<b>$database_username</b> = <tt class="php-var">"cactiuser"</tt>;<br>
<b>$database_password</b> = <tt class="php-var">"cacti"</tt>;<br>
</p><br>
</ul>
<li>Set the appropriate permissions on cacti's directories for graph/log generation. You should execute these commands from inside cacti's directory to change the permissions.<p>
<p class="code"><tt class="shell">shell&gt;</tt> <b>chown <em>cactiuser</em> rra/ log/</b></p><br>
<p>(Enter a valid username for <em>cactiuser</em>, this user will also be used in the next step for
data gathering.)</p>
<li>Point your web browser to:<p>
<blockquote>http://your-server/cacti/</blockquote>
<p>Make sure to fill in all of the path variables carefully
and correctly on the following screen.</p>
</ol>
</body>
</html>