Muses Security and Risk Management GUI for MUSES server
You will have to download the version of Netbeans than contains all components (especially important NetBeans Platform SDK and Apache Tomcat) from here. The plain 7.0 version you download from OS repos will not cut it. The JDK from the repos won't either, you'll have to install it from a PPA.
During the installation of NetBeans is important to remember that in the section on customizing the installation is necessary to check the option to install Apache Tomcat because this is disabled by default. On the other hand, JDK installation will take place automatically.
-
Install MySQL server.
-
Make sure you have a database called "muses" and another called "tomcat_realm" in your MySQL server. If not, go to (https://github.com/MusesProject/MusesSRM/tree/master/src/main/resources/eu/musesproject/db) and run all the scripts in that folder (in the following order:)
startup_db.sql
will create the structure of the "Muses" BDdb_tomcat_startup.sql
will generate "tomcat_realm" BDtest-data-inserts.sql
will add some data to "Muses" BDinit_db.sql
will add more data to "Muses" BD
-
Make NetBeans aware of where the Tomcat folder is: Netbeans > Tools > Servers > Add Server > Apache Tomcat. Then browse to Tomcat folder > Open. And finally enter musesadmin as username and musespass as password. The Tomcat Folder is also called CATALINA_HOME.
-
Go to CATALINA_HOME/conf and open tomcat-users.xml in a text editor. Inside the tomcat-users tag, include the following users:
<user password="musespass" roles="manager, manager-script, admin" username="musesadmin"/>
<user password="tomcat" roles="manager, manager-script, admin" username="tomcat"/>
- Start the Apache server by going to Netbeans, then to Window > Services > Servers > Apache Tomcat or TomEE > Right-click and choose start.
- In case Tomcat fails to start, remove the double quote on noJuliConfig and noJuliManager in CATALINA_HOME/bin/catalina.bat. This is a bug http://stackoverflow.com/questions/22225764/starting-of-tomcat-failed-from-netbeans
- Download this library and place it in CATALINA_HOME/lib. This is a Maven dependency in the SRM project, but by placing it in this folder manually, we prevent from possible future errors.
- Go again to CATALINA_HOME/conf and open the file server.xml in a text editor. Copy this under the Realm tag. Feel free to modify the values if you have another configurations on your machine.
<Realm className="org.apache.catalina.realm.JDBCRealm"
driverName="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://localhost:3306/tomcat_realm"
connectionName="tomcat"
connectionPassword="tomcat"
userTable="users"
userNameCol="username"
userCredCol="password"
userRoleTable="users_roles"
roleNameCol="rolename"
digest="SHA"/>
- In Netbeans: Run > Run Project (MUSESSRM).
- The browser should pop up and show the website. Try to login with user musesadmin and pass musespass if you ran the database scripts in step 2.
- Troubleshooting: Right-click on the MUSESSRM project in Netbeans and choose Properties > Run. Make sure the value of the server is the correct Tomcat in case you have several of them.