Difference between revisions of "Xebra Installation"
(→Automatic Installation (Ubuntu)) |
|||
Line 11: | Line 11: | ||
There is an installation script available at https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/framework/web/xebra/tools/scripts/install_xebra_ubuntu.sh | There is an installation script available at https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/framework/web/xebra/tools/scripts/install_xebra_ubuntu.sh | ||
− | The script expects $XEBRA_DEV, $EIFFEL_SRC, $ISE_EIFFEL and $ISE_LIBRARY to be set. It will checkout xebra to $XEBRA_DEV, download, install and configure apache 2.2.11 to $XEBRA_DEV/httpd. Apache will be configured to listen on port 55000 (instead of 80) in order to not interfere with an already installed http server. After the script was successfully run see [[Xebra | + | The script expects $XEBRA_DEV, $EIFFEL_SRC, $ISE_EIFFEL and $ISE_LIBRARY to be set. It will checkout xebra to $XEBRA_DEV, download, install and configure apache 2.2.11 to $XEBRA_DEV/httpd. Apache will be configured to listen on port 55000 (instead of 80) in order to not interfere with an already installed http server. After the script was successfully run see [[Xebra Tutorial|tutorials]] for how to start the server. |
− | + | ||
=Manual Installation= | =Manual Installation= |
Revision as of 10:47, 30 June 2009
Contents
Notes
- Use Xebra revision 78995 for this tutorial.
- This tutorial was tested with EiffelStudio 6.4.7.8600 ($ISE_EIFFEL) and eiffel_src ($EIFFEL_SRC) revision 78995.
- The env vars $EIFFEL_SRC, $ISE_EIFFEL, $ISE_PLATFORM and $ISE_LIBRARY are expected to be set.
Automatic Installation (Ubuntu)
There is an installation script available at https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/framework/web/xebra/tools/scripts/install_xebra_ubuntu.sh
The script expects $XEBRA_DEV, $EIFFEL_SRC, $ISE_EIFFEL and $ISE_LIBRARY to be set. It will checkout xebra to $XEBRA_DEV, download, install and configure apache 2.2.11 to $XEBRA_DEV/httpd. Apache will be configured to listen on port 55000 (instead of 80) in order to not interfere with an already installed http server. After the script was successfully run see tutorials for how to start the server.
Manual Installation
Checkout Xebra
- Define $XEBRA_DEV and checkout xebra from https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/framework/web/xebra/ to $XEBRA_DEV
Install Apache
Ubuntu 9.04
Note:
- Mod_xebra does currently not run with the apache distribution that comes with ubuntu.
- If you do not install apache into the $XEBRA_DEV/httpd folder remember to copy the webapps from $XEBRA_DEV/httpd/httpd to your httpd folder.
- Download apache unix source httpd-2.2.11 from http://httpd.apache.org/download.cgi
- Extract
- Define $APACHE2 where you want to install apache, e.g. to $XEBRA_DEV/httpd
- Run the following commands:
CFLAGS="-ggdb"./configure --prefix={insert path here} make make install
- Compile the module by running
cd $XEBRA_DEV/c_projects/mod_xebra $APACHE2/bin/apxs -c -Wc,-ggdb -I$ISE_EIFFEL/studio/spec/$ISE_PLATFORM/include mod_xebra.c mod_xebra.h
- Install the module to apache by running
sudo $APACHE2/bin/apxs -i mod_xebra.la
- Add the following lines to Apache2.2\conf\httpd.conf:
#Xebra Module LoadModule xebra_module modules/mod_xebra.so <IfModule xebra_module> AddHandler mod_xebra .xeb XebraServer_port "55001" XebraServer_host "localhost" LogLevel debug DirectoryIndex index.xeb <Files ~ "\.(ini|e|ecf)$"> Order allow,deny Deny from all </Files> <Directory ~ "EIFGENs"> Order allow,deny Deny from all </Directory> </IfModule>
- The install script also changes the Listen Port from 80 to 55000. Change this if you wish to run this apache parallel to another webserver that uses port 80.
- Restart apache (if necessary, you need to stop and start instead of restart)
sudo $APACHE2/bin/apachectl restart
- Browse to http://localhost/test.xeb. You should see the Fail Whale and a message saying "Cannot connect to XebraServer. See apache error log."
- Hint: keep an eye on the apache error log tail -f $APACHE2/logs/error_log
Windows
Note
- If you do not install apache into the $XEBRA_DEV/httpd folder remember to copy the webapps from $XEBRA_DEV/httpd/httpd to your httpd folder.
- Download apache httpd-2.2.11 windows binary from http://httpd.apache.org/download.cgi
- Install (Choose Custom Installation and install Build Headers and Libraries as well)
- Copy mod_xebra.so to your Apache2.2\modules folder.
- Add the following lines to Apache2.2\conf\httpd.conf:
#Xebra Module LoadModule xebra_module modules/mod_xebra.so <IfModule xebra_module> AddHandler mod_xebra .xeb XebraServer_port "55001" XebraServer_host "localhost" LogLevel debug DirectoryIndex index.xeb <Files ~ "\.(ini|e|ecf)$"> Order allow,deny Deny from all </Files> <Directory ~ "EIFGENs"> Order allow,deny Deny from all </Directory> </IfModule>
- Restart Apache
- Browse to http://localhost/test.xeb. You should see the Fail Whale and a message saying "Cannot connect to XebraServer. See apache error log."
Compile the Xebra Translator
- Launch estudio and open the project $XEBRA_DEV/eiffel_projects/xebra_translator/xebra_translator-voidunsafe.ecf
- Compile
Or on linux run:
ec -config $XEBRA_DEV/eiffel_projects/xebra_translator/xebra_translator-voidunsafe.ecf -target xebra_translator -c_compile -clean
Run the Xebra Server
See Xebra Tutorial for how to run the server.
Installation on Windows with IIS7
no documentation yet