Skip to content

OGo Docs

Sections
Personal tools
You are here: Home » Members » mhasselmann's Home » Installation on Debian Sarge with Apache2 on a virtual host

Installation on Debian Sarge with Apache2 on a virtual host

Document Actions
Installation of OGo (trunk) on Debian sarge with Apache2 on a virtual host.
Preparatory work

Installation of some packages:

- apache2 and apache2-common
- libapache2-mod-ngobj
- postgresql and postgresql-client

Configuration of the packages:

apache2:
- Add a LocationMatch-Directive to /etc/apache2/apache2.conf:
<LocationMatch "^/OpenGroupware*">
SetHandler ngobjweb-adaptor
SetAppPort 20000
</LocationMatch> <br>
Alias /OpenGroupware10a.woa/WebServerResources/ /usr/share/opengroupware.org-1.1/www

- enable rewrite- and include-mod:
a2enmod rewrite
a2enmod include

- restart apache2 (/etc/init.d/apache2)

postgresql:
- check/edit in /etc/postgresql/postgresql.conf, but check first your hostname by executing the shell-command "hostname"
* tcpip_socket = true
* uncomment port = 5432
* uncomment virtual_host = 'localhost' and replace 'localhost' with the return value of hostname-command

- edit /etc/postgresql/pg_hba.conf
* find and comment out (insert a # in front of each line) the following lines:
local all all ident sameuser
host all all 127.0.0.1 255.255.255.255 ident sameuser
host all all ::1 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff ident sameuser
host all all ::ffff:127.0.0.1/128 ident sameuser
* insert BEFORE host all all 0.0.0.0 0.0.0.0 reject:
local all all trust
host all all 127.0.0.1/32 trust
host all all ::1/128 trust
host ogo ogo YOUR_HOSTNAME'S_IP 255.255.255.255 trust
(write 127.0.0.1 if you run OGo on your local machine)

- finish postgresql's configuration with a restart (/etc/init.d/postgresql restart)

Annotation: The last edits in pg_hba.conf are access-control-rules for postgresql. It seems to be mostly secure to me but should (kind of ToDo *;)* ) be set back either to default values (instead of "trust": "ident sameuser") or maybe "password" or "md5". But you should keep in mind that this HowTo is only written for the case that you use the above listed configuration in pg_hba.conf. Any other ident-method needs other configurations!

Installation of Opengroupware.org's packages

- OGo comes along with some Debian support. To use it insert the following line into your /etc/apt/source.list:
deb http://download.opengroupware.org/nightly/packages/debian sarge trunk
- apt-get update
- apt-get install opengroupware.org
- when this is done you can install the environment
* this packages comes along with some scripts that make your life easier
* during installation you are asked if an instance should be created
* you can leave all values you are asked for at their defaults except of two values:
1) when you are asked for your host's name you must insert here again your hostname which is in some cases NOT "localhost" (e.g. if you use virtual domains or something like that). You can find out your hostname by executing "hostname" in the shell
2) Leave the password empty during database-setup!
- install now the environment keeping the two settings in mind:
apt-get install opengroupware.org-environment

So far so good! Now it is almost done! You should now check your installation BEFORE you execute /etc/init.d/opengroupware.org start which is proposed by the installation-script.

A new user was created. So change to him now!
su - ogo

Next thing you should do is to check ogo's "Defaults"-values. Here are some things configured like how to connect to postgresql's database. Execute the following command:
Defaults read
You still must be logged in as user "ogo"!
Look at "LSConnectionDictionary" and it should look something like this:

LSConnectionDictionary = {
databaseName = ogo;
hostName = YOURHOST;
password = "";
port = 5432;
userName = ogo;
};

If everything was fine during the installation - alright. If not, you have some options. You can remove with a purge all packages of course. But if you tried to set up OGo on a system with some other valuable data in apache2 or postgresql you should better not do this.
At my first attempt of OGo's setup these values were not correct. A hint of Lutz's HowTo really helped me (http://docs.opengroupware.org/Members/lutz/Opengroupware%20install%20howto%20in%20german/view?searchterm=90%20minuten). It is in German!
To edit these values you can execute from the shell (you must be logged in with ogo, so first of all "su - ogo"!):

Defaults write NSGlobalDomain LSConnectionDictionary '{hostName=YOURHOSTNAME; userName=ogo; password=""; port=5432; databaseName=ogo}'

Recheck all values again (execute "Defaults read" being logged in as "ogo") and hopefully everything is fine now.

Now you should check your database connection. From root-shell you must now try to log in to ogo's database:
psql -h YOURHOSTNAME ogo ogo
The option -h stands for "host" of course. The first "ogo" is the user and the second one for the database to access to. If postgresql's shell now greets you everything is fine. If not recheck again the settings of "/etc/postgresql/pg_hba.conf". Maybe a look into postgresql's documentation could be helpful as well (for me it was, especially the section of pg_hba.conf!), see http://www.postgresql.org.
If you want you can now have a look into the database's structure by reading "staff"'s table for example. Just to be sure everything is good now.
(From within psql's command shell:) select * from staff;
Don't forget the trailing semicolon!

If everything worked fine you can now exit psql (\q) and start OGo (/etc/init.d/opengroupware.org start).

Point your browser to http://foo.bar/OpenGroupware. Be aware that this URI is case-sensitive!

Now when you see no error-message or something like that you have set up OpenGroupware successfully! Congratulations then! Now choose a good root-PW and start to use OGo!

At this place thanks to all the good work of all the other document-writers here and the nice help on ogo's user-mailinglist. ;)
Created by mhasselmann
Last modified 2007-03-05 10:49 AM
 

Powered by Plone

This site conforms to the following standards: