Thursday, January 30, 2014

Install matlab in an EC2 instance

I assume you have an instance and an attached EBS

1. Upload your copy of matlab to your instance with rsync:

 rsync -avL --progress -e "ssh -i .ssh/.pem"\
 matlab_installation ubuntu@ 

2. Edit the file installer_input.txt and set the follwing options:

## Set mode value to either interactive, silent, 
## or automated and
## uncomment the line.

mode= silent

## Set the desired value for destinationFolder and 
## uncomment the line. 


## Set agreeToLicense value to yes or no and 
## uncomment the line.


## Set the desired value for outputFile and 
## uncomment the line.


3. Set the following option in your ~/.bashrc

emacs -nw ~/.bashrc 
export LC_ALL="en_US.utf8" 

4. Install Java Runtime Environment


sudo apt-get install default-jre


sudo yum install java7

5. Install extra libraries


sudo yum install libXmu.x86_64
sudo yum install libXt.x86_64
sudo yum install libXp.x86_64

NOTE:  you might need the 32 bits version if you are installing into a 32bits architecture

5. Run the installation file
sudo ./install -inputFile installer_input.txt

6. Set your path

..if bash is your favorite shell edit your .bashrc file
emacs -nw ~/.bashrc

insert somewhere: 

export PATH=/usr/local/MATLAB/R2012a/bin:$PATH

alias matlab='/usr/local/MATLAB/R2012a/bin/matlab -nosplash -nodesktop -c /usr/local/MATLAB/R2012a/lic_standalone.dat'

..if fish is your favourite shell edit your .config file
emacs -nw  ~/.config/fish/config.fish

# insert somewhere 

set -g -x PATH /usr/local/MATLAB/R2012a/bin $PATH
 7. Copy the license :

cp /wherever/it/is/my/lic_standalone.dat /usr/local/MATLAB/R2012a/lic_standalone.dat

No comments:

Post a Comment