[kforge-user] Can't get to install KForge[MyQSL]
John Bywater
john.bywater at appropriatesoftware.net
Wed Nov 10 12:50:29 UTC 2010
Hi alienik1,
alienik1 wrote:
> I'm trying to follow steps in INSTALL file/online guide to install KForge on my server using virtualenv method, as it's preferred one. The biggest problem I seem to have is the database.
>
> When, after configuring database as mysql in config file I run:
> $ kforge-admin --config $KFORGE_SETTINGS db create
> it works, generates the database on my MySQL, so I guess it connects well.
>
> But when I run this
> $ kforge-admin --config $KFORGE_SETTINGS db init
> it fails with error saying the module MySQLdb doesn't exist. Well, I tried installing it trough apt-get(I'm on ubuntu), when going into python command and using "include MySQLdb" I don't get any error, which google told me is a good sign, so I believe this line should work.
>
To install the MySQLdb module into the KForge virtualenv:
1. activate the virtual environment
2. run "easy_install mysql-python"
You might need to install libmysqlclient-dev (so that mysql_config is
available).
> when trying to install from the get-go with mySQL database with
> ./kforge-virtualenv --db-type mysql --db-user ***** --db-pass ***** --db-name hudforge --service-name HudForge /var/hudforge
> I get errors as well...
>
Which errors do you get?
> Well, this was my big problem, I have a small one too. I'm not sure if I am following the instructions right, those are... kind of all over the place and quite confuse me. Might be partly to me being not experienced with python and virtualenvs.
>
It's confusing. There are too many alternatives now, but we just
improved the installer a lot, so the next thing would be to simplify the
installation instructions.
Any suggestions about this would be very welcome.
> I see it more or less like this:
> $ wget http://appropriatesoftware.net/provide/docs/kforge-virtualenv
> $ chmod +x kforge-virtualenv
> $ ./kforge-virtualenv --project-data-dir /var/hudforge/data --service-name MyForge /var/hudforge/v.0.18
>
Looks good. That should leave you with a KForge instance that uses an
SQLite database (which should be perfectly adequate at the beginning),
Trac and Subversion should be enabled, and instructions about Apache
configuration should be printed out (with other summary details about
your installation).
Please try this, and let me know if it works?
> $ source /var/hudforge/v.0.18/bin/activate
> (kforge)$ nano $KFORGE_SETTINGS //I change the settings to fit my needs, change it to MySQL, but most of things are left intact
>
Looks good (so long as the $KFORE_SETTINGS has been set).
But let's not do this now. You can easily migrate your KForge data
between different databases systems later (it's a feature).
> Now I know I can activate plugins like that:
> (kforge)$ kforge-admin plugin enable joomla
> (kforge)$ kforge-admin plugin enable moin
> (kforge)$ kforge-admin plugin enable wordpress
Yes, you can.
> Do I need to do anything more with them during Kforge installation process?
Not during installation of KForge. But will need to make sure the
application software is installed (KForge doesn't install Joomla).
> Will I be able to activate them later on?
Yes, you can enable and disable them as many times as you want.
I didn't get that far into reading documentation on usage afterwards,
because I well, couldn't get trough installation process. Will I need to
install those services manually or will kforge use some magic for me?
Well, joomla and wordpress are terribly easy to set up, but before I had
quite hard time integrating MantisBT with SVN, so I'm most concerned on
trac and subversion provided by KForge.
>
KForge won't install Joomla, Moin, or Wordpress software.
For example, if you want to have Joomla services in KForge projects,
then you need to install the Joomla software on your system, tell KForge
where it is (see config file), and then enable the plugin. After you
enable a plugin, it will be available to site users (so they can create
project services). If you disable a plugin, then they can't do that any
more.
The KForge installer by default installs and enables Trac and
Subversion. It should all just work "out of the box".
You could try just using KForge with sqlite to begin with? You can
migrate your KForge data to a MySQL database later.
> $ kforge-admin --config $KFORGE_SETTINGS fs create
> $ kforge-admin --config $KFORGE_SETTINGS db create
> $ kforge-admin --config $KFORGE_SETTINGS db init //as mentioned above it fails
>
> $ kforge-admin --config $KFORGE_SETTINGS apacheconfig create
>
These are the manual steps that are automated by the installer. You are
free to follow the manual steps, but it's the "hard way". The "easy way"
is to just run the installer, with the options you indicated above.
>> After creating the configuration file, make sure to set the virtualenv bin_dir value /path/to/kforge/bin.
> you mean, uncomment bin_dir in nano and make sure it points into good directory?
>
Yes. But you should just be able to run the installer, configure and
restart Apache (instructions printed by the installer), and then load
KForge in your browser. :-)
>> Then copy the …/kforge/handlers/kforgevirtualenvhandlers.py file from the KForge Python library into that virtualenv bin. >This ensures Apache can access the code from the virtual environment.
> cp /var/hudforge/handlers/kforgevirtualenvhandlers.py /var/hudforge/v.0.18/bin/kforgevirtualenvhandlers.py
> right?
>
> And finally do things like in "5. Configure Apache for KForge Instance"
> this is straightforward, I have experience with apache
>
Yes, at the end, you need to tell Apache about KForge.
> Is my order of doing things right?
I think so, but let's try to get a simple KForge installation working
first, then we can sort out everything else?
The only important thing for a new installation is to separate the
project data from the system installation, so that the system can be
upgraded. Everything else can be changed after installation.
> At one point the tutorial stops being in virtualenv of kforge, so I don't even know if those are instructions I should follow,
Unfortunately, the online guide is out of date. I need to fix that.
Try just using the installer (and following what it says)?
> and when the heck should I finally use deactivate command to get out of virtualenv? Does it kill the virtualenv or what? How will apache work with it later on?
>
A virtualenv can be "activated" in several different ways. Please don't
confuse activate/deactivate with install/remove. If you "activate" and
"deactivate" a virtualenv, that does not affect the virtualenv.
Running the 'activate' command just sets values in the user's
environment, which are unset by the 'deactivate' command. Apache
activates a virtualenv by loading a python file called activate_this.py.
To remove a virtualenv, you have to delete all the files and
directories. :-)
Best wishes,
John.
More information about the kforge-user
mailing list