Installation of ActionApps
- 1 Installation
- 2 Creating the database
- 3 Initializing the database and creating a superadmin account
- 4 File uploads and cron
- 5 Your first test slice
APC-AA software is just a bunch of php scripts - human (though php savvy) readable files. There no binaries or anything else to be worried about. The whole installation task means getting the files and copy them into some directory. There are two options how to install APC-AA. You can either:
- download latest CVS version via cvs
- download the latest stable version in zipped format
Installing the ActionApps via CVS makes it easy to update later. The problem is that CVS repository is mainly intended for developers and thus always contains latest development version, which doesn't always have to be stable, and may contain bugs. On the other hand, you will get latest features and known bug fixes. The rule-of-thumb is if you need fetures that are currently being developed, than use CVS. If it's quite unlikely that you will need to update APC-AA very often, than stick on stable releases. The exact details will depend on whether your machine is serving multiple Virtual Domains and if so, whether ActionApps is to be made available to all the domains or not. ActionApps can be installed either in some common location, or inside one of the Virtual Hosts, the example below assumes that ActionApps is installed in a common location, "/home/httpd/"
Installing via CVS for developers
Developers should check the FAQ item for an alternative.
Installing via CVS for non-developers
If you are installing from CVS repository, you must have cvs utility installed on your machine. Check:
# rpm -q cvs # cvs-1.11.2-8
CVS will automatically create the installation directory for you named APC-AA.
# cd /home/httpd/ # cvs -d:pserver:firstname.lastname@example.org:/cvsroot/apc-aa login # press enter at the password prompt # cvs -z3 -d:pserver:email@example.com:/cvsroot/apc-aa co apc-aa
There was a bug in the current version of CVS 1.11, if you see the error "failed to open ~/.cvspass for reading: No such file or directory" when doing the login, then "touch ~/.cvspass" and try again.
Installing the stable release via FTP
If you want to install the latest stable version rather than the one from CVS, download it from http://sourceforge.net/projects/apc-aa/ to the hard drive (let's say to
/tmp) and than untar
# cd /home/httpd/ # tar -xvzf /tmp/apc-aa-2.6.0.tgz
This will create directory /home/httpd/apc-aa-2.6.0, which you can rename to apc-aa or whatever is convenient for you. If you have no shell access on the machine, then you can download this code, and FTP it into a directory on your web site If you want ActionApps available to all domains, then add this line in the global context with the other Aliases, otherwise you can add it to each Virtual domain where you want to make ActionApps available. Note that you do NOT need to do this for a virtual domain IF ActionApps is installed directly in that domains web site.
Alias /apc-aa/ /home/httpd/apc-aa/
This is the main ActionApps configuration file. It contains comments which explain everything there. Note that this file may not contain anything before the
<?php line at the top and after the
?> line at the bottom.
/home/httpd/html/apc-aa/include/config.php3 now contains passwords. It should therefore not be world readable. On the other hand, the http server must be able to read it. Read the chapter on [install-6.html#security security] for a possible solution for this problem.
Creating the database
There are two options depending on whether you have shell access, or are running on an ISP's setup.
No shell access: Asking the ISP
Ask the ISP to: Create a mysql database called "aadb", and a mysql user with permission to CREATE,DROP,ALTER,SELECT,INSERT,UPDATE,DELETE on this database. They should know what this means, and understand it presents no security implications.
4.2.2 Shell access: creating it yourself
Then create your initial ActionApps database. When queried for a password, use the mysql root password.
# mysql -u root -p Enter password: mysql> CREATE DATABASE aadb; Query OK, 1 row affected (0.03 sec) mysql> QUIT Bye
Create a user in MySQL that will be able to access the new aadb database. Note that the instructions below assumed you used "localhost" as the MySQL server, if you set something else, then it will typically be something like "aadbuser@machinename". This username and password should match that set in config.php3 above. We will refer to this password as the aadbuser password.
# mysql -u root -p mysql> USE mysql; mysql> GRANT CREATE,DROP,ALTER,SELECT,INSERT,UPDATE,DELETE ON aadb.* TO aadbuser@localhost IDENTIFIED BY 'password2'; Query OK, 0 rows affected (0.05 sec) mysql> FLUSH PRIVILEGES; mysql> quit
Initializing the database and creating a superadmin account
Once the database and account are created, point your Web browser to http://localhost/apc-aa/sql_update.php3. If there are any error messages (which will show up in bold) these are typically because the ISP has failed to give you one of the database permissions requested above, or has set up authentication for the database wrongly. Point your Web browser to http://localhost/apc-aa/admin/setup.php3. You should see a page with two buttons "Init" and "Recover", click "Init" and you should receive a form where you can enter the information for the SuperAdmin account. If you don't get the form, just the same screen again, then check your php settings if "register_globals = On" as described in [install-3.html#ss3.7 3.7]. There is just one question open: What is login name and password of the initial superadmin account (which you need to create the first slice)? The answer depends on the permission system you use.
- If you are using the LDAP based permission system, the superadmin account is the one you created when you edited the initial LDIF data file. At that time, you have also set a password for this account.
- If you are using the sql based permission system, there is no initial superadmin account so far. To create one, follow the instructions below.
ActionApps users who have the superadmin privilege may create new slices in addition to the rights any slice administrator has. Creating a superadmin account will be necessary whenever you don't have one left. This is the case at installation time if you are using the sql based permission system, and in case you have accidently deleted the last superadmin account or accidently revoked the superadmin privilege from the last superadmin account. To create a superadmin account, follow these steps.
- rename the file apc-aa/admin/setup.php.txt to apc-aa/admin/setup.php
- go to http://localhost/apc-aa/admin/setup.php3 and press "Recover"
- rename the file apc-aa/admin/setup.php back to apc-aa/admin/setup.php.txt for safety.
File uploads and cron
If you want people to be able to use file uploads, you have to create a directory where apache server can store uploaded files, and which will accessible via the webserver. To do this, create the directory under one of your sites, or create it somewhere else and create an alias in httpd.conf to point at it. Make sure this directory is the apache web server has write permissions for this directory. Look for lines like:
User apache Group apache
in your httpd.conf file in order to find out under which identity is your web server running. Than set the right permisions. Example:
# mkdir /var/www/uploads # chown apache:apache /var/www/uploads # chmod 775 /var/www/uploads/
Edit apc-aa/include/config.php3, edit the defines IMG_UPLOAD_PATH and IMG_UPLOAD_URL to point to this directory. Note the trailing "/". To stop someone uploading a PHP file and then executing it, edit your httpd.conf file and add
Options None php_flag engine off
For installing cron, please refer to the FAQ page.
Your first test slice
After creating the superadmin you will be thanked and either directed to the Slice addition page http://localhost/apc-aa/admin/sliceadd.php3 or direct to the Administration front end http://localhost/apc-aa/admin. You should be able to log in now with the superadmin account you created above. Refer to the APC ActionApps User Manual Webmaster's guide.