domingo, 17 de enero de 2016

Instalar sugarcrm

Wikijc:Sistemas sugarcrm

Instalar sugarcrm


Primero tenemos que instalar unos paquetes indispensables
$sudo apt-get install apache2
$sudo apt-get install php5
$sudo apt-get install phpmyadmin
Lo configuramos para apache2
$sudo apt-get install php-pear
$sudo apt-get install libmcrypt-dev
$sudo apt-get install mcrypt
$sudo apt-get install mysql-server
$sudo apt-get install php5-gd
$sudo apt-get install phpqladmin
$sudo apt-get install php5-curl
$sudo apt-get install php5-imap
$sudo apt-get install php-net-imap

Descargamos los paquetes de la aplicacion y del idioma en español de la siguiente direccion http://www.sugarforge.org/content/downloads/
Usamos la version community edition que es la gratuita

Se desempaqueta el zip y lo subimos a la instancia de EC2 al directorio /tmp para luego moverlo al directorio /var/www/ y darle los permisos $sudo unzip SugarCE-5.0.0f.zip
$sudo mv /tmp/sugarcrm /var/www/
$sudo chown -R www-data:www-data /var/www/sugarcrm

Editamos el fichero para que no aparezcan los directorios ni la informacion del servidor $sudo vi /etc/apache2/sites-enabled/000-default
NameVirtualHost *
       ServerAdmin webmaster@localhost
       DocumentRoot /var/www/
       
               Options FollowSymLinks
               AllowOverride None
       
       
               Options -Indexes FollowSymLinks MultiViews
               AllowOverride None
               Order allow,deny
               allow from all
               # This directive allows us to have apache2's default start page
               # in /apache2-default/, but still have / go to the right place
               #RedirectMatch ^/$ /apache2-default/
       

       ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
       
               AllowOverride None
               Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
               Order allow,deny
               Allow from all
       
       ErrorLog /var/log/apache2/error.log
       # Possible values include: debug, info, notice, warn, error, crit,
       # alert, emerg.
       LogLevel warn
       CustomLog /var/log/apache2/access.log combined
       ServerSignature Off
   Alias /doc/ "/usr/share/doc/"
   
       Options Indexes MultiViews FollowSymLinks
       AllowOverride None
       Order deny,allow
       Deny from all
       Allow from 127.0.0.0/255.0.0.0 ::1/128
   

Reiniciamos apache
$sudo /etc/init.d/apache2 restart

La instalacion de sugarcrm comienza al conectarnos desde un navegador http://nombreami/sugarcrm. Para instalar el lenguaje español tenemos una opcion dentro de admin donde podemos decir la ubicacion del fichero a instalar, en nuestro caso SugarEnt-5.0.0e-lang-es_es-20080516.zip

Desde el navegador ya se puede acceder http://nombreami/sugarcrm, te pide un usario que se crea desde el administrador.

Para poner un bucket de S3 como una unidad de la instanacia en EC2, tenemos que instalar los siguientes paquetes $sudo apt-get install libcurl3-openssl-dev
$sudo apt-get install -y subversion build-essential libcurl4-openssl-dev libxml2-dev libfuse-dev
http://s3fs.googlecode.com/svn/trunk/s3fs/contrib/readme.txt
S3FS-Fuse

S3FS is FUSE (File System in User Space) based solution to mount/unmount an Amazon S3 storage buckets and use system commands with S3 just like it was another Hard Disk.

  • Kernel-devel packages (or kernel source) installed that is the SAME version of your running kernel
  • LibXML2-devel packages
  • CURL-devel packages (or compile curl from sources at: curl.haxx.se/ use 7.15.X)
  • GCC, GCC-C++
  • pkgconfig
  • FUSE (2.7.x)
  • FUSE Kernel module installed and running (RHEL 4.x/CentOS 4.x users - read below)
  • OpenSSL-devel (0.9.8)
  • Subversion

If you're using YUM or APT to install those packages, then it might require additional packaging, allow it to be installed.

Downloading & Compiling:


In order to download s3fs, user the following command:
svn checkout http://s3fs.googlecode.com/svn/trunk/ s3fs-read-only

Go inside the directory that has been created (s3fs-read-only/s3fs) and run: make
This should compile the code. If everything goes OK, you'll be greated with "ok!" at the end and you'll have a binary file called "s3fs"

As root (you can use su, su -, sudo) do: "make inatall" -this will copy the "s3fs" binary to /usr/bin.

Congratulations. S3fs is now compiled and Installed.

Usage:


In order to use s3fs, make sure you have the Access Key and the Secret Key handy.
First, create a directory where to mount the S3 bucket you want to use.
Example (as root): mkdir -p /mnt/s3
Then run: s3fs mybucket -o accessKeyId=aaa -o secretAccessKey=bbb /mnt/s3

This will mount your bucket to /mnt/s3. You can do a simple "ls -l /mnt/s3" to see the content of your bucket.

If you want to allow other people access the same bucket in the same machine, you can add "-o allow _other" to read/write/delete content of the bucket.

You can add a fixed mount point in /etc/fstab, here's an example:

s3fs#mybucket /mnt/s3 fuse allow_other,accessKeyId=XXX ,secretAccessKey=YYY 0 0

This will mount upon reboot (or by launching: mount -a) your bucket on your machine.

All other options can be read at: http://code.google.com/p/s3fs/wiki/FuseOverAmazon

Known Issues:


s3fs should be working fine with S3 storage. However, There are couple of limitations:
  • There is no full UID/GID support yet, everything looks as "root" and if you allow others to access the bucket, others can erase files. There is, however, permissions support built in.
  • Currently s3fs could hang the CPU if you have lots of time-outs. This is *NOT* a fault of s3fs but rather libcurl. This happends when you try to copy thousands of files in 1 session, it doesn't happend when you upload hundreds of files or less.
  • CentOS 4.x/RHEL 4.x users - if you use the kernel that shipped with your distribution and didn't upgrade to the latest kernel RedHat/CentOS gives, you might have a problem loading the "fuse" kernel. Please upgrade to the latest kernel (2.6.16 or above) and make sure "fuse" kernel module is compiled and loadable since FUSE requires this kernel module and s3fs requires it as well.
  • Moving/renaming/erasing files takes time since the whole file needs to be accessed first. A workaround could be touse s3fs's cache support with the use_cache option.

Descargamos de internet el paquete para hacer luego la instalacion
$svn checkout http://s3fs.googlecode.com/svn/trunk/ s3fs-read-only

Nos movemos dentro del directorio que nos hemos descargado
$cd s3fs-read-only/s3fs

Hacemos la instalacion
$make install

Creamos un directorio para poder montar luego el bucket
$mkdir -p /mnt/sugardatas3

Montamos en este directorio un bucket que teniamos en S3 $s3cmd ls
2008-06-18 06:54 s3://blom.valladolid
2008-06-18 06:54 s3://blom.valladolid.sistemas
2008-06-19 09:14 s3://blom.valladolid.sistemas.ubuntu
2008-06-20 06:23 s3://blom.valladolid.sugarcrm
2008-06-05 15:04 s3://pecblom01

$s3fs blom.valladolid.sugarcrm -o accessKeyId=03ADK1XS7GH4ZHH74F02 -o secretAccessKey=JTFIpj9lc+FXaWqwNPaQSlmEKd2Ovxs6oO4kQNln /mnt/sugardatas3

Creamos un fichero en nuestro directorio /mnt/sugardatas3 para ver que luego esta en el bucket del S3
$vi /mnt/sugardatas3/leeme.txt
  1. hola esto esta creado en el directorio /mnt/sugardatas3 de nuestra instanacia EC2

Listamos nuestro bucket para ver si esta el fichero que acabamos de crear en la instancia
$s3cmd ls s3://blom.valladolid.sugarcrm
Bucket 'blom.valladolid.sugarcrm':
2008-06-20 09:56 7 s3://blom.valladolid.sugarcrm/leeme.txt
Efectivamente vemos que si que se ha subido el fichero que hemos creado en la instancia EC2 al bucket S3

No hay comentarios:

Publicar un comentario

Nota: solo los miembros de este blog pueden publicar comentarios.