Install Ubuntu: Difference between revisions

From Micro and Nano Mechanics Group
Jump to navigation Jump to search
m (moved How to install Ubuntu to Install Ubuntu: shorter title)
 
(13 intermediate revisions by one other user not shown)
Line 8: Line 8:


a. Ubuntu (GNOME/Linux based operating system, standard version)
a. Ubuntu (GNOME/Linux based operating system, standard version)

b. Xubuntu (GNU/Linux based operating system, lighter system)
b. Xubuntu (GNU/Linux based operating system, lighter system)

c. Edubuntu (Specifically designed for school environments)
c. Edubuntu (Specifically designed for school environments)

d. Kubuntu (KDE and K desktop environment, Mac-like version)
d. Kubuntu (KDE and K desktop environment, Mac-like version)


Line 30: Line 33:
These packages should help run MD++ properly.
These packages should help run MD++ properly.


== Making DEB packages from installed software ==
== Making DEB packages from closed-source installed software ==

This tutorial is a simplification of [http://www.debian-administration.org/articles/529 this other one].


DEB packages is the format used by Ubuntu (and Debian) repositories of software. Once a package is converted into DEB format Ubuntu can easily manage installation and uninstallation of the program.
DEB packages is the format used by Ubuntu (and Debian) repositories of software. Once a package is converted into DEB format Ubuntu can easily manage installation and uninstallation of the program.


All free (free as in freedom) software that comes with Ubuntu does it in DEB format, however the repositories mantainer can't make and distribute DEB packages out of proprietary (privative) software. Fortunately nothing impedes us from building DEB packages as a backups of already installed software. Once the DEB package is made reinstalation is easy handled by Ubuntu.
All free (free as in freedom) software that comes with Ubuntu does it in DEB format, however the repositories maintainers can't make and distribute DEB packages out of proprietary (privative) software. Fortunately nothing impedes us from building DEB packages as a backups of already installed software. Once the DEB package is made reinstallation is easy handled by Ubuntu.


So suppose we have the Mat-rix Lab-oratory program installed.
So, suppose we have the Matlab program installed.


Briefly, lets review the instalation:
Briefly, lets review the instalation:
Line 43: Line 48:
user@pc:/media/cdrom$ sudo ./install
user@pc:/media/cdrom$ sudo ./install


Choose manual installation: click "Install manually without using the internet.". Accept licence: click "Yes". Set root directory: type "/opt/matlab/$version". Confirm: "Create". Accept: "OK". Enter file installation key. Select items to install. Create symbolic links in "/usr/local/bin". Begin installation.
Choose manual installation: click "Install manually without using the internet.". Accept licence: click "Yes". Set root directory: type "/opt/matlab/$version". Confirm: "Create". Accept: "OK". Enter file installation key. Select items to install. Create symbolic links in "/usr/local/bin". Begin installation. The installation takes ~10 minutes. Activate the product: "Activate Manually without the internet", then select license file. Run the program, try "1+1". Exit the program. Go to the command line, type "matlab" and try it again.

The installation takes ~10 minutes.

Activate the product: "Activate Manually without the internet", then select licence file. Run the program, try "1+1". Exit the program. Go to the command line, type "matlab" and try it again.


Now to make the DEB package. Create a directory structure as follows.
Now to make the DEB package. Create a directory structure as follows.
Line 75: Line 76:
echo 'This is repackaged for internal use' > matlab-$version/debian/README
echo 'This is repackaged for internal use' > matlab-$version/debian/README


create file named <code>matlab-$version/debian/control</code> with the following information
create file named <code>matlab-$version/debian/control</code> with the following information (copy and paste as a template, the file has to have exactly this structure, avoid typos).


Source: matlab76
Package: matlab76
Version: 7.6
Section: unknown
Section: Science
Priority: extra
Priority: extra
Architecture: i386
Mantainer: user <user@pc.edu>
Build-Depends: debhelper (>=5)
Standards-Version: 3.7.2
Package: matlab76
Architecture: any
Depends: libxext6, libxp6, libxt6
Depends: libxext6, libxp6, libxt6
Installed-Size: 300000
Maintainer: User <user@pc.edu>
Description: MATLAB - The Language of Technical Computing
Description: MATLAB - The Language of Technical Computing
MATLAB is a high-level language and interactive environment that enables
MATLAB is a high-level language and interactive environment that enables
you to perform computationally intensive tasks faster than with traditional
you to perform computationally intensive tasks faster than with traditional
programming languages such as C, C++, and Fortran.
programming languages such as C, C++, and Fortran.
.
Packaged for private use.
.
MATLAB, Simulink, Communications Blockset, Communications Toolbox, Control
System Toolbox, Distributed Computing Toolbox, Fuzzy Logic Toolbox, Genetic
Algorithm and Direct Search Toolbox, Image Processing Toolbox, MATLAB
Compiler, Neural Network Toolbox, Optimization Toolbox, Partial Differential
Equation Toolbox, Real-Time Workshop, Robust Control Toolbox, Signal
Processing Blockset, Signal Processing Toolbox, SimPowerSystems, Simulink
Control Design, Stateflow, Statistics Toolbox, Symbolic Math Toolbox, System
Identification Toolbox, Wavelet Toolbox.


On the description field: leave a space in every line. Set post-installation by editing
On the description field: leave a space in every line. Set post-installation by editing
<code>matlab-$version/debian/postinst</code> with the instructions. For example,
<code>matlab-$version/debian/postinst</code> with the instructions. For example,
"alternative" names can be installed for multiple version of the same problem
"alternative" names can be installed for multiple version of the same problem
(see [http://www.debina-administration.org/articles/529 here] for more information on
(see [http://www.debian-administration.org/articles/529 here] for more information on
setting up "alternatives").
setting up "alternatives").

Create a file named <code>matlab-$version/debian/changelog</code> with the text

matlab76 (7.6.0-1) stable; urgency=low
* [INTL:en] Initial release
-- user <user@pc.edu> Sat, 08 Sep 2009 23:22:23 +0100


Copy the whole installation directory into our package
Copy the whole installation directory into our package
Line 102: Line 120:
cp -r /opt/matlab matlab-$version/src/i386/opt
cp -r /opt/matlab matlab-$version/src/i386/opt


and create symlinks manually
(takes ~8 minutes) and create symlinks manually


cd src/i386/usr/local/bin
cd ~/matlab-$version/src/i386/usr/local/bin
ln -s ../../../opt/matlab/$version/bin/matlab
ln -s ../../../opt/matlab/$version/bin/matlab
ln -s ../../../opt/matlab/$version/bin/mbuild
ln -s ../../../opt/matlab/$version/bin/mbuild
Line 115: Line 133:
dpkg-buildpackage
dpkg-buildpackage


This creates a huge file, but then you just need to execute
(takes ~15 minutes). This creates a huge file, but then you just need to execute


dpkg -i file.deb
dpkg -i file.deb


to install the program.
to install the program.

We can do the same with an installation of Mathematica.

$cd /media/cdrom/Unix/Installer
$sudo sh ./MathInstaller

Install in the default directory <code>/usr/local/Wolfram/Mathematica/7.0</code> and install scripts in <code>/usr/local/bin</code>. To solve a bug of Mathematica in Ubuntu replace the file provided here http://download.wolfram.com/?key=61JJHE and remove all the libQt*.so in the Mathematica installation.

Latest revision as of 19:39, 28 December 2010

How to install Ubuntu in a PC

What is Ubuntu?

Ubuntu is a free operating system that has been developed by a community of computer scientists around the world. They have created this operating system to provide a free operating system for education and communication purposes around the world. To read more about Ubuntu mission and goals please visit: Ubuntu

There are four versions of Ubuntu that can be downloaded:

a. Ubuntu (GNOME/Linux based operating system, standard version)

b. Xubuntu (GNU/Linux based operating system, lighter system)

c. Edubuntu (Specifically designed for school environments)

d. Kubuntu (KDE and K desktop environment, Mac-like version)

Once one has decided which version of Ubuntu to use, download it to the desktop. It is recommended to copy the downloaded package into a CD. Install the Ubuntu in the computer. The nice thing about this program is that when the computer is rebooted you can choose the operating system that one wants to use. Be sure to allocate enough space when partitioning your hard drive (7 GB or more).

Once Ubuntu has been installed in your computer, go to:

System -> Administration -> Sypnaptic Package Manager Enter root password Search for libxxf 86 (these X11 Direct Graphics Library Packages) Check them for installation click on apply download them and install them Search for Octave Check all octave packages for intallation click on apply download them and install them Close Synaptic Package Manager

These packages should help run MD++ properly.

Making DEB packages from closed-source installed software

This tutorial is a simplification of this other one.

DEB packages is the format used by Ubuntu (and Debian) repositories of software. Once a package is converted into DEB format Ubuntu can easily manage installation and uninstallation of the program.

All free (free as in freedom) software that comes with Ubuntu does it in DEB format, however the repositories maintainers can't make and distribute DEB packages out of proprietary (privative) software. Fortunately nothing impedes us from building DEB packages as a backups of already installed software. Once the DEB package is made reinstallation is easy handled by Ubuntu.

So, suppose we have the Matlab program installed.

Briefly, lets review the instalation:

user@pc:/media/cdrom$ export version=7.6
user@pc:/media/cdrom$ sudo ./install 

Choose manual installation: click "Install manually without using the internet.". Accept licence: click "Yes". Set root directory: type "/opt/matlab/$version". Confirm: "Create". Accept: "OK". Enter file installation key. Select items to install. Create symbolic links in "/usr/local/bin". Begin installation. The installation takes ~10 minutes. Activate the product: "Activate Manually without the internet", then select license file. Run the program, try "1+1". Exit the program. Go to the command line, type "matlab" and try it again.

Now to make the DEB package. Create a directory structure as follows.

cd ~
export version=7.6
mkdir -p matlab-$version/debian
mkdir -p matlab-$version/src/i386/opt
mkdir -p matlab-$version/src/i386/usr/local/bin

Create the following files

touch matlab-$version/debian/changelog
touch matlab-$version/debian/compat
touch matlab-$version/debian/docs

and copy the lincense from the original installation

cp /opt/matlab/$version/license.txt matlab-$version/debian/copyright

and store the installation dir in

echo '/opt/matlab/'$version > matlab-$version/debian/dirs

Type some information in

echo 'This is repackaged for internal use' > matlab-$version/debian/README

create file named matlab-$version/debian/control with the following information (copy and paste as a template, the file has to have exactly this structure, avoid typos).

Package: matlab76
Version: 7.6
Section: Science
Priority: extra
Architecture: i386
Depends: libxext6, libxp6, libxt6
Installed-Size: 300000
Maintainer: User <user@pc.edu>
Description: MATLAB - The Language of Technical Computing
 MATLAB is a high-level language and interactive environment that enables
 you to perform computationally intensive tasks faster than with traditional
 programming languages such as C, C++, and Fortran.
 .
 Packaged for private use.
 .
 MATLAB, Simulink, Communications Blockset, Communications Toolbox, Control
 System Toolbox, Distributed Computing Toolbox, Fuzzy Logic Toolbox, Genetic
 Algorithm and Direct Search Toolbox, Image Processing Toolbox, MATLAB
 Compiler, Neural Network Toolbox, Optimization Toolbox, Partial Differential
 Equation Toolbox, Real-Time Workshop, Robust Control Toolbox, Signal
 Processing Blockset, Signal Processing Toolbox, SimPowerSystems, Simulink
 Control Design, Stateflow, Statistics Toolbox, Symbolic Math Toolbox, System
 Identification Toolbox, Wavelet Toolbox.

On the description field: leave a space in every line. Set post-installation by editing matlab-$version/debian/postinst with the instructions. For example, "alternative" names can be installed for multiple version of the same problem (see here for more information on setting up "alternatives").

Create a file named matlab-$version/debian/changelog with the text

matlab76 (7.6.0-1) stable; urgency=low

  * [INTL:en] Initial release

 -- user <user@pc.edu>  Sat, 08 Sep 2009 23:22:23 +0100

Copy the whole installation directory into our package

cp -r /opt/matlab matlab-$version/src/i386/opt

(takes ~8 minutes) and create symlinks manually

cd ~/matlab-$version/src/i386/usr/local/bin
ln -s ../../../opt/matlab/$version/bin/matlab
ln -s ../../../opt/matlab/$version/bin/mbuild
ln -s ../../../opt/matlab/$version/bin/mcc
ln -s ../../../opt/matlab/$version/bin/mex

Now build the package from the top directory.

cd ~/matlab-$version
dpkg-buildpackage

(takes ~15 minutes). This creates a huge file, but then you just need to execute

 dpkg -i file.deb 

to install the program.

We can do the same with an installation of Mathematica.

$cd /media/cdrom/Unix/Installer
$sudo sh ./MathInstaller

Install in the default directory /usr/local/Wolfram/Mathematica/7.0 and install scripts in /usr/local/bin. To solve a bug of Mathematica in Ubuntu replace the file provided here http://download.wolfram.com/?key=61JJHE and remove all the libQt*.so in the Mathematica installation.