OpenVMS - IPv6

Memo about configure ipv6 on OpenVMS system as host mode: First of all invoke the TCPIP$IP6_SETUP command procedure by entering the following command: TARDIS::LEO$ @SYS$MANAGER:TCPIP$IP6_SETUP Leaving default option to all question, in this mode the dcl create default configuration script. Then edit the inet6 script: TARDIS::LEO$ EDIT SYS$SYSTEM:TCPIP$INET6_CONFIG.DAT After the “up” command $ ifconfig "IE0" ipv6 up Append the following line with ip and default gateway: $ ifconfig "IE0" inet6 ip6prefix 2001:1418:0193:0001::40/64 $ route add -inet6 default 2001:1418:0193:0001::250 -"I" "IE0" Save, exit and run the dcl: ...

14 April 2010 @ 11:09 · leo

CentOS - IPv6 interface

You need to update and configure following files for IPv6 configuration: Edit: /etc/sysconfig/network And append following line, to enable in systemwide the ipv6 protocol: NETWORKING_IPV6=yes Edit: /etc/sysconfig/network-scripts/ifcfg-eth1 (or your interface number) And append following line, to enable ipv6 on interface and the address/gateway if you use static routing: IPV6INIT=yes IPV6ADDR=2001:1418:0193:000B::210 IPV6_DEFAULTGW=2001:1418:0193:000B::251 Save, close and restart network service: # service network restart

14 April 2010 @ 09:53 · leo

Debian - Kernel Headers

Memo: Install linux-header package # apt-get install linux-headers-$(uname -r)

14 April 2010 @ 07:27 · leo

Neoware Thin Client - Password Recovery

Personally I tried this procedure on Neoware e140 wich run Neolinux 2.x but i think it’s the some with other models or os version: Power on the thin client Press ‘SHIFT’ during boot procedure Now you can get LILO prompt, type: vga simple (I have tried without success to run directly init=/bin/bash the system start but don’t load correctly the filesystem on flashdrive) After kernel starting up procedure you can’t see nothing, then you can jump on terminal 2 pressing ‘ALT + F2’ ...

10 April 2010 @ 16:54 · leo

Vim - Syntax highlighting

Turn on color syntax highlighting Now press ESC key, type : syntax on :syntax on You can edit ~/.vimrc file and add command syntax on to it so that next you will start vim with color syntax highlighting option $ vim ~/.vimrc Append the following line: syntax on

30 March 2010 @ 01:01 · leo

GRUB - Init Shell

Sometime in case of root password lost or file system corruption, you need to boot system with simple shell, skipping the init sequence. At Grub prompt press ’e’ to edit command before booting. Select ‘kernel’ line Press ’e’ again to edit selected command Type follow at end of the line: init=/bin/bash (or sh) Press ‘b’ to boot system Now you are at shell prompt. Enjoy

30 March 2010 @ 00:44 · leo

Linux - dmidecode

dmidecode is a tool for dumping a computer’s DMI (some say SMBIOS) table contents in a human-readable format. This table contains a description of the system’s hardware components, as well as other useful pieces of information such as serial numbers and BIOS revision. If you like to see which memory banks is in use and what the ram module sizes, you simply call dmidecode with memory parameter. # dmidecode -t memory ...

29 March 2010 @ 08:56 · leo

Cron Syntax

22 March 2010 @ 16:04 · leo

PHP & FlickrAPI - Photo wall

I wrote a simple code/class for automatic get photos from flickr photostream (by service API) to compose randomly a nice miniature photowall (you can see an example on my homepage). First of all you can need API code (only key, we don’t need secret authentication). Now the code, my class file was called lib/fget.php in here we define variable, class and function construct: <?php class Flickr { //API Key you can get them on http://www.flickr.com/services/apps/create/apply/ private $apiKey = 'xxxx'; //We define our numeric username http://www.flickr.com/services/api/explore/?method=flickr.people.getInfo private $NSID = 'xxxx'; //File per page (max file 200 for free account) private $ppage = '400'; public function __construct() { } public function retrive() { //For get data we use REST method and serialize option $getdata = 'https://flickr.com/services/rest/?method=flickr.photos.search&api_key=' . $this->apiKey . '&user_id=' . $this->NSID . '&per_page=' . $this->ppage . '&format=php_serial'; //Get the data $result = file_get_contents($getdata); //De serialize for array use $result = unserialize($result); return $result; } } ?> Now include the class into a sample page: ...

19 March 2010 @ 03:29 · leo

Squid - Radius auth

In this example a squid installation will use RADIUS “squid_radius_auth” Squid RADIUS authentication helper to authenticate users. Get last version of squid radius auth helper at: http://www.squid-cache.org/contrib/squid_radius_auth/ Download: [leo@srv01 leo]# wget http://www.squid-cache.org/contrib/squid_radius_auth/squid_radius_auth-1.10.tar.gz Extract: [leo@srv01 leo]# tar -xvf squid_radius_auth-1.10.tar.gz Go to directory: [leo@srv01 leo]# cd squid_radius_auth-1.10 Compile: [leo@srv01 squid_radius_auth-1.10]# make gcc -O2 -Wall -g -c -o squid_rad_auth.o squid_rad_auth.c gcc -O2 -Wall -g -c md5.c gcc -O2 -Wall -g -c util.c gcc -g -o squid_radius_auth squid_rad_auth.o md5.o util.o Now the installation, for my needs, I wanna keep binary into /usr/lib/squid/ and configuration file into /etc/squid/ and I don’t wanna take man files then edit Make.inc like this: ...

15 March 2010 @ 02:16 · leo