Skip to content

Latest commit

 

History

History
47 lines (40 loc) · 3.43 KB

README.md

File metadata and controls

47 lines (40 loc) · 3.43 KB

MusesSRM

Muses Security and Risk Management GUI for MUSES server

Working with it

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.

After the installation of Netbeans

  1. Install MySQL server.

  2. 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" BD
    • db_tomcat_startup.sql will generate "tomcat_realm" BD
    • test-data-inserts.sql will add some data to "Muses" BD
    • init_db.sql will add more data to "Muses" BD
  3. 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.

  4. 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"/>
  1. Start the Apache server by going to Netbeans, then to Window > Services > Servers > Apache Tomcat or TomEE > Right-click and choose start.
  2. 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
  3. 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.
  4. 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"/>
  1. In Netbeans: Run > Run Project (MUSESSRM).
  2. 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.
  3. 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.