Thursday, December 26, 2013

CentOS : Network Setting

Fail berada di:
/etc/sysconfig/network-scripts
Nama fail:
ifcfg-eth0 / ifcfg-eth1

Format untuk setting secara manual:
DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
HWADDR=xx:xx:xx:xx:xx:xx
bootproto=none
ipaddr=xxx.xxx.xxx.xxx
prefix=xx
gateway=xxx.xxx.xxx.xxx
dns1=
xxx.xxx.xxx.xxx
dns2=
xxx.xxx.xxx.xxx
NETMASK=
xxx.xxx.xxx.xxx
IPADDR=xxx.xxx.xxx.xxx
GATEWAY=xxx.xxx.xxx.xxx
TYPE=Ethernet
DEFROUTE=YES


#Jangan lupa untuk restart service network:
   /etc/init.d/network restart                  (start/stop/restart/status)

   @
  service network restart                        (start/stop/restart/status)

Friday, December 20, 2013

CentOS : Cronjob - Setiap Jumaat, 8.00 Malam

* 20 * * 5 (command line)

#Nak edit cronjob:
  crontab -e

#Nak listkan cronjob:
  crontab -l

#Jangan lupa untuk restart service cronjob:
   /etc/init.d/crond restart                  (start/stop/restart/status)

#Untuk tengak status service cronjob:
   /etc/init.d/crond status

#Nak check & update security patches:
  yum --security check-update
  yum update --security

NetVault : Error Semasa Install Ejen Client Bakbone

Kemungkinan library bagi NetVault berkenaan tidak di install.

Cara-cara:
1. Taip langkah berikut dan ENTER:
    yum install ld-linux.so.2

2. Kemudian, tengok service berkenaan dah hidup@tidak:
    ps -ef

Nak install APM bagi ejen berkenaan:
>Client Management
   >Di server berkenaan: klik kanan & install software.

Link support :
support.quest.com

Linux : Check Berapa Lama Server Hidup/Tidak Down/Shutdown/Restart (Uptime)

1. Buka console/terminal.
2. Taip "uptime", kemudian ENTER.

Friday, December 13, 2013

Ubuntu 10.04 (Server) : Nak remove INODE yang dah penuh dalam storage (100%)

Masalah ruangan server penuh, sedangkan ruangan HDD masih kosong (tak boleh nak save, edit dll). Kemungkinan INODE dah penuh.

OS Linux lain pun boleh guna cara ini.

Cara-Cara:
1.    Taip “df –i” dan ENTER. Kalau “df -h” tidak nampak space INODE.

2.    To count all the files in a directory and all it's subdirectories. Taip:
       for i in /*; do echo $i; find $i | wc -l; done

3.    Tengok mana directori mana yang bersaiz besar sekali. Catatkan.

4.    Dalam kes ini direktori /var paling besar. Jadi, gantikan arahan diatas dengan arahan ini. Taipkan:
       for i in /var/*; do echo $i; find $i | wc -l; done

5.    Tengok mana direktori mana yang bersaiz besar sekali. Catatkan.

6.    Ulang sub-direktori bagi direktori berkenaan (/var/spool). Catatkan.
       for i in /var/spool/*; do echo $i; find $i | wc -l; done

7.    Tengok direktori mana yang bersaiz besar sekali. Catatkan.

8.    Ulang sub-direktori bagi direktori berkenaan (/var/spool/postfix). Catatkan.
       for i in /var/spool/postfix/*; do echo $i; find $i | wc -l; done

9.    Ulang sub-direktori bagi direktori berkenaan (/var/spool/postfix/maildrop). Catatkan.
       for i in /var/spool/postfix/maildrop/*; do echo $i; find $i | wc -l; done

10.  Delete fail-fail yang ada dalam direktori berkenaan. Taip:
       rm -rf /var/spool/postfix/maildrop/*

11.  Sekiranya tidak dapat delete menggunakan command “fm -rf ” seperti di atas (langkah 10), gunakan command “find dan delete”:
       cd /var/spool/postfix/maildrop        (masuk ke dalam direktori berkenaan)
       ls -l | wc -l && time find -type f -delete >> /var/spool/remove_log

12.  Selesai. Ruangan telah menjadi kecil.

13.  Pastikan untuk memantau dari masa ke semasa fail log atau apa-apa fail yang dijana secara automatik. Delete fail-fail lama sekiranya perlu.


Sebelum

Selepas

Citrix XenServer : Cara Nak Force Shutdown VM

* Sekiranya force shutdown cara biasa tak berkesan

1. Log into the Xenserver host that is running your VM with issues via ssh or console via XenCenter

2. Run the following command to list VMs and their UUIDs
xe vm-list

3. First you can try just the normal shutdown command with force
xe vm-shutdown uuid= force=true

4. If that just hangs, use CONTROL+C to kill it off and try to reset the power state. The force is required on this command
xe vm-reset-powerstate uuid= force=true

5. If the VM is still not shutdown, we may need to destroy the domain

6. Run this command to get the domain id of the VM. It is the number in the first row of output
list_domains

7. Now run this command using the domain ID from the output of step 6
/opt/xensource/debug/xenops destroy_domain –domid


Link:
http://gimpland.org/now/2013/01/citrix-xenserver-how-to-force-shutdown-virtual-machines/

Tuesday, June 12, 2012

Linux : Lokasi REPO File

CentOS
/etc/yum.conf

Ubuntu
/etc/apt/sources.list

Friday, May 25, 2012

Ubuntu : Default bahasa telah bertukar ke bahasa lain

>> Dalam /etc/default/locale

LANG=zh_CH
*bahasa Cina

tukar kepada

LANG=en_US.UTF-8
*bahasa Inggeris

>> Kemudian restart pc.

Tuesday, May 22, 2012

Ubuntu : Classic Start Menu

Taip :
sudo apt-get install gnome-panel

Apabila selesai, logoff skrin & klik pada gambar 'gear'.

Pilih option yg lama.

Thursday, April 5, 2012

Windows : Speed up boot shutdown computer

START UP

Prefetch Setting
1. Delete semua file dalam "C:\Windows\Prefetch".
2. Open "regedit" and browse to this key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters

3. Tukarkan nilai "EnablePrefetcher" dari 3 kepada 2.
4. Restart PC.

*Kod nilai prefetcher:
0 - Disabled : The prefetch system is turned off.
1 - Application : The prefetch only caches applications.
2 - Boot : The prefetch only caches boot system files.
3 - All : The prefetch caches boot, and application files.
We don't want to disable it entirely. This would actually make boot times *longer*. This is because this feature is also used to speed up the loading of boot files. That is why we are going to pick the number 2 option. It allows us to keep the advantage of caching system files, without continually clogging the system up with applications.

Perform a Boot Defragment
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Dfrg\BootOptimizeFunction
-Edit the Enable string value to Y if it is not already set to Y.
-Tutup registry dan restart komputer.

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control
- WaitToKillServiceTimeout 2000

HKEY_CURRENT_USER\Control Panel\Desktop 
- HungAppTimeout 2000
- WaitToKillAppTimeout 2000
- AutoEndTasks  1

HKEY_USERS\.DEFAULT\Control Panel\Desktop 
- HungAppTimeout 2000
- WaitToKillAppTimeout 2000 (Kalau tiada, buat baru - New > String Value)
- AutoEndTasks 1

Delete Startup Menu
Start > Programs > Startup
-Delete semua program.
-Klik-kanan pada item untuk delete.

Clean out your Scheduled Tasks folder
-C:\Windows\Tasks
-Delete mana2 shortcut yang tidak perlu.

Edit "msconfig" System configuration utility @ guna "ccleaner".

SHUT DOWN

Don't have XP clear your paging file at shutdown
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
-Tukarkan nilai ClearPageFileAtShutdown kepada 0.
-Tutup registry dan restart komputer.

Fast Shutdown Shortcut
-Klik-kanan desktop Windows 7 dan pilih > New > Shortcut.
-Masukkan > shutdown.exe -s -t 00 -f dalam location field.
-Berikan nama bersesuaian, contoh: Shut Down Computer dan klik 'Finish'.

BIOS boot menu
1. Run a Quick POST (power on self test).
2. Disable booting from a floppy (especially slow), cd, usb.
3. Turn off Boot Delay if you BIOS has this available.

*Install CCleaner : Remove unwanted registry.
*Defrag PC.

Tips:
[Windows] + R = Run

Link:

Backup Data PC Sendiri

1. Buat file dalam format "*.bat".
- xcopy d:\KKM\* h:\backup_KKM\%date:~0,3%\* /Y /Q /S
- xcopy d:\KKM_Email\* h:\backup_KKM_Email\%date:~0,3%\* /Y /Q /S
2. Save di tempat bersesuaian.
3. Buka 'Task Scheduler' di Control Panel > Administrative Tools.

Pandai2 la tu...

Monday, April 2, 2012

Lambang/Bendera Zionis, Israel dalam PC

Lokasi gambar:

1. Buka komputer/laptop.
2. Pada "Local Disk (C:\)" >> Program Files >> Microsoft Office >> Media >> CAGCAT10
3. Cari gambar no "J0285926" dan klik.

Anda akan jumpa gambar lambang/bendera ZIONIS, ISRAEL lengkap dengan lilin (lambang ibadah mereka). Delete gambar berkenaan.

*Gambar tersebut ada di seluruh komputer dan laptop.

Thursday, January 26, 2012

Fedora 16 : Disable Mesej "Hard Disk Problems Detected"

1. Buka terminal
2. Taip "gnome-session-properties" dan ENTER.
3. Disable/untick "Disk notifications".
4. Settle.

Tuesday, November 1, 2011

Remote Desktop (Override RD)

mstsc /console /v:[IPServer]:[port]

Contoh:
mstsc.exe /console /v:10.17.1.251
mstsc.exe /v:10.17.1.251:3389


Sekiranya tidak boleh:
mstsc.exe /admin /v:10.17.1.251

Friday, October 21, 2011

Ubuntu 11.10 : Tukar password root

sudo su -
(masukkan password user)
passwd
(masukkan password untuk root)
(masukkan password untuk root sekali lagi)

Done.

Win XP : Fix Master Boot Record (MBR)

1. Masukkan CD.
2. "To repair a Windows XP installation using Recovery Console", tekan 'R'.
3. Keluar sahkan, tekan 'ENTER' ... >> tekan dalam masa beberapa saat.
4. "The Recovery Console provides system repair and recovery functionality".
5. Keluar "1: C:\Windows", tekan 1.
6. Masukkan katalaluan Administrator, akan keluar "C:|Windows>".
7. "Sure to write a new MBR?", tekan 'Y' untuk Yes.
8. "The new master boot record has been successfully written".
9. Exit, restart pc.

Sunday, April 3, 2011

Ubuntu 10.04 : How to fix network manager applet missing from notification area

Problem

Hey i install ubuntu 10.04 this morning. A good experience till that when i came to know that there is no nm (network-manager) applet in my panel as a result of which i m unable to connect to the wireless network.

Solutions

Method 1
Open the terminal type “sudo edit /etc/NetworkManager/nm-system-settings.conf” change the “managed=false” to “managed=true” and then save it.

then in the terminal type “killall nm-system-settings” and then reboot.

Method 2
Right click panel>add to panel>Notification Area

Cara Tukar Owner File Dlm Linux

chown -R ptmxs.ptmxs

chown -R ptmxs:ptmxs