Search:  
Gentoo Wiki

Dragonfly_CMS

Contents

Introduction

Dragonfly CMS is an open-source content management system. You can use a CMS to separate web design and programming from the adding of actual content to your site, so that authors need not know any HTML et al. to add content. Unlike a Wiki, your site can't be changed by everyone, just like a classical website.

This HOWTO brings you to a point where Dragonfly CMS is running and you can start editing your site.

I used the packages www-apps/dragonflycms-9.0.5.0 [1], dev-db/mysql-4.0.24 [2], net-www/apache-2.0.54-r8 [3] and dev-php/mod_php-4.4.0 [4] for this tutorial. You mileage may vary for different versions.

Installing all Packages

You need to be logged in as root from now on

Apache 2, mod_php, PHP and MySQL

Notes

As prerequisites we need Apache, PHP, mod_php and MySQL. If you want to use Dragonfly's built-in picture albums (coppermine) you need to compile PHP and mod_php with the GD Graphics Library. Just add the gd USE-Flag:

File: /etc/make.conf
USE="gd"

If PostgeSQL is already installed on your system, you may choose to use it instead of MySQL. The same goes for Apache 1.3 instead of Apache 2. But you will need to alter the MySQL- and Apache 2-specific steps accordingly.

If you have PHP and mod_php already installed, but compiled without GD Graphics Library support, you can leave it for now if you want to save compilation time, and recompile it anytime later. Dragonfly (sans the Image Galery) will work perfectly fine. If you want to add GD support now (or anytime later), do this:

File: /etc/make.conf
USE="gd"
root # /etc/init.d/apache2 stop
root # emerge unmerge PHP mod_php && emerge mod_php

Compilation

To let emerge compile, type:

root # emerge apache mysql mod_php

PHP will be built with mod_php, so there is no need to emerge it separately.

You can get some coffee and a good book now or do something else. Depending on your system emerging these modules should take several minutes to a few hours.

Installation and basic configuration of Apache 2, PHP and MySQL is not covered here. Please see Apache 2 Install, Apache Modules: mod_php and HOWTO MySQL for help.

Dragonfly CMS

Unmask the package

As of September 4th, 2005, www-apps/dragonflycms is masked as unstable, and we need to unmask it first:

root # echo "www-apps/dragonflycms ~x86" >> /etc/portage/package.keywords

Change ~x86 to the appropriate keyword if you use a different architecture
Further info on masked packages and how to unmask them

Emerge Dragonfly CMS

Now we can install dragonfly:

root # emerge dragonflycms

Configuration

General Config Files

There might be some config files that need updating.

root # etc-update

does this for us.

Start Apache 2 and MySQL

We need Apache 2 and MySQL running. Issue these commands:

root # /etc/init.d/apache2 start
root # /etc/init.d/mysql start

Create MySQL Database and User for Dragonfly

Create Database

Next we create a MySQL Database for Dragonfly:

 root # mysqladmin -u root -p create dragonfly

Mysqladmin will prompt for your MySQL-root password. If you haven't changed/set the MySQL-root password after mysql installation, please do so now. See HOWTO MySQL for how to do this. An unset or default password will make your system vulnerable, epecially when it's meant to be reachable from the public internet.

Create User

Just as bad an idea as setting no MySQL-root password is accessing MySQL via the default root account. So we create another account for dragonfly which has only rights for the database "dragonfly":

root # mysql -u root -p
Enter password:
mysql> grant all on dragonfly.* to dragonfly@localhost identified by '<passwd>';

replace <passwd> with a password for this new account, but keep the single quotes.

Enable Error Logging

Additionally, you can turn on error logging by typing:

root # chmod 666 /var/www/localhost/htdocs/dragonflycms/cpg_error.log

Edit Config.php

config.php contains the most basic settings needed by Dragonfly CMS to function.

Set Database Type

You only need to change this if you do not use MySQL. MySQL is already set as default.

File: /var/www/localhost/htdocs/dragonflycms/config.php
define('DB_TYPE', 'mysql');

Set MySQL Database Name

'dragonfly' is default for our database name, no need to change this either

File: /var/www/localhost/htdocs/dragonflycms/config.php
$dbname = 'dragonfly';

Set MySQL User Name and Password

Replace <passwd> with the same password you used to create the MySQL-User 'dragonfly' above, and change the user name from 'root' to 'dragonfly'

File: /var/www/localhost/htdocs/dragonflycms/config.php
$dbuname = 'dragonfly'; $dbpass = '<passwd>';

Create Database and more setup

Open install.php in your webbrowser

Our System should now be operable. Dragonfly CMS will create its database now. Type http://localhost/dragonflycms/install.php in your webbrowser

Troubleshooting: Database Errors

If you get any errors here, like "Database does not exist" or "Could not connect to database", check that Apache and MySQL are running, and re-check /var/www/localhost/htdocs/dragonflycms/config.php. Database name, User name and password need to match those you created in mysqladmin ealier.

License Page

If you succed you will be asked to read and agree to the license terms by clicking on "I Agree". Do so.

Check Configuration Page

On the next page you'll be presented with some info about your server. If you get any yellow or red dots in the last 4 lines, see next paragraph. If all dots are green, click on "Let's build the database.

Troubleshooting: Permission Errors

Check the last 4 entries. There are some nessecary directory permissions. They should be set correctly in the ebuild. In this case there will be 4 green dots. If one or more of these dots are yellow or red, go back to the console and type:

If the first dot (cache) is not green:

root # chmod 777 /var/www/localhost/htdocs/dragonflycms/cache/

To correct the second permission (uploads/avatars):

root # chmod 777 /var/www/localhost/htdocs/dragonflycms/uploads/avatars

For the third dot (modules/coppermine/albums) type:

root # chmod 777 /var/www/localhost/htdocs/dragonflycms/modules/coppermine/albums

For the fourth dot (modules/coppermine/albums/userpics) type:

root # chmod 777 /var/www/localhost/htdocs/dragonflycms/modules/coppermine/albums/userpics

Browser-reload now. All permissions should display green dots. Click on "Let's build the database"

Gather important info page

After one status page telling you that the database has been properly installed (click on "Necessary Info" there), we get to enter some information about our new site.

Site Name: This is what your site will be called. It is freely choosable.
Domainname: Your Domain name. If you're on the internet, fill in your DNS domain (example: "mycmssite.com"). If you don't have a name use your server hostname.
Path: Path where Dragonfly CMS is installed inside your htdocs, if you didn't change where emerge has put it this is /dragonflycms/
Administrator Email: Put your Email-Address here. Dragonfly will send you administrative infos there, like new users awaiting confirmation, new posts and so on.
Cookie Domain: Set this to the same name as your Domainname above. If you entered your hostname above, you can leave this blank
Cookie Path: Set this to the same path as your installation Path above.
Admin cookie name, Member cookie name and Photo Gallery cookie name: don't change this unless you have a reason.
Enable Update Service: You can set this as you like. If you set it to Yes, Dragonfly will tell you in the Admin menu if there is a new version available.

Click on "Submit".

The next page will perform a cookie test. Click on "Test Settings". If you get an error concerning cookies check if you have cookies enabled in your browser for all sites. Go back and resubmit. If you still get the error go back, clear the browser cache and resubmit.

After the cookie-test there's another Info page about what we will do next (Create first account). Click on "Create Account".

Create super admin account

Cheer up, we're almost finished. This is actually the last step.

On the next page Enter a Nickname, Email adress and password (and remember it or write it down for now!). Set your Time Zone, and Select Yes for Would you like to create a regular user with the same data?. This will save you some hassle and you can delete the regular user without affecting the admin account anytime later.

Click Submit now.

Finish

Ok, that's it. The last page will tell you to delete install.php and install/, and have fun.

Let's do this:

root # rm /var/www/localhost/htdocs/dragonflycms/install.php
root # rm -r /var/www/localhost/htdocs/dragonflycms/install/

Now point your browser at http://<YOURDOMAIN>/dragonflycms/admin.php

You'll have to log in as the User created during the last step, and you're inside.

Dragonfly is now in Maintenance Mode, which will cause index.php to show a note about being down for maintenance. To go live go to Main Settings » Maintenance » Active and set it to No. Click Save Changes.

Congratulations, you've got Dragonfly CMS up and running!

The mainpage is at: http://<YOURDOMAIN>/dragonflycms/

Bits and Pieces

Feel free to add here

Some things I found puzzling:

How to activate the forum

Yes, there is a Forum, even if the Forum Page says "This Board has no Forums".

Just go to <YOURDOMAIN>/dragonflycms/admin.php?op=Forums&do=forums, or go to admin.php » Forums » Dropdown Menu "Forums" » Maintenance

There you'll have to create at least one Category and one Forum inside that category. Once you've done that your Forum will show up.

Retrieved from "http://www.gentoo-wiki.info/Dragonfly_CMS"

Last modified: Mon, 08 Sep 2008 03:38:00 +0000 Hits: 17,158