Hello,
I just started using urbackup and although I haven’t fully set it up to my liking, it’s doing great so far for my tests. I’m still waiting for the drives that I would put on my server. So I ain’t an expert but I opted for Debian/kFreeBSD because I wanted to have native support for ZFS while still using my linux distro of choice but the installer from the downloads page just doesn’t work for me. The required packages are older and although I tried my best to follow each and every package - it just kept giving me another dependency or some catch-22. so I said f* it, I might have better luck compiling it from source since it’s available anyway. I actually got it working on the stable/release version: 1.3.2 with just these packages:
libcrypto+±dev
libcrypto+±utils
libcrypto++9
libcurl3:kfreebsd-amd64
I still had to compile it from source since it won’t work with using dpkg -i on the available deb package and download the kernel headers as well as ‘tweak’ it. I’ll explain it in a bit. I think as far as I understood the docs - the build won’t have python stats/graphs and it will have to use googlecharts which is fine. Anyway, so I saw that v1.4 is up for testing so I figured I’ll document my steps as well as try to complete all the required dependencies even if I had to build it from source and might as well share it. So here you go:
- UrBackUp Installation on Debian\kFreeBSD Wheezy -
GNU/kFreeBSD myFileServer-Ux 9.0-2-amd64 #0 Tue Jan 28 22:20:36 CET 2014 x86_64 amd64 Intel® Pentium® D CPU 2.80GHz GNU/kFreeBSD
uname -a
- Prep - install/compile urbackup requirements
build tools
apt-get install build-essentials checkinstall
libcrypto
apt-get install libcrypto++9 libcrypto+±dev libcrypto+±utils
python 2.6
apt-get install python2.6 python2.6-dev
python-numpy
apt-get install python-numpy
- This is one of the packages that just won’t install and it’s dependencies are a catch-22 *
building python-matplotlib
reference: http://matplotlib.org/1.3.1/users/installing.html#installing-from-source
wget https://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.3.1/matplotlib-1.3.1.tar.gz
tar xzf matplotlib-1.3.1.tar.gz
cd matplotlib-1.3.1
- You might also need to do apt-get install libfreetype libpng. I already had them and the good thing about this one is if a required package is not found it’ll find it for you using pip/easy_install.
under setup.cfg, I edited these values. I especially changed the backend because I think I read somewhere that the webpage is using wxwidgets. I tried to declare ‘windowing’ to false but I forgot to remove the #. So you can probably add it there too, the rest will stay in default, I think. At least that’s what the doc said.
macosx = False
wxagg = True
backend = WX
install wx requirements
apt-get install python-wxtools
start the build
- note that the python2.6 is important, if you use just python it fails because it defaults to python2.7, I think and not all the headers are available since the package dependencies are also broken. In any case, it looks like the source is built on v2.6 so it’s cool.
python2.6 setup.py install
libboost
- This one is particularly annoying, the required package is libboost1.42-dev-all which is only available on squeeze and it obviously is dependent on a load of other boost libraries since it’s all of them. The crappy thing is the python library is the one that breaks it but apart from that, it looks like each and every one of them will install. I actually didn’t bother with the python lib anymore. lazyyyyyyyyyy…
apt-get install libboost1.49-dev
apt-get install libboost-chrono1.49-dev libboost-date-time1.49-dev libboost-filesystem1.49-dev libboost-graph-parallel1.49-dev libboost-graph1.49-dev libboost-iostreams1.49-dev libboost-math1.49-dev libboost-mpi1.49-dev libboost-random1.49-dev libboost-regex1.49-dev libboost-serialization1.49-dev libboost-signals1.49-dev libboost-system1.49-dev libboost-test1.49-dev libboost-thread1.49-dev libboost-timer1.49-dev libboost-wave1.49-dev doxygen docbook-xml docbook-xsl default-jdk fop
~1.5GB of files, so make sure you have space.
libcurl
reference: https://urbackup.atlassian.net/wiki/pages/viewpage.action?pageId=884738
wget http://curl.haxx.se/download/curl-7.21.6.tar.bz2
tar jxf curl-7.21.6.tar.bz2
cd curl-7.21.6/
./configure
make clean && make
make install
- This is the single most important thing to note on compiling urbackup because regardless of getting all the required packages, it will simply not work because of this small ‘change’. It looks like the developers ‘moved’ a directory that contains a header that is referenced by another header but have not made sure that the change is reflected and updated in all things that might get affected by that change. I looked around the debian packages and the only kernel that has the correct directory tree is on the Sid version but ONLY i386. Maybe I’m lazy but I think I didn’t have any choice. The workaround is crude but it works.
reference as to why it needs to be done:
http://package-import.ubuntu.com/diffs/kfreebsd-kernel-headers
- Move <sys/kern> to <sys/kglue/sys> to make its origin clearer and make *
Workaround on the current Debian\kFreeBSD kernel so that it will find the correct header.
get the headers first, I wrote it above and my kernel is 9.0-2-amd64 which I think is the latest one.
- You probably only need one of these but I haven’t checked which is the right one. I downloaded all headers including metadata just in case.
apt-get install kfreebsd-headers-9.0-2-amd64 kfreebsd-headers-amd64 kfreebsd-headers-9-amd64 kfreebsd-headers-9.0-2
create ‘moved’ directory for a required header
mkdir -p /usr/include/sys/kglue/net
cp -a /usr/src/kfreebsd-headers-9.0-2-amd64/sys/net/if.h /usr/include/sys/kglue/net/
- I did a simple diff on the files since they have the same names and they aren’t the same in content so I thought there was a good chance it would work.
- Build & Install UrBackUp-Server
urbackup-server
stable/official-release: wget http://sourceforge.net/projects/urbackup/files/Server/1.3.2/urbackup-server-1.3.2.tar.gz
beta: wget http://sourceforge.net/projects/urbackup/files/WorkInProgress/urbackup-server-1.4.0.0.tar.gz
tar xvf urbackup-server-version.tar.gz
cd urbackup-server-1.0
./configure
make clean && make
make install
copy and configure the initscripts as well as the defaults file
cp init.d_server /etc/init.d/urbackup_srv
insserv urbackup_srv
cp defaults_server /etc/default/urbackup_srv
- Preferably I would like to use checkinstall instead of make install to easily manage the package/installation (plus it creates a deb package and that might even be shareable!) but I think some modifications need to be done in the dir options on ./configure. I used it on my earlier builds but it was installing the binaries and www files on the wrong locations. I got around it by manually copying the www files but I think I discovered another problem and I was too tired to figure it out so I just scrapped it and built everything on make install. I should post an update when I get to that, hopefully I’ll remember to document it as well, I’m pretty bad about it. If I we’re really bad, I’d just ask the developer to see if they can add it on as an option on /etc/defaults, grin. I was expecting that option to be there but wasn’t. hehe. I didn’t want to particularly mess around with the init scripts or the start script. It’s not a big deal.
Hopefully this would be able to help someone else. Your build should work now w/o a hiccup and you can be proud that you built it yourself. If there are any questions, uuh, I will try me best to answer!
Have fun.