Home arrow Installation arrow Installation Guide - ast-0.2.0 and newer
Installation Guide - ast-0.2.0 and newer PDF Print E-mail
Written by Administrator   
Wednesday, 07 June 2006
* All of the setups in the installation guide should be executed as root *

There are two ways you can install ast. First, you can use the precompiled binary file in the ast-bin distribution. This method is the easiest to get going, however it may not work on your system. First of all, you need to have a 32-bit linux system with a 2.6 kernel and glibc 2.3. Even if you meet these requirements, the binary may not work for you. The second method to install ast is to compile it from sources. This method will work on any system. If you wish to do a binary installation, skip ahead to the Binary Installation section below.

Source Installation

Before we get started, you should make sure that you have satisfied all of the dependencies. In particular, make sure that you have TA-Lib installed correctly. If you are going to perform the source installation, your system must be setup for development. In addition to AST's dependancies, you will need to have GCC installed and development version of all packages. For example, you will need libxml2 and libxml2-devel installed on SUSE, Red Hat and many other Linux distributions.

Now you will need to download the source installation package. It is the file that starts with ast-src. You will want to extract this file to a location on your webserver. Here are you typical web roots:

DistributionWeb Root
Gentoo Linux/var/www/localhost/htdocs
SUSE Linux 9, 10/srv/www/htdocs
Ubuntu Linux/var/www

The rest of this document will assume /var/www/localhost/htdocs is your web root. Make sure to use your actual web root. The commands are:
cd /var/www/localhost/htdocs
tar -xf ast-src-0.2.0.tar.gz
cd ast-0.2.0
Remember that version numbers will be different, so you can't copy those commands directly. Now we need to build ast:
cd src
./configure
make
This step may take a long time (20 minutes or more). If you have more than 1 CPU you can speed this up by doing make -j4. Now the ast executable is created in the src directory. Copy to the root of the ast installation:
cp src/ast ../
strip ../ast # omit this step to leave debugging information in the executable
You may skip the following part that describes how to do a binary installation and go on to the common installation section.

Binary Installation

If you are doing a binary installation, the only dependancy you need to satisfy is gnuplot. All other dependancies are required for building only.

The first thing you need to do is locate your web root, which is usually /var/www/localhost/htdocs. If you are using a hosting provider, you will want to use your cgi-bin directory (there is a directory inside the tarball, you will want to move all files from this directory into your cgi-bin). Now you need to download the binary distribution file, it will start with ast-bin. You should extract this into your web root:
cd /var/www/localhost/htdocs
tar -xf ast-bin-0.2.0
cd ast-bin-0.2.0
Now follow the steps below which are common to both the source and binary installations:

Common Installation Procedure

For security reasons, ast must be suid some user. You have two options here, you can use your apache user which is already created with your apache installation or you can create a new user for ast. DO NOT USE ROOT!

To create a new user for ast, do:
useradd ast -G users
Now we need to hand over ownership of all of these files to our user. You should be in /var/www/localhost/htdocs/ast-0.2.0 (or similar) now. Do:
chown apache:users * -R
or
chown ast:users * -R
Now we need to make the executable suid:
chmod 6700 ast
Now we need to tell apache to execute cgi scripts in this directory. If you installed ast into your cgi-bin, you can skip this step. Add the following information to your httpd.conf (usually /etc/apache2/httpd.conf).
<Directory "/var/www/localhost/htdocs/ast-0.2.0">
    AllowOverride All
    Options ExecCGI
    SetHandler cgi-script
    DirectoryIndex ast
</Directory>
   
You will need to restart your webserver for these changes to take effect:
/etc/init.d/apache2 restart
The last thing you need to do install the sample crontab. Go into the share/example directory and edit the crontab file in there so that it has the correct path to your ast executable (it might be /var/www/localhost/htdocs/ast-0.2.0/ast). If you have anything in your crontab, you should merge your crontab with the example file. Otherwise just do:
crontab crontab
This will load the sample file into your crontab. You should now be able to navigate to http://locahost/ast-0.2.0/ast and get into ast. You should log in as admin with the password admin to setup your users.

If you have any comments, questions or suggestions on how to make the installation easier please feel free to contact me at <mswilliamson (at) uwaterloo (dot) ca>.
Last Updated ( Friday, 11 August 2006 )
 
< Prev   Next >

Google AdSense

© 2009 Advanced Stock Tracker
Joomla! is Free Software released under the GNU/GPL License.