基於Fedora的OPENACS搭建

1、準備java

軟件:軟件下載http://pan.baidu.com/s/1o6yr9BOmysql

jboss-4.2.3.GA-jdk6.zip;linux

jdk-1_5_0_22-linux-i586.bin;sql

mysql-connector-java-5.1.0-bin.jar;數據庫

openacs-bin-0.4.zip;瀏覽器

mysql;安全

系統:fedora21ide

2、安裝測試

一、修改權限:網站

        登陸管理員(root)賬戶,進入所下載軟件的目錄中,執行命令chmod +x * 將全部的軟件權限修改過爲可執行。使用ls -l查看。

二、安裝jdk-1_5_0_22-linux-i586.bin

     操做步驟:a) 打開命令行窗口,進入軟件所在目錄。如:cd /root/文檔/

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


三、安裝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 中止服務。


四、安裝mysql-connector-java-5.1.0-bin.jar

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


五、安裝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;


六、安裝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

七、配置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>

八、運行jboss


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

九、測試openacs


wget localhost:8080/openacs

十、關閉防火牆

關閉防火牆

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/

相關文章
相關標籤/搜索