root/documentation/ossie/user-guide-0.7.0/Installation.tex @ 8306

Revision 8306, 21.7 KB (checked in by mcarrick, 5 years ago)

clarifying install instructions for ubuntu

  • Property svn:eol-style set to native
Line 
1% ------------------------------------------------------------------
2%
3%   TITLE: OSSIE 0.7.0 Installation Guide
4% AUTHORS: Matt Carrick, Drew Cormier, Christopher Covington,
5%          Carl B. Dietrich, Joseph Gaeddert, Benjamin Hilburn,
6%          C. Ian Phelps, Shereef Sayed, Jason Snyder, Haris Volos
7% CREATED:
8% REVISED:
9%     URL: http://ossie.wireless.vt.edu/
10%
11% ------------------------------------------------------------------
12
13\newpage
14\section{Installation}
15\label{section:installation}
16For users that do not have access to a Linux system, or are unfamiliar with Linux, we recommend
17that you use our pre-built VMWare images.  These images have OSSIE pre-installed on them, and are
18ready to use out-of-the-box. Using an OSSIE VMware image is described in
19Section~\ref{section:installation:vmware}.
20
21For most users on Fedora systems, installing OSSIE and its dependencies via yum is the best
22route.  The only reason not to install via yum is if you plan on doing active
23development \emph{on} OSSIE, and need access to the source code.  Note that this
24does not include application/waveform developers who are developing \emph{with}
25OSSIE, as they do not need access to the OSSIE source code.
26
27Although we do not yet provide and support binary installation packages for more Linux
28distributions, compiling OSSIE from source on them should be possible.
29
30To install OSSIE from source, follow the below instructions to install the OSSIE dependencies,
31and then compile and install the source code.  The latter process is simplified with a provided convenience
32script, build.py, which compiles and installs OSSIE from source for you.
33
34\subsection{Installing OSSIE via Yum}
35\label{section:installation:yum}
36
37\subsubsection{Add OSSIE Repository to Yum}
38\label{section:installation:yum:ossierepo}
39In order to install OSSIE via the YUM repository, you must first edit your `/etc/yum.conf' to
40add the OSSIE repository to the YUM search list. In this example, we use \tt{nano}, but you may use
41whatever editor you wish (\tt{vim}, \tt{emacs}, etc). Unless your nanorc has already been configured to not
42wrap lines, the `-w' flag is necessary to prevent \tt{nano} from adding line breaks to the file.
43\begin{lstlisting}[]
44$ su -
45# nano -w /etc/yum.conf
46\end{lstlisting}
47Add the following lines at the bottom of the file:
48\begin{lstlisting}[]
49[ossie-vt]
50name = OSSIE-VT
51baseurl=http://ossie.wireless.vt.edu/yum/ossie-vt/
52gpgcheck=0
53\end{lstlisting}
54Now update your system. This will refresh your yum package cache.  It is also always smart to have
55a fully updated system before installing new software anyways.
56\begin{lstlisting}[]
57# yum update
58\end{lstlisting}
59
60\subsubsection{Install OSSIE}
61\label{section:installation:yum:installviayum}
62Now install OSSIE and its dependencies via yum by typing:
63\begin{lstlisting}[]
64# yum install ossie
65# exit
66\end{lstlisting}
67
68Congratulations!  You should now have a fully-operable OSSIE installation.
69
70\subsection{Installing OSSIE from Source}
71\label{section:installation:source}
72
73\subsubsection{Notes on OSSIE Installation from Source}
74\label{section:installation:source:notesonsource}
75This section assumes that the user is familiar with basic
76Linux commands such as {\tt cd} and {\tt ls}.
77Commands run with root permissions are prefixed with {\tt \#}, while others
78are prefixed with {\tt \$}.
79
80OSSIE depends on the following software packages:
81\begin{itemize}
82\item Xerces - a C++ XML parser
83\item omniORB - a CORBA implementation
84\item omniORBpy - a Python interface for omniORB, necessary for the OSSIE tools and components
85\item wxPython - a Python interface for the wxWidgets graphical library, used by the OSSIE tools
86\item numpy - a Python numerical library used by the OSSIE tools
87\end{itemize}
88
89OSSIE 0.7.0 is packaged with a convenient Python script called {\tt build.py} to automatically
90configure and build the packages necessary for the framework, tools, and other
91libraries. Use of this script is not mandatory, and you can manually compile and install all/part of
92OSSIE as you wish.
93
94\subsubsection{Installing Dependencies on Fedora}
95\label{section:installation:source:dependencies:fedora}
96On Fedora systems, the dependencies can be installed via {\tt yum}.
97
98First, add the OSSIE yum repository to your yum.conf.  This is described in
99Section~\ref{section:installation:yum:ossierepo}
100
101Now, install the dependencies.  This is the entire dependency list, so some of these packages may already be installed.
102\begin{lstlisting}[]
103# yum -y install xerces-c xerces-c-devel omniORB omniORBpy \
104wxPython wxPython-devel numpy rpm-build cabextract glibc-devel \
105python-devel openssl-devel gcc gcc-c++ libtool \
106boost-1.33.1 boost-devel-1.33.1
107\end{lstlisting}
108
109Now move onto Section~\ref{section:installation:source:dependencies:configomni}
110
111\subsubsection{Installing Dependencies on Ubuntu}
112\label{section:installation:dependencies:ubuntu}
113Edit the sources.list file through the GUI or by manually editing the file.
114
115To edit the file through the GUI, on the toolbar select
116System : Administration : Software Sources and enter the administrator password.
117Under the "Ubuntu Software" tab, make sure all of the boxes are selected which
118have the following tags at the end: (main), (universe), (restricted), and (multiverse).
119Then close the window and select ``Reload'' to update the package list.
120
121To update the list manually, open the source.list file:
122\begin{lstlisting}[]
123$ sudo vim /etc/apt/sources.list
124\end{lstlisting}
125Make sure the following lines are uncommented:
126\begin{lstlisting}[]
127deb http://us.archive.ubuntu.com/ubuntu/ hardy universe
128deb-src http://us.archive.ubuntu.com/ubuntu hardy universe
129...
130deb http://us.archive.ubuntu.com/ubuntu/ hardy main restricted
131deb-src http://us.archive.ubuntu.com/ubuntu/ hardy main restricted
132...
133deb http://security.ubuntu.com/ubuntu hardy-security main restricted
134deb-src http://security.ubuntu.com/ubuntu hardy-security main restricted
135\end{lstlisting}
136
137Now, update the local dpkg cache and upgrade:
138\begin{lstlisting}[]
139$ sudo aptitude update
140$ sudo aptitude upgrade
141\end{lstlisting}
142
143This is the entire dependency list, so some of these packages may already be installed.
144Install all of the following packages:
145\begin{lstlisting}[]
146$ sudo aptitude install gcc build-essential
147$ sudo aptitude -y install omniorb4 libomniorb4-dev omniidl4-python \
148omniorb4-nameserver python-omniorb2 libgtk2.0-dev freeglut3-dev \
149libxerces27-dev libxerces27 python-wxgtk2.8 python-wxversion \
150python-wxtools python-numpy python-numpy-ext python-numpy-dev g++ \
151automake libtool subversion python-dev fftw3-dev libcppunit-dev \
152libboost-dev sdcc libusb-dev libasound2-dev libsdl1.2-dev guile-1.8 \
153libqt3-mt-dev swig libboost-filesystem-dev python-profiler
154\end{lstlisting}
155
156\subsubsection{Configure omniORB}
157\label{section:installation:source:dependencies:configomni}
158Configure omniORB by editing {\tt /etc/omniORB.cfg} as root.
159Around line 313 you should see:
160\begin{lstlisting}[]
161 InitRef = NameService=corbaname::my.host.name
162\end{lstlisting}
163Uncomment the line by deleting the pound or hash character `\#' and change
164it to:
165\begin{lstlisting}[]
166 InitRef = NameService=corbaname::127.0.0.1
167\end{lstlisting}
168Before running the framework you will need to start the naming service.
169{\tt omniNames} will automatically start when you restart your machine. Refer
170to Appendix~\ref{appendix:services} for instructions on how to start the
171omniNames service without restarting your machine or set whether the service
172starts automatically at boot.
173\footnote{You may also manually start a source-compiled tarball package of
174omniNames {\tt omniNames} with the script described in
175Appendix~\ref{appendix:omninamessh}}
176
177At this time it is a good idea to restart your machine.
178
179\subsubsection{Installing Portions of GNU Radio}
180\label{section:installation:source:dependencies:gnuradio}
181OSSIE uses a small subset of GNU Radio to communicate with and configure the USRP. The
182following steps will walk through installing portions of GNU Radio.
183
184First, GNU Radio's dependencies must be installed. If you are using Ubuntu and followed
185the instructions for installing the dependencies, skip down to checking out the source
186code from the GNU Radio Subversion repository. If you are installing on Fedora 9,
187proceed with the following directions.
188
189Install the Engineering and Scientific packages as well as the Software Development
190packages as root entering the command:
191
192\begin{lstlisting}[]
193 # yum groupinstall "Engineering and Scientific" "Development Tools"
194\end{lstlisting}
195
196Additional utilities such as the FFT library and the CPP Test Framework must also be
197installed. As root, enter the following command
198
199\begin{lstlisting}[]
200 # yum install fftw-devel cppunit-devel wxPython-devel libusb-devel  \
201   guile boost-devel alsa-lib-devel numpy
202\end{lstlisting}
203
204The Small Device C Compiler, SDCC, must be installed:
205
206\begin{lstlisting}[]
207 # yum install sdcc
208\end{lstlisting}
209
210The path for the SDCC must be set. Open the .bashrc file and add the path to the end
211of the file. To open the file, enter the command:
212
213\begin{lstlisting}[]
214 $ vim ~/.bashrc
215\end{lstlisting}
216
217Add the following path to the end of the file:
218\begin{lstlisting}[]
219 export PATH=/usr/libexec/sdcc:$PATH
220\end{lstlisting}
221
222At this point, all of the GNU Radio dependencies have been installed. Now, the GNU Radio
223software must be installed.
224
225Download the GNU Radio source code by entering the command:
226\begin{lstlisting}[]
227 $ svn co http://gnuradio.org/svn/gnuradio/branches/releases/3.1 gnuradio
228\end{lstlisting}
229
230Move into the {\tt gnuradio} directory and start building the source code by entering the
231following commands:
232
233\begin{lstlisting}[]
234 $ cd gnuradio/
235 $ ./bootstrap
236 $ ./configure --disable-all-components --enable-gnuradio-core \
237   --enable-usrp --enable-gr-usrp --enable-omnithread
238\end{lstlisting}
239
240This sets up the install to only build resources for the USRP which OSSIE requires.
241Compile the source code by entering the command:
242
243\begin{lstlisting}[]
244 $ make
245\end{lstlisting}
246
247Verify that the compile worked by running a check:
248
249\begin{lstlisting}[]
250 $ make check
251\end{lstlisting}
252
253Install the portions of GNU Radio by running the following command as root:
254
255\begin{lstlisting}[]
256 # make install
257\end{lstlisting} 
258
259The libraries installed by GNU Radio need to be linked:
260
261\begin{lstlisting}[]
262 # /sbin/ldconfig
263\end{lstlisting}
264
265At this point, GNU Radio and its dependencies have been installed. Now setup the
266proper permissions for the USRP. As root, create a group which will have access
267to the USRP:
268
269\begin{lstlisting}[]
270 # /usr/sbin/groupadd usrp
271\end{lstlisting}
272
273Add users to the group which need access to the USRP:
274
275\begin{lstlisting}[]
276 # /usr/sbin/usermod -G usrp -a USERNAME
277\end{lstlisting}
278
279Now that users will have access to the USRP, read and write access to the device
280must be created. As root, open the file {\tt /etc/udev/rules.d/10-usrp.rules} in
281a text editor:
282
283\begin{lstlisting}[]
284 # vim /etc/udev/rules.d/10-usrp.rules
285\end{lstlisting}
286
287Add the following text to the file:
288
289\begin{lstlisting}[]
290 ACTION=="add", BUS=="usb", SYSFS{idVendor}=="fffe", \
291 SYSFS{idProduct}=="0002", GROUP:="usrp", MODE:="0660"
292\end{lstlisting}
293
294The text above is displayed on two lines due to the contraints on page size, however
295the text must appear on a single line, without the backslash, in the file for the
296access to the USRP to work properly. You may also add the following comment lines to
297the file for future reference:
298
299\begin{lstlisting}[]
300 # rule to grant read/write access on USRP to group named usrp.
301 # to use, install this file in /etc/udev/rules.d/ as
302 # 10-usrp.rules
303\end{lstlisting}
304
305The USRP interface has now been created. As an optional test, connect the USRP
306to the computer and run the following command:
307
308\begin{lstlisting}[]
309 $ ls -lR /dev/bus/usb
310\end{lstlisting}
311
312The users root and usrp should now be listed under the user groups.
313
314\subsubsection{Install OSSIE}
315\label{section:installation:source:ossiecf}
316You are now ready to build and install OSSIE.  At this point, you can either compile and install
317everything by hand using the included Makefiles, or use the {\tt build.py} convenience script to
318do it for you.  Note that installing by hand requires some knowledge of OSSIE, Linux, and software development.
319
320Download the latest tarball from
321\href{http://ossie.wireless.vt.edu/download/tarballs/0.7.0/}{http://ossie.wireless.vt.edu/download/tarballs/0.7.0/}
322\\ and unpack {\tt ossie-0.7.0.tar.bz2}.
323\begin{lstlisting}[]
324 $ wget http://ossie.wireless.vt.edu/download/tarballs/0.7.0/ \
325   ossie-0.7.0.tar.bz2
326 $ tar -xvjf ossie-0.7.0.tar.bz2
327\end{lstlisting}
328
329If you want to install everything by hand, do so, and then move on to Section~\ref{section:installation:source:ossiecf:ldconfig}.
330
331If you would rather use the script, follow the steps below.
332
333\subsubsection{Using Installation Scripts}
334\label{section:installation:source:ossiecf:buildpy}
335
336The included {\tt build.py} and {\tt setup.py} scripts automate the building and installation of
337the OSSIE packages. Because OSSIE is built as a set of dependent libraries it is
338necessary to build and install each one separately so that
339they can link properly. These scripts take care of that for you.
340
341In order for the script to run uninterrupted, the {\tt sudo} command must be
342able to execute {\tt make install}.
343As root, edit the {\tt sudoers} file\footnote{By default the sudoers file must
344be edited with the {\tt visudo} command}
345\begin{lstlisting}[]
346 # /usr/sbin/visudo
347\end{lstlisting}
348
349At the end of the file, add the following line:
350\begin{lstlisting}[]
351 ALL ALL = NOPASSWD: /usr/bin/make install
352\end{lstlisting}
353
354Save and quit ({\tt :wq}).  If you made an error, visudo will tell you. We
355recommend that you comment this line out by putting a pound character (`\#') in
356front of it once you have finished installing OSSIE.
357%TODO: Have a more secure (wheel group only?) method
358
359By default, the installation directory of the OSSIE platform is {\tt /sdr}.  In
360order to install new source code and binaries into this directory
361without root permissions, you need to create and change the ownership of {\tt
362/sdr}.
363\begin{lstlisting}[]
364 # mkdir /sdr
365 # chown -R username.username /sdr
366\end{lstlisting}
367where {\tt username} is your user name.
368
369The {\tt setup.py} script installs the tools used for component and waveform development. To install the tools, move into the {\tt tools} directory and run the {\tt setup.py} script as root:
370
371\begin{lstlisting}[]
372 $ cd tools
373 # python setup.py install
374\end{lstlisting}
375
376The {\tt build.py} script installs the core framework, components, devices and a few demonstration waveforms. This script should not be run as root.
377To install, first exit out of root, then move into the directory where the OSSIE 0.7.0 tarball has been unpacked and run the script:
378
379\begin{lstlisting}[]
380 # exit
381 $ cd /home/username/path_to_ossie/
382 $ python build.py
383\end{lstlisting}
384
385Depending on the speed of your system this might take several minutes. You may
386be asked for a password during the first {\tt make install} command. Because we
387are using {\tt sudo}, this prompt is asking for your user password, not the
388root password. If successful, the prompt should say:
389\begin{lstlisting}[]
390*********************************************************
391
392  Complete installation of OSSIE 0.7.0 finished!
393
394*********************************************************
395\end{lstlisting}
396
397\subsubsection{Updating System Libraries}
398\label{section:installation:source:ossiecf:ldconfig}
399Once the OSSIE libraries are installed, they need to be linked.
400As root edit the file {\tt /etc/ld.so.conf}, adding the line
401\begin{lstlisting}[]
402 /usr/local/lib
403\end{lstlisting}
404Now run:
405\begin{lstlisting}[]
406 # /sbin/ldconfig
407\end{lstlisting}
408
409OSSIE should now be successfully installed on your system. You can skip to
410Section~\ref{section:runningwaveforms} to learn how to run waveforms.
411
412\subsection{Installation of OSSIE Eclipse Feature}
413\label{section:installation:oefinstall}
414Installation of the OSSIE Eclipse Feature (OEF) requires the installation of OSSIE, Java, and Eclipse.
415
416\subsubsection{Installing Java}
417\label{section:installation:javainstall}
418Eclipse is written in Java, so you must have it installed to run Eclipse and OEF.
419We recommend using Sun's Java Development Kit. As of this writing, the GNU Compiler for Java (GCJ) will not work.
420
421Fedora Core 9 comes with the Sun JDK pre-installed but older versions require manual installation. On other distributions it is advisable to use the
422package manager to manage the installation, if possible.
423
424\subsubsection{Installing Java on Older Versions of Fedora}
425\label{section:installation:javafedora}
426Go to \href{http://java.sun.com/javase/downloads/index.jsp}{http://java.sun.com/javase/downloads/index.jsp}
427and click Download next to JDK 6 Update 6. Choose Linux in the platform drop down menu, click the check-box
428agreeing to the license agreement, and click continue. Download the Linux rpm in self extracting file,
429{\tt jdk-6u6-linux-i586-rpm.bin}.
430
431Open a terminal and navigate to the file. As root, execute the following command:
432\begin{lstlisting}[]
433 # sh jdk-u6-linux-i586-rpm.bin
434\end{lstlisting}
435
436Create {\tt java.sh} in {\tt /etc/profile.d/} with the following contents:
437\begin{lstlisting}[]
438 export JAVA_HOME="/usr/java/latest"
439 export JAVA_PATH="$JAVA_HOME"
440 export PATH="$PATH:$JAVA_HOME/bin"
441\end{lstlisting}
442
443Log out and back in to allow the changes to update.
444
445\subsubsection{Installing Java on Ubuntu}
446\label{section:installation:javaubuntu}
447In a terminal, enter the following lines:
448\begin{lstlisting}[]
449 $ sudo apt-get update
450 $ sudo apt-get install sun-java5-jdk
451\end{lstlisting}
452
453\subsubsection{Installing Eclipse}
454\label{section:installation:eclipseinstall}
455Install the Eclipse IDE for Java Developers. Go to the \href{http://www.eclipse.org/downloads/}{Eclipse Download Center} and download an Eclipse distribution for your platform.
456
457Eclipse is distributed as a tarball archive that you can unpack to location of your choice. Pick a location that is appropriate for your platform and
458simply unpack the contents. There is no self-installer, just unpack the distribution. Do not install Eclipse in a directory that has spaces anywhere
459in its full path name.
460
461\subsubsection{Installing OEF}
462\label{section:installation:oefinstall}
463Now that the dependencies have been installed, OEF can be installed.
464
465Move into the unpacked eclipse directory, and start eclipse:
466\begin{lstlisting}[]
467$ cd /path/to/eclipse
468$ ./eclipse
469\end{lstlisting}
470
471After Eclipse starts, on the toolbar select {\tt Help}, {\tt Software Updates}.
472In the new window, select the ``Available Software" tab and click the ``Add Site"
473button the right hand side. Enter the URL: {\tt http://ossie.wireless.vt.edu/eclipse/}
474and select OK. The window will then add the URL, OSSIE, OSSIE Waveform Developer
475Feature to the list of software to update. Place a check in the box next to OSSIE
476Waveform Developer Feature and click Install. Eclipse will bring up a window which will
477resolve any dependencies and then start the install guide.
478
479When the install window opens, make sure OSSIE Waveform Developer Feature is selected
480and click Next. Accept the GNU license agreement and select Next. Eclipse will then
481begin to download the necessary files, which may take a few minutes. Allow Eclipse to
482restart when it prompts to do so. After it restarts, the OSSIE Eclipse Feature will be
483installed.
484
485Select the OSSIE perspective within Eclipse. On the toolbar, select {\tt Window},
486{\tt Open Perspective}, {\tt Other}. In the new window, select OSSIE which will then
487open the OSSIE perspective. On the toolbar, select {\tt File}, {\tt New}, {\tt OSSIE Waveform},
488or {\tt OSSIE Component} to start developing.
489
490These same instructions used for installing OEF can be used later to update it to newer versions.
491
492\subsection{Using a VMware Image on Any Platform}
493\label{section:installation:vmware}
494A VMware image of a complete Fedora Core 9-based Linux system with all necessary
495dependencies and a complete install of OSSIE 0.7.0 is available at \\
496\href{http://ossie.wireless.vt.edu/trac/wiki/Downloads}{http://ossie.wireless.vt.edu/trac/wiki/Downloads}.
497All that is needed to run the virtual image is the VM­Ware Player, available
498for no fee from \\
499\href{http://www.vmware.com/download/player/}{http://www.vmware.com/download/player/}.
500Versions of the player are available for both Windows and Linux.
501
502Install VMware Player on your system, unzip the virtual image and open it.
503For full instructions on installing and using VMware player, please
504consult the VMWare Player User Guide~\cite{vmware:web}.
505
506It is recommended that you keep a copy of the zipped virtual image so that you do
507not need to download the image a second time to start with a fresh copy. Changes
508that you make from within the image will alter it, and in the event of drastic
509unwanted changes, starting afresh is easy if you have an extra copy of the image
510on your hard drive.
511
512% \subsection{Via Ebuild on Gentoo Linux}
513% Support for installation via Gentoo's Portage package management system has not
514% yet been thoroughly tested but ebuilds do exist.
515%
516% To access the ebuilds, install and configure layman if you haven't already:
517% \begin{figure}
518% \begin{lstlisting}[]
519% # emerge layman
520% # echo "source /usr/portage/local/layman/make.conf" >> /etc/make.conf
521% \end{lstlisting}
522% \end{figure}
523%
524% Then, add ossie-overlay to your locally-stored overlays:
525% \begin{figure}
526% \begin{lstlisting}[]
527% # layman -a -o https://ossie.wireless.vt.edu/repos/ossie/experimental/scripts/gentoo/ossie-overlay.xml
528% \end{lstlisting}
529% \end{figure}
530%
531% You can then proceed with installing OSSIE:
532% \begin{figure}
533% \begin{lstlisting}[]
534% # emerge -av ossie
535% \end{lstlisting}
536% \end{figure}
537%
538% After sucessful compiliation of the OSSIE framework and its dependencies, skip
539% to section X.
540
541%\subsection{Embedded Platforms}
542%While installation on embedded platforms is not officially supported in the
543%0.6.2 release, work has been done (MENTION WORK) on porting OSSIE to embedded
544%platforms and we are interested in promoting more work in this area.
545
546
Note: See TracBrowser for help on using the browser.