Linux

Resulta que quieres saber cual es tu direción IP pública y lo único que tienes a la mano es una consola de shell (obviamente Linux), pues es todo lo que necesitas:

Teclea:

Linux console | curl -s http://jpacheco.com.mx/ip.php
$ curl -s http://jpacheco.com.mx/ip.php

Current IP CheckCurrent IP Address: 189.155.111.222

También puedes conocer tu IP pública aquí.

Voila!.

javier | Linux | Jueves 03 Julio 2008 12:52pm | Deja tu comentario

Para saber cual version de Linux estas corriendo, abre una consola y teclea el siguiente comando:

Linux console | cat /proc/version
$ cat /proc/version
Linux version 2.6.20-1.3002.fc6xen (brewbuilder_at_hs20-bc1-6_dot_build_dot_redhat_dot_com) (gcc version 4.1.2 20070626 (Red Hat 4.1.2-13)) #1 SMP Mon Aug 13 14:21:09 EDT 2007

En este caso estamos hablando de un equipo corriendo el Kernel 2.6.20-1.3002 en Fedora Core 6, con soporte para virtualizacion (xen).

javier | Linux | Jueves 31 Enero 2008 12:11pm | Deja tu comentario

Comprimiendo archivos con Gzip y Zip

Los archivos comprimidos utilizan menos espacion en disco y son descargados mas rapido. Para comprimir archivos en Linux puedes usar las herramientas de compresion Gzip o Zip.

Los archivos comprimidos tienen la extension .gz.

Para comprimir un archivo, desde la consola teclea el siguiente comando:

Linux console
$ gzip archivo.ext

El archivo sera comprimido y guardado como archivo.ext.gz

Para descomprimir el archivo, teclea:

Linux console
$ gunzip archivo.ext.gz

Si intercambias archivos con usuarios no-Linux (windowseros), debera usar zip para evitar problemas de compatibilidad. En todas las distribuciones Linux es posible abrir archivos zip o gzip, pero los sistemas operativos no compatibles con Linux pueden experimentar problemas con los archivoz gzip.

Leer más...

javier | Linux | Sábado 26 Enero 2008 4:39pm | Deja tu comentario

Si corres un servidor proxy cache como Squid es posible que encuentres en el archivo: /var/log/squid/access.log entradas que hagan referencia a TCP_MISS/304 y TCP_MISS/200, ver a continuacion:

Linux console | $ tail -f /var/log/squid/access.log
24/Jan/2008:15:29:25 +0000 1861 10.125.4.247 TCP_MISS/304 358 GET
http://techbase.kde.org/Projects/KDE_on_Windows/Installation - DIRECT/138.246.255.177 -
bsg75.mynetwork.com 2374
24/Jan/2008:16:45:45 +0000 897 10.125.4.247 TCP_MISS/200 11344 GET
http://techbase.kde.org/skins/oxygen/css.php? - DIRECT/138.246.255.177 text/css
bsg75.mynetwork.com 2545

TCP_MISS/200 - Veras estas entradas en el log cuando lo que estes intentando descargar no este en el cache del servidor. Lo que siginifica que sera descargado desde el servidor web.

Toma en cuenta que los scripts no se pueden almacenar en cache, esto aplica para los archivos con terminacion .pl o .php entre otros.

TCP_MISS/304 - Al igual que el anterior significa que el archivo que intentas descargar no esta en el cache del servidor proxy, pero si esta almacenado en el cache de tu navegador de internet.

En este caso el navegador enviara una solicitud de descargar solo si el archivo en el servidor web es mas reciente que el del cache de tu navegador..

Cultura general.

javier | Linux | Jueves 24 Enero 2008 8:37am | 3 comentario(s)

Ahora resulta que Fedora no incluira mas en su distribucion juegos que cunplan con el siguiente criterio:

"... juegos donde los objetivos se muevan en la pantalla hasta un punto determinado o linea, en donde el jugador debera acccionar (presionar) un boton/tecla/click de raton en el momento en el que el objetivo cruce la linea o punto para de esta manera obtener puntos..."

A continuacion el email:

Mail | Patent Concerns
From: "Tom \"spot\" Callaway"
To: fedora-games-list-H+wXaHxf7aLQT0dZR+AlfA-AT-public.gmane.org
Subject: Patent concerns
Date: Wed, 16 Jan 2008 14:46:02 -0500
Hi folks,

I hate for my first post to this mailing list to be a depressing one, but I need to pass along some bad news.

Due to patent concerns, we won't be able to include any games in Fedora which meet the following criteria:

A game where "targets" move across the screen to a predetermined point or line, where the player hits a button/key/mouse click as the target(s) crosses that point or line, and gets points.

This means:

No "Guitar Hero" clones. No "Dance Dance Revolution" clones.

I need your help to make sure that we don't have any other games that meet this criteria, either on the wish list or in Fedora.

If you're not sure, ask me.

Thanks in advance,

~spot

Ni modo a jugar nibles.

javier | Linux | Miércoles 16 Enero 2008 1:41pm | Deja tu comentario

Something I really like about the Open Source World is the versatility and usability of almost every system or application and obviously how cheap (or unexpensive) they are.

There are a lot of examples, the Apache Web Server or MySQL and a long list.

For instance if you need to modify your hard drive layout or partitions you can use Gparted and if you need to clone your hard drive (make an exact copy of your hard drive) you can use CloneZilla.

Actually does exist a project called GParted-Clonezilla which provides you on a single CD both solutions.

I just spent 45 minutes downloading the GParted-Clonezilla ISO image.

Really cheap don't you think?

javier | Linux | Martes 11 Diciembre 2007 2:40am | Deja tu comentario

To create a new MySQL database follow this steps:

1. Access to MySQL console using a privileged user, in this case root:

Linux console
$ mysql -u root -p

2. Create database.

Linux console
mysql > CREATE DATABASE databasename;

Now, you can add a user to the database or you can start populating it.

Easy?

javier | Linux, | SQL | Martes 20 Noviembre 2007 1:16am | Deja tu comentario

Hi All,

After three hours finally my Linux box is able to mount NTFS partitions.

Check this link: Linux-NTFS RPMs Documentation.

Is really simple, you only need to download the appropriate RPM file.

By the way, it just works fine on my CentOS 5 installation.

Happy hacking!

javier | Linux | Sábado 17 Noviembre 2007 10:14pm | Deja tu comentario

If you need to know how long your Linux services have been running you can try this:

Linux console
$ ps waux | grep -i

Or

Linux console
$ ps -o etime < pid>

To get the PID you can try the following command:

Linux console
$ ps aux | grep

Piece of cake!

javier | Linux | Miércoles 29 Agosto 2007 11:30am | Deja tu comentario

Do you need PHP support for GD?

First you need to be sure this module is not already installed, on a shell window run the following command:

Linux console
$ rpm -qa | grep php

If you have something like this:

Linux console
php-gd-5.1.6-3.fc6

The module is already installed, otherwise run the following command:

Linux console
yum -y install php-gd

Voila!

javier | Linux | Miércoles 08 Agosto 2007 6:04pm | Deja tu comentario

Easily upgrade your current Fedora Core 4 linux to the next Fedora release, using only yum.

1. Run

Linux console
$ rpm -Uvh
http://download.fedora.redhat.com/pub/fedora/linux/core/5/i386/os/Fedora/RPMS/fedora-release-5-5.noarch.rpm

To download the fedora-release from one of the Fedora Core mirrors.

2. Upgrade using yum

Linux console
$ yum -y upgrade

3. If everything goes well you will only need to reboot your computer and start enjoying Fedora Core 5.

javier | Linux | Domingo 31 Diciembre 2006 2:52pm | Deja tu comentario

Change the hostname for a Linux server is easy, you only need:

- A text editor, like Vi or Emacs. - Shell access as "root" obviously.

Those are the steps:

1. Showing the current hostname

Type the next command:

Linux console
$ hostname

current_hostname

2. Setting a new hostname

Assign a new hostname with this command:

Linux console

$ hostname new_hostname

3. Update the /etc/hosts file

Change the current directory to /etc and then open the file /etc/host with your favorite text editor:

Linux console
$ cd /etc
$ emacs hosts

This is the content for /etc/hosts file.

# Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 current_hostname localhost.localdomain localhost

Change current_hostname for the hostname assigned on step # 2, save the changes and exit the editor.

4. Update the /etc/sysconfig/network file

Change the current directory to /etc/sysconfig and then open the file /etc/sysconfig/network with your favorite text editor:

Linux console

$ cd /etc/sysconfig $ emacs network

This is the content for /etc/sysconfig/network file

NETWORKING=yes HOSTNAME=current_hostname

As in the step # 3 change current_hostname for the hostname assigned on step # 2, save the changes and exit the editor.

5. Finally reboot your server

Linux console
$ reboot

Easy, don't you think?

To know more:

Linux console
$ man hostname
javier | Linux | Viernes 25 Agosto 2006 10:03pm | Deja tu comentario

Esto es algo que desde hace tiempo queria hacer, ya he leido bastante de esto: "Correr Linux en Windows".

Para hacerlo necesitas una herramienta de virtualización que te permita emular el entorno de diferentes sistemas operativos, Linux en este caso.

Una opción es VMware server.

Aqui les dejo unas capturas de pantalla de Fedora Core 4 corriendo en Windows gracias a VMware.

Leer más...

javier | Windows, | Linux | Miércoles 17 Mayo 2006 12:26pm | Deja tu comentario

Debo dejar el lado obscuro de la fuerza.

Pero antes necesito:

Instalar una unidad de CD en mi PC.

(Chingado!)

ACTUALIZACIÓN

Ahora si, ya he dado el primer paso.

Después de unos meses que estuve en el lado obscuro de la fuerza he visto nuevamente la luz, estoy corriendo Fedora Core (2.6.11-1.1369_FC4) sé que no esta actualizada pero no hay nada que una linea en el shell no pueda arreglar:

Linux console | $ yum -y update
$ yum -y update

Los procesos que esta corriendo actualmente:

Linux console | $ top
$ top

Tasks: 96 total, 2 running, 94 sleeping, 0 stopped, 0 zombie
Cpu(s): 2.7% us, 1.0% sy, 0.3% ni, 96.0% id, 0.0% wa, 0.0% hi, 0.0% si
Mem: 450432k total, 271320k used, 179112k free, 14508k buffers
Swap: 917496k total, 0k used, 917496k free, 141824k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2802 root 15 0 93236 22m 6220 S 3.0 5.1 0:33.75 X
2961 root 25 10 35444 18m 10m R 0.7 4.1 0:02.46 rhn-applet-gui
3155 root 15 0 38040 13m 8252 S 0.3 3.0 0:00.58 gnome-terminal
3171 root 16 0 2024 1056 812 R 0.3 0.2 0:00.02 top
1 root 16 0 1744 600 520 S 0.0 0.1 0:01.32 init
2 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/0
3 root RT 0 0 0 0 S 0.0 0.0 0:00.00 watchdog/0
4 root 10 -5 0 0 0 S 0.0 0.0 0:00.01 events/0
5 root 13 -5 0 0 0 S 0.0 0.0 0:00.02 khelper
6 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kthread
8 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 kacpid
96 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kblockd/0
99 root 15 0 0 0 0 S 0.0 0.0 0:00.00 khubd
148 root 20 0 0 0 0 S 0.0 0.0 0:00.00 pdflush
149 root 15 0 0 0 0 S 0.0 0.0 0:00.01 pdflush
151 root 13 -5 0 0 0 S 0.0 0.0 0:00.00 aio/0
150 root 22 0 0 0 0 S 0.0 0.0 0:00.00 kswapd0
237 root 15 0 0 0 0 S 0.0 0.0 0:00.00 kseriod
394 root 11 -5 0 0 0 S 0.0 0.0 0:00.00 ata/0
398 root 22 0 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_0
399 root 22 0 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_1
414 root 11 -5 0 0 0 S 0.0 0.0 0:00.00 kmirrord/0
424 root 15 0 0 0 0 S 0.0 0.0 0:00.04 kjournald
940 root 12 -4 1636 572 492 S 0.0 0.1 0:00.13 udevd
995 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kgameportd
1170 root 19 0 0 0 0 S 0.0 0.0 0:00.00 shpchpd_event
1516 root 19 0 0 0 0 S 0.0 0.0 0:00.00 kjournald
1854 root 15 0 2180 1068 780 S 0.0 0.2 0:00.00 dhclient
1886 root 16 0 1616 648 556 S 0.0 0.1 0:00.03 syslogd
1888 root 16 0 1568 508 436 S 0.0 0.1 0:00.00 klogd
1898 rpc 15 0 1696 600 508 S 0.0 0.1 0:00.00 portmap
1916 rpcuser 18 0 1748 780 684 S 0.0 0.2 0:00.00 rpc.statd

Un par de dí­as configurando y listo!

javier | Linux | Viernes 17 Marzo 2006 12:34pm | Deja tu comentario

"One Node to rule them all, one Node to find them, one Node to bring them all and in the process bind them"

En las reuniones del Gluch de Julio y Agosto 2005, Larry © nos ha hablado de el proceso para la implementación de un clúster Beowful, he aquí una breve reseña de lo visto en las dos reuniones.

Un clúster es un grupo de computadoras conectadas a una red de alta velocidad que trabajan de manera simultanea como si fueran una computadora con múltiples procesadores.

Existen tres tipos de clusters:

Homogeneos: son aquellos en que todos los nodos cuentan con la misma configuración de hardware y sistema operativo, Semihomogeneos: cuentan con sistema operativo similar y diferentes arquitecturas o rendimiento y, por último los clusters Heterogeneos: que cuentan con diferente hardware y sistema operativo.

Leer más...

javier | General, | Linux | Sábado 18 Febrero 2006 3:22pm | Deja tu comentario

Principal

Herramientas

Imagen Aleatoria

Posts Recientes

Búsqueda