Installing Centurion / complete install guide for ubuntu
From Centurion Project
The following is Centurion installation guide for Ubuntu 10.04, however, it should also work for most other versions of Ubuntu Linux with minor modifications.
Contents |
Check Out Centurion From Git
The first step in installing Centurion is to obtain the source code. To do that you will need to clone the repository from github.
sudo apt-get install git
mkdir source
cd source
git clone https://github.com/centurion-project/Centurion
Configure Apache
If needed, install PHP with modules:
sudo apt-get install php5-cli php5 php5-gd php5-imagick php5-mysql libapache2-mod-php5 php5-curl
Choose a name for your new web host. In this tuturial we will use a fictional local-test.centurion-project.org. Now, modify /etc/hosts file, and add local-test.centurion-project.org after 127.0.0.1. This is how /etc/hosts should look like after modifications:
127.0.0.1 localhost local-test.centurion-project.org
# The following lines are desirable for IPv6 capable hosts::1 localhost ip6-localhost ip6-loopbackfe00::0 ip6-localnetff00::0 ip6-mcastprefixff02::1 ip6-allnodesff02::2 ip6-allrouters
Create a new file at /etc/apache/sites-available/local-test.centurion-project.org with the following contents (remember to replace your_user with your username):
<VirtualHost *:80>
DocumentRoot /home/your_user/source/Centurion/public
ServerName local-test.centurion-project.org
DirectoryIndex index.php
<Directory /home/your_user/source/Centurion>
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
You should further verify that your /etc/apache2/ports.conf contains the following
NameVirtualHost *:80
Listen 80
Then execute the following command:
sudo a2enmod rewritesudo a2enmod mime_magicsudo a2enmod headerssudo a2ensite local-test.centurion-project.orgsudo /etc/init.d/apache2 restart
Configure MySQL
The following assumes that you have already set up your mysql server. If this is not the case, then execute sudo apt-get install mysql-server.
mysql -u root -p
create database centurion character set utf8 collate utf8_general_ci;grant all on centurion.* to 'centurion'@'%' identified by 'your_secret_password';
Configure Centurion
- Set up environment. Create an .htaccess file at /home/user_name/source/Centurion/public/.htaccess with the following content: Please note that instead of development you could use other values from Centurion/application/configs/application.ini.
setEnv APPLICATION_ENV development
- Configure database at Centurion/application/configs/db.ini. Most likely you will want to change values under "[development : production]" section.
- Prepare your database/installation. Go to /home/user_name/source/Centurion/public and execute
chmod +x ../bin/zf.sh
sudo ../bin/zf.sh check install
../bin/zf.sh db install development
sudo chmod 777 index.php*
sudo chmod -R 777 status/
Now check if everything is OK by going to http://local-test.centurion-project.org. If there are no errors, you will see a button "Remove installation file" which should delete index.php and move index.php_next to index.php. You can also do it manually. "status" directory can be removed, and you can also remove write priviledge from "index.php" by executing "chmod -x index.php". That's all!
Final Notes and Tips & Tricks
- By default, the main page of the newly installed app consists of an empty page with a black logo on top. This is perfectly normal, and you can, of course, change the way how it looks by modifying Centurion/application/layouts/default.phtml template.
- You can access the admin page by going to http://your-host/admin. The default username is admin, password is admincenturion
- When a fresh copy of Centurion is installed, it may display the content in French language even though translations.ini has been configured to use English. To fix this, log in to admin, go to Translations page, and save translation for (any) string. This will create en.php locale file under Centurion/data/locales/
- You can obtain the source code of the demo project from http://demo.centurion-project.org/source.zip and http://demo.centurion-project.org/sql.zip