注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

我的博客

 
 
 

日志

 
 
关于我

砍过人吸过粉站在路边接过吻 当过兵站过岗耍过流氓入过党 上过班下过岗打过领导得过奖

网易考拉推荐

开源openacs server的安装  

2010-08-02 13:46:59|  分类: 默认分类 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
开源openacs server的安装,供有缘的同行分享。


 

Installing TR-069 OpenACS on a fresh Debian setup

Posted by pierky on February 7, 2009

1 Votes

Quantcast


As the title says, OpenACS is a TR-069 based automatic configuration server, implementing CPE configuration protocol CWMP.
It’s an opensource project you can find on Source Forge (http://sourceforge.net/projects/openacs/), actually in Beta status.

I put here a brief HowTo to have it running on a fresh Debian setup. Of course, the result of this installation if for testing purpose only, and not for production environment.

EDIT: I tested this on both Debian 4.0 (Etch) and Debian 5.0 (Lenny) and it’s working fine.

I still didn’t test its features, actually I just had it running.
As soon as I get TR-069 capable CPEs and a bit of time to test them I will add more content in the blog!

Install JDK 1.5

Make sure to have “contrib” in your apt source list; if you don’t have, add and update aptitude.

nano /etc/apt/sources.list

 

deb http://YOUR_MIRROR/debian/ etch main contrib

deb-src http://YOUR_MIRROR/debian/ etch main contrib

Install some utilities to build JDK Debian package:

apt-get install java-package fakeroot

As non-root user, get Sun JDK 5.0 Update 17 from http://java.sun.com/j2se/1.5.0/download.jsp (non-RPM file):

wget URL

Build the Debian package

fakeroot make-jpkg jdk-1_5_0_17-linux-i586.bin

Install the .deb package (as root)

dpkg -i sun-j2sdk1.5_1.5.0+update17_i386.deb

Install JBoss

Get JBoss Application Server 4.2.2 zip file from http://www.jboss.org/download/:

wget URL

Unzip it:

unzip jboss-4.2.2.GA.zip -d /opt/

cd /opt

mv jboss-4.2.2.GA/ jboss

Run the server to test it:

cd /opt/jboss/bin

./run.sh -b 0.0.0.0

If the server fails starting, check it’s using the right Java VM; you can edit the bin/run.conf file and set JAVA_HOME=”/usr/lib/j2sdk1.5-sun”

Test the server: browse the homepage at http://YOUR_IP_ADDRESS:8080/

Hit CTRL+C to stop the server.

Install MySQL

apt-get install mysql-server-5.0

Install MySql Connector/J

Get Connector/J from http://dev.mysql.com/downloads/connector/j/5.1.html

wget URL

Extract and put mysql-connector-java-5.1.7-bin.jar into jboss/server/default/lib/

tar -xzvf mysql-connector-java-5.1.7.tar.gz

cd mysql-connector-java-5.1.7

mv mysql-connector-java-5.1.7-bin.jar /opt/jboss/server/default/lib/

Compile and deploy OpenACS

Install Apache Ant:

apt-get install ant

Get openacs-src file (openacs-src-0.03.zip) from SourceForge:

wget URL

unzip openacs-src-0.03.zip

cd openacs

Edit build.properties and set the right path to jboss (jboss=/opt/jboss/server/default)

nano build.properties

Edit the web.xml file and set the right path to the firmware directory (org.openacs.fwbase context-param):

nano acs-war/web/WEB-INF/web.xml

[... cut ...]
    <context-param>
        <description>Path for firmware images</description>
        <param-name>org.openacs.fwbase</param-name>
        <param-value>/firmware/</param-value>
    </context-param>
[... cut ...]

Run ant to build OpenACS

ant

Copy dist/acs.ear to jboss/server/default/deploy:

cp dist/acs.ear /opt/jboss/server/default/deploy/

Create and edit jboss/server/default/deploy/openacs-ds.xml, configuring data source

nano /opt/jboss/server/default/deploy/openacs-ds.xml

openacs-ds.xml:

<?xml version="1.0" encoding="UTF-8"?>

<datasources>

    <local-tx-datasource>

        <jndi-name>ACS</jndi-name>

        <connection-url>jdbc:mysql://localhost/ACS</connection-url>

        <driver-class>com.mysql.jdbc.Driver</driver-class>

        <user-name>openacs</user-name>

        <password>openacs</password>

        <min-pool-size>5</min-pool-size>

        <max-pool-size>20</max-pool-size>

        <idle-timeout-minutes>5</idle-timeout-minutes>

    </local-tx-datasource>

</datasources>

Create openacs-service.xml in jboss/server/default/deploy/jms

nano /opt/jboss/server/default/deploy/jms/openacs-service.xml

 

<?xml version="1.0" encoding="UTF-8"?>

<server>

    <mbean code="org.jboss.mq.server.jmx.Queue" name="jboss.mq.destination:service=Queue,name=acsQueue">

        <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>

    </mbean>

</server>

Create ACS database and openacs user on MySQL, as in openacs-ds.xml:

mysql

CREATE DATABASE ACS;

GRANT ALL ON ACS.* TO openacs IDENTIFIED BY 'openacs';

Create ACS tables:

echo "CREATE TABLE HardwareModelBean (

  id int(11) NOT NULL auto_increment,

  oui varchar(250) default NULL,

  hclass varchar(250) default NULL,

  DisplayName varchar(250) default NULL,

  manufacturer varchar(250) default NULL,

  PRIMARY KEY  (id)

);

 

CREATE TABLE HostsBean (

  id int(11) NOT NULL auto_increment,

  serialno varchar(250) default NULL,

  url varchar(250) default NULL,

  configname varchar(250) default NULL,

  currentsoftware varchar(250) default NULL,

  sfwupdtime timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,

  sfwupdres varchar(250) default NULL,

  cfgupdres varchar(250) default NULL,

  lastcontact timestamp NOT NULL default '0000-00-00 00:00:00',

  cfgupdtime timestamp NOT NULL default '0000-00-00 00:00:00',

  hardware varchar(250) default NULL,

  cfgversion varchar(250) default NULL,

  props longblob,

  hwid int(11) default NULL,

  username varchar(250) default NULL,

  password varchar(250) default NULL,

  authtype int(11) default NULL,

  customerid varchar(250) default NULL,

  conrequser varchar(250) default NULL,

  conreqpass varchar(250) default NULL,

  PRIMARY KEY  (id)

);

 

CREATE TABLE ConfigurationBean (

  name varchar(250) NOT NULL,

  hardware varchar(250) default NULL,

  config longblob,

  filename varchar(250) default NULL,

  version varchar(250) default NULL,

  PRIMARY KEY  (name)

);

 

CREATE TABLE ScriptBean (

  name varchar(250) NOT NULL,

  script longblob,

  description varchar(250) default NULL,

  PRIMARY KEY  (name)

);

 

CREATE TABLE SoftwareBean (

  hardware varchar(250) NOT NULL,

  version varchar(250) NOT NULL,

  minversion varchar(250) default NULL,

  url varchar(250) default NULL,

  size bigint(20) NOT NULL,

  filename varchar(250) default NULL,

  PRIMARY KEY  (hardware,version)

);" | mysql ACS;

Create the firmware directory:

mkdir /firmware

Run the server:

cd /opt/jboss/bin

./run.sh -b 0.0.0.0

Browse the OpenACS web interface at http://YOUR_IP_ADDRESS:8080/openacs/index.jsf

Some useful links:
OpenACS Wiki: http://openacs.wiki.sourceforge.net/
Getting JDK 1.5 and Tomcat 5.5 up and running in Debian Linux: http://nileshk.com/node/36
JBoss on Debian quickstart: http://lorenzod8n.wordpress.com/2008/03/02/jboss-on-debian-quickstart/

 

 

 

  评论这张
 
阅读(5186)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2016