/* $Id: INSTALL,v 1.2 2000/08/14 19:40:41 slay Exp $ */ Installation 1. Take a look at the MCONFIG files in the root and subdirectories of the source tree. Normally you don't need to change anything, unless you want to change the way the binaries are built, change their default installation locations or more. This package is now almost FHS compliant, while remaining backwards compatible. Maybe you have to change the value of NOBODY, but only if the binaries are to be used in a system with different UID for user nobody. more MCONFIG (vi/joe/emacs MCONFIG) 2. Do a make patches under the ipacct source directory. This creates the kernel patches with the changes you made in MCONFIG. make patches 3. Go into the patches directory and choose a suitable patch for your kernel. There are some old patches under patches/OLD which should work with older kernels, but I don't recommend using them. Instead upgrade to a 2.2.x version of the kernel. If Linus really means that 2.2 is a stable version, this patch should work with very minor changes to all the 2.2 series. 4. Now change your directory to the parent of the Linux kernel source tree you want to patch for use with ipacct and apply the patch. Read the patch man page, if you don't know what the options mean. cd /usr/src patch -p0 -s < patch.linux-2.2.14 If this doesn't work, try (conflicting path names) cd /usr/src/linux patch -p1 -s < patch.linux-2.2.14 5. You can recompile your kernel, now. But don't forget to activate the ipacct kernel extensions by answering yes to the "Per user IP accounting" question while doing the make config. Make sure that your links under /usr/include are right and that they point to the kernel tree you patched for the use with ipacct. Normally this is a link from /usr/include/linux and /usr/include/asm to /usr/src/linux/include/linux and /usr/src/linux/include/asm respectively. make config (try make menuconfig) make dep make clean make bzImage (or make zlilo, or whatever you use usually) If you use modules you will also: make modules make modules_install 6. Do a make under the ipacct source directory. make 7. Do a make install. This will install the programs and man pages in the places you specified in MCONFIG. make install 8. If you want to run ipquota on your system you have to install a line in your rc.local or any other suitable rc file, that starts ipacctd and ipquota at boot time. echo Starting ipacctd with ipquota... /usr/sbin/ipacctd /usr/sbin/ipquota If you want to run ipstats add the following: echo Starting ipacctd with ipstats... /usr/sbin/ipacctd /usr/sbin/ipstats 9.a. The ipquota installation will by default use the classic MIDBS backend, using the /var/log/quota.stats file. If a 0.7g+ version of ipquota was installed on your machine, the new version will be a plugin replacement. b. If you wish to use the MySQL backend you'll have to: 1. create a MySQL ipquota database. See: ipquota/midbs/config/mysql for an example setup 2. modify the MIDBS config file at /etc/ipacct/midbs.config c. Remember, you can always override the default MIDBS database connection in the midbs.config file, by using the environment variable "IPQUOTADB". Set it to the name of the connection you wish to use: the ipquota range of tools will use that connection instead of the default. 10.a. ipquota: Now you can add users to the accounting database with the ipadd command. /usr/sbin/ipadd username 1024000 10% 1w Or display the ip quota of a user. /usr/bin/sayip username b. ipstats: Now you can allow access to a user with the ipallow command. /usr/sbin/ipallow -a username See the man pages for more information. 10. You should have a running ipacct system, now. If you encountered any problems please report them to me and I'll try to solve them and answer your questions. You can contact me, the current maintainer, Ramses Smeyers or the author of the MIDBS backend code, Erik Cumps, who can be reached as slay@mind.be. But please be patient as our time is very limited. Even if you contact the author, I would apreciate a cc: (carbon-copy) to me. 11. Finally, you can find the MIDBS design document under ipquota/midbs/doc/design. A PS and PDF file is available together with the original LaTeX sources.