Install Guide
From Gemin-Wiki
How to Install G+ on a debian server.
Install Guide
G+ is easier to install than ever, especially on Debian systems which now build with pretty much every requisite that G+ needs in package form
Prerequsites
You can apt-get install all the packages G+ needs:
apt-get install cvs ffmpeg sun-java5-jdk ant unzip zip
Fetching G+
G+ is installed from CVS, so you call the CVS Checkout command to fetch the archive. You'll need to replace the username here with your own. If you don't have one, contact Gemin-i and explain why you want to install G+
cvs -d :pserver:adam@dev.gemin-i.org:/var/lib/cvs login cvs -d :pserver:adam@dev.gemin-i.org:/var/lib/cvs checkout gemin-iplus
Configuring
Run the ./configure.pl script. Most of the questions should be fairly obvious to an experienced sysadmin, but here's a quick description of each question:
Default Skin
Gemin-i Plus has a few different 'skins'. The install script will locate which of these skins are in the archive and ask you to pick one to be used in your new install. It defaults to Gemin-i Plus, the others aren't guarenteed to even be present let alone working right now.
Install Name
The install name is just a string to identify the instance of the server.
Install Directory
Defaults to the jetty_root directory, and that's probably what you want. It's where the server looks for config files, puts it's output log etc.
DB Username
The username used to connect to the mysql database. The configure script will create a makedbuser.sql file to add this user to your mysql database, but you can always just use one that's already there of course.
DB Password
The password used to connect to the mysql database. The configure script will create a makedbuser.sql file to add this user to your mysql database, but you can always just use one that's already there of course.
Database Name
The name of the database for Gemin-i Plus
Database Server
Defaults to localhost, you may keep the database on a seperate server, but you probably won't
Port for Gemin-iPlus to listen on
Defaults to 8080, and unless you're running more than one instance on the same machine, that's probably as good as any. The JAVA server will open this port for listening out for connections from the flash client
Base Dir in Webroot
Gemin-i Plus will copy all the files it needs served from the webserver into this directory inside webroot. It will be used to construct URL's to get those files, and to copy the files into that directory later. Probably no reason to change it unless you're running more than one server on one machine.
Webserver Root
Where is the root of your webserver?
- on Debian systems it's /var/www/ so that's what we default to.
- on Mac OS X it's more likely to be /Library/WebServer/Documents
- on some unix systems it may be /var/lib/www
- on other unix systems /usr/local/apache/ something like that
Webserver HostName
configure.pl tries to get this by running the hostname command, but that may not be on your system and may not return the name you want anyway. You'll want the name of the webserver, IE the domain in web-links.
localhost will work if your just developing on the local box.
Password For Web Config Access
When you try and access the configuration panel, add new users or alter passwords etc, you'll be asked for a password. This sets that password. We are phasing out the panel which this password gives you access to, but at the time of writing it's still needed for some admistration tasks.
Path of log
The output log will go in the jetty_root directory normally, and be called "out". You can put it anywhere and call it anything. You might want /var/log/gemin-iplus for instance, but I tend to use the default. If you pick a file that's not in the Gemin-i directory, make sure it's writeable by the user that you will run the gemin-i server under.
Ffmpeg directory
Where ffmpeg is stored on the server (path). Defaults to the value of a call to "$ whereis ffmpeg" (likely "/usr/bin" or something similar). If ffmpeg is not installed, this will be blank. If it is installed, gemin-i allows to upload movies.
We have some Ffmpeg_install_instructions, remember that your users will not be able to upload video unless ffmpeg is installed somewhere.
Email address for failure-reports etc.
There's a monitor robot that keeps an eye on things, and emails you if they go wrong. Which email address should it send to?
Set up cronjob?
If you say yes, configure will use crontab to try and set up a cronjob for backups etc. If you don't you may have to edit cronjobs youself, or accept that backups etc aren't happening.
Should the cron run backup?
The cronjob will only backup when it's run if you say Y
Should the cron delete old backups?
The cron can delete old backups to ensure the server doesn't run out of diskspace. Say yes if you want it to do so.
How old is old?
In days. We use a week here.
Should the cron run shrinkimages?
There's a robot which will take large images and resize and recompress them with imagemagick. If you want it to do that every day, say yes.
Run the monitor bot automatically?
If you say yes, your process will restart autoatically if it falls over, and you'll get error reports in your email.
Copy needed files to web-root
If you don't let configure.pl do it, you'll have to do it yourself.
Create The Database
Two files in the jetty_root/config directory have been created by the configure script. These are makedbuser.sql and makedb.sql. The first will make MySQL create the user-information to enable the server to contact the DB. The second will create the DB itself. Use them like this:
mysql -uroot -p{PASSWORD} < jetty_root/config/makedbuser.sql
mysql -uroot -p{PASSWORD} < jetty_root/config/makedb.sql
Compile
run 'ant' from the project's root directory to compile the java server.
run
./gemin-d start
or
./gemin-d stop
will start and stop the server.
Using G+
This should be all you need to do to get G+ running. The first thing you'll want to do is log in as root (password 'root') and change the password for that user.
Proxying To Avoid Users Suffering From Blocked Ports
Gemin-i Plus is set up by default to run it's Java server on port 8080 and use apache running on the normal web port, port 80, for most graphics and html requests.
Some systems, especially in schools, are so locked down that web requests to any port other than port 80 are blocked. To get Gemin-i Plus to work on these networks is slightly more painful. You must set Apache up to forward some requests, the requests to the Gemin-i Server, from port 80 to the Gemin-i Plus server on port 8080 and then edit the client configuration file to get the flash client to direct it's requests at port 80 ready for Apache to forward them on to the Java Server.
This is a two step process, here we present instructions on how to do that with a Debian system running apache2. These may or may not be transferable to 'nix in general.
Set up apache to forward requests to the Gemin-i Plus server.
edit /etc/apache2/httpd.conf to add these lines:
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so LoadModule proxy_ftp_module /usr/lib/apache2/modules/mod_proxy_ftp.so LoadModule proxy_connect_module /usr/lib/apache2/modules/mod_proxy_connect.so LoadModule headers_module /usr/lib/apache2/modules/mod_headers.so LoadModule deflate_module /usr/lib/apache2/modules/mod_deflate.so
Next edit the config file for the virtual host running gemin-i. For example /etc/apache2/sites-available/your.site and add this line:
ProxyPass /server/ http://your.site.net:8080/
Then restart apache
/etc/init.d/apache2 restart
Now your system will pass requests to http://your.site.net/server/X on to http://your.site.net:8080/X
Edit the Client Config file
We want to make the flash client send it's requests to the new apache proxy instead of to port 8080
The client config is likely in /var/www/gemin-iplus/client_config.xml or similar. There is a line that looks like this:
<binRoot>http://dev.gemin-i.org:8080/gemin-iplus/</binRoot>
That needs to be edited to look more like this
<binRoot>http://dev.gemin-i.org/server/gemin-iplus/</binRoot>
With that done, your can run a test and hope everthing works.
Install SiD
Most G+ installations will run with our CRM 'Schools Information Database' "SiD" along-side. SiD allows schools to register, and allows facilitators to add projects and manage our relationship with schools.
SiD is a ruby application, so naturally Ruby has to be installed.
Install Rails & Prerequisites
Rails now has a Debian package so this should do, install Rails and Gems and the fcgi apache module:
apt-get install rails libgems-ruby1.8 libapache2-mod-fcgid
Install Apache Modules
We want to install the rewrite and fcgi modules which we control to make Apache run Ruby at the right times:
a2enmod rewrite a2enmod fcgid libfcgi-ruby1.8
Configure Apache's Virtual Domain
SiD will run from a virtual domain, EG http://sid.server.com/ so we need to configure apache to use that domain. Create a directory to contain the web-root, then add a virtual host to the /etc/apache2/sites-available/ and link it to /etc/apache2/sites-enables. Here's the contents of the file on our machine, you'll need to edit it of course:
<VirtualHost *>
ServerName sid.gemin-i.org
ServerAlias www.sid.gemin-i.org
ServerAdmin adam@gemin-i.org
DocumentRoot /var/www-sid/SiD/public
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www-sid/SiD/public>
Options ExecCGI FollowSymLinks
AddHandler cgi-script .cgi
AllowOverride all
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/sid.error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/sid.access.log combined
ServerSignature On
Alias /icons/ "/usr/share/apache2/icons/"
<Directory "/usr/share/apache2/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Restart Apache
To reflect the changes we have just made:
/etc/init.d/apache2 restart
Fetch SiD from CVS
Inside that doc-root, fetch the CVS archive
cvs -d :pserver:adam@dev.gemin-i.org:/var/lib/cvs checkout SiD
Edit SiD's config
in the 'config' directory in SiD, copy "database.yml.ORIG" to "database.yml", then edit it to reflect the situation on this server.
Old Install Guide
If you have difficulties the old install guide my help.
![[Main Page]](/wiki/stylesheets/images/wiki.png)