Difference between revisions of "XInstallation"

(Ubuntu 9.04 with Apache 2.2.11)
(Replaced origo.ethz.ch by eiffel.com in SVN URL)
 
Line 8: Line 8:
 
==Ubuntu 9.04 with Apache 2.2.11==
 
==Ubuntu 9.04 with Apache 2.2.11==
 
===Note===
 
===Note===
There is an installation script available for this type of configuration: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/framework/web/xebra/tools/scripts/install_xebra_ubuntu.sh
+
There is an installation script available for this type of configuration: https://svn.eiffel.com/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 and install apache to $XEBRA_DEV/httpd and compile the translator and the server. After the script was successfully run you have to edit $XEBRA_DEV/eiffel_projects/xebra_server/config.ini to match your configuration.
 
The script expects $XEBRA_DEV, $EIFFEL_SRC, $ISE_EIFFEL and $ISE_LIBRARY to be set. It will checkout xebra to $XEBRA_DEV, download and install apache to $XEBRA_DEV/httpd and compile the translator and the server. After the script was successfully run you have to edit $XEBRA_DEV/eiffel_projects/xebra_server/config.ini to match your configuration.
Line 15: Line 15:
  
 
===Checkout Xebra===
 
===Checkout Xebra===
* Define $XEBRA_DEV and checkout xebra from https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/framework/web/xebra/ to $XEBRA_DEV
+
* Define $XEBRA_DEV and checkout xebra from https://svn.eiffel.com/eiffelstudio/trunk/Src/framework/web/xebra/ to $XEBRA_DEV
  
 
===Setup Apache===
 
===Setup Apache===
Line 77: Line 77:
 
==Windows with Apache 2.2.11==
 
==Windows with Apache 2.2.11==
 
===Checkout Xebra===
 
===Checkout Xebra===
* Define $XEBRA_DEV and checkout xebra from https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/framework/web/xebra/ to $XEBRA_DEV
+
* Define $XEBRA_DEV and checkout xebra from https://svn.eiffel.com/eiffelstudio/trunk/Src/framework/web/xebra/ to $XEBRA_DEV
  
 
===Setup Apache===
 
===Setup Apache===
 
* Download apache httpd-2.2.11 windows binary from http://httpd.apache.org/download.cgi
 
* 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)
 
* Install (Choose Custom Installation and install Build Headers and Libraries as well)
* Copy [https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/framework/web/xebra/c_projects/apache_mod_xebra_win/Debug/mod_xebra.so mod_xebra.so] to your Apache2.2\modules folder.
+
* Copy [https://svn.eiffel.com/eiffelstudio/trunk/Src/framework/web/xebra/c_projects/apache_mod_xebra_win/Debug/mod_xebra.so mod_xebra.so] to your Apache2.2\modules folder.
 
* Add the following lines to Apache2.2\conf\httpd.conf:
 
* Add the following lines to Apache2.2\conf\httpd.conf:
 
  LoadModule xebra_module modules/mod_xebra.so
 
  LoadModule xebra_module modules/mod_xebra.so

Latest revision as of 13:16, 4 June 2012

Installation

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.

Ubuntu 9.04 with Apache 2.2.11

Note

There is an installation script available for this type of configuration: https://svn.eiffel.com/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 and install apache to $XEBRA_DEV/httpd and compile the translator and the server. After the script was successfully run you have to edit $XEBRA_DEV/eiffel_projects/xebra_server/config.ini to match your configuration.


Checkout Xebra

Setup Apache

Note: Mod_xebra does currently not run with the apache distribution that comes with ubuntu.

  • 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:
LoadModule xebra_module modules/mod_xebra.so
AddHandler mod_xebra .xeb
XebraServer_port "55000"
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>"
  • Restart apache (if necessary, you need to stop and start instead of restart)
sudo $APACHE2/bin/apachectl restart
  • Make sure no other apache is running, e.g. run
sudo apache2ctl stop
  • Browse to http://localhost/test.xeb. You should see the Fail Whale and a message saying "Cannot connect to XebraServer. See apache error log."
  • In order to be able to browse to the pre-created websites, copy the content of the folder xebra/httpd/htdocs to $APACHE2/htdocs.
  • Hint: keep an eye on the apache error log tail -f $APACHE2/logs/error_log

Compile the Xebra Translator

cd $XEBRA_DEV/eiffel_projects/xebra_translator/
ec -config xebra_translator-voidunsafe.ecf  -target xebra_translator -c_compile -clean

Run the Xebra Server

  • Open the file $XEBRA_DEV/eiffel_projects/xebra_server/config.ini and adapt translator, compiler, and webapps_root to your configuration.
  • Compile the server
cd $XEBRA_DEV/eiffel_projects/xebra_server
ec -config xebra_server-voidunsafe.ecf -target xebra_server -c_compile -clean
  • Open estudio in a terminal and open the project $XEBRA_DEV/eiffel_projects/xebra_server/xebra_server-voidunsafe.ecf
  • Go to the Exceptions Handling dialog and disable DEVELOPER_EXCEPTION.
  • Open the Execution Parameters dialog and set "config.ini -d 10" as argument.
  • Run
  • Browse to http://localhost/helloworld/hello.xeb. The server now translates, generates, compiles and finally runns the application.

Windows with Apache 2.2.11

Checkout Xebra

Setup Apache

  • 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:
LoadModule xebra_module modules/mod_xebra.so
AddHandler mod_xebra .xeb
XebraServer_port "55000"
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>"
  • 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 Xebra Translator

  • Launch estudio and open the project $XEBRA_DEV/eiffel_projects/xebra_translator/xebra_translator-voidunsafe.ecf
  • Compile

Run the Xebra Server

  • Open the file $XEBRA_DEV/eiffel_projects/xebra_server/config.ini and adapt translator, compiler, and webapps_root to your configuration.
  • Launch estudio and open the project $XEBRA_DEV/eiffel_projects/xebra_server/xebra_server-voidunsafe.ecf
  • Go to the Exceptions Handling dialog and disable DEVELOPER_EXCEPTION.
  • Open the Execution Parameters dialog and set "config.ini -d 10" as argument.
  • Compile and run
  • Browse to http://localhost/helloworld/hello.xeb. The server now translates, generates, compiles and finally runns the xebrawebpp application.

Windows with IIS7

no documentation yet