|
OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD. |
|
Thread Tools | Display Modes |
|
|||
BackupPC on OpenBSD?
I'm trying to get BackupPC and the web interface running on OpenBSD. Previously I've had it working on Fedora Linux and FreeBSD.
Problem: /etc/rc.d/backuppc start /etc/rc.d/wwbackuppc start ^ both fail after a fresh OpenBSD install with BackupPC First I have noticed that the _backuppc user doesn't get created and the permissions are wrong in various areas which I found by starting BackupPC as the user _backuppc. After permissions were fixed, backuppc started. Now the remaining problem is that I can't get /etc/rc.d/wwbackuppc to start. When I execute the command as described in the rc file, I get: "spawn-fcgi: child exited with: 2" |
|
|||
If you are having problems with the web interface please note that by default the Apache version in base runs chrooted.
See http://www.openbsd.org/faq/faq10.html#httpdchroot for the implications that could have.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
Thanks for the reply.
I changed rc.conf to start httpd with the "-u" flag to run unchrooted but still the same problem. To be honest I know almost nothing about web interfaces but I get the following output: Code:
perl /usr/local/bin/BackupPC_Admin.fcgi <h1>Software error:</h1> <pre>Can't locate FCGI.pm in @INC (@INC contains: /usr/local/libdata/perl5/site_perl/i386-openbsd [...]) at /usr/libdata/perl5/CGI/Fast.pm. line 25. ... Last edited by ocicat; 27th January 2013 at 10:53 AM. Reason: Please use [code] & [/code] tags when posting output. |
|
|||
That is a Perl error message, saying that it cannot find a module in the Perl module PATH @INC
The following tiny test program also triggers the same error: Code:
$ cat -n test.pl ; ./test.pl 1 #!/usr/bin/perl 2 3 use strict; 4 use warnings; 5 6 use CGI::Fast; 7 8 print "This is a test\n"; 9 10 Can't locate FCGI.pm in @INC (@INC contains: /usr/local/libdata/perl5/site_perl/amd64-openbsd /usr/libdata/perl5/site_perl/amd64-openbsd /usr/local/libdata/perl5/site_perl /usr/libdata/perl5/site_perl /usr/libdata/perl5/amd64-openbsd/5.12.2 /usr/local/libdata/perl5/amd64-openbsd/5.12.2 /usr/libdata/perl5 /usr/local/libdata/perl5 .) at /usr/libdata/perl5/CGI/Fast.pm line 25. BEGIN failed--compilation aborted at /usr/libdata/perl5/CGI/Fast.pm line 25. Compilation failed in require at ./test.pl line 6. BEGIN failed--compilation aborted at ./test.pl line 6. Code:
1 package CGI::Fast; 2 use strict; 3 4 # A way to say "use warnings" that's compatible with even older perls. 5 # making it local will not affect the code that loads this module 6 # and since we're not in a BLOCK, warnings are enabled until the EOF 7 local $^W = 1; 8 9 # See the bottom of this file for the POD documentation. Search for the 10 # string '=head'. 11 12 # You can run this file through either pod2man or pod2html to produce pretty 13 # documentation in manual or html file format (these utilities are part of the 14 # Perl 5 distribution). 15 16 # Copyright 1995,1996, Lincoln D. Stein. All rights reserved. 17 # It may be used and modified freely, but I do request that this copyright 18 # notice remain attached to the file. You may modify this module as you 19 # wish, but if you redistribute a modified version, please attach a note 20 # listing the modifications you have made. 21 22 $CGI::Fast::VERSION='1.08'; 23 24 use CGI; 25 use FCGI; But all of this does not help you much. Later on today I have some time, and will try to install backuppc myself. How did you install it? Through packages or ports? Which version of OBSD are you using?
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
Hi, that would be much appreciated. I installed OpenBSD 5.2 i386 using the "install52.iso" without x* and game* sets (from the cd). Then I set PKG_PATH and installed BackupPC from the ftp mirror using pkg_add.
Aha: Thanks for the info on the missing dependency issue. Turns out it just didn't install the 'fcgi' dependency. Solved by running: Code:
pkg_add fcgi 1. Required _backuppc user was not created. 2. BackupPC configuration and data directories therefore had wrong permissions. 3. Required dependency fcgi not installed. Not 100% sure weather httpd needs to run unchrooted but I havn't finished setting up yet. Last edited by bob701; 27th January 2013 at 09:17 PM. |
|
|||
I have it pretty much working now. This is what I had to do.
1. Install backuppc and optionally rsync... 2. Install missing dependencies bzip2 fcgi 3. Make user _backuppc following FreeBSD default, optionally using chpass after initial creation: UID: 300 GID: 300 Full Name: BackupPC pseudo-user Home Dir: /var/db/backuppc Shell: /sbin/nologin 4. chown _backuppc:_backuppc recursively on: /etc/backuppc /var/db/backuppc /var/log/backuppc 5. Move /var/www/conf/modules.sample/backuppc.conf to /var/www/conf/modules/backuppc.conf (Make sure you did what it said after the installation for the other packages) 6. Add the following to the "<Location>..." in backuppc.conf (we need to be able to login): Code:
AuthType Basic AuthUserFile /conf/users/backuppc AuthName "BackupPC" require valid-user 7. Make a user: Code:
htpasswd -c /var/www/conf/users/backuppc username 9. Start services on boot. Add the following to rc.conf.local: Code:
httpd_flags="" pkg_scripts="backuppc wwbackuppc" Last edited by bob701; 28th January 2013 at 03:48 AM. |
|
||||
The port of BackupPC has no $MAINTAINER of record, as it is maintained by a number of OpenBSD developers. You might consider posting about your experience with it to the OpenBSD ports@ mailing list.
If you do not yet use the mailing lists and wish to do so, please see http://www.openbsd.org/mail.html for details. |
|
|