一、准备

软件:软件下载http://pan.baidu.com/s/1o6yr9BO

jboss-4.2.3.GA-jdk6.zip;

jdk-1_5_0_22-linux-i586.bin;

mysql-connector-java-5.1.0-bin.jar;

openacs-bin-0.4.zip;

mysql;

系统:fedora21

二、安装

1、修改权限:

        登录管理员(root)帐户,进入所下载软件的目录中,执行命令chmod +x * 将所有的软件权限修改过为可执行。使用ls -l查看。

2、安装jdk-1_5_0_22-linux-i586.bin

     操作步骤:a) 打开命令行窗口,进入软件所在目录。如:cd /root/文档/

                      b) ./jdk-1_5_0_22-linux-i586.bin


3、安装jboss

      步骤:a)解压缩jboss-4.2.3.GA-jdk6.zip。执行命令:unzip jboss-4.2.3.GA-jdk6.zip

                b)cp jboss-4.2.3.GA -R  /opt/jboss

                c)命令行中运行jboss;

                       cd /opt/jboss/bin

                        ./run.sh -b 0.0.0.0

                d)测试jboss服务是否正常。浏览器输入 http://localhost:8080/,安装正常即可开启jboss页面。

                e)命令行中按 CTRL+C 停止服务。


4、安装mysql-connector-java-5.1.0-bin.jar

     步骤:cp mysql-connector-java-5.1.0-bin.jar /opt/jboss/server/default/lib


5、安装mysql

      步骤 :

       a)安装remi软件源

         rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm   
         rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm  
         rpm -Uvh http://rpms.famillecollet.com/remi-release-21.rpm

       b)安装mysql。
           yum --enablerepo=remi install mysql mysql-server  

       c)开启没有失去了服务并自启动。

             systemctl start mysqld.service   开启服务
             systemctl enable mysqld.service  服务自启动

       d)mysql安全设置

  • 设置(修改)root密码

  • 删除匿名用户

  • 禁用root远程登录

  • 删除测试数据库test

  • 重载权限表

要启用MySQL 安全设置请输入以下命令

  1. /usr/bin/mysql_secure_installation  

输出

  1. NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL  

  2.       SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!  

  3.    

  4.    

  5. In order to log into MySQL to secure it, we\'ll need the current  

  6. password for the root user.  If you\'ve just installed MySQL, and  

  7. you haven\'t set the root password yet, the password will be blank,  

  8. so you should just press enter here.  

  9.    

  10. Enter current password for root (enter for none):   

  11. OK, successfully used password, moving on...  

  12.    

  13. Setting the root password ensures that nobody can log into the MySQL  

  14. root user without the proper authorisation.  

  15.    

  16. Set root password? [Y/n] Y  

  17. New password:   

  18. Re-enter new password:   

  19. Password updated successfully!  

  20. Reloading privilege tables..  

  21.  ... Success!  

  22.    

  23.    

  24. By default, a MySQL installation has an anonymous user, allowing anyone  

  25. to log into MySQL without having to have a user account created for  

  26. them.  This is intended only for testing, and to make the installation  

  27. go a bit smoother.  You should remove them before moving into a  

  28. production environment.  

  29.    

  30. Remove anonymous users? [Y/n] Y  

  31.  ... Success!  

  32.    

  33. Normally, root should only be allowed to connect from 'localhost'.  This  

  34. ensures that someone cannot guess at the root password from the network.  

  35.    

  36. Disallow root login remotely? [Y/n] Y  

  37.  ... Success!  

  38.    

  39. By default, MySQL comes with a database named 'test' that anyone can  

  40. access.  This is also intended only for testing, and should be removed  

  41. before moving into a production environment.  

  42.    

  43. Remove test database and access to it? [Y/n] Y  

  44.  - Dropping test database...  

  45.  ... Success!  

  46.  - Removing privileges on test database...  

  47.  ... Success!  

  48.    

  49. Reloading the privilege tables will ensure that all changes made so far  

  50. will take effect immediately.  

  51.    

  52. Reload privilege tables now? [Y/n] Y  

  53.  ... Success!  

  54.    

  55. Cleaning up...  

  56.    

  57.    

  58.    

  59. All done!  If you\'ve completed all of the above steps, your MySQL  

  60. installation should now be secure.  

  61.    

  62. Thanks for using MySQL!  

e)设置mysql管理员密码并创建数据库


mysql -uroot -p123

>create database ACS;

>quit;


6、安装openacs

      1.unzip openacs-bin-0.5.zip       

      2.cd openacs

      3.sudo cp acs.ear  /opt/jboss/server/default/deploy

      4.sudo cp openacs-ds.xml /opt/jboss/server/default/deploy

      5.sudo cp  openacs-service.xml  /opt/jboss/server/default/deploy/jms

7、配置openacs


cd /opt/jboss/server/default/deploy

sudo vi 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>root</user-name>
    <password>123</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>

8、运行jboss


cd /opt/jboss/bin
./run.sh -b 0.0.0.0

9、测试openacs


wget localhost:8080/openacs

10、关闭防火墙

关闭防火墙

systemctl stop firewalld.service

永久关闭

systemctl disable firewalld.service




参考网站:

http://blog.csdn.net/jerrylo/article/details/8621019

http://www.linuxidc.com/Linux/2012-07/65098.htm

http://blog.pierky.com/installing-tr-069-openacs-on-a-fresh-debian-setup/