torquebox、jruby配置

9 篇文章 0 订阅

开个torquebox配置的文章做记录。

官网 : http://torquebox.org/

下载一个最新的,

点击 官方文档的地方: Documentation

 

我的服务器是centos6.2

检查java版本:java -version

需要在1.6以上,基本现在都是1.6以上的。

yum install httpd-devel openssl-devel zlib-devel gcc gcc-c++ curl-devel expatdevel gettext-devel mysql-devel readline-devel libxml2-devel libxslt-devel
yum install  make  libtool autoconf automake imake   expat-devel

 

上传torquebox-dist-2.1.2-bin.zip到/root/tool下(我默认的地方,不一定)

解压:

unzip -q torquebox-dist-2.1.2-bin.zip

 ln -s torquebox-2.0.3 torquebox-current
在etc/profile修改
export TORQUEBOX_HOME=$HOME/torquebox-current
export JBOSS_HOME=$TORQUEBOX_HOME/jboss
export JRUBY_HOME=$TORQUEBOX_HOME/jruby
export PATH=$JRUBY_HOME/bin:$PATH

使配置生效: source /etc/profile

 

$ mkdir -p ~/torquebox_examples/rails_example

cd ~/torquebox_examples/rails_example

 

 

A)jruby -S gem install activerecord-jdbc-adapter --no-ri --no-rdoc

   B)jruby -S gem install jdbc-mysql activerecord-jdbcmysql-adapter --no-ri --no-rdoc

   C)jruby -S gem install jruby-openssl --no-ri --no-rdoc

   D)jruby -S gem install rails --no-ri --no-rdoc

 

jruby -S gem update --system

 rails new dms -d mysql

//todo    修改数据库配置

bundle install

rake db:create

在项目根目录下跑: torquebox deploy

jboss下jboss/standalone/configuration配置文件standalone.xml

<interfaces>
        <interface name='management'>
            <inet-address value='${jboss.bind.address.management:127.0.0.1}'/>
        </interface>
        <interface name='public'>
            <inet-address value='${jboss.bind.address:127.0.0.1}'/>
        </interface>
        <interface name='unsecure'>
            <!-- Used for IIOP sockets in the standarad configuration.
                 To secure JacORB you need to setup SSL -->
            <inet-address value='127.0.0.1'/>
        </interface>
    </interfaces>

改为

<interfaces>
        <interface name="management">
            <inet-address value="0.0.0.0"/>
        </interface>
        <interface name="public">
            <inet-address value="0.0.0.0"/>
        </interface>
        <interface name="unsecure">
            <inet-address value="0.0.0.0"/>
        </interface>
    </interfaces>

 

./standalone.sh 

nohup ./standalone.sh &

重启torquebox ,8080端口可以访问了(如占用了,需要修改端口)。

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值