Installation
From Habari Project
Contents |
Before You Install
Server Requirements
- Supported Web Server
- Supported Database
- MySQL 4.1.x or greater
- SQLite
- PHP version 5.2 or above
- PHP Data Objects (PDO) enabled
- SimpleXML enabled
Support for PostgreSQL is planned.
To install habari on Dreamhostyou need to make sure that you have php5 selected when you are in the manage domains menu. If you are stuck there is a faq here.
Change Permissions
In order to enjoy the most convenient installation process, it is required to make writable the folder where Habari will be installed. The Habari installation process will create a config.php file and .htaccess file for you automatically.
If you are using a GNU/Linux (or other UNIX-like) host, you may apply the following chmod to the root folder of your Habari installation:
chmod o+w .
That allows everyone to write to the Habari directory. Specifically, the web server will use this to create the files necessary for Habari's execution.
When the installation process completes, you may remove the "everyone" write permission with this:
chmod o-w .
Instructions for the paranoid
If the idea of giving everyone write access to your Habari directory gives you the willies, you can instead perform the following steps:
touch .htaccess touch config.php chmod o+w .htaccess chmod o+w config.php
This creates empty .htaccess and config.php files, and makes only these files world-writable. Habari will add the necessary bits to these files.
Upon completion, you may remove the world-writable permission with these commands:
chmod o-w .htaccess chmod o-w config.php
The Habari installation process will do its best not to clobber any existing .htaccess file that might exist.
Activate PHP5
Some hosts may offer both PHP4 and PHP5, but execute files with the .php extension using the PHP4 by default. You can often change this behavior by adding the following single line in the .htaccess file found in the root folder of your Habari installation:
AddHandler application/x-httpd-php5 .php
Please read your host's FAQ as some hosts may require a different AddHandler.
Installing Habari
Step 1: Download and Extract
As Habari is still in development, no guarantees are made that these are fully stable versions, or that updating won't break the current database structure.
Developer Release
- Habari is still in development, however there is a developer release available for download.
SVN Checkout
In order to use SVN you will need SSH access to your server. Some hosts have it enabled by default, but others may only enable it upon request.
- Login to your web host.
ssh username@yourblog.com
Your host will then ask for your host password. Put it in and you are in.
- Change directory to the one you wish to install Habari in. Directory name may differ.
cd ~/public_html/habari/
- Checkout the source code.
svn checkout http://svn.habariproject.org/habari/trunk/htdocs .
- If you are not in the Habari directory, use the following command to checkout in a new directory called habari.
svn checkout http://svn.habariproject.org/habari/trunk/htdocs habari
Reference: Subversion and applying patchs
Step 2: Preparing the Database
As mentioned, Habari requires a database from one of the supported formats. If you are running on a professional hosting company (see Supported Hosts), chances are you either were provided with a database, or a web interface for creating a database. If that's the case, you can skip to the next step. Either way you are going to need:
- The name of the database
- The database user
- The password for that database user.
Please note that by default some third party hosts add your user name prior to these items.
Step 3: Running the Installer
After checking out the files, and creating your database, you are ready to run the installer. Open your web browser and navigate to your install location, ie, http://example.com/habari. You should be prompted with an installer, requiring you to choose your database type, and the necessary information to complete installation.
If the installer is not working properly, the Common Questions page has some information that may help you troubleshoot the installer.
Database Host
99% of the time, this is going to be localhost, and should be the default value in the installer.
If this is not the case, your host should have provided you with the necessary information. For example, if your installation is to be hosted on Dreamhost, then this value will be mysql.yourDomain.com.
User Name
This is the user name for the database, not your domain's user name. If you created your database via the common C-Panel interface, remember this name is prefixed by the account, then the username, ie, user_dbusername.
Password
Again, this is the database user's password, not necessarily the account password.
Database Name
This is the name of the database you created for your installation. As with the user, it's possible the database name is prefixed with your domain username, ie, user_databasename.
Table Prefix
habari__ is the default, however if you are using multiple instances of habari in the same database, or have your own naming conventions, you can change the prefix here.
Fill in the remaining data with the name of your blog, an admin user name and password, and a default email. Note that these can be changed later.
Click install, and if all goes well, you should be taken to the blog's home page. You can then log in with the admin name and password you used on the installer page, and start blogging!
If you had any problems, you can post to the Habari user group. Be sure to provide as many details as possible, including version of PHP, MySQL, and server config.
Advanced Installation
This procedure outlines a way to automate the installation process by predefining the .config file.
Predefined Configuration
Depending on your DBMS of choice, MySQL or SQLite, copy <root>/system/schema/<dbms>/config.php to the root folder, where index.php is.
Modify this array definition, or similar, in the copied config.php file.
$blog_data= array( 'admin_username' => 'ernie',
'admin_pass1' => 'RubberDuck',
'admin_pass2' => 'RubberDuck',
'admin_email' => 'ernie@www.sesamestreetlive.com'
);
Valid Parameters
'db_user' => '',
'db_pass' => '',
'db_schema' => 'habari',
'connection_string' => '',
'table_prefix' => 'habari__',
'admin_username' => 'admin',
'admin_pass1' => '',
'admin_pass2' => '',
'blog_title' => 'I love Cookies',
'admin_email' => 'bert@www.sesamestreetlive.com',
NOTE: the password elements accept either plaintext or encrypted passwords. We strongly recommend that you never store a plaintext password in your config.php file. You may use our SSHA512 password encryption page to generate an encrypted password.
These values will be extracted when or if index.php detects that there are DBMS tables present. In that case, the installer will not display the form but use these values instead.
This will allow a fully automated installation, without any prompts being displayed to the user (assuming the $db_connection array is properly constructed, too).
At the moment, it's a convenience for those who are constantly re-installing Habari and who don't want to waste a bunch of time keying in the same values over and over. It's also the basis of an automagic deployment tool for hosting providers.
Troubleshooting
See troubleshooting page for more details...
