qemu-img.exe convert -O vmdk hdd.vdi hdd.vmdk

This works from windows xp to win7 including winvista
Insert stick [4G]
diskpart
LIST DISK
SELECT DISK 1 -> could be other disk
CLEAN
CREATE PARTITION PRIMARY
SELECT PARTITION 1
ACTIVE
FORMAT FS=NTFS QUICK
ASSIGN
EXIT

c:\>h:\boot\bootsect.exe /nt60 G:
Target volumes will be updated with BOOTMGR compatible bootcode.

G: (\\?\Volume{4d8bf5bc-6871-11de-96b2-001e8caaee56})

Successfully updated NTFS filesystem bootcode.

Bootcode was successfully updated on all targeted volumes.

the copy the contents from iso/dvd on stick

tar cf file.tar files – create a tar named file.tar containing files
tar xf file.tar – extract the files from file.tar
tar czf file.tar.gz files – create a tar with Gzip compression
tar xzf file.tar.gz – extract a tar using Gzip
tar cjf file.tar.bz2 – create a tar with Bzip2 compression
tar xjf file.tar.bz2 – extract a tar using Bzip2
gzip file – compresses file and renames it to file.gz
gzip -d file.gz – decompresses file.gz back to file

There are repository rpm packages for RHEL4 and RHEL5 . The repository package installs the repo details on your local
system for yum or up2date to use. Then you can install packages with your usual method, and the EPEL repository is
included.

su -c 'rpm -Uvh http://mirror.nl.leaseweb.net/epel/5/i386/epel-release-5-4.noarch.rpm'
...
su -c 'yum install foo'

centos repo yum

[mysqld]
default-character-set=utf8
default-collation=utf8_general_ci
character-set-server=utf8
collation-server=utf8_general_ci
init-connect='SET NAMES utf8'

[client]
default-character-set=utf8

set all to utf8 in my.cnf

whois -h filtergen.level3.net RIPE::ASXXXX

1. Log in as root in SSH.
2. Type mysql -uadmin -p`cat /etc/psa/.psa.shadow`, and then press Enter.
3. Type use psa;, and then press Enter.
4. Type select * from sys_users;, and then press Enter.
5. Type select * from accounts where id = 2;, and then press Enter.
A table displays that shows the id, type, and password for accounts where the ID = 2.

sc.exe create testservice binPath= "C:\test.exe -k runservice" DisplayName= "testservice"
sc.exe delete testservice

10 Port Forwarding

By:
Stephen Carville
Rev:
08/23/02

Port Forwarding is also possible using OpenSSH (Sec 17.2).

10.1 Using xinetd redirect function

The simpliest and, in my opinion, the preferred way to handle redirecting unencrypted connections is to use the redirect
capability built into xinetd.

If necessary, add services names to /etc/services. For example:
geofwd 50005/tcp # GeoTrac forwarded port

1. Add service file to /etc/xinetd.d. Example file:
# default: on
# description: forward connections to indian:1005
service geofwd
{
flags = REUSE
socket_type = stream
wait = no
user = root
redirect = 192.168.124.4 1005
log_on_failure += USERID
}

2. Restart xinetd
# /etc/rc.d/init.d/xinetd restart

10.2 Using Netcat

The netcat utility is sometimes described as the ‘Swiss Army Knife” of the network. Here we are using it for very basic
port forwarding from an externally accessible server to an internal server. If it is not necessary to run the forwarding
service continiously, on Redhat it is prefereable to use xinetd forwarding.

1. Install netcat from CDROM or from ftp
# rpm -Uvh ftp://volga/pub/RPMS/nc-*.rpm
2. Add services names to /etc/services. For example:
geofwd 50005/tcp # GeoTrac forwarded port(netcat)
3. Add service file to /etc/xinetd.d. Example file:
4. # default: on
# description: forward connections to panama:1005
service geofwd
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/bin/nc
server_args = 192.168.124.38 1005
log_on_failure += USERID
}

5. Restart xinetd
# /etc/rc.d/init.d/xinetd restart

SELECT accounts.id, mail.mail_name, accounts.password, domains.name FROM domains LEFT JOIN mail ON domains.id = mail.dom_id LEFT JOIN accounts ON mail.account_id = accounts.id