Archive for February, 2010

http://www.linuxscrew.com/2009/12/21/best-of-linux-cheat-sheets/

Atomic Archives

* [atomic] – stable rpm channel for packages created by ART.
* [atomic-testing] – near production quality packages created by ART.
* [atomic-bleeding]- untested, non-production packages with frequently zero testing, and known unresolvable compatibility issues created by ART. You shouldn’t be here unless you are me.
* [plesk] – 3rd Party channel for SW-Soft’s Plesk Server Administrator

GPG Key
All ART packages are signed with GPG. This is to ensure that the packages have not been tampered with. ART packages that fail the gpg check should be reported immediately.

Install the ART GPG key:
wget http://www.atomicrocketturtle.com/RPM-GPG-KEY.art.txt
rpm --import RPM-GPG-KEY.art.txt

Yum Atomic Archives
CentOS 3 – 5 / RHEL 3 – 5 / Fedora 4 – 10
The Atomic archives are available through the yum package manager for Fedora, RHEL and CentOS.These archives require access to both the vendors base and update channels, RHEL3 and RHEL 4 users are therefore recommended to access the atomic archives through up2date.

Automatic configuration
Using Lynx (yum -y install lynx):
lynx -source http://www.atomicorp.com/installers/atomic.sh | sh

Using Wget:
wget -q -O - http://www.atomicorp.com/installers/atomic.sh | sh

1. Create a subdomain z-WILDCARD in Plesk – of course in the admin section of the right domain.
Why do we need this name? ’cause this entry should be the last entry in the list of subdomains, otherwise this
“trick” will not work. So if you have a domain as e.g. zabalula , than you should maybe name the subdomain zzzz-WILDCARD
or similar.
2. Add special configuration (catchall for all subdomains) to the vhosts.conf file of this subdomain.
Normally it’s located in /srv/www/vhosts/domain.com/subdomains/z-WILDCARD/conf/vhosts.conf. You have to create it
– normally you need the root user to do this. Copy the following content into the file:
ServerAlias *.domain.com
3. Apply the new configuration – recreate the Apache configuration. You have to run the tool websrvmng which is a
Plesk tool that manages and creates the webserver configuration. Execute the following as root user.
/usr/local/psa/admin/sbin/websrvmng -u --vhost-name=domain.com
4. Finally – restart Apache to load the new configuration, also as root.
apache2ctl restart

ls | while read line; do x=$(echo $line |egrep -o .*mp3); mv $line $x ;done

#!/bin/sh
SERVICE='named'
if ps ax | grep -v grep | grep $SERVICE > /dev/null
then
cat /dev/null
else
echo "$SERVICE is not running... starting"
/etc/init.d/$SERVICE restart | mail -s "$SERVICE restarted" email@domain.tld
fi

p.s. do not name the script as the service 🙂

create file if not exists: /var/www/vhosts/somedomain.com/conf/vhost.conf
<Directory /var/www/vhosts/somedomain.com/httpdocs>
php_admin_flag engine on
php_admin_value open_basedir none
</Directory>

/usr/local/psa/admin/sbin/websrvmng -u --vhost-name=somedomain.com

/usr/bin/mysql_secure_installation

/usr/local/pem/bin/logparser.sh

webalizer -p -N 5 -o /usr/local/pem/vhosts/103177/webspace/webstat -n d1011250.domain.com -c
/usr/local/pem/vhosts/103177/webspace/conf/webalizer.conf /usr/local/pem/vhosts/103177/log/access_log.new

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