5th March 2010

Como abrir una maquina vmware 2.0 con vmware 1.1

Solo teneis que editar dos ficheros de la máquina. En el vmx editais y cambiais virtualHW.version a 4 (virtualHW.version = “4″) y en el vmdk lo editais y cambiais ddb.virtualHWVersion a 4 (ddb.virtualHWVersion = “4″).
Ale a divertirse.

posted in Linux, virtualizacion, windows | 0 Comments

5th March 2010

Activar ssh en VMWARE ESXI

En la máquina física ESXI pulsamos Alt+F1. Tecleamos unsupported (no se imprimirán los caracteres en la pantalla) y pulsamos intro. En ese momento nos pedirá Contraseña (la que hayamos definido en la instalación o ninguna en caso de no haberlo hecho).

Ahora tenemos que editar el fichero /etc/inetd.conf y descomentar la linea que hace referencia al ssh. Probablemente tengamos dos, esto es porque una es para IP4 y otra para IP6.

Únicamente nos queda reiniciar los servicios con /sbin/services.sh restart o bien reiniciar el servidor físico.

posted in Linux, virtualizacion, windows | 0 Comments

23rd July 2009

He perdido las direcciones de thunderbird

Bueno, como no podia ser de otra forma, hoy ha sido un dia movidito y hemos tenido un caso con uno de los clientes de correo interno. Concretamente thunderbird (mis alabanzas hacia mozilla) nos ha gastado una broma y ha hecho que al arrancarlo no tubiera una libreta de direcciones, concretamente la que usamos para enviar notificaciones a los clientes.

Pues nada, 5 min de google y resuelto. Existe un fichero llamado dentro del perfil de thunderbird (documents and settings\usuario\Datos de programa\thunderbird\profiles\nombreperfil) que se llama prefs.js. Al parecer, thunderbird (esto no se porque) lo ha renombrado a prefs1.js con lo que al iniciarlo te vuelve a pedir que lo configures. La solución ha sido tan sencilla como volver a renombrar prefs1.js por prefs.js.

posted in General, Linux, Redes, windows | 0 Comments

11th July 2009

Problema con double bounce en qmail

Desde hace aproximadamente un mes hemos tenido unos correos extraños en nuestro servidor, teniamos miles de correos dirigidos a postmaster. Investigando hemos visto que se trata de un problema de double bounce, es decir un spamer envia un correo a una dirección que no existe desde una dirección que no existe.

Bien, esto provoca dos problemas, el primero es que como el destinatario no existe, el servidor intenta devolver una notificación al remitentes, pero claro el remitente tampoco existe con lo que se genera otro aviso por parte del servidor hacia el post master. Os podeis imaginar el problema que esto constituye cuando se acumulan 8000 correos en la cola de qmail.

Pues nada, la solución basicamente pasa por decirle que los correos double bounce los reenvie a una direccion de correo a la cual le vamos a decir excluya todos los correos recibidos. ¿como sehace esto? pues al lio… Por un lado creamos un fichero dentro de /var/qmail/control llamada doublebonceto donde indicaremos la dirección del correo que vamos a usar a este respecto:

echo nombrecuentacorreo > /var/qmail/control/doublebounceto

Obviamente la dirección tiene que estar creada… Posteriormente creamos otro fichero en el que vamos a indicar el host por defecto al que van los correos de este tipo en el fichero doublebouncehost:

echo dominio.dom > /var/qmail/control/doublebouncehost

Debemos crearlos como root y con permisos 644.

Bueno ya tenemos el trabajo casi terminado, ahora solo nos falta editar el fichero .qmail del directorio del buzon de correo (”/var/qmail/mailnames/domino.dom/bounce”). ESte fichero esta oculto, pero podemos editarlo sin problemas. Pues bien , la primera linea que seguramente sera “| true” la sustituimos por “| exit 0″

Y ya esta… a mi me ha funcionado, pero he tenido que indagar entre varias webs y echar mano de un pdf que tambien he colgado en el blog donde se definen los ficheros que usa qmail en el directorio control (aqui).

Espero que os solvente el problema como a mi.

posted in Linux, Redes | 0 Comments

11th July 2009

Manual de referencia sobre qmail

Aqui os dejo un Manual bastante interesante sobre qmail , sus ficheros, sus variables, etc. Guia QMail

Realmente es una guia de 4PSA Qmail Management, pero tienen una sección sobre los ficheros del directorio control donde se controla gran parte del funcionamiento de qmail.

Que lo disfruteis.

posted in Linux, Redes | 0 Comments

29th May 2009

Y llega GOOGLE CHROME 2.0

Google Chrome 2.0Solamente un par de meses han sido necesarios para que Google Chrome 2.0 deje atrás la fase beta, pues desde hoy ya está disponible para descargar su versión estable para sistemas Windows. Mejoras en sus motores de renderizado web y JavaScript son las principales novedades, pero no las únicas.

Así pues, además de aumentar hasta un 30% más la velocidad de su V8 y beneficiarse de la última versión de WebKit, Google Chrome 2.0 también mejora su estabilidad, pues a 300 asciende la cifra de errores que soluciona esta versión.

En el apartado de funcionalidades, aunque bastante escueto, también hay novedades. A partir de ahora se podrá disfrutar del siempre bienvenidomodo a pantalla completa, contar con un sistema para rellenar automáticamente los formularios web, así como poder prescindir de las miniaturas en la página de accesos directos que se muestra al abrir una pestaña nueva, por si nos avergonzamos de alguna de las páginas que más visitamos.

Unas mejoras más que agradecidas y que lo serían mucho más si los usuarios de LinuxMac OS X pudiéramos disfrutarlas de forma oficial, pues por el momento los usuarios de Windows son los únicos que pueden descargar Google Chrome 2.0, bien desde la página de sus creadores, o a través de la función de actualización integrada en la primera versión delnavegador web de Google.

posted in Linux, windows | 0 Comments

28th May 2009

Firewall y mucho más open source

Buenas blogeros :D, desde hace tiempo usamos IPCOP para disponer de un grado de seguridad aceptable en las empresas pero ante la imposibilidad de hacer funcionar correctamente un filtro antispam perimetral sobre este sistema nos pusimos a indagar y cual fue nuestra sorpresa al llegar a “UNTANGLE”. Tengo que decir en su contra que consume muchos recursos (bueno , cualqueir maquina de hoy es dia es más que suficiente), sobre todo comparado con IPCOP, pero tambien reconozco que funciona de lujo:

- Antispam
- Antiphising
- Antivirus
- OpenVpn
- Filtro de contenidos y P2P
- QOS
- Sistema de reportes muy completo…

Bueno que esta muy bien y ademas, para quien necesite aun más tienen una parte de pago y soporte… que más se puede pedir de un Open source . Podeis verlo en www.untangle.com

Que aproveche… 

posted in Linux, Redes | 0 Comments

13th January 2009

Configurar zuckerreport en sugarcrm

Aqui dejo el post que me ha salvado la vida ;D

Hi all,

I struggled a bit getting sugar, zucker reports and iReport to work correctly, so after I eventually got it working I thought I’d post on here what I done. Hopefully this may help other people out there.

Ok, lets get started….

Please note this is for the windows installation. Something that I found useful is that if you pre-install mysql then you will be able to use all the administration and monitoring software for your sugar installation and you wont have to configure a thing.

Please ensure that your system has the latest java installed (I used version 6.0.70.6).
Download the file ’sugarcrm-CE-5.1.0a-windows-installer.exe’ and run the installation.

Once the installation is complete locate the php.ini file, e.g. sugarcrm-5.1.0a/php
Edit this file and:
Change post_max_size to 40M
Change upload_tmp_dir to a directory folder without spaces, e.g. C:\tmp
Change upload_max_filesize to 40M

Restart Sugar.

Download ZuckerReports (I used version 1.10).
Login to SugarCrm as administrator, head to the Admin page and select Module Loader.
Upload a new module and select the Zucker zip file. Once uploaded then install the package.
Hopefully at this point all is well.

Navigate to the folder ‘htdocs\sugarcrm\modules\ZuckerReports’
Edit the file config.php and:
Find the line that is commented out for Windows Environment and replace with the following line -
“java_cmdline” => “C:\ZuckerJava\javaw %ARGS% 2>&1″
Note: The javaw.exe has been copied to a folder that does not contain any spaces as this may cause problems.

If the installation of SugarCRM used a different SQL port, e.g. it was not the default of 3306 then the following needs to be changed.
Navigate to: ‘htdocs\sugarcrm\modules\ZuckerReportTemplate’
Change the file ReportTemplate.php, scan for 3306 and change to the appropriate port number.

The Zucker images may also be in the wrong place, check if they appear when in the ZuckerReports module whilst you are in Sugar. If no images appear then copy the files within ‘htdocs\sugarcrm\custom\themes\Awesome80s\images’ put them in ‘htdocs\sugarcrm\themes\default\images’.

We are getting there!!

Next up is to install iReport, if you don’t know what this is then it will allow you to create some cool reports and upload them into sugar. Download the latest version (I used version 3.1.1) from here and install.

Find the file ‘jasperreports-3.1.0.jar’ within the iReport installation folder and copy it to ‘htdocs\sugarcrm\modules\ZuckerReports\jasper’. I also removed any older version of the same jar file but I am not sure if it is required or not!

At this point restart Sugar and all should be working nicely.
You could start up iReport, add a database and point it to sugar - the driver will be mysql and the connection url will be something like ‘jdbc:mysql://localhost:3306/sugarcrm’. You will need to put in the user id of ‘root’ and the appropriate password. Once you see your database create yourself a basic report click preview to see if it works. If it does then save and login to sugar. Go to the ZuckerReports module and select ‘Report and Query Templates’. Select ‘New JasperReport Template’ and then browse to the report you just created.

Here is the moment of truth, click on Save and fingers crossed it will import ok. Then select run report and hey presto you should see your report!

Just to keep things complete I will include how to setup the scheduler, there are articles out there on how to do this, but I will include it here so at least you don’t have to dig around!
Edit the file ‘_AddJobsHere.php’ within the folder ‘htdocs\sugarcrm\modules\Schedulers’ and add the following line to the “$job_strings”-array, you put this above option 9 which is for updateTrackerSessions:
8 => ‘ZuckerReportsScheduler’,

Further down you should see a load of functions, right near the bottom and above ‘Job 9′ to keep it in order add the following function:
function ZuckerReportsScheduler() {
require_once(”modules/ZuckerRunnableReport/RunnableReport.php”);
RunnableReport::scheduler_run_all();
return true;
}

Restart sugar and login as admin. Go to the admin page and then select ‘Scheduler’. Click on ‘Create Scheduler’ and fill in the details, the job will be ‘ZuckerReportsScheduler’. You can put in whatever you want for the interval.

Phew, the last bit is to create a batch job otherwise nothing will happen!
Create a batch file, e.g. ‘SugarScheduler.bat’ and add the following:
cd \sugarcrm-5.1.0a\htdocs\sugarcrm\SugarCE-Full-5.1.0a
C:\SUGARC~1.0A\php\php-cgi.exe -c C:\SUGARC~1.0A\php\php.ini -f cron.php

You will probably need to change the path to where your installation lives. Note: you will need to use the directory short names for the actual command otherwise it will not work!

Now add this batch file to the windows scheduler or at a command line type the following:
schtasks /create /sc minute /tn “Sugar Cron” /tr c:\SugarScheduler.bat

This will create the schedule job to run every minute….hurahh!!

I hope this has helped some people out as I’ve spent a while myself getting this working.

Good luck everyone.

Frizza

Debes tener correctamente configurado el scheduler de sugar e instalado el php5-cli (en mi caso por tener php5)

posted in Linux, PHP | 0 Comments

24th December 2008

Instalar Zabbix en Ubuntu desde los source

Following are instructions on installing ZABBIX on Ubuntu. Beware that the packages in the Ubuntu repository are quite probably an old version. You can check this with

apt-cache showpkg zabbix-server-mysql

They currently apply to ZABBIX v1.4.2 and Ubuntu 7.04 but may apply to other versions. These instructions have been compiled from various sources so a big thanks to the sources. These instructions have been tested on Ubuntu 8.04 as well.

Install pre-requisites: Apache MySQL-Server PHP5 Net-Snmp libraries Curl libraries

sudo apt-get install build-essential mysql-server libmysqlclient15-dev php5 php5-gd php5-mysql
snmp libsnmp-dev snmpd libcurl3-dev

If you aren’t going to be using Web Monitoring, you can exclude libcurl3-dev from above.

NOTE: For Jabber support make sure to include libiksemel3 and libiksemel-dev packages and then add –with-jabber=/usr/ to your configure command (STEP #4 below). The script wants the /include dir for the .h file and /lib for .c files and it needs to look in the root of the directory for them. For Ubuntu /usr is the place. Therefore, if you make sure that it knows to look in “/usr/” Jabber support should build fine. This is tested on Ubuntu Dapper 6.06 with Zabbix 1.4.2 but should work for more recent versions of Ubuntu as well.

1 - Make the zabbix user and group:

sudo adduser zabbix
enter in new password
confirm

use the remaining defaults.

Add zabbix to the admin group:

sudo adduser zabbix admin

2 - Download and Untar the sources:

su - zabbix
wget http://optusnet.dl.sourceforge.net/sourceforge/zabbix/zabbix-1.4.2.tar.gz
tar zxvpf zabbix-1.4.2.tar.gz

You might want to confirm that this is actually the latest version. You might also want to find a mirror closer to you by going to http://sourceforge.net/project/showfiles.php?group_id=23494.

3 - Create a zabbix database and populate it:

sudo mysql -e"create database zabbix;”
sudo mysql -e”grant all privileges on zabbix.* to zabbix@localhost identified by ‘enter-password-here’;”

The following steps will require the password you assigned to the new zabbix database user account in the step above.

mysql -D zabbix -uzabbix -p zabbix < /home/zabbix/zabbix-1.4.2/create/schema/mysql.sql
mysql -D zabbix -uzabbix -p zabbix < /home/zabbix/zabbix-1.4.2/create/data/data.sql
mysql -D zabbix -uzabbix -p zabbix < /home/zabbix/zabbix-1.4.2/create/data/images_mysql.sql

4 - Configure, compile and install the server:

cd zabbix-1.4.2/
./configure –prefix=/usr –with-mysql –with-net-snmp \
–with-libcurl –enable-server –enable-agent &&
make
sudo make install

If you aren’t going to be using Web Monitoring, you can exclude –with-libcurl from above.

If you wish to add Jabber support add –with-jabber=/usr/ and make sure you have libiksemel3 and libiksemel-dev packages as noted above before STEP #1

5 - Prepare the rest of the system:

sudo nano /etc/services

Add at the end:

zabbix_agent 10050/tcp # Zabbix ports
zabbix_trap 10051/tcp

Save and exit.

sudo mkdir /etc/zabbix
sudo chown -R zabbix.zabbix /etc/zabbix/
cp misc/conf/zabbix_* /etc/zabbix/

Edit /etc/zabbix/zabbix_agentd.conf:

nano /etc/zabbix/zabbix_agentd.conf

Make sure that the Server parameter points to the server address, for the agent that runs on the server it is like this:

Server=127.0.0.1

Save and exit.

Edit /etc/zabbix/zabbix_server.conf:

nano /etc/zabbix/zabbix_server.conf

For small sites this default file will do, however if you are into tweaking your config for your 10+ hosts site, this is the place.

Change this:

# Database user
DBUser=zabbix
# Database password
# Comment this line if no password used
DBPassword=Secret

Save and exit.

Copy the init.d scripts to the right spot:

sudo cp misc/init.d/debian/zabbix-server /etc/init.d
sudo cp misc/init.d/debian/zabbix-agent /etc/init.d

You may need to edit these script files as the compiled versions of the zabbix files is placed under /usr/sbin (/usr/bin in older versions).

sudo nano /etc/init.d/zabbix-server

Look for the following line:

DAEMON=/home/zabbix/bin/${NAME}

and replace it with:

DAEMON=/usr/sbin/${NAME} (old versions use /usr/bin/${NAME})

Save and exit.

sudo nano /etc/init.d/zabbix-agent

Look for the following line:

DAEMON=/home/zabbix/bin/${NAME}

and replace it with:

DAEMON=/usr/sbin/${NAME}  (old versions use /usr/bin/${NAME})

Save and exit.

Now set the correct permissions and set ZABBIX to start when the machine boots:

sudo chmod 755 /etc/init.d/zabbix-server
sudo update-rc.d zabbix-server defaults
sudo chmod 755 /etc/init.d/zabbix-agent
sudo update-rc.d zabbix-agent defaults

Start the server :

sudo /etc/init.d/zabbix-server start

Start the agent:

sudo /etc/init.d/zabbix-agent start

Now check to make sure that they are running:

ps -aux | grep zabbix

You should see multiple instances of zabbix_server and zabbix_client running if everything has gone ok.

6 - Configure web interface

mkdir /home/zabbix/public_html
cp -R frontends/php/* /home/zabbix/public_html/

Edit /etc/apache2/sites-enabled/000-default:

sudo nano /etc/apache2/sites-enabled/000-default

Work into file:

Alias /zabbix /home/zabbix/public_html/
<Directory /home/zabbix/public_html>
  AllowOverride FileInfo AuthConfig Limit Indexes
  Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
  <Limit GET POST OPTIONS PROPFIND>
    Order allow,deny
    Allow from all
  </Limit>
  <LimitExcept GET POST OPTIONS PROPFIND>
    Order deny,allow
    Deny from all
  </LimitExcept>
</Directory>

Save and exit.

Make php.ini adjustments:

sudo nano /etc/php5/apache2/php.ini

Change the following values:

max_execution_time = 300 ; Maximum execution time of each script, in seconds
date.timezone = America/Kentucky/Louisville

(use this url to find your correct timezone format: http://us3.php.net/manual/en/timezones.php )

Restart Apache:

sudo /etc/init.d/apache2 restart

Now point your browser to:

http://<servername or ip>/zabbix/

1. Introduction

read and click Next

2. License Agreement

Read, check ‘I Agree’, click Next

3. Check of Pre-Requisites

Fix any problems, click retry. Click Next when all pre-requisites are OK.

4. Configure DB Connection

Enter appropriate settings and click Test Connection. Click Next when OK.

5. Pre-Installation Summary

Verify installation settings, click Next.

6. Install

Click Save Configuration file and save to machine. Copy zabbix.conf.php to /home/zabbix/public_html/conf/zabbix.conf.php

One way to do this from a desktop machine (requires ssh installed): scp zabbix.conf.php zabbix@<serverip>:/home/zabbix/public_html/conf/

If using a windows workstation, you can use winscp http://winscp.net/eng/index.php to drag/drop the file onto your zabbix machine. This also requires ssh to be installed. (sudo apt-get install openssh-server)

Click Retry and click Next when OK.

7. Finish Click Finish to complete installation.

Your New Zabbix install will now be shown.

Log in with username: Admin And password is zabbix

First go to the tab Configuration and then Hosts.

Now create a host-group, see that you can give it some templates, e.g: Application.MySQL, Host.SNMP, Host.Standalone, Host.Unix.

Then some hosts:

Select your host-group and use Link with Template Host.Unix

Now a lot of triggers are imported and the game begins.

Go to the monitoring tab and watch the latest values roll in.

For specifics on configuration, please refer to the Zabbix user manual.

posted in General, Linux, Redes | 0 Comments

20th December 2008

Copias de Windows con rsync sobre servidor linux

Como siempre, os dejo aqui cosas que encuentro interesantes y que pruebo.

La idea es tener un servidor linux al que mediente rsync se conecte un servidor windows para disponer de una copia de los ficheros. Esta copia solo se realiza sobre los documentos que han cambiado. Algo más que interesante para ahorrar en ancho de banda.

Set up rsync server on Ubuntu

  1. Run sudo apt-get install rsync (it’s probably already installed)
  2. Create a file named rsyncd.conf in /etc
    1. sudo nano /etc/rsyncd.conf
    2. Add the following to rsyncd.conf, replacing all instances ofusername with your Ubuntu username:
      [usernamebackup]
      
          path = /home/username/backup
          comment = Backup
          uid = username
          gid = username
          read only = false
          auth users = username
          secrets file = /etc/rsyncd.secrets
    3. sudo chmod 644 /etc/rsyncd.conf
  3. Create a file named rsyncd.secrets in /etc
    1. sudo nano /etc/rsyncd.secrets
    2. Add the following to rsyncd.secrets, replacing usernamewith your username and password with a password of your choosing:
      username:password
    3. sudo chmod 600 /etc/rsyncd.secrets
  4. Open rsync port by editing /etc/default/rsync and setting
    RSYNC_ENABLE=true
  5. Restart rsync
    sudo /etc/init.d/rsync restart

Set up rsync client on Windows

  1. Install Cygwin, making sure Editors > nano and Net > rsync are selected
  2. Add C:\cygwin\bin; to the Windows PATH statement
    1. Right-click on My Computer and select Properties
    2. Switch to the Advanced tab and click the Environment Variables button at the bottom
    3. Find the “Path” or “PATH” variable in the System variables list at the bottom and click Edit
    4. Add C:\cygwin\bin; to the beginning of the list
  3. Create secret file to store password in Cygwin
    1. Start Cygwin Bash Shell
    2. Create secret file in the filesystem root and enter only the password in rsyncd.secrets above, with no spaces or line breaks
      nano /secret
    3. chmod 600 /secret
    4. chown Administrator:SYSTEM /secret
  4. Create bat file to run rsync
    1. Open Notepad and enter the following command, replacingUser Name with your Windows User Name directory,username with your Ubuntu username, and ipaddresswith the IP address of your Ubuntu server (e.g. 192.168.0.100):
      C:\cygwin\bin\rsync.exe -qrtz --password-file=c:\cygwin\secret --delete "/cygdrive/c/Documents and Settings/User Nameusername@ipaddress::usernamebackup

      As you may have guessed, the "/cygdrive/c/Documents and Settings/User Name" command line option designates where to start backing up from. As currently configured, this will backup your Windows home directory (Desktop, My Documents, etc). If you want to backup your whole hard drive, change that option to "/cygdrive/c".

    2. Save the file as C:\rsync.bat

Create scheduled task to run C:\rsync.bat once a day

  1. Create scheduled task
    1. Goto Start > Programs > Accessories > System Tools > Scheduled Tasks
    2. From the File menu, select New > Scheduled Task
    3. Name this task “rsync backup”
    4. Right-click on the task and select properties
    5. Enter C:\rsync.bat in the Run field
    6. Switch to the Schedule tab and select the time you want the backup to run every day and click Ok
  2. Test the scheduled task
    1. Create a folder called C:\data and put a few photo files in it
    2. Edit C:\rsync.bat and change "/cygdrive/c/Documents and Settings/User Name to "/cygdrive/c/data"
    3. Add the command pause on a new line at the bottom of C:\rsync.bat and save the file
    4. Right-click on the “rsync backup” scheduled task and select “Run”—A command window should popup and with either errors or the list of files being transfered. If there are errors, troubleshoot them.
    5. Once the scheduled task and C:\rsync.bat appear to be working correctly, change "/cygdrive/c/data" back to"/cygdrive/c/Documents and Settings/User Nameand remove the pause command
    6. Finally, edit the scheduled task properties and change “Run as:” to NT AUTHORITY\SYSTEM—this will ensure that the process runs in the background, without popping up a command prompt window

Run your first backup

Run C:\rsync.bat from the command line before going to bed. Backing up 35GB over a wireless-g connection took me over 8 hours. Subsequent backups take less than a minute. Behold the beauty of rsync.

Update: for information on how to backup Ubuntu to Ubuntu (or Linux to Linux really) using rsync with passphraseless keys, check out Playing with rsync on Ubuntu.

posted in Linux, Redes, windows | 0 Comments

  • Publicidad

  • Calendar

  • March 2010
    M T W T F S S
    « Nov    
    1234567
    891011121314
    15161718192021
    22232425262728
    293031