Archive

Archive for the ‘Server’ Category

convert to utf8

November 8th, 2011 No comments

#/bin/bash
LIST=`find . -name *.inc`
for i in $LIST;
do iconv -c -f euc-kr -t utf8 $i -o $i.”utf8″;
mv $i.”utf8″ $i;
done

Categories: Server, System Tags:

replace string, sed

February 17th, 2011 No comments

$sed -i 's/foo/foo_bar/g' filename.ext

$find . -type f -exec sed -i ‘s/foo/foo_bar/g‘ {} \;

Categories: Server Tags:

remove ssl encryption

October 30th, 2010 No comments

openssl rsa -in server.key -out server.key.new

mv server.key.new server.key

chmod 600 server.key

Categories: Server Tags: , ,

iptables: block ip address

August 6th, 2010 No comments

iptables -A INPUT -s 139.76.64.65 -j DROP
iptables -A INPUT -s 139.76.224.65 -j DROP

iptables -D INPUT -s 139.76.224.65 -j DROP

Categories: Server Tags: , ,

Ubuntu VM on Xen FIX: perl: warning: Setting locale failed.

July 27th, 2010 No comments

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory

# locale-gen en_US en_US.UTF-8 hu_HU hu_HU.UTF-8

# dpkg-reconfigure locales

Categories: Server, System Tags: ,

logrotate debug

June 8th, 2010 No comments

logrotate -f -v /etc/logrotate.conf

than it will update /var/lib/logrotate/status

Categories: Server Tags: , ,

Server Configuration Job Log

December 13th, 2009 No comments

Dell PowerEdge  SC1420

Dell CERC SATA 1.5/6ch RAID Controller

Windows 2003 / MS SQL 2005 / Accpac ERP

IMG_0506

1. Upgrade system BIOS, raid controller firmware on windows 2003

2. Attach a new hard disk and configure raid 0, virtual drive #1

3. Move all data on current D drive to new attached drive

4. Back up C partition as a image: Clonezilla

5. Reconfigure hard disk 1 & 2 as raid 1, virtual drive #0

6. Restore backed up C drive image to new reconfigured virtual drive #0

Categories: Server, System Tags: , , ,

Linux Server Monitoring Tools

November 4th, 2009 No comments

- Network Monitoring
tcptrack
iptraf

- CPU, Memory Monitoring
top
free

- Disk I/O Monitoring
iostat(sysstat)

Categories: Server, System Tags: , , ,

Mount LVM disk

September 1st, 2009 No comments

#apt-get install lvm2

#pvscan
PV /dev/sdb1 VG server-roma lvm2 [136.49 GB / 0 free]
Total: 1 [136.49 GB] / in use: 1 [136.49 GB] / in no VG: 0 [0 ]

#vgscan
Reading all physical volumes. This may take a while…
Found volume group “server-roma” using metadata type lvm2

#vgchange -a y
2 logical volume(s) in volume group “server-roma” now active

#lvscan
ACTIVE ‘/dev/server-roma/root’ [130.91 GB] inherit
ACTIVE ‘/dev/server-roma/swap_1′ [5.58 GB] inherit

#mount /dev/server-roma/root /mnt

Categories: Server, System Tags: , , , ,

ubuntu server 9.04 grub menu.lst

September 1st, 2009 No comments
title           Ubuntu 9.04, kernel 2.6.28-15-server
uuid            18173536-b479-4e5f-80f6-a363503b55e1
kernel          /boot/vmlinuz-2.6.28-15-server root=UUID=18173536-b479-4e5f-80f6-a363503b55e1 ro quiet splash
initrd          /boot/initrd.img-2.6.28-15-server
quiet
title           Ubuntu 9.04, kernel 2.6.28-15-server (recovery mode)
uuid            18173536-b479-4e5f-80f6-a363503b55e1
kernel          /boot/vmlinuz-2.6.28-15-server root=UUID=18173536-b479-4e5f-80f6-a363503b55e1 ro  single
initrd          /boot/initrd.img-2.6.28-15-server
title           Ubuntu 9.04, kernel 2.6.28-11-server
uuid            18173536-b479-4e5f-80f6-a363503b55e1
kernel          /boot/vmlinuz-2.6.28-11-server root=UUID=18173536-b479-4e5f-80f6-a363503b55e1 ro quiet splash
initrd          /boot/initrd.img-2.6.28-11-server
quiet
title           Ubuntu 9.04, kernel 2.6.28-11-server (recovery mode)
uuid            18173536-b479-4e5f-80f6-a363503b55e1
kernel          /boot/vmlinuz-2.6.28-11-server root=UUID=18173536-b479-4e5f-80f6-a363503b55e1 ro  single
initrd          /boot/initrd.img-2.6.28-11-server
title           Ubuntu 9.04, memtest86+
uuid            18173536-b479-4e5f-80f6-a363503b55e1
kernel          /boot/memtest86+.bin
quiet

/boot/grub/menu.lst

title           Ubuntu 9.04, kernel 2.6.28-15-server
uuid            18173536-b479-4e5f-80f6-a363503b55e1
kernel          /boot/vmlinuz-2.6.28-15-server root=UUID=18173536-b479-4e5f-80f6-a363503b55e1 ro quiet splash
initrd          /boot/initrd.img-2.6.28-15-server
quiet

title           Ubuntu 9.04, kernel 2.6.28-15-server (recovery mode)
uuid            18173536-b479-4e5f-80f6-a363503b55e1
kernel          /boot/vmlinuz-2.6.28-15-server root=UUID=18173536-b479-4e5f-80f6-a363503b55e1 ro  single
initrd          /boot/initrd.img-2.6.28-15-server

title           Ubuntu 9.04, memtest86+
uuid            18173536-b479-4e5f-80f6-a363503b55e1
kernel          /boot/memtest86+.bin
quiet

Categories: Server, System Tags: , ,