sábado, 24 de noviembre de 2012

Subversion SVN on Ubuntu




# Install subversion
sudo apt-get install subversion libapache2-svn

# If usu java and subversion instal JavaHL Library
# Subclipse 1.8.x requires JavaHL version 1.7.x.
# I need Subclipse 1.8.x in order to use svn 1.7.x. ...see more...
sudo add-apt-repository ppa:dominik-stadler/subversion-1.7
sudo apt-get update
sudo apt-get install libsvn-java

#Install visual graphic client (cliente visual para SVN (RapidSVN) en Ubuntu)
sudo apt-get install rapidsvn


Reference:
- Subversion installing
-Instalar un cliente visual para SVN (RapidSVN) en Ubuntu.
-SVN Cheatsheet.

Java: Configure Eclipse

Configure Eclipse



# Install Aptana Studio for Web Developers into Eclipse

Open Eclipse and go to Help -> Install New Software and paste the URL (http://download.aptana.com/studio3/plugin/install)
Now, few more Next Next ..


# Install Helios

1- Help->Software Updates->Find and Install.
2- Install/Update con 2 opciones. Seleccionamos la opción Search for new features to install.
Select Helios: http://download.eclipse.org/releases/helios
and installit...

# Install Subclipse (Subversion client) in Eclipse (if is necesary)

1- Help->Software Updates->Find and Install.
2- Install/Update con 2 opciones. Seleccionamos la opción Search for new features to install.
3- Introduciremos un nuevo sitio, pulsa sobre el boton New Remote Site.
4- Nombre y URL del nuevo lugar de búsqueda introducimos alguna de las siguientes opciones:

Subclipse Links for 1.8.x Release:
Changelog: http://subclipse.tigris.org/subclipse_1.8.x/changes.html
Eclipse update site URL: http://subclipse.tigris.org/update_1.8.x
Zipped downloads: http://subclipse.tigris.org/servlets/ProjectDocumentList?folderID=2240
Subclipse Links for 1.6.x Release:
Changelog: http://subclipse.tigris.org/subclipse_1.6.x/changes.html
Eclipse update site URL: http://subclipse.tigris.org/update_1.6.x
Zipped downloads: http://subclipse.tigris.org/servlets/ProjectDocumentList?folderID=2240
Subclipse Links for 1.4.x Release:
Changelog: http://subclipse.tigris.org/subclipse_1.4.x/changes.html
Eclipse update site URL: http://subclipse.tigris.org/update_1.4.x
Zipped downloads: http://subclipse.tigris.org/servlets/ProjectDocumentList?folderID=2240
...see more...http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA

5- Finalmente pulsamos sobre Ok nos aparecerá el repositorio Subversive lo marcamo.
6- Aceptamos la licencia y Finish


References:
- Instrucciones para instalar subversion
- Subclipse: plugin de Subversion para Eclipse.
- Configurar plugin subversion en eclipse (subclipse).

Java: Install Eclipse on Ubuntu 12.04

Forma estándar de instalar Eclipse en Ubuntu

Precondición: Debemos tener instalado java.

# Remover Eclipse si esta Instalado previamente
#----------------------------------------------------------------------------------------------------

# Install Eclipse Platform    (standard form)
#----------------------------------------------------------------------------------------------------

sudo apt-get install eclipse-platform

# Extras:
# Install JDT for Java Development If you want
sudo apt-get install eclipse-jdt

# Install CDT for C/C++ Development If you want
sudo apt-get install eclipse-cdt

#Launch Eclipse Platform
eclipse

# If an error similar to the following:
# An error has occurred. See the log file /home/username/.eclipse/org.eclipse.platform_3.7.0_155965261/configuration/1353802599085.log.
# Then do following:
ln -s /usr/lib/jni/libswt-* ~/.swt/lib/linux/x86/
#And on Ubuntu 12.04 64 bit try:
ln -s /usr/lib/jni/libswt-* ~/.swt/lib/linux/x86_64/

# The Result folder Structure on Linux system is following:
#      /usr/bin/eclipse #sh
#      /usr/share/eclipse
#      /usr/lib/eclipse
#      /home/username/.eclipse/
#      /home/username/.config/eclipse/
#      /etc/eclipse.ini


Instalando desde un zip en Ubuntu


Primero nos aseguramos de si nuestro sistema es 32bits o 64bits para saber que copia bajar de Eclipse:

uname -a

Luego bajamos una copia en un zip:

Eclipse Luna: https://www.eclipse.org/downloads/


Descomprimimos en nuestro "home" y editamos el archivo "eclipse.desktop" que va a funcionar como acceso directo que lanza la aplicación (ver: http://difusal.blogspot.com.ar/2014/07/how-to-install-eclipse-luna-44-on-ubuntu.html).




References:
- How to Install Eclipse IDE on Ubuntu 12.04
- Instalando Eclipse Indigo en Ubuntu (u otro Linux)
- Eclipse 4.2 (JUNO) in Ubuntu 12.04.

- Youtube: Install Java and Eclipse IDE into Ubuntu Desktop 12.04.
- Youtube: Como instalar Eclipse Indigo en Ubuntu 10.04.

- How to install Eclipse in folder independent? 

Eclipse Luna:
https://www.eclipse.org/downloads/
http://ubuntuhandbook.org/index.php/2014/06/install-latest-eclipse-ubuntu-14-04/
http://difusal.blogspot.com.ar/2014/07/how-to-install-eclipse-luna-44-on-ubuntu.html

Java: Remove Eclipse from Ubuntu

# Remover Eclipse from Ubuntu 12.04
#----------------------------------------------------------------------------------------------------

sudo apt-get remove --purge eclipse
sudo apt-get autoremove eclipse
sudo rm -r /usr/lib/eclipse

#Remove files from yout home (example username user)
cd /home/username
sudo rm -r ~/.eclipse/
sudo rm -r ~/.config/eclipse/

Nota: In graphical environment go tu Ubuntu Software Center and remove it.

Java: Install Java JDK 6.0 on Ubuntu 12.04


Instalar Sun (Oracle) Java 6 JDK en Ubuntu 12.04


# Instalar sun-java6-jdk sobre ubuntu 12.04 usando Terminal
#----------------------------------------------------------------------------------------------------

sudo add-apt-repository ppa:flexiondotorg/java
sudo apt-get update
sudo apt-get install sun-java6-jdk sun-java6-plugin


sudo update-alternatives --config java

There are 3 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                     Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-7-oracle/jre/bin/java   1062      auto mode
* 1            /usr/lib/jvm/java-6-sun/jre/bin/java      63        manual mode
  2            /usr/lib/jvm/java-7-oracle/bin/java       1         manual mode
  3            /usr/lib/jvm/java-7-oracle/jre/bin/java   1062      manual mode

Press enter to keep the current choice[*], or type selection number: 1

sudo update-alternatives --config javac

There are 2 choices for the alternative javac (providing /usr/bin/javac).

  Selection    Path                                  Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-7-oracle/bin/javac   1062      auto mode
  1            /usr/lib/jvm/java-6-sun/bin/javac      63        manual mode
  2            /usr/lib/jvm/java-7-oracle/bin/javac   1062      manual mode

Press enter to keep the current choice[*], or type selection number: 1

java -version

java version "1.6.0_30"
Java(TM) SE Runtime Environment (build 1.6.0_30-b12)
Java HotSpot(TM) Server VM (build 20.5-b03, mixed mode)


References:
- Instalar Sun (Oracle) Java 6 JDK en Ubuntu 12.04 .
- Install Java JDK 6.0 update 31 on Ubuntu 12.04 LTS.

Install OpenERP 6.0.3 on ubuntu

# Instalar OpenERP 6.0.3 sobre Ubuntu (Install OpenERP 6.0.3 on ubuntu 12)
#----------------------------------------------------------------------
 
OpenERP is open source ERP software done with Python language.
 
 

I) Dependencias

 
# Instalando postgres
#----------------------------------------------------------------------

sudo apt-get install postgresql postgresql-client postgresql-contrib libpq-dev
psql --version

sudo su postgres -c psql
ALTER USER postgres WITH PASSWORD 'postgresdemo';

sudo passwd -d postgres
sudo su postgres -c passwd

sudo su - postgres
createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt openerp
exit


# Instalando python
#----------------------------------------------------------------------

sudo apt-get install python python-psycopg2 python-reportlab \
python-egenix-mxdatetime python-tz python-pychart python-mako \
python-pydot python-lxml python-vobject python-yaml python-dateutil \
python-pychart python-webdav

sudo apt-get install python-cherrypy3 python-formencode python-pybabel \
python-simplejson python-pyparsing

sudo apt-get install python-gtk2 python-glade2 \
    python-matplotlib python-egenix-mxdatetime python-hippocanvas

#sudo apt-get install python-xml 
 

II) Primera forma de instalación:

#----------------------------------------------------------------------
# Instalando openERP 6.0.3 desde sources
# http://www.openerp.com/downloads
#----------------------------------------------------------------------

sudo adduser --system --home=/opt/openerp --group openerp
cd /opt/openerp
sudo mkdir /opt/openerp/download
sudo chmod 755 /opt/openerp/download
sudo chown openerp: /opt/openerp/download
sudo mkdir server
sudo chmod 755 /opt/openerp/server
sudo chown openerp: /opt/openerp/server
sudo mkdir web
sudo chmod 755 /opt/openerp/web
sudo chown openerp: /opt/openerp/web
sudo mkdir client
sudo chmod 755 /opt/openerp/client
sudo chown openerp: /opt/openerp/client
cd /opt/openerp/download
sudo wget http://www.openerp.com/download/stable/source/openerp-server-6.0.3.tar.gz
sudo tar xvf openerp-server-6.0.3.tar.gz
sudo mv openerp-server-6.0.3/* /opt/openerp/server
sudo rm -R openerp-server-6.0.3
sudo wget http://www.openerp.com/download/stable/source/openerp-web-6.0.3.tar.gz
sudo tar xvf openerp-web-6.0.3.tar.gz
sudo mv openerp-web-6.0.3/* /opt/openerp/web
sudo rm -R openerp-web-6.0.3
sudo wget http://www.openerp.com/download/stable/source/openerp-client-6.0.3.tar.gz
sudo tar xvf openerp-client-6.0.3.tar.gz
sudo mv openerp-client-6.0.3/* /opt/openerp/client
sudo rm -R openerp-client-6.0.3
cd /opt/openerp/
sudo chown -R openerp: *
sudo mkdir /var/log/openerp
sudo chown openerp:root /var/log/openerp

# Configurar OpenERP
#----------------------------------------------------------------------

sudo cp /opt/openerp/server/doc/openerp-server.conf /etc/openerp-server.conf
sudo chown openerp:root /etc/openerp-server.conf
sudo chmod 640 /etc/openerp-server.conf
sudo cp /opt/openerp/server/openerp-server /etc/init.d/openerp-server
sudo chmod 755 /etc/init.d/openerp-server
sudo chown root: /etc/init.d/openerp-server
sudo cp /opt/openerp/web/doc/openerp-web.cfg /etc/openerp-web.conf
sudo chown openerp:root /etc/openerp-web.conf
sudo chmod 640 /etc/openerp-web.conf
sudo cp /opt/openerp/web/scripts/openerp-web /etc/init.d/openerp-web
sudo chmod 755 /etc/init.d/openerp-web
sudo chown root: /etc/init.d/openerp-web

# Terminando de Instalar el cliente 
#----------------------------------------------------------------------

cd /opt/openerp/download
sudo wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz
sudo tar zxvf setuptools-0.6c11.tar.gz
sudo cd setuptools-0.6c11
sudo python setup.py build
sudo python setup.py install 

cd /opt/openerp/client/bin
openerp-client

# Lanzar aplicaciones
#----------------------------------------------------------------------

sudo /etc/init.d/postgresql restart
sudo /etc/init.d/openerp-server start
less /var/log/openerp/openerp-server.log
sudo /etc/init.d/openerp-web start

#sudo python /opt/openerp/server/bin/openerp-server.py -r openerp -w postgresdemo --db_host 127.0.0.1
#/opt/openerp/server/bin/openerp-server.py --config=/etc/openerp-server.conf

# Ver si esta corriendo OpenERP
#----------------------------------------------------------------------
ps aux | grep openerp


# Otra forrma de instalar el cliente
#----------------------------------------------------------------------

cd /opt/openerp/client/
sudo python setup.py install
openerp-client

/opt/openerp/client/bin/python openerp-client.py
/opt/openerp/client/bin/python openerp-client.py -h


# Instalando Modulos
#----------------------------------------------------------------------

sudo apt-get install bzr

cd /opt/openerp/download
sudo bzr branch lp:~openerp-commiter/openobject-addons/extra-6.0
sudo cp -R /opt/openerp/download/extra-6.0/* /opt/openerp/server/bin/addons/
cd /opt/openerp/server/bin/addons/
sudo chown -R openerp: *

# Instalar Modulos de Argentina
#----------------------------------------------------------------------

cd /opt/openerp/download
sudo bzr branch lp:openerp-argentina
sudo cp -R /opt/openerp/download/openerp-argentina/* /opt/openerp/server/bin/addons/
cd /opt/openerp/server/bin/addons/
sudo chown -R openerp: *
 

III) Segunda forma de instalación:

 
#----------------------------------------------------------------------
# Instalando openERP 6.0.3 desde .DEB 
# http://www.openerp.com/downloads
#----------------------------------------------------------------------

#download penerp-server-6.0-latest.deb 

wget http://nightly.openerp.com/6.0/releases/openerp-server-6.0-latest.deb
wget http://nightly.openerp.com/6.0/releases/openerp-client-6.0-latest.deb
#wget http://nightly.openerp.com/6.0/releases/openerp-web-6.0-latest.tar.gz

# see dependences: python-dateutil python-libxslt1 python-lxml python-psycopg2 python-pydot python-pychart python-reportlab python-tz python-pyparsing python-yaml postgresql-client
# You need dokg. To installit use: sudo apt-get install dpkg 
 
# Install server with dpkg:
dpkg -i openerp-server-6.0-latest.deb
Selecting previously unselected package openerp-server.
(Leyendo la base de datos ... 56530 ficheros o directorios instalados actualmente.)
Desempaquetando openerp-server (de openerp-server-6.0-latest.deb) ...
Configurando openerp-server (6.0.4-0) ...

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Open ERP uses a PostgreSQL database to store its data. With the first *
* generation of packages, you have to setup this database manually. *
* Please read /usr/share/doc/openerp-server/README.Debian how to do it. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Starting openerp-server: openerp-server.
Procesando disparadores para ureadahead ...
Procesando disparadores para man-db ...
Procesando disparadores para python-support ...
...


Java: Uninstall openjdk from ubuntu


# Desinstalar openjdk de ubuntu
#----------------------------------------------------------------------------------------------------

sudo apt-cache search openjdk
sudo update-alternatives --config java

sudo apt-get --purge remove openjdk-6-jre openjdk-6-doc openjdk-6-jre-headless openjdk-6-jre-lib
sudo apt-get autoremove




References:
- http://yoodey.com/removing-openjdk-jre-ubuntu-1010-ec2-amazon-and-install-sun-java-6-jre-jdk