设为首页 收藏本站
查看: 1109|回复: 0

[经验分享] windows系统安装cacti

[复制链接]
累计签到:2 天
连续签到:2 天
发表于 2017-4-20 06:38:02 | 显示全部楼层 |阅读模式
Installing Cacti on Windows
=================================
Installations

   1. Download and install the following pieces of software:
          * (optional) Apache and install it to c:apache or c:apache2.  Make sure to install it as a service.
          * Cacti and extract it to the root of your web server directory.  Typically c:inetpubwwwroot or c:apache2.
          * Cactid and extract it to c:cactid.
          * RRDTool and extract it to c:rrdtool.
          * PHP 4.3.6+ or 5.x and extract it to c:php.
          * MySQL 4.0 or MySQL 4.1.  5.0 is not supported under Cacti 0.8.6g.  Install it to c:mysql.
          * (optional) Cygwin. Download setup.exe and keep it around until later used in the document.
          * (optional) Net-SNMP and install to c:net-snmp.

Configure PHP

   1.

      If using PHP 4, move the files in c:phpdlls to c:php.
   2.

      Add the following to your Windows PATH environment variable c:php. The Windows path can be accessed via the Control Panel at: System | Advanced | Environment Variables | System Variables..
   3.

      Add the following two new environment variables to your system using the procedure above: PHPRC=c:php.
         1. If using PHP 4, create this variable:  MIBDIRS=c:phpmibs
         2. If using PHP 5, create this variable:  MIBDIRS=c:phpextrasmibs
   4.

      If using PHP 4.3.5 or less (not recommended), create the following directory c:tmp.
   5.

      Rename the file c:phpphp.ini.dist to php.ini, and make the following changes to it:

      If using PHP 4 uncomment the following lines:

extension_dir = c:phpextensions
extension=php_snmp.dll
extension=php_sockets.dll
   

      If using PHP 5 uncomment the following lines:

extension_dir = c:phpext
extension=php_mysql.dll
extension=php_snmp.dll
extension=php_sockets.dll
   

      If using PHP 4.3.5 or less include the following line. If using 4.3.6 or greater, you should remove this line if present.

session.save_path=c:tmp
   

   6.

      If you have had previous versions of PHP installed, you had likely moved the PHP system files to in the Windows directory structure. If so, you will have to remove those files. Please review your PHP installation documentation for instructions on removing those files.
   7. If you want to allow template importing, uncomment the following line:

file_uploads = On

   8. Give the user who will be running the scheduled task, modify rights to:

c:phpmibs.index

Configure the Webserver (Apache)

   1.

      Make sure you have stopped any IIS web servers before you proceed with Apache installation.
   2.

      If you are using Apache 1.3.x, installation of PHP 5 is not recommended. If using PHP 4, add the following lines to your httpd.conf file in the c:apacheconf directory:

LoadModule php4_module c:phpsapiphp4apache.dll
AddModule mod_php4.c
AddType application/x-httpd-php .php
DirectoryIndex index.html index.htm index.php
   

   3.

      If you are using Apache 2.x, add the following lines to your httpd.conf file in the c:apache2conf directory:

      If using PHP 4, then add the following lines:

LoadModule php4_module c:phpsapiphp4apache2.dll
AddType application/x-httpd-php .php
DirectoryIndex index.html index.htm index.php
   

      If using PHP 5, then add the following lines:

LoadModule php5_module c:phpphp5apache2.dll
AddType application/x-httpd-php .php
DirectoryIndex index.html index.htm index.php
   

Configure the Webserver (IIS)

   1.

      Start the Internet Information Services (IIS) Manager, right click on Default Web Site (in most cases) and select Properties.
   2.

      Under the Home Directory tab, select Configuration and click Add. Browse to the path of php4isapi.dll or php5isapi.dll, and type in .php as the extension.
      IIS6: Enable All Verbs and Script Engine.
   3.

      Under the ISAPI Filters tab, click Add and browse to the php4isapi.dll or php5isapi.dll file. Name the filter "php" and click OK.
   4.

      Under the Documents tab, add index.php to the top of the list.
   5. If using IIS6, go to Web Service Extensions and add a new Web Service Extension.  Name the extension "php", click Add and browse to the php4isapi.dll or php5isapi.dll file,  enable Set Extension status to Enable, and click OK.
   6. Under the Default Web Site, right click on Cacti and select Properties.
   7. Under the Directory tab, click the Write checkbox..
   8. Give the IUSR_XXXX and IIS_WPG users read & execute permissions to the file %windir%system32cmd.exe.  They will also need read permissions on <web root>/cacti/ and its subfolders.
   9. IIS6: Give the IIS_WPG user modify permissions to the folders /cacti/log and /cacti/rrd.
  10.

      Completely stop and start the IIS service using the following commands:

net stop iisadmin
net start w3svc
   

Install Cygwin (optional)

   1. Installing a single instance of Cygwin, and using it for all applications that require it is recommended so you do not have different versions of the Cygwin dlls laying around on your system, which can cause conflicts.
   2. Run setup.exe you previously downloaded.
   3. Once you reach the portion of setup entitled Select Packages, install the following:

Base (whole thing)
Libs
libart_lgpl
     libfreetype26
     libpng12
     zlib
Utils
patch
Web
wget

   4. Add c:cygwinbin to your system path.
   5. Move setup.exe to c:cygwin for future use.

Install RRDTool

   1. If you have Cygwin installed, remove the DLL files from the c:rrdtool directory.

Configure MySQL

   1.

      Start MySQL by running c:mysqlbinwinmysqladmin.exe.
   2.

      Set a password for the root user

shell> cd mysqlbin
shell> mysqladmin --user=root password somepassword
shell> mysqladmin --user=root --password reload
   

   3.

      Create the MySQL database:

shell> mysqladmin --user=root --password create cacti
   

   4.

      Import the default Cacti database:

shell> mysql --user=root --password cacti < c:apache2htdocscacticacti.sql
   

   5.

      Optional: Create a MySQL username and password for Cacti.

shell> mysql --user=root --password mysql
mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword';
mysql> flush privileges;

   6. If you're running MySQL 4.1 or newer with PHP 4.x, then you will need to apply the old password trick for user authentication to work with Cacti.

shell> SET PASSWORD FOR 'cacti'@'localhost' = OLD_PASSWORD('newpwd');
mysql> FLUSH PRIVILEGES;


      You will also need to modify your MySQL configuration file, typically my.ini in c:mysql.   Stop the MySQL service and add the following line:

--old-passwords

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-366527-1-1.html 上篇帖子: 使用Cacti监控你的网络Cacti的安装 下篇帖子: cacti+nagios整合问题
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表