martes, 27 de marzo de 2012
lunes, 26 de marzo de 2012
KVM
modificar virsh
https://help.ubuntu.com/community/KVM/Managing
http://wiki.debian.org/es/KVM
http://www.howtoforge.com/virtualization-with-kvm-on-a-debian-squeeze-server
http://elhombrequereventodeinformacion.wordpress.com/2011/04/05/instalar-kvm-en-debian-6-squeeze/
http://www.adictosaltrabajo.com/tutoriales/tutoriales.php?pagina=debianKvm
http://josecely.tecsua.com/?p=40
http://proyectosbeta.blogspot.com/2011/06/como-instalar-y-usar-kvm-en-ubuntu-1004.html
To create a Debian Squeeze guest (in bridging mode) with the name vm10, 512MB of RAM, two virtual CPUs, and the disk image /var/lib/libvirt/images/vm10.img (with a size of 12GB), insert the Debian Squeeze Netinstall CD into the CD drive and run
virt-install --connect qemu:///system -n vm10 -r 512 --vcpus=2 --disk path=/var/lib/libvirt/images/vm10.img,size=12 -c /dev/cdrom --vnc --noautoconsole --os-type linux --os-variant debiansqueeze --accelerate --network=bridge:br0 --hvm
O con un .iso
virt-install --connect qemu:///system -n vm10 -r 512 --vcpus=2 --disk path=/var/lib/libvirt/images/vm10.img,size=12 -c /var/lib/libvirt/images/debian-6.0.0-amd64-netinst.iso --vnc --noautoconsole --os-type linux --os-variant debiansqueeze --accelerate --network=bridge:br0 --hvm
virsh undefine vm1 ----para eliminar domain
virsh --connect qemu:///system
start vm10
quit
Para apagar
virsh --connect qemu:///system
shutdown vm10
quit
Para listar las maquinas virtuales
virsh list
Shut Down A Guest
# virsh list
# virsh shutdown dominName
# virsh shutdown freebsd
# virsh shutdown 3
Rebooting A Guest
# virsh list
# virsh reboot domaiName
# virsh reboot 3
# virsh reboot win2008biz
Force a guest to stop with the virsh command if it is not responding or crashed
# virsh list
# virsh destroy domainName
# virsh destroy openbsd.nixcraft.in
Get Information About Guest
# virsh list
# virsh dominfo dominName
# virsh dominfo 2
# virsh dominfo freebsd
/etc/libvirt/qemu/ - Virtual machine configuration directory. All xml files regarding VMs are stored here. You can edit them manually or via virt-manager.
/etc/libvirt/qemu/networks/ - Networking for your KVM including default NAT. NAT is only recommended for small setup or desktops. I strongly suggest you use bridged based networking for performance.
/etc/libvirt/qemu/networks/default.xml - The default NAT configuration used by NAT device virbr0.
/var/log/libvirt/ - The default log file directory. All VM specific logs files are stored here.
/etc/libvirt/libvirtd.conf - Master libvirtd configuration file.
/etc/libvirt/qemu.conf - Master configuration file for the QEMU driver.
https://help.ubuntu.com/community/KVM/Managing
http://wiki.debian.org/es/KVM
http://www.howtoforge.com/virtualization-with-kvm-on-a-debian-squeeze-server
http://elhombrequereventodeinformacion.wordpress.com/2011/04/05/instalar-kvm-en-debian-6-squeeze/
http://www.adictosaltrabajo.com/tutoriales/tutoriales.php?pagina=debianKvm
http://josecely.tecsua.com/?p=40
http://proyectosbeta.blogspot.com/2011/06/como-instalar-y-usar-kvm-en-ubuntu-1004.html
To create a Debian Squeeze guest (in bridging mode) with the name vm10, 512MB of RAM, two virtual CPUs, and the disk image /var/lib/libvirt/images/vm10.img (with a size of 12GB), insert the Debian Squeeze Netinstall CD into the CD drive and run
virt-install --connect qemu:///system -n vm10 -r 512 --vcpus=2 --disk path=/var/lib/libvirt/images/vm10.img,size=12 -c /dev/cdrom --vnc --noautoconsole --os-type linux --os-variant debiansqueeze --accelerate --network=bridge:br0 --hvm
O con un .iso
virt-install --connect qemu:///system -n vm10 -r 512 --vcpus=2 --disk path=/var/lib/libvirt/images/vm10.img,size=12 -c /var/lib/libvirt/images/debian-6.0.0-amd64-netinst.iso --vnc --noautoconsole --os-type linux --os-variant debiansqueeze --accelerate --network=bridge:br0 --hvm
virsh undefine vm1 ----para eliminar domain
Administración
Para iniciarvirsh --connect qemu:///system
start vm10
quit
Para apagar
virsh --connect qemu:///system
shutdown vm10
quit
Para listar las maquinas virtuales
virsh list
Shut Down A Guest
# virsh list
# virsh shutdown dominName
# virsh shutdown freebsd
# virsh shutdown 3
Rebooting A Guest
# virsh list
# virsh reboot domaiName
# virsh reboot 3
# virsh reboot win2008biz
Force a guest to stop with the virsh command if it is not responding or crashed
# virsh list
# virsh destroy domainName
# virsh destroy openbsd.nixcraft.in
Get Information About Guest
# virsh list
# virsh dominfo dominName
# virsh dominfo 2
# virsh dominfo freebsd
The following files are required to manage and debug KVM problems:
/etc/libvirt/ - Main configuration directory./etc/libvirt/qemu/ - Virtual machine configuration directory. All xml files regarding VMs are stored here. You can edit them manually or via virt-manager.
/etc/libvirt/qemu/networks/ - Networking for your KVM including default NAT. NAT is only recommended for small setup or desktops. I strongly suggest you use bridged based networking for performance.
/etc/libvirt/qemu/networks/default.xml - The default NAT configuration used by NAT device virbr0.
/var/log/libvirt/ - The default log file directory. All VM specific logs files are stored here.
/etc/libvirt/libvirtd.conf - Master libvirtd configuration file.
/etc/libvirt/qemu.conf - Master configuration file for the QEMU driver.
Installing Linux on USB – Part 7: Install Debian Linux from USB drives
http://linux.koolsolutions.com/2009/02/25/installing-linux-on-usb-part-7-install-debian-linux-from-usb-drive/
martes, 20 de marzo de 2012
elastik
habilitar video
http://www.elastix.org/dokuwiki/doku.php?id=video_support
mysql openfire
http://www.elastixconnection.com/index.php?option=com_content&view=article&id=98&Itemid=99
http://www.elastix.org/dokuwiki/doku.php?id=video_support
mysql openfire
http://www.elastixconnection.com/index.php?option=com_content&view=article&id=98&Itemid=99
Openfire para registrar todos sus datos puede utilizar una base de datos interna o MySQL. Por lo que he visto es mucho mejor usar una base de datos en MySQL. Primero creamos la base de datos *mysqladmin create openfire -u root -pXXXXX* poner en lugar de las X nuestra contraseña para el usuario root de mysql (no tiene nada que ver con el usuario root de nuestro servidor Linux) entramos en el cliente de mysql *mysql -u root -pXXXXX* creamos un usuario y le otorgamos todos los permisos para manejar la base de datos *Openfire* mysql> *GRANT ALL PRIVILEGES ON openfire.* TO fulano IDENTIFIED BY 'sesamo'; * *Query OK, 0 rows affected (0.01 sec)* mysql> *flush privileges;* *Query OK, 0 rows affected (0.00 sec)* mysql> *quit* Bye sesamo es la contraseña del usuario fulano Ahora importamos las tablas para la base de datos *mysql openfire < /opt/openfire/resources/database/openfire_mysql.sql -u root -pXXXXX*
domingo, 18 de marzo de 2012
voip
clientes:;
http://www.voip-info.org/wiki/view/Open+Source+VOIP+Software
http://letitknow.wordpress.com/2011/05/16/how-to-install-asterisk-1-8-4-on-debian-6-0-1/
http://www.voip-info.org/wiki/view/Open+Source+VOIP+Software
http://letitknow.wordpress.com/2011/05/16/how-to-install-asterisk-1-8-4-on-debian-6-0-1/
viernes, 16 de marzo de 2012
importante smsd
check_memory_method = 1
memory_start = 0.
APN=kolbi3g
http://groups.google.com/group/cslucr-root/search?group=cslucr-root&q=huawei&qt_g=Buscar+en+este+grupo
init = AT+CPMS="ME","ME","ME"
http://smstools3.kekekasvi.com/topic.php?id=595
http://smstools3.kekekasvi.com/index.php?p=run
memory_start = 0.
APN=kolbi3g
http://groups.google.com/group/cslucr-root/search?group=cslucr-root&q=huawei&qt_g=Buscar+en+este+grupo
init = AT+CPMS="ME","ME","ME"
http://smstools3.kekekasvi.com/topic.php?id=595
http://smstools3.kekekasvi.com/index.php?p=run
martes, 13 de marzo de 2012
Migrando de Debian 5 Lenny a Squeeze 6
http://www.rolandovera.com/2011/03/21/migrando-de-debian-5-lenny-a-squeeze-6/
lunes, 12 de marzo de 2012
pushpin
private.xml
<Pushpin key="devlabel" eval="evDeviceNameIconURL(e)" iconSize="47,24" iconOffset="9,24" image="images/pp/label47_fill.png"/>
<!-- "evDeviceNameIconURL" is defined in 'jsmap.js' -->
pushpinicon.jva
www.pixlr.com/express
tildes
https://sourceforge.net/projects/opengts/forums/forum/579835/topic/3410741
<Pushpin key="devlabel" eval="evDeviceNameIconURL(e)" iconSize="47,24" iconOffset="9,24" image="images/pp/label47_fill.png"/>
<!-- "evDeviceNameIconURL" is defined in 'jsmap.js' -->
pushpinicon.jva
www.pixlr.com/express
tildes
https://sourceforge.net/projects/opengts/forums/forum/579835/topic/3410741
opengts
1. Use more data in label pushpin on map https://sourceforge.net/projects/opengts/forums/forum/579835/topic/3478627
2.
How to Install PlaySMS And SMS Server Tools 3 On Debian Server
http://support.host1plus.com/index.php?/Knowledgebase/Article/View/576/0/how-to-install-playsms-and-sms-server-tools-3-on-debian-server
http://www.mobistuff.net/index.php/smsgateway2/mysmsgateway/huaweik3765smsdconf
This tutorial will show you how you can set up an SMS server on Debian with playsms and smstools.
1.What we need before we start is apache2, mysql server, php5, lynx, wget, curl.
Now we install updates, and install dependencies:
2.Installing PlaySMS
Type mysql root password, when you are asked for the password.
Type mysql root password, when you are asked for the password.
My USB datacable is detected as ttyUSB0 so I don't have to edit the port, but if your phone is detected as something else, change it on line 27 to etc. ttyUSB1, ttyACM0
Username: admin
Password: admin
Click Gateway, click Manage smstools, click (click here to activate).
Your server is now up and running, ready to be used.
http://www.mobistuff.net/index.php/smsgateway2/mysmsgateway/huaweik3765smsdconf
This tutorial will show you how you can set up an SMS server on Debian with playsms and smstools.
1.What we need before we start is apache2, mysql server, php5, lynx, wget, curl.
Now we install updates, and install dependencies:
apt-get update
apt-get upgrade
apt-get install apache2 mysql-server php5 php5-cli php5-cgi php-pear php-db phpmyadmin make gcc sendmail lynx wget curl
Now create a password for mysql root user, and remember it.apt-get upgrade
apt-get install apache2 mysql-server php5 php5-cli php5-cgi php-pear php-db phpmyadmin make gcc sendmail lynx wget curl
2.Installing PlaySMS
adduser playsms
mkdir -p /var/www/playsms
mkdir -p /var/spool/playsms
mkdir -p /var/log/playsms
chown -R www-data /var/www/playsms
chown -R www-data /var/spool/playsms
chown -R www-data /var/log/playsms
And next download latest version of playSMS, find latest here, or grab my url: http://sourceforge.net/projects/playsms/mkdir -p /var/www/playsms
mkdir -p /var/spool/playsms
mkdir -p /var/log/playsms
chown -R www-data /var/www/playsms
chown -R www-data /var/spool/playsms
chown -R www-data /var/log/playsms
wget http://downloads.sourceforge.net/project/playsms/playsms/Version%200.9.5.2/playsms-0.9.5.2.tar.gz
This will extract playsms to /usr/local/src.
tar -zxvf playsms-0.9.5.2.tar.gz -C /usr/local/src
Now go to the following folder:
cd /usr/local/src/playsms-0.9.5.2/web
Now run the following commands:Type mysql root password, when you are asked for the password.
cp -rR * /var/www/playsms
chown -R www-data /var/www/playsms
mysqladmin -u root -p create playsms
And now we import the mysql database from playsms, remember to change the path, if you install another version.chown -R www-data /var/www/playsms
mysqladmin -u root -p create playsms
Type mysql root password, when you are asked for the password.
mysql -u root -p playsms < /usr/local/src/playsms-0.9.5.2/db/playsms.sql
Here we will make the config file, you have to fill out the fields:
cd /var/www/playsms
cp config-dist.php config.php
nano config.php
So it looks like this (replace 'my_password_for_mysql_root_user' with your password, and do not remove ' '):cp config-dist.php config.php
nano config.php
<?php // PHP PEAR DB compatible database engine: // msql, mssql, mysql, oci8, odbc, pgsql, sqlite $core_config['db']['type'] = 'mysql'; // database engine $core_config['db']['host'] = 'localhost'; // database host/server $core_config['db']['port'] = '3306'; // database port $core_config['db']['user'] = 'root'; // database username $core_config['db']['pass'] = 'my_password_for_mysql_root_user'; // database password $core_config['db']['name'] = 'playsms'; // database name $core_config['db']['pref'] = 'playsms'; // table's prefix without trailing underscore // SMTP configuration $core_config['smtp']['relm'] = ''; // yes, not realm, its relm $core_config['smtp']['user'] = ''; $core_config['smtp']['pass'] = ''; $core_config['smtp']['host'] = 'localhost'; $core_config['smtp']['port'] = '25'; // Do not change anything below this line unless you know what to do // ----------------------------------------------------------------- // you can turn on or off PHP error reporting // on production level you should turn off PHP error reporting (set to 0), by default its on //error_reporting(0); //error_reporting(E_ALL ^ (E_NOTICE | E_WARNING | E_DEPRECATED)); error_reporting(E_ALL ^ (E_NOTICE | E_WARNING)); // logs directories $apps_path['logs'] = '/var/log/playsms'; // log level: 0=disabled, 1=info, 2=warning, 3=debug, 4=verbose // WARNING: log level 3 and 4 will also save sensitif information such as password for used gateway $core_config['logstate'] = 0; // 0 for single session login; 1 for multi session login // multi session login is not secure because playsms leaves md5 crypted username and password // on admin's computer $core_config['multilogin'] = 0; // are we using http or https ? the default is using http instead https $core_config['ishttps'] = false; ?>Now run the following commands:
cd /usr/local/src/playsms-0.9.5.2/bin
cp playsmsd playsmsd.php playsmsd_start /usr/local/bin/
cp playsms /etc/default/
Now we have to make sure that the program will start everytime the systems boots; do the following:cp playsmsd playsmsd.php playsmsd_start /usr/local/bin/
cp playsms /etc/default/
nano /etc/init.d/rc.local
Add on the bottom of the file (before exit if there's an exit
command). This way playsmsd_start will start automatically on boot. Save
and exit..... last line .... /usr/local/bin/playsmsd_start
Install smstools
cd
wget http://smstools3.kekekasvi.com/packages/smstools3-3.1.14.tar.gz
tar -zxvf smstools3-3.1.14.tar.gz -C /usr/local/src
cd /usr/local/src/smstools3
make
make install
Now we make playsms and smstools work together:wget http://smstools3.kekekasvi.com/packages/smstools3-3.1.14.tar.gz
tar -zxvf smstools3-3.1.14.tar.gz -C /usr/local/src
cd /usr/local/src/smstools3
make
make install
cd /usr/local/src/playsms-0.9.5.2
cp contrib/smstools/smsd.conf /etc/
Now we have to edit the config file.cp contrib/smstools/smsd.conf /etc/
My USB datacable is detected as ttyUSB0 so I don't have to edit the port, but if your phone is detected as something else, change it on line 27 to etc. ttyUSB1, ttyACM0
nano /etc/smsd.conf
My config file looks like this:# Global configuration devices = modem1 loglevel = 4 logfile = /var/log/sms/smstools.log outgoing = /var/spool/sms/outgoing checked = /var/spool/sms/checked failed = /var/spool/sms/failed incoming = /var/spool/sms/incoming sent = /var/spool/sms/sent delaytime = 6 errorsleeptime = 12 blocktime = 180 autosplit = 3 receive_before_send = yes # Modem configuration # iTegno 3000 USB [modem1] #init = device = /dev/ttyUSB0 incoming = yes #pin = baudrate = 115200Now run the following commands:
mkdir -p /var/spool/sms/checked
mkdir -p /var/spool/sms/failed
mkdir -p /var/spool/sms/incoming
mkdir -p /var/spool/sms/outgoing
mkdir -p /var/spool/sms/sent
mkdir -p /var/log/sms
chown -R www-data /var/spool/sms
update-rc.d sms3 defaults
Browse http://your-server-ip/playsms/ and log in using default administrator user:mkdir -p /var/spool/sms/failed
mkdir -p /var/spool/sms/incoming
mkdir -p /var/spool/sms/outgoing
mkdir -p /var/spool/sms/sent
mkdir -p /var/log/sms
chown -R www-data /var/spool/sms
update-rc.d sms3 defaults
Username: admin
Password: admin
Click Gateway, click Manage smstools, click (click here to activate).
Your server is now up and running, ready to be used.
domingo, 11 de marzo de 2012
Configuración de asterisk sobre debian Lenny.
Tomando en cuenta que se tiene una instalación sin entorno grafico y
con los servicios necesarios para el arranque del sistema operativo
Debian GNU/Linux 5.0 en un equipo de cómputo; a continuación se explica
la configuración de asterisk para brindar servicios de telefonía IP en
una red de datos.
1. El primer paso es obtener los privilegios de administrador (root) en una consola de administración del sistema; esto se hace con el comando:
su
2. Entrar al directorio /usr/src .
cd /usr/src/
Una de las ventajas que ofrecen las arquitecturas GNU/Linux se refleja en la posibilidad de compilar el código fuente de las aplicaciones a instalar bajo el hardware del equipo. Como resultado de este proceso se obtiene un “sistema operativo a la medida”; mismo que tiene grandes beneficios a nivel de estabilidad y velocidad de respuesta. Para llevar a cabo este proceso es necesario realizar lo siguiente:
3. Descargar las últimas versiones de asterisk, libpri, dahdi (antes zaptel) y asterisk-addons.
NOTA: Verificar dichos enlaces en la pagina de digium, (en caso de que no se encuentren disponiblen los archivos .. sustituir los nombres de los paquetes disponibles para proceder con las descargas… xD)
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-1.6.1.11.tar.gz
wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4.10.2.tar.gz
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-addons-1.6.1.2.tar.gz
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
4. Descomprimir los archivos .tar.gz con los comandos:
tar xvfz asterisk-1.6.1.11.tar.gz
tar xvfz asterisk-addons-1.6.1.2.tar.gz
tar xvfz libpri-1.4.10.2.tar.gz
tar xvfz dahdi-linux-complete-current.tar.gz
5. Instalar las dependencias o librerías junto con los encabezados del kernel para no tener problemas al compilar los paquetes antes descritos.
apt-get install -qy bison flex libncurses5-dev zlib1g-dev libssl-dev libnewt-dev libiksemel-dev libxml2-dev
apt-get install -qy make linux-headers-`uname -r` gcc g++ libstdc++6
apt-get install sox
apt-get install -qy subversion
6. Compilar e instalar los drivers para las tarjetas de Digium [DGM2009] en caso de que se requiera conectividad con la PSTN. (opcional)
cd /usr/src/ dahdi-linux-complete-2.2.0.2+2.2.0 /
make all
make install
make config
7. Ahora el siguiente paso es Instalar libpri con los siguientes comandos:
cd /usr/src/ libpri-1.4.10.2/
make
make install
8. Compilar e instalar asterisk.
cd /usr/src/asterisk-1.6.1.11/
./configure
make
make install
make samples
9. Instalar asterisk-addons
cd /usr/src/asterisk-addons-1.6.1.2/
./configure
make
make install
make samples
10. Por último se debe reiniciar el servidor con el comando:
init 6
Hasta este punto se tiene instalado el paquete asterisk en el servidor GNU/Linux, es decir, dicho equipo puede enlazar llamadas telefónicas por medio de la red entre las extensiones de la misma.
1. El primer paso es obtener los privilegios de administrador (root) en una consola de administración del sistema; esto se hace con el comando:
su
2. Entrar al directorio /usr/src .
cd /usr/src/
Una de las ventajas que ofrecen las arquitecturas GNU/Linux se refleja en la posibilidad de compilar el código fuente de las aplicaciones a instalar bajo el hardware del equipo. Como resultado de este proceso se obtiene un “sistema operativo a la medida”; mismo que tiene grandes beneficios a nivel de estabilidad y velocidad de respuesta. Para llevar a cabo este proceso es necesario realizar lo siguiente:
3. Descargar las últimas versiones de asterisk, libpri, dahdi (antes zaptel) y asterisk-addons.
NOTA: Verificar dichos enlaces en la pagina de digium, (en caso de que no se encuentren disponiblen los archivos .. sustituir los nombres de los paquetes disponibles para proceder con las descargas… xD)
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-1.6.1.11.tar.gz
wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4.10.2.tar.gz
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-addons-1.6.1.2.tar.gz
wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-current.tar.gz
4. Descomprimir los archivos .tar.gz con los comandos:
tar xvfz asterisk-1.6.1.11.tar.gz
tar xvfz asterisk-addons-1.6.1.2.tar.gz
tar xvfz libpri-1.4.10.2.tar.gz
tar xvfz dahdi-linux-complete-current.tar.gz
5. Instalar las dependencias o librerías junto con los encabezados del kernel para no tener problemas al compilar los paquetes antes descritos.
apt-get install -qy bison flex libncurses5-dev zlib1g-dev libssl-dev libnewt-dev libiksemel-dev libxml2-dev
apt-get install -qy make linux-headers-`uname -r` gcc g++ libstdc++6
apt-get install sox
apt-get install -qy subversion
6. Compilar e instalar los drivers para las tarjetas de Digium [DGM2009] en caso de que se requiera conectividad con la PSTN. (opcional)
cd /usr/src/ dahdi-linux-complete-2.2.0.2+2.2.0 /
make all
make install
make config
7. Ahora el siguiente paso es Instalar libpri con los siguientes comandos:
cd /usr/src/ libpri-1.4.10.2/
make
make install
8. Compilar e instalar asterisk.
cd /usr/src/asterisk-1.6.1.11/
./configure
make
make install
make samples
9. Instalar asterisk-addons
cd /usr/src/asterisk-addons-1.6.1.2/
./configure
make
make install
make samples
10. Por último se debe reiniciar el servidor con el comando:
init 6
Hasta este punto se tiene instalado el paquete asterisk en el servidor GNU/Linux, es decir, dicho equipo puede enlazar llamadas telefónicas por medio de la red entre las extensiones de la misma.
Configuración de Zimbra sobre debian Lenny.
Antes que nada quiero comentarles que actualmente estoy
desarrollando un proyecto de telefonia IP, asi mismo les ofrezco una
disculpa si es que en las publicaciones anteriores la redaccion del
texto esta enfocada al mismo. Lo importante de estos posts son realmente
los pasos que les expongo para la configuracion de los servicios ; asi
mismo les comento que los textos que presento en este espacio los pego
directamente del documento de mi proyecto.
Sin mas comentarios los comandos para configurar la suite de Zimbra son los siguientes:
1. Primeramente se debe eliminar el paquete exim4 de nuestro sistema.
apt-get remove –-purge exim4 exim4-base exim4-config exim4-daemon-light
2. Anadir las siguientes lineas al archivo /etc/hosts con los siguientes comandos:
echo 127.0.0.1 www.ejemplo.lan debian >>/etc/hosts // Segunda // línea del archivo
echo 192.168.1.100 www.ejemplo.lan debian >>/etc/hosts // Ultima // línea del archivo
NOTA: después del nombre de dominio la palabra “debian” se refiere al nombre de la maquina en la cual se está configurando el servicio.
3 . Instalar las siguientes dependencias y de paso editar el archivo resolv.conf indicando el nombre de dominio y el servidor DNS correspondiente. El archivo queda de la siguiente manera:
search ejemplo.lan
nameserver 127.0.0.1
apt-get install libc6-i686 sudo libidn11 curl fetchmail libgmp3c2 libexpat1 libgtopt-mixed-perl libxml2 listdc++6 libpcre3 libltdl3 ssh
4. Descargar el paquete zcs-6.0.7_GA_2473.DEBIAN5.20100616212143.tgz de la página http://www.zimbra.com/downloads/os-downloads.html y colocarlo en el directorio /usr/src del sistema.
5. Descomprimir el mismo con el comando:
tar –zxvf zcs-6.0.7_GA_2473.DEBIAN5.20100616212143.tgz
6. Ahora es necesario ejecutar el script install.sh que se encuentra dentro del directorio del programa que crea por default el comando antes citado; dicha instrucción despliega lo siguiente:
./install.sh
Operations logged to /tmp/install.log.5437
Checking for existing installation…
zimbra-ldap…NOT FOUND
zimbra-logger…NOT FOUND
zimbra-mta…NOT FOUND
zimbra-snmp…NOT FOUND
zimbra-store…NOT FOUND
zimbra-apache…NOT FOUND
zimbra-spell…NOT FOUND
zimbra-convertd…NOT FOUND
zimbra-memcached…NOT FOUND
zimbra-proxy…NOT FOUND
zimbra-archiving…NOT FOUND
zimbra-cluster…NOT FOUND
zimbra-core…NOT FOUND
PLEASE READ THIS AGREEMENT CAREFULLY BEFORE USING THE SOFTWARE.
ZIMBRA, INC. (“ZIMBRA”) WILL ONLY LICENSE THIS SOFTWARE TO YOU IF YOU
FIRST ACCEPT THE TERMS OF THIS AGREEMENT. BY DOWNLOADING OR INSTALLING
THE SOFTWARE, OR USING THE PRODUCT, YOU ARE CONSENTING TO BE BOUND BY
THIS AGREEMENT. IF YOU DO NOT AGREE TO ALL OF THE TERMS OF THIS
AGREEMENT, THEN DO NOT DOWNLOAD, INSTALL OR USE THE PRODUCT.
License Terms for the Zimbra Collaboration Suite:
http://www.zimbra.com/license/zimbra_public_eula_2.1.html
Press Return to continue
Checking for prerequisites…
FOUND: NPTL
FOUND: sudo-1.6.9p17-2
FOUND: libidn11-1.8+20080606-1
FOUND: libpcre3-7.6-2.1
FOUND: libgmp3c2-2:4.2.2+dfsg-3
FOUND: libexpat1-2.0.1-4+lenny1
FOUND: libstdc++6-4.3.2-1.1
FOUND: libstdc++5-1:3.3.6-18
FOUND: libperl5.10-5.10.0-19lenny2
Checking for suggested prerequisites…
FOUND: perl-5.10.0
FOUND: sysstat
Prerequisite check complete.
Checking for installable packages
Found zimbra-core
Found zimbra-ldap
Found zimbra-logger
Found zimbra-mta
Found zimbra-snmp
Found zimbra-store
Found zimbra-apache
Found zimbra-spell
Found zimbra-memcached
Found zimbra-proxy
Select the packages to install
7. Hasta este punto el paquete Zimbra presenta la opción de seleccionar los componentes a instalar; así mismo para efectos de este trabajo, únicamente se deben marcar los siguientes:
Install zimbra-ldap [Y] Y
Install zimbra-logger [Y]
Install zimbra-mta [Y]
Install zimbra-snmp [Y]
Install zimbra-store [Y]
Install zimbra-apache [Y]
Install zimbra-spell [Y]
Install zimbra-memcached [N]
Install zimbra-proxy [N]
Checking required space for zimbra-core
checking space for zimbra-store
Installing:
zimbra-core
zimbra-ldap
zimbra-logger
zimbra-mta
zimbra-snmp
zimbra-store
zimbra-apache
zimbra-spell
The system will be modified. Continue? [N] Y
8. Después seleccionar la lista de lo antes citado el programa advierte que nuestro sistema va a ser modificado; así mismo para comenzar la instalación le indicamos que sí. La información desplegada es la de abajo:
Removing /opt/zimbra
Removing zimbra crontab entry…done.
Cleaning up zimbra init scripts…done.
Cleaning up /etc/ld.so.conf…done.
Cleaning up /etc/security/limits.conf…done.
Finished removing Zimbra Collaboration Suite.
Installing packages
zimbra-core……zimbra-core_6.0.3_GA_1915.DEBIAN5_64_amd64.deb…done
zimbra-ldap……zimbra-ldap_6.0.3_GA_1915.DEBIAN5_64_amd64.deb…done
zimbra-logger……zimbra-logger_6.0.3_GA_1915.DEBIAN5_64_amd64.deb…done
zimbra-mta……zimbra-mta_6.0.3_GA_1915.DEBIAN5_64_amd64.deb…done
zimbra-snmp……zimbra-snmp_6.0.3_GA_1915.DEBIAN5_64_amd64.deb…done
zimbra-store……zimbra-store_6.0.3_GA_1915.DEBIAN5_64_amd64.deb…done
zimbra-apache……zimbra-apache_6.0.3_GA_1915.DEBIAN5_64_amd64.deb…done
zimbra-spell……zimbra-spell_6.0.3_GA_1915.DEBIAN5_64_amd64.deb…done
Operations logged to /tmp/zmsetup.11242009-193550.log
Installing LDAP configuration database…done.
Setting defaults…
DNS ERROR resolving MX for zimbra6.mi.dominio
It is suggested that the domain name have an MX record configured in DNS
Change domain name? [Yes] Yes
9. En este apartado se debe poner el nombre de dominio de nuestra red local; en este caso y para efectos de este ejemplo escribimos www.ejemplo.lan. El ejemplo queda como sigue:
Create domain: [zimbra6.mi.dominio] www.ejemplo.lan
It is suggested that the domain name have an MX record configured in DNS
Re-Enter domain name? [Yes] n
done.
10. A continuación se presentan los menús de configuración del paquete ya instalado; así mismo, es recomendable asignar la contraseña de root para la administración del mismo. En los siguientes pasos se muestra como se lleva a cabo dicho propósito:
Checking for port conflicts
Main menu
1) Common Configuration:
2) zimbra-ldap: Enabled
3) zimbra-store: Enabled
+Create Admin User: yes
+Admin user to create: admin@www.ejemplo.lan
******* +Admin Password UNSET
+Enable automated spam training: yes
+Spam training user: spam.fig77lxqx@www.ejemplo.lan
+Non-spam(Ham) training user: ham.sb8zipfq@www.ejemplo.lan
+Global Documents Account: wiki@ www.ejemplo.lan
+SMTP host: zimbra6. www.ejemplo
+Web server HTTP port: 80
+Web server HTTPS port: 443
+Web server mode: http
+IMAP server port: 143
+IMAP server SSL port: 993
+POP server port: 110
+POP server SSL port: 995
+Use spell check server: yes
+Spell server URL: http://zimbra6.www.ejemplo:7780/aspell.php
+Configure for use with mail proxy: FALSE
+Configure for use with web proxy: FALSE
+Enable version update checks: TRUE
+Enable version update notifications: TRUE
+Version update notification email: admin@www.ejemplo.lan
+Version update source email: admin@www.ejemplo.lan
4) zimbra-mta: Enabled
5) zimbra-snmp: Enabled
6) zimbra-logger: Enabled
7) zimbra-spell: Enabled
8 ) Default Class of Service Configuration:
r) Start servers after configuration yes
s) Save config to file
x) Expand menu
q) Quit
Address unconfigured (**) items (? – help) 3
11. Elegimos la opción 3 y pulsamos la tecla entrar. Aparece lo siguiente:
Store configuration
1) Status: Enabled
2) Create Admin User: yes
3) Admin user to create: admin@www.ejemplo.lan
** 4) Admin Password UNSET
5) Enable automated spam training: yes
6) Spam training user: spam.fig77lxqx@www.ejemplo.lan
7) Non-spam(Ham) training user: ham.sb8zipfq@www.ejemplo.lan
8) Global Documents Account: wiki@www.ejemplo.lan
9) SMTP host: zimbra6.www.ejemplo
10) Web server HTTP port: 80
11) Web server HTTPS port: 443
12) Web server mode: http
13) IMAP server port: 143
14) IMAP server SSL port: 993
15) POP server port: 110
16) POP server SSL port: 995
17) Use spell check server: yes
18 ) Spell server URL: http://zimbra6.www.ejemplo:7780/aspell.php
19) Configure for use with mail proxy: FALSE
20) Configure for use with web proxy: FALSE
21) Enable version update checks: TRUE
22) Enable version update notifications: TRUE
23) Version update notification email: admin@www.ejemplo.lan
24) Version update source email: admin@www.ejemplo.lan
Select, or ‘r’ for previous menu [r] 4
12. Ahora es necesario seleccionar la opción 4, es decir, es este paso se debe asignar la contraseña para el administrador del servidor Zimbra. Así mismo es necesario regresar al menú principal para finalizar la configuración del paquete.
Password for admin@www.ejemplo.lan (min 6 characters): [123456]
Store configuration
1) Status: Enabled
2) Create Admin User: yes
3) Admin user to create: admin@www.wjwmplo.lan
4) Admin Password set
5) Enable automated spam training: yes
6) Spam training user: spam.fig77lxqx@www.ejemplo.lan
7) Non-spam(Ham) training user: ham.sb8zipfq@www.ejemplo.lan
8 ) Global Documents Account: wiki@www.ejemplo.lan
9) SMTP host: zimbra6.ejemplo.lan
10) Web server HTTP port: 80
11) Web server HTTPS port: 443
12) Web server mode: http
13) IMAP server port: 143
14) IMAP server SSL port: 993
15) POP server port: 110
16) POP server SSL port: 995
17) Use spell check server: yes
18 ) Spell server URL: http://zimbra6.www.ejemplo:7780/aspell.php
19) Configure for use with mail proxy: FALSE
20) Configure for use with web proxy: FALSE
21) Enable version update checks: TRUE
22) Enable version update notifications: TRUE
23) Version update notification email: admin@www.ejemplo.lan
24) Version update source email: admin@www.ejemplo.lan
Select, or ‘r’ for previous menu [r] r
13. Como se expuso en el paso número 10 de esta sección, una parte de las opciones del menú principal son las siguientes:
Main menu
1) Common Configuration:
2) zimbra-ldap: Enabled
3) zimbra-store: Enabled
4) zimbra-mta: Enabled
5) zimbra-snmp: Enabled
6) zimbra-logger: Enabled
7) zimbra-spell: Enabled
8) Default Class of Service Configuration:
r) Start servers after configuration
s) Save config to file
x) Expand menu
q) Quit
*** CONFIGURATION COMPLETE – press ‘a’ to apply
14. Por último , para terminar la configuración y por consiguiente inicializar el servidor de correo, es necesario llevar a cabo los pasos siguientes:
Select from menu, or press ‘a’ to apply config (? – help) a
Save configuration data to a file? [Yes]
Save config in file: [/opt/zimbra/config.11347]
Saving config in /opt/zimbra/config.11347…done.
The system will be modified – continue? [No] yes
Operations logged to /tmp/zmsetup.11242009-193550.log
Setting local config values…done.
Setting up CA…done.
Deploying CA to /opt/zimbra/conf/ca …done.
Creating SSL certificate…done.
Installing mailboxd SSL certificates…done.
Initializing ldap…done.
Setting replication password…done.
Setting Postfix password…done.
Setting amavis password…done.
Setting nginx password…done.
Creating server entry for zimbra6.www.ejemplo…done.
Saving CA in ldap …done.
Saving SSL Certificate in ldap …done.
Setting spell check URL…done.
Setting service ports on zimbra6.www.ejemplo…done.
Adding zimbra6.www.ejemplo to zimbraMailHostPool in default COS…done.
Installing webclient skins…
yahoo…done.
sky…done.
bones…done.
lemongrass…done.
hotrod…done.
goldrush…done.
steel…done.
beach…done.
lavender…done.
zmail…done.
bare…done.
sand…done.
waves…done.
Finished installing webclient skins.
Setting zimbraFeatureIMEnabled=FALSE…done.
Setting zimbraFeatureTasksEnabled=TRUE…done.
Setting zimbraFeatureBriefcasesEnabled=TRUE…done.
Setting zimbraFeatureNotebookEnabled=TRUE…done.
Setting MTA auth host…done.
Setting TimeZone Preference…done.
Initializing mta config…done.
Setting services on zimbra6.www.ejemplo…done.
Creating domain www.ejemplo.lan…done.
Setting default domain name…done.
Creating domain www.ejemplo.lan…done.
Setting default domain name…done.
Creating domain www.ejemplo.lan…already exists.
Creating admin account admin@www.ejemplo.lan…done.
Creating root alias…done.
Creating postmaster alias…done.
Creating user wiki@www.ejemplo.lan…done.
Creating user spam.fig77lxqx@www.ejemplo.lan…done.
Creating user ham.sb8zipfq@www.ejemplo.lan…done.
Setting spam training accounts…done.
Initializing store sql database…done.
Setting zimbraSmtpHostname for zimbra6.mi.dominio…done.
Configuring SNMP…done.
Checking for default IM conference room…not present.
Initializing default IM conference room…done.
Setting up syslog.conf…updateSyslog: Updating /etc/rsyslog.conf….done.
done.
You have the option of notifying Zimbra of your installation.
This helps us to track the uptake of the Zimbra Collaboration Suite.
The only information that will be transmitted is:
The VERSION of zcs installed (6.0.7_GA_2473.DEBIAN5_32)
The ADMIN EMAIL ADDRESS created (admin@www.ejemplo.lan)
Notify Zimbra of your installation? [Yes]
Notifying Zimbra of installation via http://www.zimbra.com/cgi-bin/notify.cgi?VER= 6.0.7_GA_2473.DEBIAN5_32&MAIL=admin@www.ejemplo.lan
Notification complete
Starting servers…done.
Installing common zimlets…
com_zimbra_ymemoticons…done.
com_zimbra_url…done.
com_zimbra_local…done.
com_zimbra_email…
Sin mas comentarios los comandos para configurar la suite de Zimbra son los siguientes:
1. Primeramente se debe eliminar el paquete exim4 de nuestro sistema.
apt-get remove –-purge exim4 exim4-base exim4-config exim4-daemon-light
2. Anadir las siguientes lineas al archivo /etc/hosts con los siguientes comandos:
echo 127.0.0.1 www.ejemplo.lan debian >>/etc/hosts // Segunda // línea del archivo
echo 192.168.1.100 www.ejemplo.lan debian >>/etc/hosts // Ultima // línea del archivo
NOTA: después del nombre de dominio la palabra “debian” se refiere al nombre de la maquina en la cual se está configurando el servicio.
3 . Instalar las siguientes dependencias y de paso editar el archivo resolv.conf indicando el nombre de dominio y el servidor DNS correspondiente. El archivo queda de la siguiente manera:
search ejemplo.lan
nameserver 127.0.0.1
apt-get install libc6-i686 sudo libidn11 curl fetchmail libgmp3c2 libexpat1 libgtopt-mixed-perl libxml2 listdc++6 libpcre3 libltdl3 ssh
4. Descargar el paquete zcs-6.0.7_GA_2473.DEBIAN5.20100616212143.tgz de la página http://www.zimbra.com/downloads/os-downloads.html y colocarlo en el directorio /usr/src del sistema.
5. Descomprimir el mismo con el comando:
tar –zxvf zcs-6.0.7_GA_2473.DEBIAN5.20100616212143.tgz
6. Ahora es necesario ejecutar el script install.sh que se encuentra dentro del directorio del programa que crea por default el comando antes citado; dicha instrucción despliega lo siguiente:
./install.sh
Operations logged to /tmp/install.log.5437
Checking for existing installation…
zimbra-ldap…NOT FOUND
zimbra-logger…NOT FOUND
zimbra-mta…NOT FOUND
zimbra-snmp…NOT FOUND
zimbra-store…NOT FOUND
zimbra-apache…NOT FOUND
zimbra-spell…NOT FOUND
zimbra-convertd…NOT FOUND
zimbra-memcached…NOT FOUND
zimbra-proxy…NOT FOUND
zimbra-archiving…NOT FOUND
zimbra-cluster…NOT FOUND
zimbra-core…NOT FOUND
PLEASE READ THIS AGREEMENT CAREFULLY BEFORE USING THE SOFTWARE.
ZIMBRA, INC. (“ZIMBRA”) WILL ONLY LICENSE THIS SOFTWARE TO YOU IF YOU
FIRST ACCEPT THE TERMS OF THIS AGREEMENT. BY DOWNLOADING OR INSTALLING
THE SOFTWARE, OR USING THE PRODUCT, YOU ARE CONSENTING TO BE BOUND BY
THIS AGREEMENT. IF YOU DO NOT AGREE TO ALL OF THE TERMS OF THIS
AGREEMENT, THEN DO NOT DOWNLOAD, INSTALL OR USE THE PRODUCT.
License Terms for the Zimbra Collaboration Suite:
http://www.zimbra.com/license/zimbra_public_eula_2.1.html
Press Return to continue
Checking for prerequisites…
FOUND: NPTL
FOUND: sudo-1.6.9p17-2
FOUND: libidn11-1.8+20080606-1
FOUND: libpcre3-7.6-2.1
FOUND: libgmp3c2-2:4.2.2+dfsg-3
FOUND: libexpat1-2.0.1-4+lenny1
FOUND: libstdc++6-4.3.2-1.1
FOUND: libstdc++5-1:3.3.6-18
FOUND: libperl5.10-5.10.0-19lenny2
Checking for suggested prerequisites…
FOUND: perl-5.10.0
FOUND: sysstat
Prerequisite check complete.
Checking for installable packages
Found zimbra-core
Found zimbra-ldap
Found zimbra-logger
Found zimbra-mta
Found zimbra-snmp
Found zimbra-store
Found zimbra-apache
Found zimbra-spell
Found zimbra-memcached
Found zimbra-proxy
Select the packages to install
7. Hasta este punto el paquete Zimbra presenta la opción de seleccionar los componentes a instalar; así mismo para efectos de este trabajo, únicamente se deben marcar los siguientes:
Install zimbra-ldap [Y] Y
Install zimbra-logger [Y]
Install zimbra-mta [Y]
Install zimbra-snmp [Y]
Install zimbra-store [Y]
Install zimbra-apache [Y]
Install zimbra-spell [Y]
Install zimbra-memcached [N]
Install zimbra-proxy [N]
Checking required space for zimbra-core
checking space for zimbra-store
Installing:
zimbra-core
zimbra-ldap
zimbra-logger
zimbra-mta
zimbra-snmp
zimbra-store
zimbra-apache
zimbra-spell
The system will be modified. Continue? [N] Y
8. Después seleccionar la lista de lo antes citado el programa advierte que nuestro sistema va a ser modificado; así mismo para comenzar la instalación le indicamos que sí. La información desplegada es la de abajo:
Removing /opt/zimbra
Removing zimbra crontab entry…done.
Cleaning up zimbra init scripts…done.
Cleaning up /etc/ld.so.conf…done.
Cleaning up /etc/security/limits.conf…done.
Finished removing Zimbra Collaboration Suite.
Installing packages
zimbra-core……zimbra-core_6.0.3_GA_1915.DEBIAN5_64_amd64.deb…done
zimbra-ldap……zimbra-ldap_6.0.3_GA_1915.DEBIAN5_64_amd64.deb…done
zimbra-logger……zimbra-logger_6.0.3_GA_1915.DEBIAN5_64_amd64.deb…done
zimbra-mta……zimbra-mta_6.0.3_GA_1915.DEBIAN5_64_amd64.deb…done
zimbra-snmp……zimbra-snmp_6.0.3_GA_1915.DEBIAN5_64_amd64.deb…done
zimbra-store……zimbra-store_6.0.3_GA_1915.DEBIAN5_64_amd64.deb…done
zimbra-apache……zimbra-apache_6.0.3_GA_1915.DEBIAN5_64_amd64.deb…done
zimbra-spell……zimbra-spell_6.0.3_GA_1915.DEBIAN5_64_amd64.deb…done
Operations logged to /tmp/zmsetup.11242009-193550.log
Installing LDAP configuration database…done.
Setting defaults…
DNS ERROR resolving MX for zimbra6.mi.dominio
It is suggested that the domain name have an MX record configured in DNS
Change domain name? [Yes] Yes
9. En este apartado se debe poner el nombre de dominio de nuestra red local; en este caso y para efectos de este ejemplo escribimos www.ejemplo.lan. El ejemplo queda como sigue:
Create domain: [zimbra6.mi.dominio] www.ejemplo.lan
It is suggested that the domain name have an MX record configured in DNS
Re-Enter domain name? [Yes] n
done.
10. A continuación se presentan los menús de configuración del paquete ya instalado; así mismo, es recomendable asignar la contraseña de root para la administración del mismo. En los siguientes pasos se muestra como se lleva a cabo dicho propósito:
Checking for port conflicts
Main menu
1) Common Configuration:
2) zimbra-ldap: Enabled
3) zimbra-store: Enabled
+Create Admin User: yes
+Admin user to create: admin@www.ejemplo.lan
******* +Admin Password UNSET
+Enable automated spam training: yes
+Spam training user: spam.fig77lxqx@www.ejemplo.lan
+Non-spam(Ham) training user: ham.sb8zipfq@www.ejemplo.lan
+Global Documents Account: wiki@ www.ejemplo.lan
+SMTP host: zimbra6. www.ejemplo
+Web server HTTP port: 80
+Web server HTTPS port: 443
+Web server mode: http
+IMAP server port: 143
+IMAP server SSL port: 993
+POP server port: 110
+POP server SSL port: 995
+Use spell check server: yes
+Spell server URL: http://zimbra6.www.ejemplo:7780/aspell.php
+Configure for use with mail proxy: FALSE
+Configure for use with web proxy: FALSE
+Enable version update checks: TRUE
+Enable version update notifications: TRUE
+Version update notification email: admin@www.ejemplo.lan
+Version update source email: admin@www.ejemplo.lan
4) zimbra-mta: Enabled
5) zimbra-snmp: Enabled
6) zimbra-logger: Enabled
7) zimbra-spell: Enabled
8 ) Default Class of Service Configuration:
r) Start servers after configuration yes
s) Save config to file
x) Expand menu
q) Quit
Address unconfigured (**) items (? – help) 3
11. Elegimos la opción 3 y pulsamos la tecla entrar. Aparece lo siguiente:
Store configuration
1) Status: Enabled
2) Create Admin User: yes
3) Admin user to create: admin@www.ejemplo.lan
** 4) Admin Password UNSET
5) Enable automated spam training: yes
6) Spam training user: spam.fig77lxqx@www.ejemplo.lan
7) Non-spam(Ham) training user: ham.sb8zipfq@www.ejemplo.lan
8) Global Documents Account: wiki@www.ejemplo.lan
9) SMTP host: zimbra6.www.ejemplo
10) Web server HTTP port: 80
11) Web server HTTPS port: 443
12) Web server mode: http
13) IMAP server port: 143
14) IMAP server SSL port: 993
15) POP server port: 110
16) POP server SSL port: 995
17) Use spell check server: yes
18 ) Spell server URL: http://zimbra6.www.ejemplo:7780/aspell.php
19) Configure for use with mail proxy: FALSE
20) Configure for use with web proxy: FALSE
21) Enable version update checks: TRUE
22) Enable version update notifications: TRUE
23) Version update notification email: admin@www.ejemplo.lan
24) Version update source email: admin@www.ejemplo.lan
Select, or ‘r’ for previous menu [r] 4
12. Ahora es necesario seleccionar la opción 4, es decir, es este paso se debe asignar la contraseña para el administrador del servidor Zimbra. Así mismo es necesario regresar al menú principal para finalizar la configuración del paquete.
Password for admin@www.ejemplo.lan (min 6 characters): [123456]
Store configuration
1) Status: Enabled
2) Create Admin User: yes
3) Admin user to create: admin@www.wjwmplo.lan
4) Admin Password set
5) Enable automated spam training: yes
6) Spam training user: spam.fig77lxqx@www.ejemplo.lan
7) Non-spam(Ham) training user: ham.sb8zipfq@www.ejemplo.lan
8 ) Global Documents Account: wiki@www.ejemplo.lan
9) SMTP host: zimbra6.ejemplo.lan
10) Web server HTTP port: 80
11) Web server HTTPS port: 443
12) Web server mode: http
13) IMAP server port: 143
14) IMAP server SSL port: 993
15) POP server port: 110
16) POP server SSL port: 995
17) Use spell check server: yes
18 ) Spell server URL: http://zimbra6.www.ejemplo:7780/aspell.php
19) Configure for use with mail proxy: FALSE
20) Configure for use with web proxy: FALSE
21) Enable version update checks: TRUE
22) Enable version update notifications: TRUE
23) Version update notification email: admin@www.ejemplo.lan
24) Version update source email: admin@www.ejemplo.lan
Select, or ‘r’ for previous menu [r] r
13. Como se expuso en el paso número 10 de esta sección, una parte de las opciones del menú principal son las siguientes:
Main menu
1) Common Configuration:
2) zimbra-ldap: Enabled
3) zimbra-store: Enabled
4) zimbra-mta: Enabled
5) zimbra-snmp: Enabled
6) zimbra-logger: Enabled
7) zimbra-spell: Enabled
8) Default Class of Service Configuration:
r) Start servers after configuration
s) Save config to file
x) Expand menu
q) Quit
*** CONFIGURATION COMPLETE – press ‘a’ to apply
14. Por último , para terminar la configuración y por consiguiente inicializar el servidor de correo, es necesario llevar a cabo los pasos siguientes:
Select from menu, or press ‘a’ to apply config (? – help) a
Save configuration data to a file? [Yes]
Save config in file: [/opt/zimbra/config.11347]
Saving config in /opt/zimbra/config.11347…done.
The system will be modified – continue? [No] yes
Operations logged to /tmp/zmsetup.11242009-193550.log
Setting local config values…done.
Setting up CA…done.
Deploying CA to /opt/zimbra/conf/ca …done.
Creating SSL certificate…done.
Installing mailboxd SSL certificates…done.
Initializing ldap…done.
Setting replication password…done.
Setting Postfix password…done.
Setting amavis password…done.
Setting nginx password…done.
Creating server entry for zimbra6.www.ejemplo…done.
Saving CA in ldap …done.
Saving SSL Certificate in ldap …done.
Setting spell check URL…done.
Setting service ports on zimbra6.www.ejemplo…done.
Adding zimbra6.www.ejemplo to zimbraMailHostPool in default COS…done.
Installing webclient skins…
yahoo…done.
sky…done.
bones…done.
lemongrass…done.
hotrod…done.
goldrush…done.
steel…done.
beach…done.
lavender…done.
zmail…done.
bare…done.
sand…done.
waves…done.
Finished installing webclient skins.
Setting zimbraFeatureIMEnabled=FALSE…done.
Setting zimbraFeatureTasksEnabled=TRUE…done.
Setting zimbraFeatureBriefcasesEnabled=TRUE…done.
Setting zimbraFeatureNotebookEnabled=TRUE…done.
Setting MTA auth host…done.
Setting TimeZone Preference…done.
Initializing mta config…done.
Setting services on zimbra6.www.ejemplo…done.
Creating domain www.ejemplo.lan…done.
Setting default domain name…done.
Creating domain www.ejemplo.lan…done.
Setting default domain name…done.
Creating domain www.ejemplo.lan…already exists.
Creating admin account admin@www.ejemplo.lan…done.
Creating root alias…done.
Creating postmaster alias…done.
Creating user wiki@www.ejemplo.lan…done.
Creating user spam.fig77lxqx@www.ejemplo.lan…done.
Creating user ham.sb8zipfq@www.ejemplo.lan…done.
Setting spam training accounts…done.
Initializing store sql database…done.
Setting zimbraSmtpHostname for zimbra6.mi.dominio…done.
Configuring SNMP…done.
Checking for default IM conference room…not present.
Initializing default IM conference room…done.
Setting up syslog.conf…updateSyslog: Updating /etc/rsyslog.conf….done.
done.
You have the option of notifying Zimbra of your installation.
This helps us to track the uptake of the Zimbra Collaboration Suite.
The only information that will be transmitted is:
The VERSION of zcs installed (6.0.7_GA_2473.DEBIAN5_32)
The ADMIN EMAIL ADDRESS created (admin@www.ejemplo.lan)
Notify Zimbra of your installation? [Yes]
Notifying Zimbra of installation via http://www.zimbra.com/cgi-bin/notify.cgi?VER= 6.0.7_GA_2473.DEBIAN5_32&MAIL=admin@www.ejemplo.lan
Notification complete
Starting servers…done.
Installing common zimlets…
com_zimbra_ymemoticons…done.
com_zimbra_url…done.
com_zimbra_local…done.
com_zimbra_email…
viernes, 9 de marzo de 2012
zimbra espanol
http://wiki.zimbra.com/index.php?title=Translations
http://www.zimbra.com/forums/spanish/48767-instalacion-zimbra-desde-cero-para-novatos.html
http://www.zimbra.com/forums/spanish/48767-instalacion-zimbra-desde-cero-para-novatos.html
jueves, 8 de marzo de 2012
apt-mirror
http://gnodebian.blogspot.com/2012/01/crea-tu-propio-repositorio-debianubuntu.html
root@repositori:~# apt-get install apt-mirror
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias
Leyendo la información de estado... Hecho
Se instalarán los siguientes paquetes NUEVOS:
apt-mirror0 actualizados, 1 se instalarán, 0 para eliminar y 48 no actualizados.
Necesito descargar 14,8kB de archivos.
Se utilizarán 127kB de espacio de disco adicional después de esta operación.
Des:1 http://es.archive.ubuntu.com/ubuntu/ lucid/universe apt-mirror 0.4.7-0ubuntu1 [14,8kB]
Descargados 14,8kB en 0s (17,8kB/s)
Seleccionando el paquete apt-mirror previamente no seleccionado.(Leyendo la base de datos ... 00%
42967 ficheros y directorios instalados actualmente.)
Desempaquetando apt-mirror (de .../apt-mirror_0.4.7-0ubuntu1_all.deb) ...
Procesando disparadores para man-db ...
Configurando apt-mirror (0.4.7-0ubuntu1) ...
Con
esto ya tenemos el apt-mirror instalado. Ahora tendremos que configurar
el archivo de configuración del apt-mirror para decirle lo que queremos
replicar y donde lo queremos bajar.
#MAVERICK#
deb http://es.archive.ubuntu.com/ubuntu maverick main restricted universe multiverse
deb http://es.archive.ubuntu.com/ubuntu maverick-security main restricted universe multiverse
deb http://es.archive.ubuntu.com/ubuntu maverick-updates main restricted universe multiverse
#deb http://es.archive.ubuntu.com/ubuntu maverick-proposed main restricted universe multiverse
#deb http://es.archive.ubuntu.com/ubuntu maverick-backports main restricted universe multiverse
deb-src http://es.archive.ubuntu.com/ubuntu maverick main restricted universe multiverse
deb-src http://es.archive.ubuntu.com/ubuntu maverick-security main restricted universe multiverse
deb-src http://es.archive.ubuntu.com/ubuntu maverick-updates main restricted universe multiverse
#deb-src http://es.archive.ubuntu.com/ubuntu maverick-proposed main restricted universe multiverse
#deb-src http://es.archive.ubuntu.com/ubuntu maverick-backports main restricted universe multiverse
Con esto, se bajará el repositorio de la distribución Maverick (10.10) en /var/spool/apt-mirror/mirror .
Si queremos que cada noche se sincronice, podemos modificar la entrada en /etc/cront.d/apt-mirror descomentando la linea que existe para quedar de esta manera:
0 4 * * * apt-mirror /usr/bin/apt-mirror > /var/spool/apt-mirror/var/cron.logDe esta manera, cada dia a las 4 de la mañana se sincronizará el repositorio.
Bien,
ahora quedará que el repositorio que hemos bajado sea accesible. Para
que sea accesible instalaremos un servidor web (apache2) y crearemos un
enlace a nuestro recien replicado repositorio:
root@repositori:~# apt-get install apache2Un vez hecho esto, ya podremos crear un enlace a nuestro repositorio:
ln -s /var/spool/apt-mirror/mirror/es.archive.ubuntu.com/ubuntu /var/www/ubuntu
Si
ahora vamos a nuestro firefox y tecleamos http://localhost/ubuntu
veremos el repositorio y por tanto ya tendremos creado un repositorio de
Ubuntu, replicado del oficial y accesible.
Ahora sólo quedará que los equipos clientes accedan a él. Para ello modificaremos nuestro /etc/apt/sources.list:
deb http://192.168.1.10/ubuntu/ lucid main restricted(etc...)
(192.168.1.10 es un ejemplo en donde se reflejaria nuestra IP local en donde hemos replicado el repositorio).
Alguna vez veremos que nuestro apt-mirror nos da un error:
apt-mirror is already running , exiting at /usr/bin/apt-mirror line 187.
Para arreglarlo basta con borrar un archivo:rm /var/spool/apt-mirror/var/apt-mirror.lock
martes, 6 de marzo de 2012
Host Email and Calendars with Zimbra 6 on Debian 6 (Squeeze)
Host Email and Calendars with Zimbra 6 on Debian 6 (Squeeze)
Published: Tuesday, February 15th, 2011 by Phil Paradis
Zimbra is a groupware system that provides email, calendaring, integrated antivirus
and spam filtering, and more for multiple domains. Available in several editions, this
guide will help you get Zimbra Collaboration Suite - Open Source Edition installed
on your Debian 6 (Squeeze) Linux VPS.Please note that Zimbra is a fairly "heavy" (resource-intensive) product compared to some other groupware offerings. We recommend a Linode 2048 or higher for best results; you may encounter issues using Zimbra with plans with less resources. Additionally, note that Zimbra works best as a standalone product on your VPS; installation alongside other software is not advised. Zimbra is deprecating support for 32-bit systems, and therefore it is assumed you have deployed the 64-bit version of Debian 6. If this is not the case, you will want to redeploy with the 64-bit version before continuing. All configuration will be performed through the terminal; please make sure you're logged into your Linode as root via SSH.
Please note that as of this writing, Zimbra is not officially supported on Debian 6. The software should function as expected, but your support options may be limited by choosing to install it on Debian 6. If this is a concern for you, you may wish to consider following our Debian 5 (Lenny) Zimbra guide instead.
Contents
Basic System Configuration
Issue the following commands to set your system hostname, substituting a unique value for "plato."echo "plato" > /etc/hostname hostname -F /etc/hostnameEdit your /etc/hosts file to resemble the following, substituting your Linode's public IP address for 12.34.56.78, your hostname for "plato," and your primary domain name for "example.com." :
File:/etc/hosts
127.0.0.1 localhost.localdomain localhost
12.34.56.78 plato.example.com plato
Install Prerequisite Packages
Make sure your package repositories and installed programs are up to date by issuing the following commands:apt-get update apt-get upgrade --show-upgradedIssue the following commands to install several packages required by Zimbra:
apt-get install sudo libpcre3 libgmp3c2 lib32gmp3-dev libgmp3-dev sysstat libexpat1 libidn11 perl-modules wget lzmaDepending on the requirements for the current version of Zimbra, you may need to install additional packages later. The install program will notify you if additional packages are required.
Install Zimbra
Visit the download page for Zimbra Open Source Edition and copy the link to the current version of the software for Debian 5 (Lenny) to your clipboard (unless there is a new link for Debian 6, in which case you should use that instead). Issue the following commands on your Linode via the shell to download and unpack the install package, replacing the filenames shown below after wget and tar with the current version. Please note that the version you download (32 or 64-bit) must match your Linode's architecture.wget http://files2.zimbra.com/downloads/6.0.10_GA/zcs-6.0.10_GA_2692.DEBIAN5.20101215161423.tgz tar -xzvf zcs* cd zcs*Edit the file util/utilfunc.sh. Search for the first instance of the following line:
File excerpt:util/utilfunc.sh
PREREQ_PACKAGES="sudo libidn11 libgmp3 libstdc++6"
File excerpt:util/utilfunc.sh
PREREQ_PACKAGES="sudo libidn11 libgmp3c2 libstdc++6"
wget http://security.ubuntu.com/ubuntu/pool/main/d/dpkg/dpkg_1.15.5.6ubuntu4.5_amd64.deb wget http://security.ubuntu.com/ubuntu/pool/main/d/dpkg/dpkg_1.15.5.6ubuntu4.5_i386.debInstall the package with the following command:
dpkg -i dpkg*debLaunch the installer with the following command:
./install.sh --platform-overrideThe install will begin, prompting you to respond to a number of questions, and consuming a moment to perform various tasks. You can safely assume the default configuration. The system will offer the following prompt:
The system will be modified. Continue? [N] YAs noted, answer Y to continue with the installation. The installation will take a few moments to install of the system packages.
After the installation completes, you may receive a warning similar to the one shown below:
DNS ERROR resolving MX for hostname.example.com It is suggested that the domain name have an MX record configured in DNS Change domain name? [Yes] NoYou'll then be presented with an admin menu next.
Main menu 1) Common Configuration: 2) zimbra-ldap: Enabled 3) zimbra-store: Enabled +Create Admin User: yes +Admin user to create: admin@hostname.example.com ******* +Admin Password UNSET +Enable automated spam training: yes +Spam training user: spam.5jdzb7fy@hostname.example.com +Non-spam(Ham) training user: ham.vhdq0mhzo@hostname.example.com +Global Documents Account: wiki@hostname.example.com +SMTP host: hostname.example.com +Web server HTTP port: 80 +Web server HTTPS port: 443 +Web server mode: http +IMAP server port: 143 +IMAP server SSL port: 993 +POP server port: 110 +POP server SSL port: 995 +Use spell check server: yes +Spell server URL: http://hostname.example.com:7780/aspell.php +Configure for use with mail proxy: FALSE +Configure for use with web proxy: FALSE +Enable version update checks: TRUE +Enable version update notifications: TRUE +Version update notification email: admin@hostname.example.com +Version update source email: admin@hostname.example.com 4) zimbra-mta: Enabled 5) zimbra-snmp: Enabled 6) zimbra-logger: Enabled 7) zimbra-spell: Enabled 8) Default Class of Service Configuration: r) Start servers after configuration yes s) Save config to file x) Expand menu q) Quit Address unconfigured (**) items (? - help)Enter "3" to enter the zimbra-store menu, which will look similar to the following:
Store configuration 1) Status: Enabled 2) Create Admin User: yes 3) Admin user to create: admin@hostname.example.com ** 4) Admin Password UNSET 5) Enable automated spam training: yes 6) Spam training user: spam.5jdzb7fy@hostname.example.com 7) Non-spam(Ham) training user: ham.vhdq0mhzo@hostname.example.com 8) Global Documents Account: wiki@hostname.example.com 9) SMTP host: hostname.example.com 10) Web server HTTP port: 80 11) Web server HTTPS port: 443 12) Web server mode: http 13) IMAP server port: 143 14) IMAP server SSL port: 993 15) POP server port: 110 16) POP server SSL port: 995 17) Use spell check server: yes 18) Spell server URL: http://hostname.example.com:7780/aspell.php 19) Configure for use with mail proxy: FALSE 20) Configure for use with web proxy: FALSE 21) Enable version update checks: TRUE 22) Enable version update notifications: TRUE 23) Version update notification email: admin@hostname.example.com 24) Version update source email: admin@hostname.example.com Select, or 'r' for previous menu [r] 4You can configure various options here; but, the most important option is the one for setting the administrator password. Enter "4" to set it, choosing a strong password comprised of letters, numbers, and non-alphanumeric characters. After setting the admin password, enter "r" to return to the main menu. At this point you can enter "a" to apply the configuration that you have set, and follow this procedure. This allows Zimbra to proceed with the remaining installation steps.
Issue the following command to restore your original version of dpkg:
apt-get install dpkgAfter installation has completed, you may wish to reboot your Linode to make sure everything comes back up properly. After doing so, visit the Zimbra admin URL in your browser. It will be in the form https://hostname.example.com:7071/. You'll need to accept the SSL certificate presented to access the admin panel, which you may then use to continue configuring your new Zimbra server.
Once you have configured the server and added accounts, users may log in using a link similar to http://hostname.example.com/zimbra/mail. Enjoy!
Monitor for Software Updates and Security Notices
When running software compiled or installed directly from sources provided by upstream developers, you are responsible for monitoring updates, bug fixes, and security issues. After becoming aware of releases and potential issues, update your software to resolve flaws and prevent possible system compromise. Monitoring releases and maintaining up to date versions of all software is crucial for the security and integrity of a system.Please monitor the Zimbra Updates page to ensure that you are aware of all updates to the software and can upgrade appropriately or apply patches and recompile as needed.
When upstream sources offer new releases, repeat the instructions for installing Zimbra and recompile your software when needed. These practices are crucial for the ongoing security and functioning of your system.
More Information
You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.Zimbra ZCS 6.0 en Debian Squeeze
Zimbra ZCS 6.0 en Debian Squeeze
1.- Se instala un Debian Squeeze usando la instalacion por red con los paquetes minimos requeridos.
2.- Modificamos el archivo /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.1.50 correo.ejemplo.com correo
3.- Modificamos el archivo /etc/hostname
correo.ejemplo.com
4.- Modificamos el archivo debian_version y lo editamos.
correo:~# cat /etc/debian_version
5.0
5.-Añadir al “/etc/sysctl.conf” y luego reiniciar
#disable ipv6
net.ipv6.conf.all.disable_ipv6=1
luego reiniciamos el server
6.- Configuramos el archivo /etc/resolv.conf
Para ello se necesita setear un servidor DNS que contenga una entrada valida del servidor de correo A & MX.
nameserver 192.168.1.100 (servidor dns)
nameserver 208.67.220.220
7.- Se instala los paquetes necesarios:
apt-get install libc6-i686 sudo libidn11 curl fetchmail libgmp3c2
libexpat1 libgetopt-mixed-perl libxml2 libstdc++6 libpcre3 ssh sudo
openssl libgmp3c2 file dns-browse sysstat libltdl7 libltdl-dev
8.- Modificamos el archivo sources.list
mail:~# cat /etc/apt/sources.list
deb http://ftp.debian.org/ lenny main contrib non-free
deb-src http://ftp.debian.org/ lenny main contrib non-free
#aptitude update
Instalamos la siguiente version de perl:
#aptitude install perl=5.10.0-19lenny2
9.- Se obtiene e instala zimbra de su pagina oficial
correo:~/zcs-6.0.8_GA_2661.DEBIAN5.20100820040222# ./install.sh
muestra mensaje
MISSING: libgmp3
Vamos a la carpeta util y editamos el archivo utilfunc.sh y reemplazamos libgmp3 por libgmp3c2
10.- Empezamos a configurar zimbra, para ir terminando la instalacion.
Main menu
1) Common Configuration:
2) zimbra-ldap: Enabled
3) zimbra-store: Enabled
+Create Admin User: yes
+Admin user to create: admin@ejemplo.com
******* +Admin Password UNSET
+Enable automated spam training: yes
+Spam training user: spam.ovlhtoqr@ejemplo.com
+Non-spam(Ham) training user: ham.ujyjybke@ejemplo.com
+Global Documents Account: wiki@ejemplo.com
+SMTP host: correo.ejemplo.com
+Web server HTTP port: 80
+Web server HTTPS port: 443
+Web server mode: http
+IMAP server port: 7143
+IMAP server SSL port: 7993
+POP server port: 7110
+POP server SSL port: 7995
+Use spell check server: yes
+Spell server URL: http://correo.ejemplo.com:7780/aspell.php
4) zimbra-mta: Enabled
5) zimbra-snmp: Enabled
6) zimbra-logger: Enabled
7) zimbra-spell: Enabled
8) zimbra-proxy: Enabled
9) Default Class of Service Configuration:
r) Start servers after configuration yes
s) Save config to file
x) Expand menu
q) Quit
Address unconfigured (**) items (? - help)
En la parte 3 se ve que la opcion no esta seteada, entonces
tecleamos "3" y presionamos enter, para ingresar al siguiente submenu.
Store configuration
1) Status: Enabled
2) Create Admin User: yes
3) Admin user to create: admin@ejemplo.com
** 4) Admin Password UNSET
5) Enable automated spam training: yes
6) Spam training user: spam.ovlhtoqr@ejemplo.com
7) Non-spam(Ham) training user: ham.ujyjybke@ejemplo.com
8) Global Documents Account: wiki@ejemplo.com
9) SMTP host: correo.ejemplo.com
10) Web server HTTP port: 80
11) Web server HTTPS port: 443
12) Web server mode: http
13) IMAP server port: 7143
14) IMAP server SSL port: 7993
15) POP server port: 7110
16) POP server SSL port: 7995
17) Use spell check server: yes
18) Spell server URL: http://correo.ejemplo.com:7780/aspell.php
Select, or 'r' for previous menu [r]
Se ve que la opcion 4 esta como unset(no seteado) tipeamos 4 y luego
enter e ingresamos el password para el admin, luego otra ves presionas
enter para regresar al menu principal.
Main menu
1) Common Configuration:
2) zimbra-ldap: Enabled
3) zimbra-store: Enabled
4) zimbra-mta: Enabled
5) zimbra-snmp: Enabled
6) zimbra-logger: Enabled
7) zimbra-spell: Enabled
8) zimbra-proxy: Enabled
9) Default Class of Service Configuration:
r) Start servers after configuration yes
s) Save config to file
x) Expand menu
q) Quit
*** CONFIGURATION COMPLETE - press 'a' to apply
Tal como dice tipeamos "a" para guardar los cambios.
Select from menu, or press 'a' to apply config (? - help) a
Save configuration data to a file? [Yes] ----> Guardamos la configuracion
Save config in file: [/opt/zimbra/config.6778] ----> por default
Saving config in /opt/zimbra/config.6778...done.
The system will be modified - continue? [No] Y ----> Y para modificarlo
Operations logged to /tmp/zmsetup.12222008-151821.log
.
.
.
Configuration complete - press return to exit
# su zimbra
$ zmcontrol status
Host correo.ejemplo.com
antispam Running
antivirus Running
imapproxy Running
ldap Running
logger Running
mailbox Running
mta Running
snmp Running
spell Running
stats Running
$ zmcontrol start
Host correo.ejemplo.com
Starting logger...Done.
Starting mailbox...Done.
Starting imapproxy...Done.
Starting antispam...Done.
Starting antivirus...Done.
Starting snmp...Done.
Starting spell...Done.
Starting mta...Done.
Starting stats...Done.
Accedemos a esta direccion.
https://ipdelserver:7071/zimbraAdmin/
PD:
a.- Para evitar problemas es bueno tipear estos comandos para ver si se pueden resolver de lo contrario tendremos problemas
host `hostname` <-- Tipearlo tal como esta
dig yourdomain.com mx
dig yourdomain.com any
b.- Al comenzar a configurar el zimbra terminando me salian errores de LDAP, lo que hize fue removerla instalacion y deshabilitar el ipv6
./install.sh -u
Esto removera la instalacion previa del sistema, una vez despues de
realizar los cambios y sus reinicios respectivos recien pude terminar la
instalacion con suceso.
Fuente:
http://muchikon.blogspot.com/search/label/zimbra
http://www.zimbra.com/forums/installation/14789-solved-can-t-start-zimbra-server.html
http://www.zimbra.com/forums/installation/19143-solved-ldap-failed-28928-a.html
http://www.zimbra.com/forums/administrators/7619-domain-name-change.html
http://www.zimbra.com/forums/administrators/17006-change-domain-name-change-aliases.html
http://www.zimbra.com/forums/installation/37282-installation-zcs-6-0-5-open-source-debian-5-amd64-ldap-failure.html
http://www.vmware.com/products/zimbra/
http://www.zimbra.com/downloads/os-downloads.html
http://www.zimbra.com/docs/os/latest/single_server_install/quick_start.1.09.html
viernes, 2 de marzo de 2012
How to Install and Configure PHP 5 to Run with Apache on Windows Set Up PHP 5 for Apache on Windows
How to Install and Configure PHP 5 to Run with Apache on Windows
Set Up PHP 5 for Apache on Windows
Download PHP 5
Before you begin, get a copy of PHP 5 from the PHP download page. In particular, download the VC6 thread-safe zip package from the "Windows Binaries" section — that is, don't get the installer. For example, select the package labelled "PHP 5.2.5 zip package" if 5.2.5 is the current version.
[Update: note that I have not tested the procedure below with any of the PHP 5.3 versions, only with 5.2.5, which was the latest version at the time I originally wrote this. In theory, the procedure should work with later 5.2 versions as well. I'm not sure about 5.3 though. A version jump from 5.2 to 5.3 usually means bigger changes than simple bug fixes. If you want to be sure the procedure below will work, just get the latest of the 5.2 series.]Install PHP 5
Create a folder on your hard disk for PHP. I suggest "c:\php" although you can use other names if you wish. Personally though, I prefer to avoid names with spaces in it, like "c:\Program Files\php" to avoid potential problems with programs that cannot handle such things. I will assume that you used c:\php in this tutorial.
Extract all the files from the zip package into that folder. To do that simply double-click the zip file to open it, and drag all the files and folders to c:\php.
Upgraders: Remove the Old PHP.INI File from Your Windows Directory
If you are upgrading to PHP 5 from an older version, go to your windows directory, typically c:\windows, and delete any php.ini file that you have previously placed there.
Configuring PHP
Go to the c:\php folder and make a copy of the file "php.ini-recommended". Name the new file "php.ini". That is, you should now have a file "c:\php\php.ini", identical in content with "c:\php\php.ini-recommended".
Note: if you are using Apache 1, you should either move the php.ini file to your windows directory, "C:\Windows" on most systems, or configure your PATH environment variable to include "c:\php". If you don't know how to do the latter, just move the php.ini file to the "c:\windows" folder. You do not have to do this if you are using Apache 2, since we will include a directive later in the Apache 2 configuration file to specify the location of the php.ini file.
Use an ASCII text editor (such as Notepad, which can be found in the Accessories folder of your Start menu) to open "php.ini". You may need to make the following changes to the file, depending on your requirements:
Enable Short Open Tags
Search for the line that reads:
short_open_tag = Off
short_open_tag = OnMagic Quotes
By default, input data is not escaped with backslashes. That is, if your visitors enter an inverted comma (single quote) into your web form, the script will receive that unadorned inverted comma (single quote). This is for the most part desirable unless you have special requirements. If you want your input data to have the backslash ("\") prefix, such as, for example, to mimic your web host's settings, search for the following:
magic_quotes_gpc = Offand replace it with:
magic_quotes_gpc = OnDo not do this unless your web host has this setting as well. Even with the setting of "Off", you can still use the addslashes() function in PHP to add the slashes for the specific pieces of data that need them.
Register Globals
A number of older scripts assume that all data sent by a form will automatically have a PHP variable of the same name. For example, if your form has an input field with a name of "something", older PHP scripts assume that the PHP processor will automatically create a variable called $something that contains the value set in that field.
If you are running such scripts, you will need to look for the following field:
register_globals = Offand change it to the following:
register_globals = OnWARNING: Do NOT do this unless you have third party scripts that need it. When writing new scripts, it's best to always code with the assumption that the register_globals item is set to "Off".
Display Errors
On a "live" website, you typically want errors in your script to be silently logged to a PHP error file. On your own local machine, however, while you are testing and debugging a PHP script, it is probably more convenient to have error messages sent to the browser window when they appear. This way, you won't miss errors if you forget to check the error log file.
If you want PHP to display error messages in your browser window, look for the following:
display_errors = OffAnd change it to:
display_errors = OnThis value should always be set to "Off" for a "live" website.
Session Path
If your script uses sessions, look for the following line:
;session.save_path = "/tmp"Thesession.save_path
sets the folder where PHP saves its session files. Since "/tmp" does not exist on Windows, you will need to set it to a directory that does. One way is to create a folder called (say) "c:\tmp" (the way you created c:\php earlier), and point this setting to that folder. If you do that, change the line to the following:
session.save_path = "c:\tmp"Notice that in addition to changing the path, I also removed the semi-colon (";") prefix from the line.
Alternatively, you can find out the current TEMP folder on your computer and use that. Or create a "tmp" folder in your PHP directory, like "c:\php\tmp" and set the configuration file accordingly. The possibilities are endless. If you can't decide, just create "c:\tmp" and do as I said above.SMTP Server
If your script uses the mail() function, and you want the function to successfully send mail on your local machine, look for the following section:
[mail function]Change it to point to your SMTP server and email account. For example, if your SMTP server is "mail.example.com" and your email address is "youremail@example.com", change the code to:
; For Win32 only.
SMTP = localhost
smtp_port = 25
; For Win32 only.
;sendmail_from = me@example.com
[mail function]Note that after you do this, when your script tries to use the mail() function, you will need to be connected to your ISP for the function to succeed. If you do not modify the above lines and attempt to use mail() in your script, the function will return a fail code, and display (or log) the error (depending on how you configure php.ini to handle errors).
SMTP = mail.example.com
smtp_port = 25
sendmail_from = youremail@example.com
(Note that in Apache 1.x, the smtp_port line may not be present. If so, don't include it.)
How to Configure Apache for PHP 5
There are two ways to set up Apache to use PHP: the first is to configure it to load the PHP interpreter as an Apache module. The second is to configure it to run the interpreter as a CGI binary. I will supply information for how you can accomplish both, but you should only implement one of these methods. Choose the module method if your web host also installed PHP as an Apache module, and use the CGI method if they have implemented it to run as a CGI binary.Running PHP 5 as an Apache Module
To configure Apache to load PHP as a module to parse your PHP scripts, use an ASCII text editor to open the Apache configuration file, "httpd.conf". If you use Apache 1.x, the file is found in "c:\Program Files\Apache Group\Apache\conf\". Apache 2.0.x users can find it in "C:\Program Files\Apache Group\Apache2\conf\" while Apache 2.2.x users can find it in "C:\Program Files\Apache Software Foundation\Apache2.2\conf\". Basically, it's in the "conf" folder of wherever you installed Apache.
Search for the section of the file that has a series of "LoadModule" statements. Statements prefixed by the hash "#" sign are regarded as having been commented out.
If you are using Apache 1.x, add the following line after all the LoadModule statements:
LoadModule php5_module "c:/php/php5apache.dll"If you are using Apache 2.0.x, add the following line after all the LoadModule statements:
LoadModule php5_module "c:/php/php5apache2.dll"If you are using Apache 2.2.x, add the following line instead:
LoadModule php5_module "c:/php/php5apache2_2.dll"Note carefully the use of the forward slash character ("/") instead of the traditional Windows backslash ("\"). This is not a typographical error.
If you are using Apache 1.x, search for the series of "AddModule" statements, and add the following line after all of them. You do not have to do this in any of the Apache 2 series of web servers.
AddModule mod_php5.cNext, search for "AddType" in the file, and add the following line after the last "AddType" statement. Do this no matter which version of Apache you are using. For Apache 2.2.x, you can find the "AddType" lines in the <IfModule mime_module> section. Add the line just before the closing </IfModule> for that section.
AddType application/x-httpd-php .phpIf you need to support other file types, like ".phtml", simply add them to the list, like this:
AddType application/x-httpd-php .phtmlFinally, for those using one of the Apache 2 versions, you will need to indicate the location of your PHP ini file. Add the following line to the end of your httpd.conf file.
PHPIniDir "c:/php"Of course if you used a different directory for your PHP installation, you will need to change "c:/php" to that path. Remember to use the forward slash ("/") here again.
If you are using Apache 1, you will have already placed your php.ini file in either the Windows directory or somewhere in your PATH, so PHP should be able to find it by itself. You can of course do the same if you are using Apache 2, but I find modifying the Apache configuration file a better solution than cluttering your c:\windows directory or your PATH variable.
Running PHP 5 as a CGI Binary
If you have configured PHP 5 to run as an Apache module, skip forward to the next section. This section is for those who want to configure PHP to run as a CGI binary.
The procedure is the same whether you are using the Apache 1.x series or one of the 2.x series.
Search for the portion of your Apache configuration file which has the ScriptAlias section. Add the line from the box below immediately after the ScriptAlias line for "cgi-bin". If you use Apache 2.2.x, make sure that the line goes before the closing </IfModule> for that <IfModule alias_module> section.
Note that if you installed PHP elsewhere, such as "c:\Program Files\php\", you should substitute the appropriate path in place of "c:/php/" (for example, "c:/Program Files/php/"). Observe carefully that I used forward slashes ("/") instead of the usual Windows backslashes ("\") below. You will need to do the same.
ScriptAlias /php/ "c:/php/"Apache needs to be configured for the PHP MIME type. Search for the "AddType" comment block explaining its use, and add the AddType line in the box below after it. For Apache 2.2.x, you can find the AddType lines in the <IfModule mime_module> section. Add the following line just before the closing </IfModule> for that section.
AddType application/x-httpd-php .phpAs in the case of running PHP as an Apache module, you can add whatever extensions you want Apache to recognise as PHP scripts, such as:
AddType application/x-httpd-php .phtmlNext, you will need to tell the server to execute the PHP executable each time it encounters a PHP script. Add the following somewhere in the file, such as after the comment block explaining "Action". If you use Apache 2.2.x, you can simply add it immediately after your "AddType" statement above; there's no "Action" comment block in Apache 2.2.x.
Action application/x-httpd-php "/php/php-cgi.exe"Note: the "/php/" portion will be recognised as a ScriptAlias, a sort of macro which will be expanded to "c:/php/" (or "c:/Program Files/php/" if you installed PHP there) by Apache. In other words, don't put "c:/php/php.exe" or "c:/Program Files/php/php.exe" in that directive, put "/php/php-cgi.exe".
If you are using Apache 2.2.x, look for the following section in the httpd.conf file:
<Directory "C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin">Add the following lines immediately after the section you just found.
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
<Directory "C:/php">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>Configuring the Default Index Page
This section applies to all users, whether you are using PHP as a module or as a CGI binary.
If you create a file index.php, and want Apache to load it as the directory index page for your website, you will have to add another line to the "httpd.conf" file. To do this, look for the line in the file that begins with "DirectoryIndex" and add "index.php" to the list of files on that line. For example, if the line used to be:
DirectoryIndex index.htmlchange it to:
DirectoryIndex index.php index.htmlThe next time you access your web server with just a directory name, like "localhost" or "localhost/directory/", Apache will send whatever your index.php script outputs, or if index.php is not available, the contents of index.html.
Restart the Apache Web Server
Restart your Apache server. This is needed because Apache needs to read the new configuration directives for PHP that you have placed into the httpd.conf file. The Apache 2.2 server can be restarted by doubleclicking the Apache Service Monitor system tray icon, and when the window appears, clicking the "Restart" button.Testing Your PHP Installation
Create a PHP file with the following line:
<?php phpinfo(); ?>
Save the file as "test.php" or any other name that you fancy, but with
the ".php" extension, into your Apache htdocs directory. If you are
using Notepad, remember to save as "test.php" with the quotes, or the software will add a ".txt" extension behind your back.
Suscribirse a:
Entradas (Atom)