First, you will need the Af-Arch source code. You can find the latest stable release already packaged and tested at:
You can also try to use the latest SVN source code located at:
Drop us an email at the mailling list (http://fact.aspl.es/index.php?id=26) if you needed to get info about current status of the SVN repository.
This step will depend on the system you are running and the method you may prefer. To accomplish this step you can see the following documents:
NOTE:These steps are only required for client side installation. If the Af-Arch server installation is placed on another computer don't need to take the next steps.
This is required because Af-Arch server nodes, in particular Af-Kernel, needs a PostGreSQL installation to store its data. You will need to configure your PostGreSQL to accept connections from Af-Arch servers and a PostGreSQL administrador user to install SQL data needed by Af-Arch servers.
This package includes all libraries and tools (including Vortex).
Once downloaded follows next steps to compile source code:
bash:~$ tar tzvf af-arch-version.tar.gz bash:~$ cd af-arch-version bash:~$ ./configure bash:~$ make bash:~$ make install
Previous steps will compile Af-Arch sources and will enable you to develop Af-Arch clients and applications.Af-Arch Installer which can be found at http://www.aspl.es/fact/af-arch-installer
This perl script helps to download Af-Arch from svn repository and assist you on installing Af-Arch.
Af-Arch-Installer will ask your building preferences, install source in you system and helps you to configure central Af-Kernel server.
The only configure process the Af-Arch-Installer doesn't do is to configure your PostGreSQL to accept conections from Af-Arch servers. You can follow the instructions from this section to know more about configuring your PostGreSQL database server.
You can follow this steps to use Af-Arch installer:
[acinom@titan tmp] >> wget http://www.aspl.es/fact/af-arch-installer --19:16:58-- http://www.aspl.es/fact/af-arch-installer => `af-arch-installer' Resolviendo www.aspl.es... 188.8.131.52 Conectando con www.aspl.es[184.108.40.206]:80... conectado. Peticion HTTP enviada, esperando respuesta... 200 OK Longitud: 17,080 [text/plain] 100%[====================================>] 17,080 67.17K/s 19:16:59 (67.07 KB/s) - `af-arch-installer' guardado [17080/17080]
[acinom@titan tmp] >> chmod +x af-arch-installer
[acinom@titan tmp] >> ./af-arch-installer [msg]: checking enviroment conditions checking for svn..ok checking for wget..ok checking for pkg-config..ok checking for aclocal..ok checking for autoheader..ok checking for automake..ok checking for autoconf..ok checking for libtoolize..ok checking for psql..ok checking for make..ok checking for flex..ok checking for bison..ok Af-arch installer v0.2.0: a simple perl script to install ar-arch Copyright (C) 2004 Advanced Software Production Line, S.L. To install Af-arch consist of serveral steps that must be taken. You can let this program to follow all steps until the end. But, if something goes wrong you can relaunch all steps or relaunch each step manually in order to get more control over the installation. During the process there will apper some questions to guide the installation. This questions have defaults answers inside [brackets] that you may choose by simply pressing Enter. There are also questions like: (Y/n). Here capital letter is the default options also selected by pressing Enter. Remember: If you have any problem, questions or suggestions mail us now at: <email@example.com> Press Enter to show the help any time you want. Press Enter to continue the process. --> all - Install af-arch taking all steps (recommended). Select this option if you want to install Af-arch, install sql schema, configure af-kernel parameters and create an initial Af-arch root user. source - only install af-arch source code. No sql install, no af-kernel configure and no root user creation takes place. This is useful if you have Af-arch already installed and working and you only want to upgrade the source code with out modifiying config and sql. This can also be used if you already have a server installation and you need the af-arch client side libraries. config - only launch the configure process, the sql install and the initial root user creation uninst - uninstall af-kernel sql. quit - exit from the installer (same as Control-C) log - enable/disable console log. By default console log is disable. If you want to know what's really happening use this. --> all
Assuming you already have installed PostGreSQL on your system (check http://www.postgresql.org for more information), you only need to ensure Af-Arch servers are allowed to perform operations against the SQL database.
This is done by configuring the file found at: /etc/postgresql/pg_hba.conf. You will have to allow md5 connections from Af-Arch server nodes. Here is a sample:
# TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD local all postgres ident sameuser local all all md5 local all all ident sameuser # supposing you have Af-Arch server nodes running at the same # computer as the postgresql server you will have to set something # similar to. host all all 127.0.0.1 255.255.255.255 md5 # supposing you have Af-Arch server nodes outside the computer # actually running postgresql but both inside the net 192.168.0.0, # you will have to set something similar to. host all all 192.168.0.0 255.255.255.0 md5 host all all 127.0.0.1 255.255.255.255 ident sameuser host all all 0.0.0.0 255.255.255.255 reject
Once configured your PostGreSQL installation you have to restart it to take effect changes done.
To create an PostGreSQL admin user use:
postgres@barrakuda:~$ createuser admin -P Enter password for user "admin": Enter it again: Shall the new user be allowed to create databases? (y/n) y Shall the new user be allowed to create more new users? (y/n) y CREATE USER postgres@barrakuda:~$
To do this operation it is usual to only allow it from postgres user. To logon as postgres user you can try:
acinom@barrakuda:~$ su - postgres
You have to rename it to /etc/af-arch/af-kernel.cfg and setup with your preferences. Here is the content:
# -- af_gen_do_not_touch_this_file -- # Do not remove previous line because af-gen may overwrite this # file without them. # # Af-kernel central server config file # # Lines starting with # are comments. # Tcp server configuration. The following lines controls the # hostname to bind and the tcp port to use. listening port = 55000 listening hostname = any # Database configuration. The following information is used # to configure a gda tcp based connection to the postgres # server. The port is optional, unless you have an especific # postgres configuration leave it as is. database server = localhost database port = database name = af_kernel database user = af_kernel database password = changeme # Logging to file configuration log file = /tmp/af-kernel.log log active = yes # Session configuration section. The following section allows you # to tweak the af-arch native session which will affect the behaviour # of your client. If you set session to no, the session mechanism will # be disabled and the rest of parameters will be ingnored. sessions = no session expiration = 7200 afkey expiration = 3600 # Host location. The following allows you to activate the host # location checking done by the af-kernel. This host location checking # allows you have an allways updated af-kernel registry with the location # for each server. If host location fails for a given server it is removed # from the kernel registry. host location check = no # Controls how signals are handler by af-arch servers. # This allows to implement several politics allowing to debug, exit slowly # or to print backtrace. # # Allowed values are: # stop - stops the running server until it is killed by the user # backtrace - gets actual backtrace and prints it to the console # and the exit. # none - do nothing, just exit. # # NOTE: "stop" value can be used for long running bugs allowing you to # run gdb using attach command to debug the function which have received # the signal, usually a SIGSEGV. on signal received = stop # Controls how is handled the server registration. # Every af-arch server needs to be registered against the central server: af-kernel # This operation is done using the --update-services command line argument provided # on every af-arch server. Obviously, this can be somekind tedious for some people # who doesn't mind about controling when services are changing. # This parameter doesn't applies to af-kernel central server because its especial # behaviour, the af-kernel will just install itself. automatic register = yes # The file must end with a new line
Default configuration will do. Keep in mind that database user [string] value have to be the same than the one installed the the install.sql script found at af-arch/af-kernel/data/.
You can also check configuration settings for Af-Arch servers.this section, to install Af-Kernel SQL you have to execute install.pl script inside the af-arch/af-kernel/data directory as follows:
bash: ~$ cd af-arch/af-kernel/data bash: ~$$ ./install.pl -- Database installer for af_kernel -- Where is the server running the database? [localhost] barbol Postgres user ? [acinom] Running postgres port ?  Creating database for af_kernel ... Password: CREATE DATABASE Installing sql schema for af_kernel...
To create this user do:
bash: ~$ af-kernel --add-superuser aspl The following procedure will create an af-arch super user: This user have some especial capabilities such as creating other users, and groups, given them permissions or manipulate servers registration. Passwords can not be empty or a simply enter. (Remember you can cancel de process by typing Control-D). Enter password for the new superuser: Retype the password, please: User aspl created successfully. Exiting..