====== Getting Started ======
This version of Getting Started is an attempt to combine the different ways of getting a project started into one set of instructions. The options for each project are a regular project, a project under Subversion and a project using the Admin plugin.
Subversion is a system that enables you to save different versions of your code. It also enables a group of people to work on the same project without the danger of one person overwriting another person's work. There are different version control systems. Subversion appears to be the most popular right now. You can learn how to get and install Subversion at http://svnbook.red-bean.com/en/1.1/pr02s06.html . You may have to modify these instructions for your operating system.
This entry is one person's implementation. This article describes only one way. There are other ways, which you will have to figure out for yourself. There are some procedures that need be done only once. There are others that need to be done for every project.
If you want to get started quickly read the file **README.txt** after checking out Akelos.
===== My environment =====
My operating system is Fedora 9.\\
I need to tell you where my stuff is because this article will have examples that reference my choices. Obviously, you may do it differently.
^ Location of ^ Directory ^ Comment ^
|Akelos |~/develop/php/akelos |Location of the Akelos software. |
|Subversion repository |~/develop/repos |You may have repositories in different locations for different projects or you may have a number of projects in one repository. Each project will exist in a different subdirectory. Having a repository in a shared directory is discouraged because it seems to cause Subversion errors. A link from a shared directory to a repository may be all right, though I haven't tested it.|
|Project |~/develop/php |My project name is "ticket". We will check out copies of the project from the repository to this directory.|
|Docroot |/var/www/html |This is the location for Apache access. Links must be made to this directory from the "public" directory of both Akelos and each project.|
|User root |/home/alan |The symbol '~' is a synonym for this directory |
===== Things that need to be done only once: =====
==== Check PHP ====
Execute ''/usr/bin/env php -v'' to display the php version information. It should look something like this:
''PHP 5.2.4 (cli) (built: Sep 18 2007 08:57:57)\\
Copyright (c) 1997-2007 The PHP Group\\
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies''
If the output doesn't resemble the above, find a way to display your php version information. Suggestions are ''php -v'' or ''/usr/bin/php -v''. Change the first line in each of the following files to reflect what works for you: ''script/console'', ''script/generate'', ''script/migrate'', ''script/setup'' and ''script/test''.
==== Get Akelos ====
Go to where you want to install Akelos. Then get it from Akelos' Subversion trunk.\\
''cd ~/develop/Software\\ svn co http://svn.akelos.org/trunk/ akelos''
Create a link in your docroot to allow Apache to access pages in your Akelos software.\\
''cd /var/www/html\\ ln -s ~/develop/Software/akelos/public/ akelos''
==== Get Subversion ====
You may or may not want to use Subversion. This article will consider both options.
Getting Subversion is very dependent upon your operating system and (in the case of Linux) your distribution. Therefore, it is beyond the scope of this article. This link to Subversion's site may help: http://subversion.tigris.org.
==== Make Permission File ====
The name and location of this file isn't important, but I have stored mine as ''~/bin/apache''. The text of this file is
chown apache:users . -R
chmod g+rw . -R
Make this file executable.
chmod +x ~/bin/apache
When a project is created, copy it to the root of your project. You will need to run it when your project is complete and likely whenever files are generated.
Later instructions will tell you to execute it in a way similar to this:
sudo ~/develop/php/ticket/apache
If you don't have sudo access, we suggest that you keep an extra terminal window or tab open. ''su'' to root, and change to the project's root directory:
[alan@erie ~]$ cd ~;su
Password:
[root@erie alan]# cd develop/php/ticket/
[root@erie ticket]#
When the instructions tell you to execute it, switch to this window or tab and
[root@erie ticket]# ./apache
===== Things that need be done for each project =====
==== Set up project ====
If you are using [[setupprojectwithsubversion|Subversion]], follow the link instead of using these directions: (Note: this has not been updated to reflect the latest setup procedure.)\\ \\
=== Create your project ===
cd ~/develop/php
./akelos/script/setup ticket
cd ~/develop/php/ticket
cp ~/bin/apache .
=== Configure the database ===
./script/configure -i
You will get the following messages, followed by the default values in brackets:
* Database name. This is the name of your database. It will be suffixed with _dev and _tests for non production environments.
* Database type
* Database user
* Database password (There's no default for this.)
* Development database name (This gives you the opportunity to change the default.)
* Production database name (This gives you the opportunity to change the default.)
* Testing database name (This gives you the opportunity to change the default.)
* Application Locales. (The default is "en" for English.)
This section will conclude with the following messages:\\
Your application has been configured correctly
See config/config.php and config/database.yml
=== Set up Apache access ===
Make the public directory accessible to Apache.
su
cd /var/www/html
ln -s /home/alan/develop/php/ticket/public/ ticket
exit
Make sure that your permissions are set correctly:
sudo ~/develop/php/ticket/apache
=== Check it out ===
Point your browser to http://localhost/ticket to see the Welcome Aboard screen.\\
==== Administrative Pages ====
The [[admin|Admin plugin]] allows you to limit access to parts of your site to people in certain roles. If a project is to use this plugin, it should be installed as soon as the project is created.