Subject: Using cacti with other web servers than apache variants
Package: cacti
Version: 0.8.6h-3
Severity: wishlist
Tags: patch

Problem
-------

I wanted to use cacti with lighttpd, but installing cacti pulled apache2 along 
which I did not want installed.


Solution
--------

Someone in the #debian irc channel on freenode.net (I wish I can remember who) 
advised me to use the equivs package
to track down the problem, which I did. I used php5 instead of php4 all along.

I performed the following steps before attempting anything of my objectives:

1. I installed cacti and all of its dependencies. I used php5 instead of the 
default php4 by explicitly installing the
php5 counterparts of the dependencies of cacti, then I installed cacti with its 
other default dependencies
(apache2, mysql 5, ... etc.)

2. I needed to manually add "extension=mysql.so" to /etc/php5/apache/php.ini. 
For some reason, the other extensions
were enables except mysql's.

3. At this point, cacti was working fine on apache.


To make sure that the concept of using lighttpd with cacti is feasible, I tried 
to run cacti on top of lighttpd
using the following steps:

1. I installed lighttpd, configured it to run on a different port, enabled the 
built-in fastcgi module,
installed php5-cgi, and added an alias to cacti's site folder.

2. Again, I needed to manually add "extension=mysql.so" to 
/etc/php5/cgi/php.ini.

3. At this point, cacti was working fine on lighttpd, too.


The next step was to make sure that lighttpd is capable of running cacti on its 
own and without any help from
any apache component, I tried to purge apache and its related stuff and make 
sure lighttpd can still run
cacti. So, I did the following (every remove in the following is actually a 
purge):

1. Remove apache2 (I'm not sure if apache2 package was really installed or not, 
since apache2-mpm-prefork provides
apache2 and was installed):
  Effect:
  - No effect. Not used. apache2-mpm-prefork (a dependency of 
libapache2-mod-php[45]) is used instead.

2. Replace libapache2-mod-php5 with an empty package that provides 
libapache2-mod-php5 (created using equivs):
  Effect:
  - php doesn't work with apache anymore after a force-reload.
  - lighttpd still works fine after a force-reload.

3. Replace apache2-mpm-prefork with an empty package that provides apache2 
(trying to remove apache2-mpm-prefork
caused cacti to get uninstalled since apache2-mpm-prefork provides apache2 
which is a dependency of cacti):
  Effect:
  - No apache server installed.
  - lighttpd still working with php and cacti.

4. Remove apache2-common.

Now the only apache-related package still installed (other than the equivs 
dummies!) is apache2-utils,
which is suggested by lighttpd and removing it won't casue any problems.



Conclusion
----------
cacti can work with other web servers than apache variants. I verified this 
lighttpd only, but there should be no
reason for any other web server that supports php not to be able to run cacti.

I did not try to find out an alternative set of dependencies for cacti, but 
basically httpd along with some php
dependency should do it, besides the database setup dependencies.

I have to say that I did not have to worry about any database stuff. It was 
well setup by default.

The system information below is for a temporary test setup. My final deployment 
system is an arm architecture.



-- System Information:
Debian Release: testing/unstable
 APT prefers testing
 APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-686
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)

Versions of packages cacti depends on:
ii apache2-dummy [apache2] 1.0 A dummy package replacing apache2 ii dbconfig-common 1.8.13 common framework for packaging dat
ii  debconf [debconf-2.0]         1.5.1      Debian configuration management sy
ii  libapache2-mod-php5-dummy [li 1.0        A dummy package replacing libapach
ii  libphp-adodb                  4.72-0.1   The 'adodb' database abstraction l
ii  logrotate                     3.7.1-3    Log rotation utility
ii  mysql-client-5.0 [virtual-mys 5.0.22-2   mysql database client binaries
ii  php5-cli                      5.1.2-1+b1 command-line interpreter for the p
ii  php5-mysql                    5.1.2-1+b1 MySQL module for php5
ii  php5-snmp                     5.1.2-1+b1 SNMP module for php5
ii  rrdtool                       1.2.11-0.5 Time-series data storage and displ
ii  snmp                          5.2.2-3    NET SNMP (Simple Network Managemen
ii  ucf                           2.0010     Update Configuration File: preserv

Versions of packages cacti recommends:
ii iputils-ping 3:20020927-3 Tools to test the reachability of ii mysql-server 5.0.22-2 mysql database server (current ver
ii  mysql-server-5.0 [mysql-ser 5.0.22-2     mysql database server binaries

-- debconf information:
 cacti/app-password-confirm: (password omitted)
 cacti/mysql/admin-pass: (password omitted)
 cacti/password-confirm: (password omitted)
 cacti/mysql/app-pass: (password omitted)
 cacti/db/app-user: cacti
 cacti/mysql/admin-user: root
 cacti/upgrade-backup: true
 cacti/install-error: abort
* cacti/webserver: Apache2
 cacti/internal/reconfiguring: false
 cacti/mysql/method: unix socket
 cacti/remote/host:
 cacti/upgrade-error: abort
 cacti/import-oldsettings:
 cacti/dbconfig-upgrade: true
 cacti/remote/newhost:
 cacti/purge: false
 cacti/passwords-do-not-match:
 cacti/dbconfig-remove: true
 cacti/dbconfig-install: true
 cacti/performing_upgrade: false
 cacti/database-type:
 cacti/remove-error: abort
 cacti/db/dbname: cacti
 cacti/remote/port:



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to