First you have to get the source code (more info on wiki or compile tutorial):
# yum install darcs
$ darcs get http://www.pyflag.net/pyflag
After this, you will have a folder called pyflag. If you look at the install instructions from the PyFlag site, you can see that there are several packages that must be installed before installing PyFlag. Most of these can be found in yum repos, but under different names (items in parenthesis are the debian package names):
python-mysqldb (manual install)
# yum install python-dateutil clamav clamav-server mysql mysql-devel mysql-server file-devel pexpect python-imaging
After installing all of these packages, you must initialize mysql:
# /sbin/chkconfig mysqld on
# /sbin/service mysqld start
# mysqladmin -u root password 'new-passwd'
You must use quotes around the new-passwd you choose, and don't forget what it is!
You must also setup clamav-server so it will work. Make sure you know where everything is installed, because things get funky with clamav and Fedora:
# rpm -q --filesbypkg [packagename]
Where [packagename] is replaced by the package(s) you installed. I went ahead and installed all of clamav packages just to be safe. Two files of interest are the daemon file itself and the configuration file. My locations are:
This is annoying, because when you run the clamd daemon, it says it can't find the clamd.conf file in the appropriate place: /etc/clamd.conf So you can add a symbolic link to the real location:
ln -s /usr/share/doc/clamav-server-0.92.1/clamd.conf /etc/clamd.conf
You'll have to figure out how to set up your own clamd.conf file.
Ok, at this point you are able to install PyFlag:
$ cd pyflag
$ sh autogen.sh
$ su -
# make install
Make sure that you have no errors when running configure, make and make install. Now, before running PyFlag, you must set up the configuration file to point to the mysql.sock file. Fedora places the mysql.sock file in a different location than the default (/var/run/mysqld/mysqld.sock). So open up the configuration file using your favorite editor:
$ vi ~/.pyflagrc
Change the line that says:
Notice that ``run'' is changed to ``lib'' and the `d' is absent from the end of mysql. You are now set.
Also make sure that PyFlag points to the clamav socket (for example):
If everything goes well, you can then set up PyFlag:
Follow the instructions on the website for setting up pyflag by going to http://127.0.0.1:8000.
There was only one other thing I changed. Since I already have a service listening on port 8000, I changed the port in the configuration file:
I'll have a post later after I've played around with this for a while...