La coctelera tecnologica

Si te gusta la informática, la tecnología, el modding, geek

Archivo de la categoria 'FreeBSD'


Instalando cPanel

11 November, 2008

El otro día contemple la posibilidad de instalar cPanel en una FreeBSD (bufff que difícil no ?) no no, no hay para tanto, siempre y que te hayas leido uno de esos gran tochos de libros de administración en UNIX.

Así que paso a la acción, primero he de decir que necesitas una licencia (no os molesteis en buscar por ningún p2p a buscar esa key mágica porqué no la hay :-) )

En mi caso me lo dieron todo a pelo, es decir sin nada, solo la FreeBSD base sin ningún tipo de servicio, yo lo único que hice es tirar del Midnight Commander, parecido al comandante norton de ms-dos, pero mucho más funcional claro :)

Primero saber que son los PORTS en FreeBSD, paso a resumir:

$ wget ftp://ftp.freebsd.org/pub/FreeBSD/ports/ports-current/ports.tar.gz

$ mv ports.tar.gz /usr

$ tar xfvz ports.tar.gz

Con esto ya hemos instalado los ports en la FreeBSD es decir a partir de ahora, ya estamos listos para poder instalar paquetes, podeis mirar toda la documentación en http://www.freebsd.org/es/where.html

$ cd /usr/ports/misc/mc

$ make install clean

Y listos esperamos a que baje de Internet el paquete mc, ya que tenemos el mc lo arrancamos, y nos vamos, a editar el fichero dns, etc … que funcione todo correctamente.

Leer mas … »

Publicado en FreeBSD | No hay comentarios »

Matar procesos por nombre

30 August, 2008

He visto un script en Internet, que me a llamado mucho la atención. 

Se trata de un script que podemos matar un proceso por el nombre, en vez de usar el PID del proceso, es un tanto antiguo, por lo que se puede ver, pero realmente puede ser muy útil, ya que no tenemos de usar el comando “ps aux” para ver todos los procesos del sistema, si no vamos directamente por el nombre. Por lo que dice en el script, funciona en un sistema BSD.

Antes de poner el código me gustaría decir, que yo no lo he traducido, pero quien sepa algo básico de programación verá, como es posible cambiar el idioma, espero que sirva como una de esas tantas utilidades!

Leer mas … »

Publicado en FreeBSD, Linux, Programación | 2 Comentarios »

Script para descargar videos de youtube en Linux

27 July, 2008

Navegando me encontre con un curioso script que para mi es muy muy útil. Se trata de poder bajar videos de Youtube desde una terminal, y la verdad resulta útil si trabajamos en entornos de trabajo, ya que el comando siempre será el que nosotros queramos.

Lo primero de todo es crear el fichero:

$ touch youtube

En mi caso le he puesto youtube podeis poner lo que queráis, luego desde la consola, arrancamos un editor de textos, bien sea nano, vi, para hacerlo más fácil usaré el gedit:

$ gedit youtube

Leer mas … »

Publicado en FreeBSD, Linux, Programación, Software, Utilidades | No hay comentarios »

Wine: Ejecutando programas de Windows bajo Linux

27 July, 2008

Quizás puede ser tendencioso pensar que Wine, puede hacer funcionar todos lo que ejecuta Windows y no es así. De hecho yo he podido arrancar Microsoft Office o el Adobe Photoshop como si fuera una aplicación más de Linux.

Pero no espereis que emule drivers o juegos, porqué no llega para tanto, pero de todas formas, no había visto la evolución de Wine como era. También funciona bajo sistemas BSD, Solaris y Mac OS X, esta aplicación como en su web dice, es una implementación de API de Windows OpenGL. Bueno de hecho si que funciona sin problemas, Wine con juegos, por ejemplo con Live For Speed, NBA Live 07, todo es pasarse por su Wiki de base de datos de programas soportados en su base de datos.

En Linux es fácil instalar solo basta con abrir una terminal y como root:

$ apt-get install wine

$ sudo apt-get install wine   (en el caso de Ubuntu)

Por ejemplo bajo FreeBSD su instalación es mediante los PORTS, o sea que los procedimientos son así:

$ cd /usr/ports/emulators/wine/ && make install clean

$ pkg_add -r wine

La primera sería para instalar el puerto, la segunda para añadir el paquete, el proceso habitual en FreeBSD.

Los binarios para la mayoría de distribuciones las teneis aquí.

Leer mas … »

Publicado en FreeBSD, Juegos, Linux, Software | No hay comentarios »

¿Por qué usar la licencia BSD?

18 February, 2008

Carsten Haitzler (más conocido como Rasterman), es artista y programador, creador de Enlightenment. Dijo lo siguiente en la lista de correo enlightenment-devel el 14 de Octubre de 2005, hablando de por qué habia licenciado E con licencia BSD.

OK. I guess this topic has done the rounds years ago and time is for a new one. i emphasise that this is a PERSONAL OPINION base on experience, knowledge of industry, technical facts, and all the licenses in question as well as others out there.

fact: once source is available it IS able to be stolen. the chances of being able to lift large chunks of useful code (eg take the image scaling routines or the alpha blending routines) which is where a lot of the really tight code is, is tirival. no one would ever know. reformat it a bit and that’s it. there is very little you can do. you will never know its stolen. its part of a much larger codebase that suddenly is faster and nicer. we have not the resources to litigate nor the time to scour the world looking for code and products that may have possible used the code, disasembling their machnie code and hunting for patterns that might possibly indicate our code (and a bit of reformatting - if u loop one way or another) can even make this entirely pointless. theft is trivial. not getting caught is easy as pie. accept it. even if they dont steal the code - they can READ it and find the IDEAs and HOW to do it then re-implement (alomsot identically). this doesnt violate even the gpl.

now in an attempt to have an olive branch stretched out to the world that doesnt eat, sleep, breathe open source, we are making the barrier of entry lower but not REQUIRING they ship source. they have other options. shipping source is one way of meeting attribution clauses. others are to advertise or to simply tell the develoeprs about the use of it. as a matter of FACT that if they take code and dont give back - they bear the burdern of maintenance and handling a fork. they will find it hard to incorproate new improvements and eventually due to practical concernns will be driven back to the main tree and realise it is better for them to give back what they do - if anything, and save costs.

also note - a lot of things are LIBRARIES - they mostly will not GIVE BACK as they build ontop of an api. their IP is in their app, not the lib. if they find a bug - it helps them to submit a patch as that patch is then in upstream and they dont have to maintain a fork. they can concentrate on their own product and not worry about a slew of libraries etc. they are using the api of. they have much fewer license concerns.

for the “open soruce world” the lbiraries are as open - if not more so, than most, so nothing lost there.

and finally - i went with this license because frankly - i accepted long long long ago that peolpe will take and NOT GIVE BACK. they do it with gpl - and they do it in terms of download then ask for support - and support takes time. time costs money. thus effectively they are taking and NOT giving back. they will never write a single patch or a line of code. they will use it and ask for support/help - EVEN IF the help is IN documentation - they dont read it. they prefer to write an email to a developer and get a personalised response. dont worry about licenes - this is the WORST problem with open source. by FAR. companies are unlikely to just “steal”. thats the view of those that hate anything commercial. practicality is that the companies need some support - will ask a bit, realise they use up your time and offer to PAY you for it and PAY for patches, custom code ans support BECAUSE the license is muchmore open. this helps you get some minimal money for your hard work - better than $0. note - we dont get paid ANYTHING to produce E related code. it’s produced out of sheer love, sweat and tears. for all the students out there - this stuff is done in time on evenings and weekends after exhausting days of work. year in and year out. for peolpe with jobs personal time is precous and worth a lot to them personally - so in working on e we invest much of ourselves in it. we are a project with $0 funding. unlike many other projects of similar visibility, no company has stepped forward to seriously partner with us to fund its
development (thus it moves very slowly). over the years there have been times when me, or mandrake or mej have had paid work time to work on things. but those have been minimal in the scheme/lifetime of E.

a BSD +attribution license is a way of extending an olive branch to companies possibly willing to put down some hard cash. we all have principles and stick to them like glue. i have had a few job offers before for large sums, BUT they would have meant an IP agreement that would mean i no longer could work on E as all my coding work would belong to the company. such offers i have turned down, even after negotiations and big carrots. if you cant, trust us that we have the interests of the project at heart and will maintain that, but in doing so we like to “bend with the wind” a bit more than most to achieve the goal.

so… after a bit of length there - thats the reason i have used bsd licenses, and almost all of the core develoeprs agree with such licenses as being the way to go - we may simply think alike on the topic, but that is one thing that definitely binds us all together.

Publicado en FreeBSD | No hay comentarios »

Repositorio de shell scripts para usar y aprender.

18 February, 2008

Tal y como hay un gran repositorio como es Sourceforge he encontrado navegando con mi Debian y el Firefox y he redescubierto a SHELLdorado. Se trata de un buen repositorio de scripts para UNIX, mayormente escritos en BASH (también los hay en KSH). Podemos encontrar scripts para tratamiento de archivos, scripts de utilidades de sistema y administración, para conversiones, html, correo ¡y mucho más!Por si esto fuera poco, este gran site incluye una sección de links que no te la vas a acabar en tu vida, un conjunto de tips ordenados por nivel, e incluso algunos artículos.

Publicado en FreeBSD, Linux | No hay comentarios »

Cambiar el nice de un proceso en KDE4

31 January, 2008

Llevo un rato usando el nuevo System Activity para KDE4 y me ha gustado bastante, todo se ve muy simple, como tiene que ser. Pero lo que más me ha gustado es el diálogo Renice Process. Si haces clic con el botón derecho a un proceso de la lista puedes enviarle las típicas señales de toda la vida y también puedes cambiarle el nice. Este es el diálogo que me ha salido al probarlo con el proceso psi.

Es precioso!

Una vez el sistema ha estado instalado y actualizado, he seguido las instrucciones de instalación de KDE 4 RC2 y en un momento lo tenia funcionando (sin tener que desinstalar KDE 3.5). Sólo he tenido algunos problemas con los paquetes kdm y kdm-kde4, pero ya está todo solucionado.

Todos los cambios que he visto en KDE4 son a mejor, sin duda (me quedo especialmente con Dolphin y Oxygen). Pero es innegable que esto no es una Release Candidate, sino una Beta, y las Betas no eran Betas sino Alphas, creo que me explico lo suficientemente bien. La idea de RC es que todo esté terminado para poder pulir los bugs que queden. Pero aquí hay cosas sin terminar, especialmente Plasma que irónicamente es el centro de todas las miradas por ser lo mas visible. Por otra parte hay que decir que el escritorio no peta, parece que realmente las bases están bien asentadas, y lo que pueda fallar (y falla) son algunas de las aplicaciones que corren sobre él.

Por lo tanto supongo que va a pasar lo de siempre, es muy probable que cuando salga KDE 4.0, estemos ante una versión no del todo estable y tengamos que esperar hasta KDE 4.1 para algo más completo. Dejo una imagen de su aspecto:

  

Publicado en Actualidad, FreeBSD, Linux | No hay comentarios »

Distribuciones de FreeBSD

31 January, 2008

A diferencia de GNU/Linux, FreeBSD no es un puzzle que necesite de un distribuidor que lo monte y lo empaquete, creando así cientos de sabores distintos de un mismo sistema (distinto software por defecto, distinto instalador y distinta forma de administrar y actualizar el sistema). FreeBSD es un sistema operativo completo y proporciona no sólo un núcleo sinó el conjunto de funcionalidades que componen el sistema.

De todas formas, pese a existir una distribución central y oficial que llamamos FreeBSD, también hay distribuciones derivadas de él, que aunque normalmente no tan conocidas, están pensadas para situaciones muy concretas y ofrecen una alternativa al FreeBSD original.

La diferencia principal, si es que queremos compararlas con las distribuciones de GNU/Linux, es que FreeBSD de por sí ya tiene un sistema para compilar, instalar, desinstalar, actualizar aplicaciones, el sistema de ports y packages. Por lo que, aunque algunas de las distribuciones de FreeBSD ofrezcan sistemas alternativos de hacer lo mismo, siguen siendo compatibles con el sistema tradicional de administración de este sistema operativo. Comparar una distribución de FreeBSD con el FreeBSD original es más parecido (a efectos prácticos) a comparar Ubuntu con Debian, por poner un ejemplo.  Leer mas … »

Publicado en FreeBSD | Comments Off

Verbose

6 January, 2008

Yo diria que todos los comandos llevan verbose, pongo un ejemplo en ssh muy interesante :)
Sale mucha información y sobretodo si hacemos “verbose” tres veces, es decir lo máximo.

En este caso que pongo es muy interesante para detectar problemas con llaves públicas, por ejemplo.

Si quereis probar …

  • #ssh -v localhost
  • #ssh -vv localhost
  • #ssh -vvv localhost

xavi@debian ~ $ ssh -v -l xavi localhost
OpenSSH_4.5p1, OpenSSL 0.9.8d 07 Sep 2008
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to localhost [127.0.0.1] port 22.
debug1: Connection established.
debug1: identity file /home/xavi/.ssh/identity type -1
debug1: identity file /home/xavi/.ssh/id_rsa type -1
debug1: identity file /home/xavi/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.5
debug1: match: OpenSSH_4.5 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.5
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
The authenticity of host ‘localhost (127.0.0.1)’ can’t be established.
RSA key fingerprint is 56:0a:7a:7d:fd:5e:a1:bf:1f:5d:1e:7e:0b:87:11:3a.
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts (/home/xavi/.ssh/known_hosts).
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /home/xavi/.ssh/identity
debug1: Trying private key: /home/xavi/.ssh/id_rsa
debug1: Trying private key: /home/xavi/.ssh/id_dsa
debug1: Next authentication method: keyboard-interactive
Password:
debug1: Authentication succeeded (keyboard-interactive).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
Last login: Thu Dic 18 23:31:54 2007 from server
xavi@debian ~ $

Publicado en FreeBSD, Linux | No hay comentarios »

Compilando Kernel de FreeBSD

21 August, 2007

Hay quien usa FreeBSD como un sistema de escritorio y no solo como un servidor, incluso hasta podemos tenerla en un portatil. Una de las cosas que casi con toda seguridad toca es la de compilar el kernel. Antes de seguir ni que decir que con la distribución que más se puede aprender sigue siendo la “Slacky” es decir la Slackware. En FreeBSD aparte de usar los ports es casi “imprescindible” recompilar el kernel.

Basicamente se necesita añadir:

  • Soporte para la tarjeta de sonido sin tener que cargar el driver en /etc/rc.conf
  • Soporte para altas resoluciones en la consola
  • Especificar que la CPU es i686
  • Soporte para CDROM
  • Soporte para Disquetera (aunque es una cosa obsoleta podriamos excluirla)
  • Soporte para puertos COM, LPT, etc
  • Drivers Ethernet o Wireless

¿Cómo compilar el kernel en FreeBSD?

El proceso de compilación del kernel en FreeBSD es muy simple. En /usr/src/sys se encuentra el código fuente del kernel. Si tenemos bien configurado el cvsup podemos actualizar el código a la última versión de esta forma:

# cd /usr/src
# make update

Con esto hemos actualizado el código fuente de todo el sistema base, ahora entramos en /usr/src/sys/i386/conf y hacemos una copia del fichero de configuración del kernel que viene por defecto:

# cd /usr/src/sys/i386/conf
# cp GENERIC NUEVOKERNEL

NUEVOKERNEL es un fichero de texto plano al que sólo tenemos que comentar (#) o descomentar las lineas adecuadas dependiendo de lo que estemos buscando. Para esto nos será extremadamente útil leer The Configuration File en el Handbook de FreeBSD. Lo editamos con ee (”easy editor”, viene por defecto en la instalación base) o con edir (lo prefiero por comodidad ya que el vi es bastante rollo.), y hacemos las modificaciones:

# edit NUEVOKERNEL

# cd /usr/src
# make buildkernel KERNCONF=NUEVOKERNEL

# make installkernel KERNCONF=NUEVOKERNEL

Ahora el nuevo kernel se ha instalado en /boot/kernel/kernel y el antiguo se ha movido a /boot/kernel.old/kernel
Reiniciamos: # reboot

Y si lo hemos hecho todo bien ya podemos disfrutar de un kernel a medida en nuestro sistema FreeBSD.

Publicado en FreeBSD | No hay comentarios »