Herramientas de usuario

Herramientas del sitio


notas:start

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Ambos lados, revisión anteriorRevisión previa
Próxima revisión
Revisión previa
notas:start [2014/01/08 18:55] – [Sistema Operativo] cayunotas:start [Fecha desconocida] (actual) – borrado - editor externo (Fecha desconocida) 127.0.0.1
Línea 1: Línea 1:
-====== Notas ====== 
  
-<diagram> 
-| | | XXX |-| SGU |XXX=[[notas:start|Notas]]\\ Notas cortas \\ cosas que no se donde poner etc.|SGU=[[notas:seguridad|Seguridad]]\\ Notas de Seguridad 
-| | |  :  | : | 
-| | |  :  | L |KKK |-| KXN |KKK=[[notas:kickstart|Kickstart]]|KXN=[[notas:kickstart_xen|Kickstart+XEN]] 
-| | |  :  | : | 
-| | |  :  | L | UBX |UBX=[[notas:Ubuntu DomU en Red Hat]] 
-| | |  :  | : | 
-| | |  :  | L | CSY |CSY=[[notas:Inicio rapido de Csync2]] \\ Sincronizar configuracion 
-| | |  :  | 
-| | |  L  |-| LLL |LLL=[[notas:syslog_centralizado|Syslog Centralizado]] 
-| | |  :  |  
-| | |  L  |-| AST |AST=[[notas:asterisk|Asterisk]] \\ Sistema de telefonia IP 
-| | |  :  | |  :  | 
-| | |  :  | |  L  | TDM |TDM=[[notas:asterisk_tdm400p|TDM 400P]] \\ Placa FX0 FXS 
-| | |  :  | |      
-| | |  L  |-| KML |KML=[[notas:kamailio|Kamailio]] \\ Gateway SIP 
-| | |  :  | |      
-| | |  L  | SYD |SYD=[[notas:sysinfo_dokuwiki|Script Sysinfo Dokuwiki]] \\ Documenta los equipos con Dokuwiki 
-| | |  :  | |      
-| | |  L  |-| ENM |ENM=[[notas:enomalism|Enomalism]] \\ GUI para Xen 
-| | |  :  | 
-| | |  L  |-| BRX |BRX=[[notas:xen_multi_bridge|Xen multi bridge]] \\ Agregar multiples placas de red a Xen 
-| | |  :  | 
-| | |  L  |-| LDP |LDP=[[notas:openldap|OpenLDAP]] \\ Configurar, asignar politicas 
-| | |  :  | | 
-| | |  L  |-| IPT |IPT=[[notas:iptables|Iptables]] \\ Uso simple de reglas 
-| | |  :  | | 
-| | |  L  |-| APH |APH=[[notas:apache|Apache]] \\ Tips de apache 
-| | |  :  | | 
-| | |  L  |-| SSH |SSH=[[notas:openssh|OpenSSH]] \\ Tips de SSH 
-| | |  :  | | 
-| | |  L  |-| BIND |BIND=[[notas:bind|Bind]] \\ Tips de BIND 
-| | |     | | 
-| | |  L  |-| SQUID |-| RHCS |SQUID=[[notas:squid|Squid]] \\ Cosas varias sobre Squid |RHCS=[[notas:squid:rhcs|Red Hat Cluster Suite]] \\ Alta disponibilidad de Squid con RHCS 
-| | |     | | | : | 
-| | |  :  | | | L |-| SHBT |SHBT=[[notas:squid:hearbeat|Alta disponibilidad con Hearbeat]] \\ Alta disponibilidad de Squid con Hearbeat 
-| | |  :  | | 
-| | |  L  |-| BDB |-| TVI |-| TSH |-| TIVT |BDB=[[notas:bases_de_datos|Base de Datos]] \\ Cosas varias sobre Base de Datos|TVI=[[notas:bases_de_datos:SQL for Tivoli Storage Manager]] \\ Useful SQL Statements for TSM |TSH=[[notas:bases_de_datos:TSM SQL Hints]]|TIVT=[[notas:bases_de_datos:TSM SQL Tips]] 
-| | |  :  | | 
-| | |  L  |-| GPG |GPG=[[notas:gnupg|GNU Privacy Guard]] \\ Cosas varias sobre GPG y un tutorial 
-| | |  :  | | 
-| | |  L  |-| SSL |SSL=[[notas:openssl|OpenSSL]] \\ Tips de OpenSSL y manejo de certificados 
-| | |  :  | | 
-| | |  L  |-| PRG |-| STC |-| VLG |PRG=[[notas:programacion|Programación]]|STC=[[notas:strace|Strace]] \\ Introducción simple a Strace|VLG=[[notas:valgrind|Valgrind]] \\ Introducción simple a Valgrind 
-| | |  :  | | 
-| | |  L  |-| NFS |NFS=[[notas:Compartir archivos por NFS]] 
-| | |  :  | | 
-| | |  L  |-| LINUX |-| UPGRADE_SUSE |LINUX=Linux|UPGRADE_SUSE=[[notas:linux:Actualizar SuSE Linux]] 
-</diagram> 
- 
-===== Hardware ===== 
- 
-==== iDrac Dell ==== 
- 
-IPMI es un estándar que encontramos en el hardware de muchos servidores, se trata de un chipset que permite obtener información del estado de diferentes componentes hardware, temperaturas, voltajes, etc. Este estándar lo conforman empresas como HP, Dell e Intel. 
- 
-Ejemplo de como activarlo desde el SSH de iDrac 6 
- 
-<code> 
-racadm config -g cfgIpmiLan -o cfgIpmiLanEnable 1 
-racadm config -g cfgIpmiLan -o cfgIpmiLanPrivilegeLimit <nivel> 
-</code> 
- 
-donde <nivel> es uno de los siguientes valores: 
-  * 2 (Usuario) 
-  * 3 (Operador) 
-  * 4 (Administrador) 
- 
-Como ver la configuración actual 
- 
-<code> 
-racadm getconfig -g cfgIpmiLan 
-</code> 
- 
-http://support.dell.com/support/edocs/software/smdrac3/idrac/idrac1.11/sp/ug/chap09.htm?~file=/software/smdrac3/idrac/idrac1.11/sp/ug/chap09.htm&~f= 
- 
- 
-Como obtener los datos desde nuestro sistema operativo 
- 
-<code> 
-ipmitool -I lan -H 10.0.0.10 -U user -P pass chassis status 
-ipmitool -I lan -H 10.0.0.10 -U user -P pass sdr list 
-ipmitool -I lan -H 10.0.0.10 -U user -P pass sdr type "Power Supply" 
- 
-Status           | 64h | ok  | 10.1 | Presence detected 
-Status           | 65h | ok  | 10.2 | Presence detected, Power Supply AC lost 
-Status           | 66h | ok  | 10.3 | Presence detected 
-Status           | 67h | ok  | 10.4 | Presence detected 
-PS Redundancy    | 74h | ok  |  7.1 | Redundancy Degraded 
-</code> 
- 
-<code> 
-/usr/sbin/ipmimonitoring -h 10.15.3.107 --config-file /etc/freeipmi.conf -u user -p pass 
-</code> 
- 
-^Record_ID^Sensor Name^Sensor Group^Monitoring Status^Sensor Units^Sensor Reading^ 
-|12 | Ambient Temp | Temperature | Nominal | C | 25.000000 | 
-|22 | CMOS Battery | Battery | Nominal | N/A | 'OK'| 
-|24 | VCORE PG | Voltage | Nominal | N/A | 'State Deasserted'| 
-|25 | VCORE PG | Voltage | Nominal | N/A | 'State Deasserted'| 
-|26 | VCORE | Voltage | Nominal | N/A | 'State Deasserted'| 
-|27 | VCORE | Voltage | Nominal | N/A | 'State Deasserted'| 
-|28 | VCACHE PG | Voltage | Nominal | N/A | 'State Deasserted'| 
-|29 | VCACHE PG | Voltage | Nominal | N/A | 'State Deasserted'| 
-|30 | VCACHE | Voltage | Nominal | N/A | 'State Deasserted'| 
-|31 | VCACHE | Voltage | Nominal | N/A | 'State Deasserted'| 
-|32 | VIO PG | Voltage | Nominal | N/A | 'State Deasserted'| 
-|33 | VIO PG | Voltage | Nominal | N/A | 'State Deasserted'| 
-|34 | CPU 1.8 PLL PG | Voltage | Nominal | N/A | 'State Deasserted'| 
-|35 | 8V Rear PG | Voltage | Nominal | N/A | 'State Deasserted'| 
-|36 | 8V Front PG | Voltage | Nominal | N/A | 'State Deasserted'| 
-|37 | 5V Rear PG | Voltage | Nominal | N/A | 'State Deasserted'| 
-|38 | 5V Front PG | Voltage | Nominal | N/A | 'State Deasserted'| 
-|39 | 3.3V PG | Voltage | Nominal | N/A | 'State Deasserted'| 
-|40 | 1.8V PG | Voltage | Nominal | N/A | 'State Deasserted'| 
-|41 | 1.5V PG | Voltage | Nominal | N/A | 'State Deasserted'| 
-|42 | 1.1V PG | Voltage | Nominal | N/A | 'State Deasserted'| 
-|43 | 0.9V PG | Voltage | Nominal | N/A | 'State Deasserted'| 
-|44 | Mem VR PG | Voltage | Nominal | N/A | 'State Deasserted'| 
-|45 | Mem VR PG | Voltage | Nominal | N/A | 'State Deasserted'| 
-|46 | Mem VR PG | Voltage | Nominal | N/A | 'State Deasserted'| 
-|47 | Mem VR PG | Voltage | Nominal | N/A | 'State Deasserted'| 
-|48 | Mem VR PG | Voltage | Nominal | N/A | 'State Deasserted'| 
-|49 | Mem VR PG | Voltage | Nominal | N/A | 'State Deasserted'| 
-|50 | Mem VR PG | Voltage | Nominal | N/A | 'State Deasserted'| 
-|51 | Mem VR PG | Voltage | Nominal | N/A | 'State Deasserted'| 
-|52 | VR PG | Voltage | Nominal | N/A | 'State Deasserted'| 
-|53 | VR1 PG | Voltage | Nominal | N/A | 'State Deasserted'| 
-|54 | VR2 PG | Voltage | Nominal | N/A | 'State Deasserted'| 
-|58 | Heatsink Pres | Entity Presence | Nominal | N/A | 'Entity Present'| 
-|59 | iDRAC6 Ent Pres | Entity Presence | Nominal | N/A | 'Entity Present'| 
-|60 | USB Cable Pres | Entity Presence | Nominal | N/A | 'Entity Present'| 
-|61 | Stor Adapt Pres | Entity Presence | Nominal | N/A | 'Entity Present'| 
-|62 | PCIe Riser Pres | Entity Presence | Critical | N/A | 'Entity Absent'| 
-|63 | IO Riser Pres | Entity Presence | Nominal | N/A | 'OK'| 
-|64 | FAN 1 RPM | Fan | Nominal | RPM | 2400.000000 | 
-|65 | FAN 2 RPM | Fan | Nominal | RPM | 2400.000000 | 
-|66 | FAN 3 RPM | Fan | Nominal | RPM | 2400.000000 | 
-|67 | FAN 4 RPM | Fan | Nominal | RPM | 2760.000000 | 
-|68 | FAN 5 RPM | Fan | Nominal | RPM | 2640.000000 | 
-|69 | FAN 6 RPM | Fan | Nominal | RPM | 2640.000000 | 
-|74 | Presence | Entity Presence | Nominal | N/A | 'Entity Present'| 
-|75 | Presence | Entity Presence | Nominal | N/A | 'Entity Present'| 
-|76 | Presence | Entity Presence | Nominal | N/A | 'Entity Present'| 
-|77 | Presence | Entity Presence | Nominal | N/A | 'Entity Present'| 
-|78 | Presence | Entity Presence | Nominal | N/A | 'Entity Present'| 
-|79 | Presence | Entity Presence | Nominal | N/A | 'Entity Present'| 
-|80 | Presence | Entity Presence | Nominal | N/A | 'Entity Present'| 
-|81 | Presence | Entity Presence | Nominal | N/A | 'Entity Present'| 
-|82 | Presence  | Entity Presence | Nominal | N/A | 'Entity Present'| 
-|83 | Status | Processor | Nominal | N/A | 'Processor Presence detected'| 
-|84 | Status | Processor | Nominal | N/A | 'Processor Presence detected'| 
-|85 | Status | Processor | Nominal | N/A | 'Processor Presence detected'| 
-|86 | Status | Processor | Nominal | N/A | 'Processor Presence detected'| 
-|87 | Status | Power Supply | Nominal | N/A | 'Presence detected'| 
-|88 | Status | Power Supply | Nominal | N/A | 'Presence detected'| 
-|89 | Status | Power Supply | Nominal | N/A | 'Presence detected'| 
-|90 | Status | Power Supply | Nominal | N/A | 'Presence detected'| 
-|91 | Current | Current | Nominal | A | 0.800000 | 
-|92 | Current | Current | Nominal | A | 0.880000 | 
-|93 | Current | Current | Nominal | A | 0.680000 | 
-|94 | Current | Current | Nominal | A | 0.800000 | 
-|95 | Voltage | Voltage | Nominal | V | 222.000000 | 
-|96 | Voltage | Voltage | Nominal | V | 224.000000 | 
-|97 | Voltage | Voltage | Nominal | V | 224.000000 | 
-|98 | Voltage | Voltage | Nominal | V | 222.000000 | 
-|99 | Riser Config | Cable/Interconnect | Nominal | N/A | 'Cable/Interconnect is connected'| 
-|100 | OS Watchdog | Watchdog 2 | Nominal | N/A | 'OK'| 
-|102 | Intrusion | Physical Security | Nominal | N/A | 'OK'| 
-|103 | PS Redundancy | Power Supply | Nominal | N/A | 'Fully Redundant'| 
-|104 | Fan Redundancy | Fan | Nominal | N/A | 'Fully Redundant'| 
-|105 | System Level | Current | Nominal | W | 700.000000 | 
-|107 | Drive | Drive Slot | Nominal | N/A | 'Drive Presence'| 
-|109 | Cable SAS A | Cable/Interconnect | Nominal | N/A | 'Cable/Interconnect is connected'| 
- 
-Si queremos elegir mostrar solo uno de los grupos deberemos agregar a la linea de comandos la opcion //-g// y el número //-g 103//. 
- 
-^Record_ID^Sensor Name^Sensor Group^Monitoring Status^Sensor Units^Sensor Reading^ 
-| 103 | PS Redundancy | Power Supply | Nominal | N/A | 'Fully Redundant' | 
- 
-Ejemplo consultar el Voltage y separalo en ; 
- 
-<code bash> 
-ipmimonitoring  -h 10.1.1.7 --config-file /usr/local/nagios/etc/ipmi/freeipmi-esxi.conf --quiet-cache --sdr-cache-recreate -s 95,96,97,98 -g Voltage |tail -n 4 | cut -d "|" -f 6    | sed -e 's/^[ \t]*/Voltage=/' | sed ':a;N;$!ba;s/\n/ /g' | sed -e 's/  /;/g'| sed -e 's/^[ \t]*//'  
-Voltage=218.000000;Voltage=220.000000;Voltage=218.000000;Voltage=218.000000  
-</code> 
-===== Sistema Operativo ===== 
-=== Ver los dispositivos dm- asociados a un LV === 
-<code bash> 
-lvdisplay|awk  '/LV Name/{n=$3} /Block device/{d=$3; sub(".*:","dm-",d); print d,n;}' 
-</code> 
- 
-http://www.linuxquestions.org/questions/linux-newbie-8/dm0-in-iostat-652771/ 
- 
-=== Reloading inittab without reboot === 
- 
-Para recargar nuestro inittab sin tener que reiniciar debemos ejecutar "/sbin/init q" 
- 
- 
-=== Ver cual de los archivos abiertos es el mas grande === 
- 
-<code> 
-# lsof  -nn | sort -k7 -n 
-</code> 
- 
-=== Renombrar múltiples archivos === 
- 
-Por ejemplo si tenemos archivos ***.cfg** y queremos cambiarle la extension de .cfg a .cfg.old 
- 
-<code> 
-rename s/.cfg/.cfg.old/ *.cfg 
-</code> 
- 
-=== Compilar el Kernel a lo Debian === 
- 
-Esto es lo mismo que hacer un //make -j//. 
- 
-<code> 
-export CONCURRENCY_LEVEL=2 
-</code> 
- 
-Despues de hacer el menuconfig le damos el make de esta manera. 
- 
-<code> 
-make-kpkg --initrd --append-to-version=-some-string-here kernel-image kernel-headers kernel-source 
-</code> 
- 
-y listo, vamos a tener dos archivos asi: 
- 
-<code> 
-linux-headers-3.0.6-13-generic_3.0.6-13-generic-10.00.Custom_i386.deb 
-linux-image-3.0.6-13-generic_3.0.6-13-generic-10.00.Custom_i386.deb   
-</code> 
- 
-=== Renombrar todos los archivos de minúsculas a mayúsculas (o viceversa) === 
- 
-De minúsculas a mayúsculas: 
- 
-<code> 
-$ find . -type f|while read f; do mv $f `echo $f |tr "[:lower:]" "[:upper:]"`; done 
-</code> 
- 
-De mayúsculas a minúsculas: 
- 
-<code> 
-$ find . -type f|while read f; do mv $f `echo $f |tr "[:upper:]" "[:lower:]"`; done 
-</code> 
- 
-Ref.: http://www.linux-os.com.ar/linuxos/renombrar-todos-los-archivos-de-minusculas-a-mayusculas-o-viceversa/ 
- 
-=== Ordenar procesos medio muertos === 
- 
-<code> 
-top -b -n 1 | awk '{if (NR <=7) print; else if ($8 == "D") {print; count++} } END {print "Total status D: "count}' 
-ps axu | awk '{if (NR <=7) print; else if ($8 == "D") {print; count++} } END {print "Total status D: "count}' 
-</code> 
- 
- 
-=== QLogic FC HBA LUN Scan Utility === 
- 
-This utility scans for the newly added LUNs. After adding the new LUNs 
-it is not required to unload/load the QLogic FC driver or reboot the 
-system. To see the newly added LUNs, just run the ql-scan-lun.sh utility. 
- 
-The simplest way to use this utility is to run 
- # ./ql-scan-lun.sh 
- 
-By default the utility would re-scan the QLogic HBAs for new LUNs. 
- 
-{{:notas:ql-scan-lun-1.6.tgz|}} 
- 
- 
- 
-=== Rescan SCSI BUS Script === 
- 
-Linux allows you to add and remove SCSI devices without rebooting by using the echo "scsi add-single-device H C I L" > /proc/scsi/scsi command (H = host, C = channel, I = SCSI ID, L = SCSI LUN). The remove-single-device command works similarily. 
-Note, however, that the SCSI bus was NOT designed for hot-plugging, so you might be out of luck ... And you have to be sure, that termination is OK. All filesystems on a device have to be unmounted before disconnecting it or powering it down. 
- 
- 
-{{:notas:rescan-scsi-bus.sh-1.48.gz|}} 
- 
-{{:notas:rescan-scsi-bus.sh-1.56.gz|}} 
- 
-http://www.garloff.de/kurt/linux/ 
- 
-=== Reescanear tabla de particiones === 
-Desde una llamada al sistema : 
-<code> 
-echo 1 > /sys/block/sdd/device/rescan 
-fdisk -l 
-mkfs.ext3 /dev/sdXY 
-</code> 
-O podemos hacerlo ejecutando la utilidad **partprobe** sin argumentos, desde una shell con root. 
- 
-=== Copia de seguridad con Rsync === 
- 
-<code> 
-rsync -av --progress --rsh ssh root@servidor:/ . 
-</code> 
- 
-<code> 
-rsync --progress -av --delete /home/sergio/ /media/disk/sergio-home/ 
-</code> 
- 
-  * progress: nos mostrará el porcentaje de ficheros copiados 
-  * a: Archive, es una forma rápida de decirle que es una copia recursiva y que queremos que todo sea copiado 
-  * v: Verbose, le indica a rsync que de información en pantalla sobre cada transacción 
-  * z: Compress, comprime los ficheros para utilizar menor ancho de banda, así son copiados más rápidamente 
-  * delete: borrará todos los ficheros en el folder destino, que han sido borrados en el folder origen, lo que los hacer estar sincronizados 
- 
-**script_rsync.sh** 
- 
-<code bash> 
-#!/bin/bash 
- 
-REPOSITORY=/usr/local/nagios/share/wiki/helpers/servidores/ 
-HOSTDIR=$2 
-USER=monitoreo 
-HOSTNAME=$2 
-ARCHIVOS=( "/etc/passwd" "/etc/group" "/etc/hosts" "/etc/sysconfig" "/etc/crontab" "/etc/security/limits.conf" "/etc/services" ) 
-TMPHOSTCHECK=/tmp/rsync_bk.tmp 
- 
-case $1 in 
- 
-'backup') 
-if [ $# -lt 2 ]; then 
-        echo no second variable 
-        exit 
-fi 
- 
-rm -rfd ${TMPHOSTCHECK} 
-cat /etc/hosts | egrep $2 | head -n 1 | awk '{print $2}' >> ${TMPHOSTCHECK} 
- 
-if [ -s ${TMPHOSTCHECK} ]; then 
-                PROPERNAME=`cat /etc/hosts | egrep $2\$ | head -n 1 | awk '{print $2}' | cut -f-1 -d.` 
-                        if [ ${PROPERNAME} != $2 ]; then 
-                                echo Hostnames do not match - $2 - ${PROPERNAME} 
-                                echo exiting 
-                                exit 
-                        fi 
-                rm -rfd ${TMPHOSTCHECK} 
-        else 
-                echo host does not exist!!!! 
-                echo exiting 
-                rm -rfd ${TMPHOSTCHECK} 
-                exit 
-fi 
- 
-if [ -d ${REPOSITORY}/${HOSTDIR} ]; then 
-                echo ${REPOSITORY}${HOSTDIR} exists 
-        else 
-                mkdir ${REPOSITORY}/${HOSTDIR} 
-fi 
- 
-for i in "${ARCHIVOS[@]}" 
-do 
-    rsync -avz --progress -e 'ssh ' ${USER}@${HOSTNAME}:$i ${REPOSITORY}${HOSTDIR} 
-done 
- 
-;; 
- 
-'help') 
-echo help screen 
-;; 
- 
-*) echo "usage: $0 <backup server|help>" 
-esac 
-</code> 
- 
-=== Buscar archivos de determinado tamaño === 
- 
-<code> 
-find ./ -type f -size +40000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 } 
-</code> 
- 
-=== Formateador de disco para unidades USB === 
- 
-ufiformat is a command-line utility for formatting floppy disks in UFI- 
- compatible USB floppy drives. It allows disks to be formatted in any 
- format supported by the drive, and can also be used to determine what 
- format a disk is currently using. 
- 
- 
-Homepage: http://www.geocities.jp/tedi_world/format_usbfdd_e.html 
- 
- 
-<code> 
-This is formatting disk utility for USB floppy devices. 
- 
-Usage: ufiformat [OPTION]... [DEVICE] 
-Format a floppy disk in a USB floppy disk DEVICE. 
- 
-  -f, --format [SIZE]  specify format capacity SIZE in KB 
-                       without -f option, the format of the current media will be used. 
-  -F, --force          do not perform any safety checks 
-  -i, --inquire        show device information, instead of performing format 
-                       without DEVICE argument, list USB floppy disk devices 
-  -v, --verbose        show detailed output 
-  -q, --quiet          suppress minor output 
-  -h, --help           show this message 
-Examples: 
-        To format a media keeping its current geometry:  ufiformat /dev/sda 
-        To format a media for 2hd(1.44MB): ufiformat -f 1440 /dev/sda 
-        To list USB floppy devices: ufiformat -i 
-        To show USB floppy device information: ufiformat -i /dev/sda 
-To use this program, both /dev/sd* and /dev/sg* need to be accessible. 
-High-level formatting is usually needed after using this program(ex. mkfs.vfat -I /dev/sda). 
-</code> 
- 
- 
-=== Postfix Error === 
- 
-Error :  
- 
-<code> 
-postfix/postdrop[13652]: warning: unable to look up public/pickup: No such file or directory 
-</code> 
- 
-Solución 
- 
-<code> 
-sudo mkfifo /var/spool/postfix/public/pickup 
-sudo /etc/init.d/postfix restart 
-</code> 
- 
- 
-=== Configurar protección/prioridades en YUM === 
- 
- 
-El propósito del plugin protectbase es proteger ciertos repositorios de las actualizaciones de otros repositorios. Los repositorios que sean protegidos no serán actualizados por ficheros nuevos en repositorios que no estén protegidos. Este plugin es recomendado para todos aquellos que rutinariamente habilitan repositorios de terceros, debido a que estos repositorios que no son de CentOS pueden actualizar ciertos ficheros del sistema y causar potencialmente que su instalación de CentOS se vuelva inestable. 
- 
-<code> 
-yum install yum-protectbase 
-</code> 
- 
-Después que el plugin esté instalado, asegúrese de que esté habilitado. Edite el fichero /etc/yum/pluginconf.d/protectbase.conf y asegúrese de que contenga las líneas siguientes: 
- 
-<code> 
-[main] 
-enabled = 1 
-</code> 
- 
-Luego usted necesita editar todos los ficheros .repo en /etc/yum.repos.d/ y adicionar: 
- 
-<code> 
-protect=1 
-</code> 
-o 
-<code> 
-protect=0 
-</code> 
- 
-Si tenes RH5 con las suscripciones pagas y todo, hay que editar este archivo 
- 
-**/etc/yum/pluginconf.d/rhnplugin.conf** 
- 
-<code> 
-[main] 
-enabled = 1 
-gpgcheck = 1 
- 
-# You can specify options per channel, e.g.: 
-# 
-[rhel-i386-server-5] 
-enabled = 1 
-protect = 0 
-# 
-#[some-unsigned-custom-channel] 
-#gpgcheck = 0 
-</code> 
- 
-Ref.:http://wiki.centos.org/es/PackageManagement/Yum/ProtectBase 
- 
- 
-=== Cambiar la MAC Address === 
- 
- 
-Primero vemos la MAC Address que tenemos asignada fisicamente 
- 
-<code> 
-$ ifconfig -a | grep HWaddr 
-eth0  Link encap:Ethernet HWaddr 00:11:85:ee:25:61 
-</code> 
- 
-Luego procedemos a cambiarla en modo root 
- 
-<code> 
-# ifconfig eth0 down 
-# ifconfig eth0 hw ether 00:11:85:ee:25:71 
-# ifconfig eth0 up 
-# ifconfig eth0 |grep HWaddr 
-</code> 
- 
- 
-=== Redimensionado de volúmenes lógicos === 
- 
-Con ext3 
-<code> 
-# lvextend -L+3G /dev/VolGroup00/proxydmz2-var-log-squid 
-# e2fsck -f /dev/VolGroup00/proxydmz2-var-log-squid 
-# resize2fs  /dev/VolGroup00/proxydmz2-var-log-squid 
-</code> 
- 
-Si alguno quiere leer mas, aca hay una nota básica muy simple sobre LVM \\ 
-http://jazstudios.blogspot.com/2006/12/lvm-basics.html 
- 
-=== Servicios al inicio del Sistema === 
- 
- 
-  * Red Hat 
-    * **chkconfig servicio on** o **chkconfig servicio off** 
- 
-  * SuSE  
-    * **insserv -d servicvio**  
- 
-  * En ambas distribuciones para ver los estados de ejecucion de los servicios 
-    * **chkconfig --list** 
-    * Ademas se muestra un apartado con los servicios activos de xinetd 
- 
-  * Debian 
-    * **update-rc.d servicio defaults**  
- 
- 
-=== Locales y Tomcat === 
- 
-A veces cuando usamos aplicaciones que parcialmente utilizan Tomcat, como es el caso de MicroStrategy podemos tener diferencias con los reportes generados en via web y los generados desde el  Intelligence Server, si los generados via web por ejemplo tienen incorrecto los separadores de coma y simbolos de moneda es muy probable que sean las locales, podemos fijarnos en modificar ciertas opciones de arranque del Tomcat. 
- 
-**/etc/init.d/tomcat5** (al principio del archivo) 
-<code bash> 
-LC_ALL="es_AR.utf8" 
-JAVA_OPTS="-Xmx512M -Duser.language=es -Duser.region=ES" 
-</code> 
- 
-**/etc/profile** (al final del archivo) 
-<code bash> 
-export LC_ALL="es_AR.utf8" 
-</code> 
- 
- 
-=== HOW TO Run SAP GUI On LINUX To Connect SAP/R3 Systems === 
- 
- 
-I have created this document for people who need to install SAPGUI into Linux. 
- 
-1) Minimum system requirements. \\ 
-Linux \\ 
-Hardware: CPU: Intel PentiumIII with 800 MHz \\ 
-RAM: 256MB \\ 
-Software: \\ 
-OS: SuSE Linux 9.3 - 10.1, Red Hat Enterprise Linux 3 and 4 \\ 
-JVM: Sun Java Runtime Evironment 1.4.2 (32-bit) or 5.0 (32-bit) including Java Plugin \\ 
-(please see: \\ 
-http://java.sun.com/j2se/1.4.2/install-linux.html http://java.sun.com/j2se/1.4.2/docs/...ocale.doc.html  \\ 
-http://java.sun.com/j2se/1.5.0/install-linux.html http://java.sun.com/j2se/1.5.0/docs/...ocale.doc.html for details) \\ 
- 
- 
-2) Download SAPGUI from: 
- 
-ftp://ftp.sap.com/pub/sapgui/java/ 
-(anonymous login) 
- 
-https://websmp201.sap-ag.de/sapgui-java 
-(OSS user and pass) 
- 
- 
-3) At the /java folder in ftp select: 
- 
-File: PlatinGUI-Linux-700.jar 37926 KB 11/07/06 13:58:00 
- 
-(note: a more recent version may be available) 
- 
-4) In the downloaded folder, execute 
- 
-Code: 
-<code> 
-java -jar PlatinGUI-Linux-700.jar 
-</code> 
- 
-5) Executing SAPGUI 
- 
-a) Guilogon: 
- 
-Code: 
-<code> 
-~/SAPClients/SAPGUI7.00/bin$ ./guilogon 
-To create servers, touch at new and go to "advanced". 
-</code> 
- 
--- tip “use expert configuration” 
- 
-Example: 
- 
-For server 10.1.1.6 with system number 01: 
- 
-Code: 
-<code> 
-conn=/H/10.1.1.6/S/3201 
-</code> 
- 
-B) Command line 
- 
-For server 10.1.1.6 with system number 01: 
- 
-Code: 
-<code> 
-~/SAPClients/SAPGUI7.00/bin$ ./sapgui /H/10.1.1.6/S/3201 
-</code> 
- 
-If your server using load balancing configuration, use this connection string **conn=/M/(IP_Address_Message_Server)/S/36(system_number)/G/(nama_group)** and use this connection string configuration if yor SAP R/3 server are not using load balancing system, **conn=/H/(IP_Address_server_SAP)/S/32(system_number)**. 
- 
-http://sapbasis.wordpress.com/2007/08/22/installation-and-configuration-of-sapgui-for-java-on-linux/ 
- 
- 
-http://www.linuxquestions.org/linux/answers/Applications_GUI_Multimedia/HOW_TO_Run_SAP_GUI_On_LINUX_To_Connect_SAP_R3_Systems 
- 
- 
-=== SAP SysInfo === 
- 
-Script para colectar informacion de tu sistema SAP 
- 
-{{:notas:sapsysinfo.zip|}} 
- 
-=== Convertidor del SAPLogon.ini de Windows al connections de SAPGui Java  === 
- 
-{{:notas:sap_gui_for_java_configuration_generator_scripts.zip|}} 
- 
- 
-=== Formatear lista de filesystems montados === 
-<code> 
-# mount | column -t 
-/dev/sda1         on  /                         type  ext4                   (rw,errors=remount-ro,commit=0) 
-proc              on  /proc                     type  proc                   (rw,noexec,nosuid,nodev) 
-none              on  /sys                      type  sysfs                  (rw,noexec,nosuid,nodev) 
-fusectl           on  /sys/fs/fuse/connections  type  fusectl                (rw) 
-none              on  /sys/kernel/debug         type  debugfs                (rw) 
-none              on  /sys/kernel/security      type  securityfs             (rw) 
-none              on  /dev                      type  devtmpfs               (rw,mode=0755) 
-none              on  /dev/pts                  type  devpts                 (rw,noexec,nosuid,gid=5,mode=0620) 
-none              on  /dev/shm                  type  tmpfs                  (rw,nosuid,nodev) 
-none              on  /var/run                  type  tmpfs                  (rw,nosuid,mode=0755) 
-none              on  /var/lock                 type  tmpfs                  (rw,noexec,nosuid,nodev) 
-/dev/sda6         on  /home                     type  ext4                   (rw,user_xattr,commit=0) 
-rpc_pipefs        on  /var/lib/nfs/rpc_pipefs   type  rpc_pipefs             (rw) 
-nfsd              on  /proc/fs/nfsd             type  nfsd                   (rw) 
-binfmt_misc       on  /proc/sys/fs/binfmt_misc  type  binfmt_misc            (rw,noexec,nosuid,nodev) 
-gvfs-fuse-daemon  on  /home/sergio/.gvfs        type  fuse.gvfs-fuse-daemon  (rw,nosuid,nodev,user=sergio) 
-</code> 
- 
- 
-=== Reacer una tabla de particiones desde cero === 
- 
-Reacer una tabla de particiones desde cero, en por ejemplo una LUN o un disco ya usado que deje restos de otro tipo de tabla de partición incompatible. 
- 
-<code> 
-parted /dev/sdc 
-mklabel msdos 
-quit 
-</code> 
- 
-=== Agregar Memoria y CPU en caliente en VMware === 
- 
-<code bash> 
-#!/bin/bash 
-# William Lam 
-# http://engineering.ucsb.edu/~duonglt/vmware/ 
-# hot-add memory to LINUX system using vSphere ESX(i) 4.0 
-# 08/09/2009 
- 
-if [ "$UID" -ne "0" ] 
-        then 
-        echo -e "You must be root to run this script.\nYou can 'sudo' to get root access" 
-        exit 1 
-fi 
- 
-for MEMORY in $(ls /sys/devices/system/memory/ | grep memory) 
-do 
-        SPARSEMEM_DIR="/sys/devices/system/memory/${MEMORY}" 
-        echo "Found sparsemem: \"${SPARSEMEM_DIR}\" ..." 
-        SPARSEMEM_STATE_FILE="${SPARSEMEM_DIR}/state" 
-        STATE=$(cat "${SPARSEMEM_STATE_FILE}" | grep -i online) 
-        if [ "${STATE}" == "online" ]; then 
-                echo -e "\t${MEMORY} already online" 
-        else 
-                echo -e "\t${MEMORY} is new memory, onlining memory ..." 
-                echo online > "${SPARSEMEM_STATE_FILE}" 
-        fi 
-done 
-</code> 
- 
-<code bash> 
-#!/bin/bash 
-# William Lam 
-# http://engineering.ucsb.edu/~duonglt/vmware/ 
-# hot-add cpu to LINUX system using vSphere ESX(i) 4.0 
-# 08/09/2009 
- 
-for CPU in $(ls /sys/devices/system/cpu/ | grep cpu | grep -v idle) 
-do 
-        CPU_DIR="/sys/devices/system/cpu/${CPU}" 
-        echo "Found cpu: \"${CPU_DIR}\" ..." 
-        CPU_STATE_FILE="${CPU_DIR}/online" 
-    if [ -f "${CPU_STATE_FILE}" ]; then 
-        STATE=$(cat "${CPU_STATE_FILE}" | grep 1) 
-        if [ "${STATE}" == "1" ]; then     
-            echo -e "\t${CPU} already online" 
-        else 
-             echo -e "\t${CPU} is new cpu, onlining cpu ..." 
-             echo 1 > "${CPU_STATE_FILE}" 
-        fi 
-    else  
-        echo -e "\t${CPU} already configured prior to hot-add" 
-    fi 
-done 
-</code> 
- 
-=== Copia rápida de seguridad via red === 
- 
-En el equipo donde vamos a dejar la copia 
-<code> 
-netcat -l -p 7000 > stage.tgz 
-</code> 
- 
-Desde donde realizamos la copia, la ip es la del equipo anterior 
-<code> 
-tar cfzp - /oracle/stage | netcat 192.168.1.55 7000 
-</code> 
- 
-=== TAB Completion Debian Net Install === 
-<code> 
-apt-get install bash-completion 
-exit 
-login 
-</code> 
- 
-=== IPRM para determinado usuario === 
-<code bash> 
-ipcs -a | grep `whoami` 
- 
-ipcs -s | grep $USERNAME | perl -e 'while (<STDIN>) { @a=split(/\s+/); print `ipcrm sem $a[1]`}' 
- 
-ipcs -s | grep $USERNAME | awk ' { print $2 } ' | xargs ipcrm sem 
-</code> 
-===== Redes sociales ===== 
- 
-==== Twitter ==== 
- 
- 
-Twidge es una aplicación de línea de comandos para solicitar servicios de microblogging a Twitter (funciona también para Identi.ca). Cuenta con múltiples características, a saber: 
- 
-    * Es fácil de aprender. 
-    * Cuenta buena documentación. 
-    * Es compatible con el API de Twitter. 
-    * Puede acortar URL con tinyurl.com. 
-    * Está diseñado para ser amigable con scripts para el shell. 
- 
- 
-Dicho lo anterior, aprendamos Twidge en 8 sencillos pasos: 
- 
-1. Instalación. De nueva cuenta, asumo un sistema tipo Debian (también puedes compilarlo para cualquier GNU/Linux). 
- 
-      $ sudo apt-get install twidge 
- 
-2. Configuración. Twidge te hará un par de peticiones: usuario y contraseña. 
- 
-      $ twidge setup 
- 
-3. Los 20 updates más recientes de tus amigos. Twidge desplegará adecuadamente el nick de tu amigo y estado en un par de columnas. 
- 
-      $ twidge lsrecent 
- 
-4. Actualiza tu estado. 
- 
-      $ twidge update "Preparando post sobre Twidge" 
- 
-5. Sigue a alguien interesante. 
- 
-      $ twidge follow cayu 
- 
-6. Lo contrario… 
- 
-      $ twidge unfollow BillGates 
- 
-7. Conoce a tus seguidores. 
- 
-      $ twidge lsfollowers 
- 
-8. Acorta URL largas. Twidge lo hace automáticamente. 
- 
-      $ twidge update "http://software.complete.org/static/twidge/doc/html"  
- 
-Ref: http://bitelia.com/2010/02/comando-linux-twidge-un-cliente-para-twitter 
- 
-===== Ubicar la Latitud y Longitud en Google Maps ===== 
- 
-Una vez seleccionada la dirección o el punto que queremos, en la barra de direcciones del navegador: 
- 
-<code javascript> 
-javascript:void(prompt('',gApplication.getMap().getCenter())); 
-</code> 
- 
-===== Scripts para importar LOGS de Cisco Call Manager en Mysql o PostgreSQL ===== 
- 
-{{:notas:cdr.tgz|}} 
-===== Script de Nautilus para añadir una marca de agua a una imagen ===== 
- 
-Script muy bueno 
- 
-<code bash> 
-#!/bin/bash 
- 
-#****************************************************************************************** 
-# 
-# Marca de agua 
-# Versión= 1.0 
-# 
-# Script de Nautilus que añade una marca de agua a una imagen  
-# La marca de agua es otra imagen 
- 
-# Script programado y probado satisfactoriamente en Debian Lenny y Gnome 2.22.3 
-# Esta programado pensado en ejecutarse como un script de Nautilus aunque es posible  
-# usarlo en consola pasandole como parámetro el nombre del fichero de la imagen.   
- 
-#  DEPENDENCIAS 
-# 
-#  Zenity (http://freshmeat.net/projects/zenity) 
-#  Necesario para generar los cuadros de dialogo del script 
-#   
-#  Imagemagick (http://www.imagemagick.org/) 
-#  Contiene elprograma composite  necesario para crear el borde  
- 
-# INSTALACION: 
-# 1. Copiar el script al directorio /home/usuario/.gnome2/nautilus-scripts  
-# 2. Dar permisos de ejecución al script 
-# 3. En este momento al pulsar con el botón derecho del ratón sobre una imagen nos 
-#    aparece el menú Scripts y dentro de el aparece el script. 
- 
-# Copyright (C) 2009 Carlos Fco. Andión López 
- 
-# This program is free software; you can redistribute it and/or modify 
-# it under the terms of the GNU General Public License as published by 
-# the Free Software Foundation; either version 2 of the License, or 
-# (at your option) any later version. 
- 
-# This program is distributed in the hope that it will be useful, 
-# but WITHOUT ANY WARRANTY; without even the implied warranty of 
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
-# GNU General Public License for more details. 
- 
-# You should have received a copy of the GNU General Public License along 
-# with this program; if not, write to the Free Software Foundation, Inc., 
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 
- 
-# http://www.gnu.org/copyleft/gpl.html 
- 
-#****************************************************************************************** 
- 
- 
-# Se comprueba que los programas necesarios para generar el borde estan presentes 
-for command in composite 
-do 
- if [ ! $(which $command) ] 
-then 
-    zenity --error --text "Falta el programa \"$command\" .\n 
- Es necesario instalar el paquete ImageMagick." 
-        exit 1 
-    fi 
-done 
- 
- 
-#Se indica el fichero con la marca de agua y el porcentaje de visibilidad 
- 
- WM_FILE=`zenity --file-selection --title="Seleccione un archivo"` 
- 
- case $? in 
- 0) 
- echo "\"$WM_FILE\" seleccionado.";; 
- 1) 
- echo "No ha seleccionado ningún archivo.";; 
-  
- -1) 
- echo "No ha seleccionado ningún archivo.";; 
-  
- esac 
- 
- 
-VISIBILITY=`zenity --title='Marca de agua' --text='¿Visibilidad en %?' --entry-text='50' --entry` 
- 
- 
-#Se inicializa la barra de progreso de zenity 
-FILES_COUNT="$#" 
-CURRENT_FILE=1 
- 
-for arg; 
- do 
-    #Se renombra el archivo para evitar sobreescribir el original y crear uno nuevo con la marca 
-    IMX_FILE_TARGET='wm_'"$arg" 
- 
- composite -dissolve "$VISIBILITY" "$WM_FILE" "$arg" "$IMX_FILE_TARGET" 
- 
- 
-    #Actualizo la barra de progreso de Zenity 
-    percentage=$(echo "$CURRENT_FILE * 100 / $FILES_COUNT" | bc) 
-    CURRENT_FILE=$((CURRENT_FILE + 1)) 
-    echo $percentage 
- 
-done | zenity --progress --title="Procesando imagenes"  --auto-close 
-</code> 
- 
-Ref: http://elrincondetolgalen.wordpress.com/2009/11/12/script-de-nautilus-para-anadir-una-marca-de-agua-a-una-imagen/ 
- 
-===== Ver el dmesg en formato humano ===== 
- 
-==== Alternativa I ==== 
- 
- 
-<code perl> 
-#!/usr/bin/perl 
-  
-use strict; 
-use warnings; 
-  
-my @dmesg_new = (); 
-my $dmesg = "/bin/dmesg"; 
-my @dmesg_old = `$dmesg`; 
-my $now = time(); 
-my $uptime = `cat /proc/uptime | cut -d"." -f1`; 
-my $t_now = $now - $uptime; 
-  
-sub format_time { 
- my @time = localtime $_[0]; 
- $time[4]+=1;    # Adjust Month 
- $time[5]+=1900;    # Adjust Year 
- return sprintf '%4i-%02i-%02i %02i:%02i:%02i', @time[reverse 0..5]; 
-} 
-  
-foreach my $line ( @dmesg_old ) 
-{ 
- chomp( $line ); 
- if( $line =~ m/\[\s*(\d+)\.(\d+)\](.*)/i ) 
- { 
- # now - uptime + sekunden 
- my $t_time = format_time( $t_now + $1 ); 
- push( @dmesg_new , "[$t_time] $3" ); 
- } 
-} 
-  
-print join( "\n", @dmesg_new ); 
-print "\n"; 
-</code> 
- 
-==== Alternativa II ==== 
- 
-<code perl> 
-#!/usr/bin/perl -wn 
-use strict; 
-  
-foreach my $line (<>) { 
-    my ($uptime) = (do { local @ARGV='/proc/uptime';<>} =~ /^(\d+)\./); 
-    $line=~/^\[\s*(\d+)\.\d+\](.+)/;  
-    printf "[%s]%s\n", scalar localtime(time - $uptime + $1), $2; 
-} 
-</code> 
notas/start.1389207324.txt.gz · Última modificación: 2014/01/08 18:55 por cayu