jeudi 22 juin 2017

Install R 3.4.0 from source on ubuntu 16.04

This tutorial is modified from https://askubuntu.com/questions/798335/how-you-install-r-3-2-2-in-ubuntu-14-04-lts

cd $HOME
wget https://cran.rstudio.com/src/base/R-3/R-3.4.0.tar.gz
tar xvf R-3.4.0.tar.gz
cd R-3.4.0
sudo apt-get install gcc fort77 aptitude
sudo aptitude install g++
sudo aptitude install xorg-dev
sudo aptitude install libreadline-dev
sudo aptitude install gfortran
gfortran --version
sudo apt install libpcre3-dev liblzma-dev libbz2-dev
sudo add-apt-repository ppa:webupd8team/java -y
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo apt-get install oracle-java8-set-default
sudo apt-get install texlive-base
sudo apt-get install texinfo
sudo apt-get install texlive-fonts-extra
sudo apt-get install libcurl4-openssl-dev
java -version
# need to build shared library (--enable-R-shlib)
# the --enable-R-shlib option is needed for the RStudio IDE to work
sudo ./configure --enable-R-shlib      
sudo make
sudo make install
R --version
cd $HOME
rm R-3.4.0.tar.gz
sudo rm -rf R-3.4.0

Now you can install Rstudio:

wget https://download1.rstudio.org/rstudio-1.0.143-i386.deb
sudo gdebi -n rstudio-1.0.143-i386.deb

rm rstudio-1.0.143-i386.deb

mardi 13 juin 2017

No ssh connection: REMOTE HOST IDENTIFICATION HAS CHANGED

When you try to connect using ssh in terminal to a remote host, if you get this message:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:wJp/vYtoiAonG/LRyXK6fYuzcCb7WQZF1N9tlxVVOsg.
Please contact your system administrator.



you must edit this file:
sudo vi ~/.ssh/known_hosts
And remove the line corresponding to the faulty ip address.

mercredi 31 mai 2017

Install Command Line Interface for openstack on MacOSX Sierra 10.12.5

The documents present in the openstack server to install Command Line Interface are not uptodate for MacOSX:
https://docs.openstack.org/user-guide/common/cli-install-openstack-command-line-clients.html

 Here is the solution. It has been tested in Sierra 10.12.5.

First be sure that you have python install. In terminal, enter:
belinda:~ marcgirondot$ python --version
Python 2.7.13

Any version higher than 2.7 should work. If you have not, when installing Xcode, python should be included.

Install Xcode from app store (take care, it is 4 GB !)
https://itunes.apple.com/fr/app/xcode/id497799835?mt=12

Open Xcode from application folder and install line command tools in terminal:
sudo xcode-select --install

Validate the installation in terminal using:
sudo xcodebuild -license

Install pip:
sudo easy_install pip

Upgrade pip:
sudo -H pip install --upgrade pip --ignore-installed six

Install different components of openstack:

# Installation 
sudo -H pip install python-openstackclient --ignore-installed six

sudo -H pip install --upgrade python-novaclient --ignore-installed six
sudo -H pip install --upgrade python-cinderclient --ignore-installed six
sudo -H pip install --upgrade python-neutronclient --ignore-installed six
sudo -H pip install --upgrade python-glanceclient --ignore-installed six
# for nova
sudo -H pip install --upgrade netifaces --ignore-installed six

To run it, you must define environment variables as described here:
https://docs.openstack.org/user-guide/common/cli-set-environment-variables-using-openstack-rc.html

It works for me !

To upgrade openstack client:
sudo -H pip install --upgrade python-openstackclient --ignore-installed six