-
Notifications
You must be signed in to change notification settings - Fork 102
V2 Install using git
This document is a step by step installation howto using a Git clone.
This document should work for any Linux / UNIX based system with Apache / MySQL / PHP5.
Get the Source
Log into the server where you wish to install ViMbAdmin.
Move to the directory where you wish to store the source. Note that it should not be checked out into any web exposed directory (e.g. do not checkout to /var/www
). In my case, I'm going to use /usr/local/vimbadmin
so I:
cd /usr/local
git clone git://github.com/opensolutions/ViMbAdmin.git vimbadmin
As it stands, there are two branches of interest:
-
master - this reflects tagged stable releases as found in the
.tar.gz
downloads. Use this if you want a stable system. - develop - the branch under active development. Use this if you want the latest but possibly unstable updates.
Regularly pulling from either will keep you up to date.
If you plan to use master then nothing further is required. To use develop, switch your clone to that branch:
cd /usr/local/vimbadmin
git checkout develop
ViMbAdmin requires the following third party libraries:
- Zend Framework (V1.11 but other versions may work, Version 1.10 in Debian 6.0 seems working, tested 2012/11/04)
- Doctrine (V1.2)
- Smarty (V3 but later versions of 2 may also work. Version in Debian 6.0 is not working tested 2012/11/04)
You can install / use third party libraries directly into ViMbAdmin's library/
directory from SVN externals or link to existing copies elsewhere on your system. The following subsections explain each option.
This is the easiest option by far:
cd /usr/local/vimbadmin
./bin/library-init.sh
To update the libraries at a later date from their respective SVN repositories then just:
cd /usr/local/vimbadmin
./bin/library-update.sh
Zend Framework
So long as Zend/Application.php
is in your path, you should not need to do anything.
This should be the case with a package manager based install of Zend Framework. If not, then you can symlink the Zend directory to the ViMbAdmin library. For example, on Ubuntu 10.10:
ln -s /usr/share/php/libzend-framework-php/Zend /usr/local/vimbadmin/library/Zend
Doctrine
So long as Doctrine.php
is in your path, you should not need to do anything.
If not, then you can symlink the parent directory containing Doctrine.php
to the ViMbAdmin library. For example:
ln -s /path/to/doctrine/installation /usr/local/vimbadmin/library/Doctrine
In Debian 6.0:
ln -s /usr/share/php/Doctrine/lib /usr/local/vimbadmin/library/Doctrine
Smarty
Again, ensure Smarty.class.php
is in your path.
If not, then you can symlink the parent directory containing this file to the ViMbAdmin library. For example, on Ubuntu 10.10 you could:
ln -s /usr/share/php/smarty /usr/local/vimbadmin/library/Smarty
In Debian :
ln -s/usr/share/php/smarty/libs /usr/local/vimbadmin/library/Smarty
If you don't use the symlink method, you will need to update your vimbadmin/application/configs/application.ini
as follows (using the above Ubuntu 10.10 example):
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Smarty View
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
...
resources.smarty.plugins[] = APPLICATION_PATH "/../library/ViMbAdmin/Smarty/functions"
resources.smarty.plugins[] = "/usr/share/php/smarty/plugins"
resources.smarty.plugins[] = "/usr/share/php/smarty/sysplugins"
Log into your MySQL (or other) database and create a new user and database:
mysql> CREATE DATABASE `vimbadmin`;
mysql> GRANT ALL ON `vimbadmin`.* TO `vimbadmin`@`127.0.0.1` IDENTIFIED BY 'password';
mysql> FLUSH PRIVILEGES;
Change the host as appropriate above and chose a secure random password.
We need to edit `vimbadmin/application/configs/application.ini`` and set the Doctrine DSN string.
First copy the dist version to the real version:
cp vimbadmin/application/configs/application.ini.dist vimbadmin/application/configs/application.ini
Using the above example, we'd set the following:
resources.doctrine.connection_string = "mysql://vimbadmin:password@127.0.0.1/vimbadmin"
Now, move into the bin directory: cd vimbadmin/bin
and execute:
./doctrine-cli.php create-tables
Your database is now ready.
Now edit vimbadmin/application/configs/application.ini
and configure all parameters in the [user]
section (except securitysalt
- it's easier to do that later).
The web server user will need write access to vimbadmin/var/
. On Debian / Ubuntu this is www-data
but change as appropriate for your system:
chown -R www-data: vimbadmin/var
You need to tell Apache where to find ViMbAdmin and what URL it should be served under. In this example, we're going to serve it from /vimbadmin
(e.g. www.example.com/vimbadmin
). As such, we create an Apache configuration block as follows on our web server:
Alias /vimbadmin /usr/local/vimbadmin/public
<Directory /usr/local/vimbadmin/public>
Options FollowSymLinks
AllowOverride None
Order allow,deny
allow from all
SetEnv APPLICATION_ENV production
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ /vimbadmin/index.php [NC,L]
</Directory>
You may need to edit the above if you're using a different URL or file system path. Reload Apache and you can now browse to your new installation.
Alternatively with Lighttpd : You need to tell lighty where to find ViMbAdmin and what URL it should be served under. In this example, we're going to serve it from /vimbadmin
(e.g. www.example.com/vimbadmin`). As such, we create an alias as follows on our web server configuration:
url.rewrite = (
"^/vimbadmin/(.*)\.(.+)$" => "$0",
"^/vimbadmin/(.+)/?$" => "/vimbadmin/index.php/$1"
)
alias.url = ( "/vimbadmin" => "/usr/local/vimbadmin/public" )
You should now be greeted with a page welcoming you. If you didn't set the security salt above, then the installer will provide a random string. Place this in vimbadmin/application/configs/application.ini
before continuing. If you did set it, then enter it in the Security Salt input box.
This is a security step to ensure that only the person performing the installation can create a super administrator.
Now enter a username (which must be an email address) and a password.
Once you click save, you're done! Log in and work away.
The next step is configuring a fully fledged mail system (Postfix, Dovecot for example) to use the above.
We'll write up an howto for this in time. Meanwhile, there are a number of howto documents for Postfix Admin which you can use such as: