Installing Openacs on Linux
The installation of Openacs is divided into four major strides:
1. Installing the JDK
2. Install JBoss
3. Install MySQL
4. Deploying Openacs
About JDK
Java Developmentkit (JDK) is a free software development kit (SDK, software Development Kit) released by Sun for Java developers. Since Java was launched, the JDK has become the most widely used Java SDK. As the Java Language SDK, ordinary users do not need to install the JDK to run Java programs, just install the JRE. The program developer must install the JDK to develop, compile, and debug the program. Because Openacs is developed based on JDK-1.5.0_22, the 1.5 version of the JDK is chosen as the operating environment.
About JBoss
JBoss is an open source application server based on the Java EE. Because JBoss code follows the LGPL license, it can be used for free in any commercial application. JBoss is the fastest-growing application server in the Java EE Application Server field. JBoss is popular because JBoss is distributed under commercial-friendly LGPL and developed by the open source community. JBoss Application Server also has many excellent qualities.
Openacs Introduction
Openacs is a Java-written open source ACS server, launched in 2007-09-06 by Audrius Valunas, after four years of development, Openacs has a very complete function, not only as a CPE development of auxiliary testing tools, and is fully capable of remote management of a certain number of CPE. Openacs uses b/s mode, can access the ACS server through the browser, the remote management of CPE can be implemented flexibly by writing Java script. Openacs needs to be deployed on the JBoss application server, the release version has the bin (binary) version and the SRC (source) version, where the source version needs to be compiled with Ant.
I. Installation JDK1.5
1. Download the binary format JDK installation package from the Sun Company's official web Jdk-1_5_0_22-linux-i586.bin
2. Run the file and install it in the/OPT directory
Cd/opt
Sh./Jdk-1_5_0_22-linux-i586.bin
After selecting Yes, the installation succeeds in generating the jdk1.5.0_22 directory under the/OPT directory.
3. After successful installation, the environment variables need to be set, and the following statements are added in the ~/.BASHRC file:
Path= $PATH:/opt/jdk1.5.0_22/bin
Java_home=/opt/jdk1.5.0_22
Class_path=/opt/jdk1.5.0_22/lib/tools.jar
Export PATH java_home Class_path
Use SOURCE/ETC/BASHRC to update environment variables after the modification is complete. Use Java-version in the terminal to see if the environment variable is set correctly.
Two Installing JBOSS4.2.2.2
1. Download the JBoss installation package Jboss-4.2.2.ga.zip
2. Unzip the installation package to the/opt folder, modify the environment variables, and add the following statement to the ~/.BASHRC:
Path= $PATH:/opt/jboss-4.2.2.ga/bin
Jboss_home=/opt/jboss-4.2.2.ga
3. After the deployment is complete to the/opt/jboss/bin directory, run JBoss with./run.sh-b 0.0.0.0来 to see if it will start successfully, and if you can browse http://localhost:8080/properly, the JBoss installation is successful. (If you don't log in with localhost, change localhost to your IP address, and note that it is the IP of the server.) )
4. If JBoss does not have IP access, be aware of firewall issues
A. Open the 8080 port you want to use and execute the following command:
/sbin/iptables-i input-p TCP--dport 8080-j ACCEPT
B. Save the changes and execute the following command:
/etc/rc.d/init.d/iptables Save
C. Restart the firewall so that the changes take effect immediately, execute the following command:
/etc/init.d/iptables restart
Three Installing the MySQL Database
1. Because MySQL database is very popular on Linux, so the mainstream Linux version of the current download basically integrates the MySQL database inside, we can use the following command to see whether the MySQL database is installed on our operating system
[[email protected] opt] $rpm-qa | grep MySQL
If so, we can use the one that has been installed.
2. I am using yum to perform MySQL database installation, first we can enter Yum List | grep MySQL to see the downloadable version of the MySQL database available on Yum:
[[email protected] opt] $yum list | grep MySQL
3. Install MySQL
Install MySQL, mysql-server, mysql-devel All (note: When we installed MySQL, we did not install the MySQL client, which is equivalent to installing the MySQL database, we also need to install the Mysql-server server)
[[email protected] opt] $yum install-y mysql-server MySQL Mysql-deve
4. At this point we can view the version of the mysql-server that has just been installed by the following command
[[email protected] opt] $rpm-qi mysql-server
5. Start MySQL
We can start our MySQL service by entering the service mysqld Star command [[email protected] opt] $service mysqld start
At this point we will see that the first time you start the MySQL server will prompt a lot of information, the purpose is to initialize the MySQL database, when we restart the MySQL service again, will not prompt so much information
6. When we use MySQL database, we have to start the Mysqld service first, we can through Chkconfig--list | grep mysqld command to see if the MySQL service is booting automatically, such as:
[[email protected] opt] $chkconfig mysqld on
7.mysql database After installation will only have a root administrator account, but at this time the root account has not set a password for it, the first time the MySQL service started, the database will be some initialization work, in the output of a large string of information, we see a line of information:
/usr/bin/mysqladmin-u root password ' new-password '//Set password for root account
So we can use this command to set the password for our root account (Note: This root account is the root account of MySQL, not the root account of Linux).
[email protected] opt] $mysqladmin-u root password ' root '//Use this command to set the root account password to root
8. We can now log in to our MySQL database via the mysql-u root-p command.
[Email protected] ~]$ mysql-u root-p
Enter Password:
Welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 4
Server version:5.1.73 Source Distribution
Copyright (c) and/or, Oracle, its affiliates. All rights reserved.
Oracle is a registered trademark of the Oracle Corporation and/or its
Affiliates. Other names trademarks of their respective
Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement.
Mysql>
This is the time to enter MySQL.
9. Create a new Openacs user with the root user and set the password to Openacs,
mysql> INSERT INTO Mysql.user (Host,user,password) VALUES (' localhost ', ' openacs ', Password (' Openacs '));
10. Refresh the System Permissions table
Mysql>flush privileges;
11. Log in after exiting
mysql>exit;
[Email protected] ~]$ mysql-u openacs–p
Mysql> Login Successful
12. Next, authorize the Openacs. I am logged in as root.
Mysql-u root-p
Password
A. First create a database (ACSDB) for the user,
mysql> CREATE DATABASE ACS;
B. Create a user in MySQL so that the user has full permissions on the database.
You can use the grant command in the following format:
GRANT permissions on the database name. Table name to new user name @ hostname identified by ' password ';
Such as:
Mysql> GRANT all on acs.* to [e-mail protected] identified by ' Openacs ';
Note: Each of the MySQL statements is followed by the words ";" Number, note case.
13. Unzip the downloaded database driver and copy the Mysql-connector-java-5.1.7-bin.jar to $ (jboss_home)/server/default/lib/below.
[[email protected]] $cpmysql-connector-java-5.1.7-bin.jar. /jboss/jboss-4.2.2.ga/server/default/lib/
This completes the database and driver installation.
Four Deploying Openacs
1. Copy the acs.ear to the/opt/jboss-4.2.2.ga/server/default/deploy/below.
2. Modify the openacs-ds.xml to make it suitable for your database configuration:
<?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>
The main changes are user-name and password and connection-url.
3. After the modification is complete, copy the Openacs-ds.xml to ($JBOSS _home)/server/default/deploy/below.
4. Create Openacs-service.xml (you have not created it already) and copy it to ($JBOSS _home)/server/default/deploy/jms below, the openacs-service.xml format is as follows:
<?xml version= "1.0" encoding= "UTF-8"?>
<server>
<mbeancode= "Org.jboss.mq.server.jmx.Queue" name= "Jboss.mq.destination:service=queue,name=acsqueue" >
<dependsoptional-attribute-name= "Destinationmanager" >jboss.mq:service=DestinationManager</depends>
</mbean>
</server>
This openacs configuration is complete.
To this JBoss startup and failure, the prompt message is:
17:24:34,951info [Server] Runtime shutdown hook called, forcehalt:true
17:24:34,951 INFO [Server] JBoss shutdown:undeploying All Packages
17:24:34,969 INFO [Server] Shutdown complete
Shutdown Complete
Halting VMS
My process of resolution:
1. Disable the firewall or open port 8080 (the problem remains).
2. In a blog to see that is the java_home path problem, said the path does not contain the infrequently used characters, so I put the java_home path in the special characters removed. (but not in the landing).
3. The final solution is very simple, but also quite cost me some kung fu, find to find is the machine name caused, directly hostname localhost, with this command to modify the names. (finally landed in).
http://192.168.1.21:8080/openacs/
A picture of the drawings
2014.12.16
Construction of ACS server based on CWMP (TR069) protocol