Next Previous Contents

4. Installation of ActionApps

4.1 Installation

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:

Installing the ActionApps via Subversion (SVN) makes it easy to update later. The problem is that SVN 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 SVN. 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/"

4.1.1 Installing via Subversion (SVN) for developers

Developers should check the Subversion (Version Control for Source Code) item for an alternative.

4.1.2 Installing via Subversion (SVN) for non-developers

If you are installing from SVN repository, you must have subversion utility installed on your machine. Check:

# rpm -q subversion
# subversion-1.10.2-4.el8.x86_64


SVN will automatically create the installation directory for you named apc-aa.

# cd /home/httpd/
# svn co svn:// apc-aa

4.1.3 Installing the stable release via FTP

If you want to install the latest stable version rather than the one from SVN, download it from to the hard drive (let's say to /tmp) and than untar

# cd /home/httpd/
#  tar -xvzf /tmp/apc-aa-2.90.tar.gz

This will create directory /home/httpd/apc-aa-2.90.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/

4.1.4 Configuring ActionApps

Edit /home/httpd/html/apc-aa/include/config.php3.

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.

The file /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 security for a possible solution for this problem.

4.2 Creating the database

There are two options depending on whether you have shell access, or are running on an ISP's setup.

4.2.1 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

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;
ON aadb.*
TO aadbuser@localhost
IDENTIFIED BY 'password2';
Query OK, 0 rows affected (0.05 sec)

mysql> quit

4.3 Initializing the database and creating a superadmin account

  Once the database and account are created, point your Web browser to http://localhost/apc-aa/service/sql_update.php. 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 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.

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.

4.4 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.

4.5 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.

Next Previous Contents