Installing Jython and Django - Sun GlassFish Enterprise Server v3 Scripting Framework Guide

Installing Jython and Django - Sun GlassFish Enterprise Server v3 Scripting Framework Guide

Installing Jython and Django

To develop Jython on Django applications for Enterprise Server, you must do the
following :

  • Install Jython

  • Install Django

  • Install the Jython container for Enterprise Server

Jython can be installed in one of the following ways:

  • Install Jython as a standalone product

  • Install Jython from GlassFish Update Center

The following sections explain these tasks in more detail.

To Install Jython as Standalone

You can download Jython and install it as a standalone product. If
Jython is installed as standalone, you need to inform the Jython install location to
the Enterprise Server.

  1. Download Jython from the following location:

    http://downloads.sourceforge.net/project/jython/jython/2.5.1/jython_installer-2.5.1.jar

  2. Run the installer as follows:

    java -jar jython_installer-2.5.1.jar

  3. Set the following environmental variables:

    Set the JYTHON_HOME variable to the Jython install location:

    export JYTHON_HOME=/jython-install-location

    Add the JYTHON_HOME/bin directory to the path:

    export PATH=$JYTHON_HOME/bin:$PATH

    You should now be able to invoke Jython from command line as
    follows:

    jython

  4. Inform and configure the Enterprise Server with the location of Jython installation with
    the following command:

    asadmin deploy --property jython.home=/jython-install-location

To Install Jython from Update Center

The GlassFish Update Center provides a Jython package. The package installs a Jython
instance that enables creation of Jython applications for the Enterprise Server. If you
installed Jython from Update Center, there is no need for further configuration of
jython.home property.

  1. Start the Update Tool with the following command:

    as-install/bin/updatetool
  2. Choose the following option from Available Add-ons and click Install:

    Jython Runtime IPS package for GlassFish v3

    Update center automatically completes the installation of the container and configures it for
    use with Enterprise Server.

  3. Set the following environmental variables:

    Set the JYTHON_HOME variable to the Jython install location:

    export JYTHON_HOME=/as-install/glassfish/jython

    Add the JYTHON_HOME/bin directory to the path:

    export PATH=$JYTHON_HOME/bin:$PATH

    You should now be able to invoke Jython from command line as
    follows:

    jython

To Install Django

  1. Download Django from the following location:

    http://media.djangoproject.com/releases/1.1.1/Django-1.1.1.tar.gz.

  2. Extract the tar file:

    gunzip Django-1.1.1.tar.gz

    tar -xvf Django-1.1.1.tar

  3. Change to the extracted directory:

    cd Django-1.1.1

  4. Install Django with the following command:

    jython setup.py install

To Install Jython Container for Sun GlassFish Enterprise Server

The GlassFish Update Center provides the Jython container package. With this task you
can install Jython Container module and Grizzly adapter JAR files in the as-install/glassfish/modules
directory, and enable deployment of Jython/Django applications on the Enterprise Server.


Note - Make sure that the asadmin command is available from the PATH variable. Alternately
you can use the as-install/bin/asadmin command.

 


  1. Start the Update Center with the following command:

    as-install/bin/updatetool
  2. Choose the following option from Available Add-ons and click Install:

    GlassFish V3 Jython Container

    Update center automatically completes the installation of the container and configures it for
    use with Enterprise Server.

  3. Start the Enterprise Server:

    asadmin start-domain -v

  4. Test the configuration with the following process:

    1. Change to Django examples directory:

      cd Django-1.1.1/samples

    2. Deploy the example applications on the server:

      asadmin deploy .

    3. Access the deployed example applications from browser:

      http://localhost:8080/examples

To Install Jython Support Libraries for Django

The django-jython project created database back-ends and management commands for Django and Jython
application development. With this task you can install the django-jython packages and enable
database support for Django.

  1. Download the django-jython packages from the following location:

    http://django-jython.googlecode.com/files/django-jython-1.0.0.tar.gz

  2. Extract the tar file:

    gunzip django-jython-1.0.0.tar.gz

    tar -xvf django-jython-1.0.0.tar

  3. Change to the extracted directory:

    cd django-jython-1.0.0

  4. Install the package:

    jython setup.py install

posted on 2012-05-24 17:45  lexus 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/lexus/archive/2012/05/24/2516868.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值