Skip to content

Commit 8022dd5

Browse files
Adding some more content
1 parent d905417 commit 8022dd5

File tree

3 files changed

+73
-3
lines changed

3 files changed

+73
-3
lines changed

Figures/tomcatpackages.png

650 KB
Loading

MUSESDevGuide.bib

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,10 @@ @misc{mysqlguide:site
4444
url = {http://wiki.gentoo.org/wiki/MySQL/Startup_Guide},
4545
lastaccess = {March, 2015}
4646
}
47+
48+
@misc{eclipsetomcat:site,
49+
author = {MuleSoft, INC.},
50+
title = {Apache Tomcat Eclipse Integration},
51+
url = {https://www.mulesoft.com/tcat/tomcat-eclipse},
52+
lastaccess = {March, 2015}
53+
}

MUSESDevGuide.tex

Lines changed: 66 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ \subsection{Preparing the database}
141141
The script for creating the MUSES server database is located at \texttt{MusesServer\\/db/startup\_db.sql}, and it should be loaded in the MySQL server at our machine. First, make sure you have MySQL server installed. If not, open a terminal and type \texttt{sudo apt-get install mysql-server-5.6}. During the installation, you will be asked to set a password for the root user. Few basic steps \cite{mysqlguide:site} should be followed to load the MUSES database:
142142

143143
\begin{description}
144-
\item[\texttt{root \#/etc/init.d/mysql start}]
145-
\item[\texttt{user \$mysql -u root -h localhost -p}] and then enter the chosen password.
144+
\item[\texttt{\$ sudo /etc/init.d/mysql start}]
145+
\item[\texttt{\$ mysql -u root -h localhost -p}] and then enter the chosen password.
146146
\item[\texttt{SOURCE /home/yourusername/foldertoMusesServer/db/startup\_db.sql;}] which loads the database structure from the script.
147147
\item[\texttt{SOURCE /home/yourusername/foldertoMusesServer/db/startup\_db.sql;}] which populates the loaded database.
148148
\item[\texttt{SHOW DATABASES;}] should list the databases, and also MUSES database.
@@ -151,7 +151,15 @@ \subsection{Preparing the database}
151151
\item[\texttt{GRANT ALL ON muses.* TO 'muses'@'localhost';}] which gives permission to the MusesServer project to access the content in the MUSES database.
152152
\end{description}
153153

154-
Finally, go to Eclipse again, right-click on the MusesServer project, and then go to \textit{Run As > Maven clean}, as it was shown in Figure \ref{fig:RunAs}. In the console, you will see a ``BUILD SUCESS'', and then, repeat going to \textit{Run As > Maven install}. Check that there were no errors, specially this type of error: \texttt{\textit{Error calling Driver\#connect}}, which means that the code cannot connect to the database. Now, you can implement functionalities and test them by doing \textit{Run As > Maven install} or \textit{Run As > Maven test}.
154+
Finally, go to Eclipse again, right-click on the MusesServer project, and then go to \textit{Run As > Maven clean}, as it was shown in Figure \ref{fig:RunAs}. In the console, you will see a ``BUILD SUCESS'', and then, repeat going to \textit{Run As > Maven install}. Check that there were no errors, specially this type of error: \texttt{\textit{Error calling Driver\#connect}}, which means that the code cannot connect to the database. Now, you can implement functionalities and test them locally by doing \textit{Run As > Maven install} or \textit{Run As > Maven test}.
155+
156+
\section{Integrating Tomcat server}
157+
\label{sec:eclipsetomcat}
158+
159+
Now that we can have a running client, by following the described steps on Section \ref{sec:buildclient}, and that we just builded the server part (see previous section), it is time for integrating Tomcat on Eclipse. After that, we will be able to test our development in a client-server mode, and locally. And this is an important point, because this step is for development purposes only. To install Apache Tomcat in a system, in order to work as a MUSES server, please refer to Section \ref{sec:tomcat}.
160+
161+
%Tutorial at \cite{eclipsetomcat:site}
162+
155163

156164
\chapter{Creating and integrating new sensors}
157165
\label{ch:sensors}
@@ -160,6 +168,61 @@ \chapter{Creating and integrating new sensors}
160168
\chapter{Installing MUSES}
161169
\label{ch:installmuses}
162170

171+
Table \ref{tab:server_infrastructure} shows the hardware requirements to run MUSES server applications, the following sections will explain how to install and configure these requirements.
172+
173+
\begin{table}
174+
\caption{MUSES server infrastructure.}
175+
\label{tab:server_infrastructure}
176+
177+
\begin{center}
178+
\begin{tabular}{ |l|l|l| }
179+
\hline
180+
\multicolumn{3}{|c|}{\textbf{MUSES server}} \\
181+
\hline
182+
\textbf{Description} & \textbf{Name} & \textbf{Version} \\
183+
\hline
184+
Hardware & Desktop PC & Intel Core 64 bit \\
185+
OS & Ubuntu Desktop & 12.04 LTS \\
186+
Virtual Machine & JVM\footnote{Java Virtual Machine} & 1.6.0\_27 \\
187+
Servlet Container & Apache Tomcat & 7 \\
188+
WEB Server & Apache & 2.2.22 \\
189+
Database & MySQL & 5.5.31 \\
190+
\hline
191+
\end{tabular}
192+
\end{center}
193+
\end{table}
194+
195+
\section{Installing Apache Tomcat (Application Server)}
196+
\label{sec:tomcat}
197+
198+
Apache Tomcat powers numerous large-scale, mission-critical web applications across a diverse range of industries and organizations. But first of all, minimum Java Runtime Environment (JRE) 6 is required for Tomcat 7. For being able to install the last available version of JRE on the machine, open a terminal and follow this command:
199+
200+
\begin{verbatim}
201+
$ sudo apt-get install openjdk-7-jre
202+
\end{verbatim}
203+
204+
If you find problems with the dependencies, the command \texttt{\$ sudo apt-get -f install} fixes the possibly broken dependencies and finishes the installation. Also, you may need to update your system package list, for what you have to do the following:
205+
206+
\begin{description}
207+
\item[\$ sudo apt-get update] to update the lists.
208+
\item[\$ sudo apt-get upgrade] to install the new version of the packages, found by \textit{updating} the lists.
209+
\end{description}
210+
211+
Find a correct Tomcat package to install by typing \texttt{\$ apt-cache search tomcat} and looking at the highlighted parts on Figure \ref{fig:tomcatpackages}. In this case, the needed version is version 7.
212+
213+
\begin{figure}
214+
\begin{center}
215+
\includegraphics[width=0.8\textwidth]{./Figures/tomcatpackages.png}
216+
\label{fig:tomcatpackages}
217+
\caption{What your terminal should show after introducing the \texttt{\$ apt-cache search tomcat} command. The highlighted packages are the ones we have to focus in.}
218+
\end{center}
219+
\end{figure}
220+
221+
Then, to install all Tomcat packages, the following command are needed:
222+
223+
%$ sudo apt-get install tomcat7-admin
224+
%$ sudo apt-get install tomcat7
225+
163226
\bibliographystyle{abbrv}
164227
\bibliography{MUSESDevGuide}
165228

0 commit comments

Comments
 (0)