Posts By :

Roderick Derks

FC6: disable IPv6 network support 150 150 Roderick Derks

FC6: disable IPv6 network support

Disable IPv6 Networking Support to decrease unneeded system load if you're not going to use it anyway.

Edit /etc/sysconfig/network. (a restart of the network service is required)
[root@server ~]$ vi /etc/sysconfig/network
Change:
NETWORKING_IPV6=yes
To:
NETWORKING_IPV6=no

Disable IPv6 Protocol Stack for Kernel
Edit /etc/modprobe.conf.
[root@server ~]# vi /etc/modprobe.conf

Add the following 2 lines: (a restart of the network service is required)
alias net-pf-10 off
alias ipv6 off

Stop and disable IPv6 Firewall
[root@server ~]# /etc/init.d/ip6tables stop (or service ip6tables stop)
Flushing firewall rules:                                   [  OK  ]
Setting chains to policy ACCEPT: filter                    [  OK  ]
Unloading ip6tables modules:                               [  OK  ]

[root@server ~]# chkconfig –level 35 ip6tables off

Joomla: sef service map google url 150 150 Roderick Derks

Joomla: sef service map google url

Here is the link you can use in the Google webmaster tool to add a sitemap created by SEF Service Map:

http://<your site>/index2.php?option=com_sefservicemap&task=googlemap

VMWare: Very slow network throughput Host->Guest but not Guest->Host 150 150 Roderick Derks

VMWare: Very slow network throughput Host->Guest but not Guest->Host

Host system is linux FC6 and my guest system is also FC6 using VMWare server. But this also could be a Debian host and a WXP guest system.

I am using the bridged networking option and everything works great except for one very annoying thing.
Network transfers moving files from host->guest over the network is incredibly slow something <1KB/s.
This is independant of protocol, I’ve tried scp, ftp, and samba.
Transfering files using the above protocols from the guest->host is fine getting something in the order of 4000-7000 KB/s.

There is a solution to this problem… 

read more

Java script: countdown clock 150 150 Roderick Derks

Java script: countdown clock

Add this script to you HTML webpage:

 

<!– START 08. HOME – CONTENT – Countdown (1291)–>
 

<script language="javascript">

        var nowDate = new Date();
        var eventDate = new Date("Dec 31 2006 23:59:59 +0100");
        
        function update()
        {
            nowDate = new Date();
    
            secondstogo=(eventDate-nowDate)/1000;
            days = secondstogo/(24*60*60);
            days = Math.floor(days);
    
            secondstogo=secondstogo-(days*24*60*60);
            hours = Math.floor(secondstogo/(60*60));
            
            secondstogo=secondstogo-(hours*60*60);
            minutes = Math.floor(secondstogo/(60));
    
            secondstogo=secondstogo-(minutes*60);
            seconds = Math.floor(secondstogo);
    
            if (seconds < 10)
                seconds = "0" + seconds;
            
            newclock = days + " dagen<br/>" + hours + " uren<br/>" + minutes + " minuten<br/>" + seconds + " seconden<br/>";
            
            writit(newclock,'countDownInfo');
            ID=window.setTimeout("update();",1000);
        }
        
        function writit(text,id)
        {
            document.getElementById(id).innerHTML=text;
        }

        ID=window.setTimeout("update();", 1000);
</script>

<div id="countdown">
    <h1>COUNTDOWN</h1>
    <div>
        <img style="margin-left:10px; border:0px; float:left;" src="http://top2000.radio2.nl/data/media/db_images/original/42308.gif">
        <div id="countDownInfo"></div>
        <div style="clear:left;"></div>
    </div>
</div>
<!– STOP 08. HOME – CONTENT – Countdown (1291)–>

FC6: enable PHP extensions GD and DOMXML 150 150 Roderick Derks

FC6: enable PHP extensions GD and DOMXML

To enable the PHP extensions GD and DOMXML to get the Joomla Expose component to work properly I had to reconfigure the default FC6 PHP configuration.

To do this just execute the following commands:

# yum -y install php_gd php_domxml
# service httpd stop
# service httpd start

Pretty simple. You can download the Joomla Expose components here .

HPUX: Ignite restore from tape 150 150 Roderick Derks

HPUX: Ignite restore from tape

1. Boot the system
2. When it asks for a key interuption for interupting the boot sequence press any key.
3. This will give you ISL prompt.
4. Do a search for the devices. i.e SEA command.
5. Check which is a tape device (it will be mentioned as a Sequencial Device).
6. On the ISL Prompt give Command : BO (Tape device Name i.e. P1 , P2 etc.).
7. Press N for IPL.
8. It will boot from the tape.
9. Here you can select interactive or non-interactive recovery (this depends on if you have given options while creating the backup).  For a restore I used the non-interactive mode.

A menu appears. Choose "Install HP-UX". This will recover your system. If you are restoring to the same system you made the ignite tape from, you can use the non-interactive recovery. If you are restoring to a different system, it is best to use the advanced installation.
 

HPUX: Restore /etc directory from ignite tape 150 150 Roderick Derks

HPUX: Restore /etc directory from ignite tape

# mkdir cd /tmp/restore_etc
# cd /tmp/restore_etc
# mt -f /dev/rmt/0mn rew (rewind ignite tape)
# mt -f /dev/rmt/0mn fsf 1 (fast forward to right postion on tape)
# tar xvf /dev/rmt/0m etc (restore directory)

NO slash for "etc" -> not /etc

# cp -R -p -i . /etc/
Don't overwrite files by pressing the N key when asked

Another option
# tar xvf /dev/rmt/0m etc/aliases (restore single file)
NO slash for "etc"

Linux bash script for VMware: automated backup vm’s 150 150 Roderick Derks

Linux bash script for VMware: automated backup vm’s

Here is a script that I use to create backups of all of my VM's. There has been some evolution over time so I posted three versions. You can run these script after some adjustments on your VMware host server. For every VM the same routine is followed: stop, copy, start. To complete the backup procedure the backup that just was created is copied to a remote VMware server. So in case of a hardware failure you can start your VM's again on the remote machine. Be aware that this is not a hot backup, the VM's will be switched off.

read more

Using SSH, SCP and RSYNC without a password 150 150 Roderick Derks

Using SSH, SCP and RSYNC without a password

From time to time you want to write scripts that will allow you to copy files to or execute commands on remote systems. You want to execute these scripts without being prompted for a password and you don't want to store the password in the script file. To achieve this we can use ssh encryption keys. read more

Linux: vi quick reference 150 150 Roderick Derks

Linux: vi quick reference

Last Line Mode

Command Mode

Input Mode

Search Functions:

Screen/Line Movement:

Add/Append Text:

/exp                        Go forward to exp

0              Goto line start

a              Append after cursor

?exp                       Go backward to exp

$              Goto line end

A            Append at line end

:5                            Goto line 5

%            Goto matching

I              Insert before cursor

Move and Insert Text:

G             Goto last line

5i             Insert text 5 times

:3,8 d                      Delete line 3-8

 

 

:4,9m 12                  Move line 4-9 to 12

Word Movement:

Add New Lines:

:2,5 t 13                  Copy lines 2-5 to 13

W           Go forward one word

o             Open a line below cursor

:5,9w file                Write line 5-9 to file

3W         Go forward three words

O             Open a line above cursor

 

B             Go back one word

 

Save Files and Exit:

3B           Go back three words

Change Text:

:w                            Write buffer to disk

 

cw           Change a word

:w newfile              Write buffer to newfile

Search Functions:

3cw         Change 3 words

:w! file                    Write absolutely

n             Repeat previous search

C             Change a line

:wq                         Write buffer and quit

N             Reverse previous search

r              Replace one character

:q                            Quit editor

 

R             Replace/Type-over a line

:q!                           Quit, discard buffer

Delete Text:

 

:e!                           Reedit, discard change

x              Delete one character

Screen Movement:

 

dw          Delete one word

^d           Scroll down one half screen

Control Edit Session:

dd           Delete one line

^u           Scroll up one half screen

:set nu                    Display line numbers

D/d$       Delete to end of line

^f            Page forward one page

:set nonu               Turn off line numbers

d0           Delete to begin of line

^b           Page backward one page

:set all                    Show all settings

dG           Delete to end of file

H             Home, top of screen

:set list                   display invisible chars

4dd         Delete 4 lines

M            Middle of screen

 

 

L             Last line of screen

Global Replacement:

Cancel Edit Functions:

 

: %s/string_1/string_2/gc

u             Undo last change

 

:1,$ s/string_1/string_2/g

.               Do last change again

 

Global Delete

 

 

:g/pattern/d

Copy and Insert Text:

 

Read in A File:

Y             Yank a copy of a line

 

:r file_name

5Y           Yank a copy of 5 lines

 

 

P             Put below cursor

 

 

p             Put above cursor

 

 

 

 

 

Word Processing Functions:

 

 

J              Join next line to current

 

 

4J            Join 4 lines to current

 

 

xp            Transposes 2 characters

 

    Your Name (required)

    Your Email (required)

    Subject

    Your Message

      Your Name (required)

      Your Email (required)

      Subject

      Your Message