Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Centos Yum Install Download Only for Offline Install

 yum install yum-plugin-downloadonly yum-utils createrepo

mkdir /var/tmp/httpd
mkdir /var/tmp/httpd-installroot

yum install --downloadonly --installroot=/var/tmp/httpd-installroot --releasever=7 --downloaddir=/var/tmp/httpd httpd

createrepo --database /var/tmp/httpd

vi /etc/yum.repos.d/offline-httpd.repo

[offline-httpd]
name=CentOS-$releasever - httpd
baseurl=file:///var/tmp/httpd
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

repoclosure --repoid=offline-httpd


dmidecode - Checking a Host is VM or Physical One?

When you are accessing a server via ssh (in this case linux), sometimes you would like to know if the host is a 'vm' or a 'physical' server.

dmidecode -s system-manufacturer

[VMware Workstation]
dmidecode -s system-manufacturer
VMware, Inc.

[Physical Server]
# dmidecode -s system-manufacturer
HP

Other useful dmidecode commands.

# dmidecode -type {Number}

0 BIOS
1 System
2 Base Board
3 Chassis
4 Processor
5 Memory Controller
6 Memory Module
7 Cache
8 Port Connector
9  System Slots
10 On Board Devices
11 OEM Strings
12 System Configuration Options
13 BIOS Language
14 Group Associations
15 System Event Log
16 Physical Memory Array
17 Memory Device
18 32-bit Memory Error
19 Memory Array Mapped Address
20 Memory Device Mapped Address
21 Built-in Pointing Device
22 Portable Battery
23 System Reset
24 Hardware Security
25 System Power Controls
26 Voltage Probe
27 Cooling Device
28 Temperature Probe
29 Electrical Current Probe
30 Out-of-band Remote Access
31 Boot Integrity Services
32 System Boot
33 64-bit Memory Error
34 Management Device
35 Management Device Component
36 Management Device Threshold Data
37 Memory Channel
38 IPMI Device
39 Power Supply

hpacucli - Checking Serial Number for Failed HDD

If you do not have access to an iLO to check your failed HDD serial number, you can get it from your host, in this case linux, using hpacucli.

HPACUCLI --> HP Array Configuration Utility CLI

Display Controller and Disk Status
=> ctrl all show config

Smart Array P410i in Slot 0 (Embedded)    (sn: 50123456789ABCDE)

   array A (SAS, Unused Space: 0  MB)


      logicaldrive 1 (273.4 GB, RAID 1+0, Interim Recovery Mode)

      physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 146 GB, OK)
      physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 146 GB, Failed)
      physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 146 GB, OK)
      physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 146 GB, OK)

   array B (SAS, Unused Space: 0  MB)


      logicaldrive 2 (136.7 GB, RAID 1, OK)

      physicaldrive 2I:1:5 (port 2I:box 1:bay 5, SAS, 146 GB, OK)
      physicaldrive 2I:1:6 (port 2I:box 1:bay 6, SAS, 146 GB, OK)

   SEP (Vendor ID PMCSIERA, Model  SRC 8x6G) 250 (WWID: 50123456789ABCED)

Display Serial number for failed HDD
=> ctrl slot=0 pd 1I:1:2 show detail

Smart Array P410i in Slot 0 (Embedded)

   array A

      physicaldrive 1I:1:2
         Port: 1I
         Box: 1
         Bay: 2
         Status: Failed
         Last Failure Reason: Hardware error
         Drive Type: Data Drive
         Interface Type: SAS
         Size: 146 GB
         Rotational Speed: 10000
         Firmware Revision: HPD5
         Serial Number: 3NM0FD9900009723E8CM
         Model: HP      DG146ABAB4
         Current Temperature (C): 47
         Maximum Temperature (C): 54
         PHY Count: 1
         PHY Transfer Rate: 3.0Gbps

Other useful hpacucli commands.


hponcfg - Configure iLO IP and Password from Linux

Make sure hponcfg already installed.

To configure iLO need to prepare a XML script (i.e: ilo-ip-setting.xml) as below,

<RIBCL VERSION="2.0">
 <LOGIN USER_LOGIN="xxx" PASSWORD="xxx">
 <RIB_INFO MODE="WRITE" >
 <MOD_NETWORK_SETTINGS>
 <IP_ADDRESS VALUE = "10.10.10.10"/>
 <SUBNET_MASK VALUE = "255.255.255.0"/>
 <GATEWAY_IP_ADDRESS VALUE = "10.10.10.1"/>
 <PRIM_DNS_SERVER value = "0.0.0.0"/>
 <DHCP_ENABLE VALUE = "N"/>
 </MOD_NETWORK_SETTINGS>
 </RIB_INFO>
 </LOGIN>
</RIBCL>

Set IP via hponcfg.
[root@mylnx]# /sbin/hponcfg -f ilo-ip-setting.xml
HP Lights-Out Online Configuration utility
Version 4.6.0 Date 09/28/2015 (c) Hewlett-Packard Company, 2015
Firmware Revision = 1.78 Device type = iLO 2 Driver name = hpilo
<INFORM>Integrated Lights-Out will reset at the end of the script.</INFORM>

Please wait while the firmware is reset. This might take a minute
Script succeeded

To set a password, prepare a XML file something like below,
<RIBCL VERSION="2.0">
  <LOGIN USER_LOGIN="xxx" PASSWORD="xxx">
  <USER_INFO MODE="write">
    <MOD_USER USER_LOGIN="Administrator">
      <PASSWORD value="pa$$word"/>
    </MOD_USER>
  </USER_INFO>
  </LOGIN>

</RIBCL>
Note: the <LOGIN> element must be there, but could be anything such above example.

To get current configuration,
[root@mylnx]# /sbin/hponcfg -w myilo.xml
HP Lights-Out Online Configuration utility
Version 4.6.0 Date 09/28/2015 (c) Hewlett-Packard Company, 2015
Firmware Revision = 1.78 Device type = iLO 2 Driver name = hpilo
Management Processor configuration is successfully written to file "myilo.xml"

And we can read our current configuration in the myilo.xml file.
[root@mylnx]# cat myilo.xml

Ref:
https://support.hpe.com/hpsc/doc/public/display?docId=emr_na-a00007610en_us

CVE-2019-11477 SACK Panic (Linux >= 2.6.29)

Summary:
An integer overflow flaw was found in the way the Linux kernel's networking subsystem processed TCP Selective Acknowledgment (SACK) segments. While processing SACK segments, the Linux kernel's socket buffer (SKB) data structure becomes fragmented. Each fragment is about TCP maximum segment size (MSS) bytes. To efficiently process SACK blocks, the Linux kernel merges multiple fragmented SKBs into one, potentially overflowing the variable holding the number of segments. A remote attacker could use this flaw to crash the Linux kernel by sending a crafted sequence of SACK segments on a TCP connection with small value of TCP MSS, resulting in a denial of service (DoS).

Action:
Option #1
Disable selective acknowledgments system wide for all newly established TCP connections.
# echo 0 > /proc/sys/net/ipv4/tcp_sack

Option #2
To prevent new connections with low MSS sizes using firewalld or iptables.

Red Hat Enterprise Linux 7 and 8 (firewalld).
# firewall-cmd --permanent --direct --add-rule ipv4 filter INPUT 0 -p tcp --tcp-flags SYN SYN -m tcpmss --mss 1:500 -j DROP
# firewall-cmd --reload
# firewall-cmd --permanent --direct --get-all-rules

Others (iptables)
# iptables -I INPUT -p tcp --tcp-flags SYN SYN -m tcpmss --mss 1:500 -j DROP
# service iptables save

Recommendation
Update kernel versions to the Linux stable releases as recommended by Linux kernel developers  (https://www.openwall.com/lists/oss-security/2019/06/17/6)

Acknowledgements
Jonathan Looney (Netflix Information Security)

Ref:
https://access.redhat.com/security/vulnerabilities/tcpsack
https://github.com/Netflix/security-bulletins/blob/master/advisories/third-party/2019-001.md

RHEL/CentOS Network Error - Device eth0 does not seem to be present, delaying initialization

I got below errors while trying to reboot network service,

[root@server ~]# /etc/init.d/network restart
Shutting down interface eth5.715:  Removed VLAN -:eth5.715:-
                                                           [  OK  ]
Shutting down interface eth5:                              [  OK  ]
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface eth0:  bnx2 device eth0 does not seem to be present, delay
ing initialization.
                                                           [FAILED]
Bringing up interface eth2:  bnx2 device eth2 does not seem to be present, delay
ing initialization.
                                                           [FAILED]
Bringing up interface eth5:                                [  OK  ]
Bringing up interface eth5.715:  Added VLAN with VID == 715 to IF -:eth5:-
                                                           [  OK  ]

To fix this add your HWADDR or MAC address details to your /etc/sysconfig/network-scripts/ifcfg-eth0

[root@server~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
# Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
HWADDR=XX:XX:XX:XX:XX:XX
IPADDR=x.x.x.x
NETMASK=y.y.y.y
GATEWAY=z.z.z.z




Linux Performance Analysis - USE Method

USE Method (by Brendan Gregg)

For every resource, check utilization, saturation, and errors.

Resource: all physical server functional components (CPUs, disks, busses, ...)
Utilization: the average time that the resource was busy servicing work
Saturation: the degree to which the resource has extra work which it can't service, often queued
Errors: the count of error events


--Quick Check

Check system resource usage and running processes by running the ten commands
# uptime
# dmesg | tail
# vmstat 1
# mpstat -P ALL 1
# pidstat 1
# iostat -xz 1
# free -m
# sar -n DEV 1
# sar -n TCP,ETCP 1
# top


--Logs Check

Common logs location
/var/log/auth.log : Authentication logs
/var/log/secure or /var/log/auth.log : Authentication log
/var/log/messages : General message and system related stuff
/var/log/kern.log : Kernel logs
/var/log/cron.log : Crond logs (cron job)
/var/log/maillog : Mail server logs
/var/log/qmail/ : Qmail log directory (more files inside this directory)
/var/log/httpd/ : Apache access and error logs directory
/var/log/lighttpd/ : Lighttpd access and error logs directory
/var/log/boot.log : System boot log
/var/log/mysqld.log : MySQL database server log file
/var/log/utmp or /var/log/wtmp : Login records file
/var/log/yum.log : Yum command log file.

# less /var/log/messages
# more /var/log/messages

Continuous log fail observation
#tail -f /var/log/messages

Search  for a term in a file
#grep -i error /var/log/messages


--Services check

Show all installed services
#systemctl list-unit-files

#service --status-all
#service --status-all | more
#service --status-all | less
#service --status-all | grep ntpd


--System info check

Show version
#lsb_release -a

# lshw
# lscpu
# lsblk
# lspci
# fdisk -l

Show kernel  modules
#lsmod

List containing your BIOS version and supported modes, your motherboard manufacturer and model number, your CPU technical details and your RAM characteristics
#sudo dmidecode -q 


Cara Format USB Flashdisk Ubuntu via Terminal

Berikut cara memformat USB Flasdisk via Terminal:

1. Tentukan letak device USB Flashdisk Anda.

Setelah menancapkan USB Flashdisk anda lakukan perintah berikut,

root@spydeeyk-r00m:~# fdisk -l

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xbdaf6c0a

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      102400    7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2              13       12749   102297600    7  HPFS/NTFS
/dev/sda3           12750       17611    39054015   83  Linux
/dev/sda4           17612       30401   102735675    5  Extended
/dev/sda5           17612       18097     3903763+  82  Linux swap / Solaris
/dev/sda6           18098       30401    98831848+  83  Linux

Disk /dev/sdb: 4004 MB, 4004511744 bytes
116 heads, 51 sectors/track, 1322 cylinders
Units = cylinders of 5916 * 512 = 3028992 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        1323     3910640    b  W95 FAT32
root@spydeeyk-r00m:~#

USB Flasdisk saya berada di /dev/sdb1, letak device usb flashdisk anda bisa saja berbeda dengan saya.

2. Unmount USB Flashdisk Sebelum diformat.

root@spydeeyk-r00m:~# umount /dev/sdb1


3. Format USB Flashdisk.

mkfs.vfat -n 'Label' -I device

Contoh:

root@spydeeyk-r00m:~# mkfs.vfat -n 'spydeeyk' -I /dev/sdb1


Selamat Mencoba.

Tested on lucid (10.04 LTS)

Cara Menghapus Kernel Lama di Grub Ubuntu

Ada dua cara untuk menghapus kernel lama di grub ubuntu (se-tahu saya :D):

1. Via Synaptic Package Manager
Akses Synaptic Manager:
System --> Administration --> Synaptic Package Manager
Search dengan keyword 'kernel', lalu hapus kernel lama yg anda inginkan. Tapi, penting untuk diingat!, jangan salah hapus kernel yang sedang anda gunakan.. hehehe..

Untuk mengetahui kernel yang sedang digunakan, ketikkan perintah:
# uname -a 

Contoh:

root@spydeeyk-r00m:~# uname -a
Linux spydeeyk-r00m 2.6.32-30-generic #59-Ubuntu SMP Tue Mar 1 21:30:21 UTC 2011 i686 GNU/Linux

Nah, pada contoh diatas kernel yang saya gunakan 2.6.32-30-generic.


Oh ya, setelah kernel lama dihapus alias diremove via synaptic package manager lakukan pula perintah:
# update-grub2

2. Via Command Terminal
Pertama kita cari tahu dahulu kernel-kernel yang terinstall di system kita dengan perintah:
root@spydeeyk-r00m:~# aptitude search linux-image-2.6 | grep "i "


Contoh:

root@spydeeyk-r00m:~# aptitude search linux-image-2.6 | grep "i "
i   linux-image-2.6.32-21-generic   - Linux kernel image for version 2.6.32 on x
i   linux-image-2.6.32-22-generic   - Linux kernel image for version 2.6.32 on x
i   linux-image-2.6.32-24-generic   - Linux kernel image for version 2.6.32 on x
i   linux-image-2.6.32-29-generic   - Linux kernel image for version 2.6.32 on x
i   linux-image-2.6.32-30-generic   - Linux kernel image for version 2.6.32 on x

Setelah mengetahui kernel-kernel yang terinstall, sekarang kita bisa remove kernel yang kita inginkan (ingat jangan remove kernel yang sedang dipakai, ok? :D )

Contoh:
root@spydeeyk-r00m:~# aptitude purge linux-image-2.6.32-21-generic 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Reading extended state information      
Initializing package states... Done
The following packages will be REMOVED:
  linux-image-2.6.32-21-generic{p} 
0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 96.9MB will be freed.
Do you want to continue? [Y/n/?] y
Writing extended state information... Done
(Reading database ... 311174 files and directories currently installed.)
Removing linux-image-2.6.32-21-generic ...
Examining /etc/kernel/prerm.d.
run-parts: executing /etc/kernel/prerm.d/dkms 2.6.32-21-generic /boot/vmlinuz-2.6.32-21-generic
Running postrm hook script /usr/sbin/update-grub.
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-30-generic
Found initrd image: /boot/initrd.img-2.6.32-30-generic
Found linux image: /boot/vmlinuz-2.6.32-29-generic
Found initrd image: /boot/initrd.img-2.6.32-29-generic
Found linux image: /boot/vmlinuz-2.6.32-24-generic
Found initrd image: /boot/initrd.img-2.6.32-24-generic
Found linux image: /boot/vmlinuz-2.6.32-22-generic
Found initrd image: /boot/initrd.img-2.6.32-22-generic
Found Windows 7 (loader) on /dev/sda1
done
Purging configuration files for linux-image-2.6.32-21-generic ...
Running postrm hook script /usr/sbin/update-grub.
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-30-generic
Found initrd image: /boot/initrd.img-2.6.32-30-generic
Found linux image: /boot/vmlinuz-2.6.32-29-generic
Found initrd image: /boot/initrd.img-2.6.32-29-generic
Found linux image: /boot/vmlinuz-2.6.32-24-generic
Found initrd image: /boot/initrd.img-2.6.32-24-generic
Found linux image: /boot/vmlinuz-2.6.32-22-generic
Found initrd image: /boot/initrd.img-2.6.32-22-generic
Found Windows 7 (loader) on /dev/sda1
done
Reading package lists... Done             
Building dependency tree       
Reading state information... Done
Reading extended state information      
Initializing package states... Done
Writing extended state information... Done

root@spydeeyk-r00m:~#

That's it.. :)

Bagi saya ada baiknya disisakan 2 kernel.. kernel yang sedang dipakai dan sebelumnya, buat jaga-jaga aja.. :D

How to Reset Windows Password Using Ubuntu - chntpw

Berikut bagaimana cara untuk mereset password windows (XP, Vista, Windows 7) menggunakan Ubuntu dan chntpw.

Ada dua kemungkinan dalam penggunaan Ubuntu. Pertama, bisa jadi di komputer atau laptop Anda sudah terdapat sistem operasi ubuntunya (dual boot), maka anda dapat langsung menginstall packet chntpw. Kedua, jika anda tidak menggunakan dual boot, windows dan Ubuntu, Anda dapat mengunduh Ubuntu, dan membuat Bootable Ubuntu Usb Flash Drive (live ubuntu via flashdisk). Dan satu lagi, anda perlu terkoneksi ke internet untuk dapat menginstall paket menggunakan perintah apt-get install :) .

Sekarang kita mulai mereset password windows menggunakan Ubuntu dan chntpw.

Vim - Copy, Paste and Delete

This is 'simple how to' copy, paste and delete on Vim

Copy
Y --> To copy one line
2Y --> Two lines
10Y --> 10 lines
yG --> All lines to the end of the file

Paste
Just hit 'p'

Delete
dd --> delete a line
5dd --> delete five lines
d$  --> delete to end of line
d0  --> delete to beginning of line

Select
ggVG --> select all

Simple FTP Server Installation - vsftpd

There are many kind of FTP server, one of them is vsftpd. Here is simple FTP server installation vsftpd on linux ubuntu.

1.  Install vsftpd using apt-get

sudo apt-get install vsftpd

2.  Configurafion

edit file /etc/vsftpd.conf

To enable anonymous user uncomment line:

anon_upload_enable=YES

or

To limit users to their home directories, uncomment line:

chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list


Then restart ftp service

sudo /etc/init.d/vsftpd restart

FTP Command Line - put and put without prompt

Sometimes we need to use FTP command line besides GUI. Problem that i had when using FTP command line is prompt while using command 'put' or 'mput'. Here is how to use FTP command line without prompt:

You only need to start the FTP session using option -i

e.g:
ftp -i ftp-server-name-or-domain

The -i option to disable interactive prompting.

Install openSSH ahh..

Holla... Lama ga cuap2 di blog ini.., eh koq cuap2?, coret2 kali yah.. :D , jadi pengen coret2 lagi.., hmmm.. kedepannya pengen tulis2 seputar linux, tutorial2 gitu dech.. tapi yang basic-basic aja koq, mengulang apa-apa yang udah diajarin ibu dan bapak guru.. huhehehe.. :D

Okeh.., untuk awal-awal enaknya nulis seputar remote gitu kali yah.., nah salah satu aplikasi untuk remote itu yang banyak dipakai sama admin-admin jaringan ya SSH.

Nah, iseng-iseng juga nich saya install openSSH di lappie.., hmmm.. klo mau tau lebih jauh tentang SSH, cari sendiri yah.. :D, langsung praktek aja nich..

Aplikasi Desktop Untuk Linux

Tulisan ini cuma sekedar catatan pribadi, apa saja program/aplikasi yang saya gunakan (sebahagian besar si.. :) ) untuk linux desktop saya (debian). berikut:

Graphics:

* The GIMP - free software replacement for Adobe Photoshop
* F-Spot - full-featured personal photo management application for the GNOME desktop
* Google Picasa - application for organizing and editing digital photos

Internet:

* Firefox/Iceweasel
* Opera
* Flash Player 10
* FileZilla - multithreaded FTP client
* Thunderbird/Icedove - email and news client
* Evolution - combines e-mail, calendar, address book, and task list management functions
* aMule - P2P file sharing application
* Transmission BitTorrent Client - BitTorrent client
* Azureus/Vuze - Java Bittorrent client
* Pidgin - multi-platform instant messaging client
* Skype
* Google Earth
* Xchat IRC - IRC client

Office:

* OpenOffice Writer - replacement for Microsoft Word
* OpenOffice Calc - replacement for Microsoft Excel
* Adobe Reader
* GnuCash - double-entry book-keeping personal finance system, similar to Quicken
* Scribus - open source desktop publishing (DTP) application

Sound & Video:

* Amarok - audio player
* Audacity - free, open source, cross platform digital audio editor
* Banshee - audio player, can encode/decode various formats and synchronize music with Apple iPods
* MPlayer - media player (video/audio), supports WMA
* Rhythmbox Music Player - audio player, similar to Apple's iTunes, with support for iPods
* gtkPod - software similar to Apple's iTunes, supports iPod, iPod nano, iPod shuffle, iPod photo, and iPod mini
* XMMS - audio player similar to Winamp
* dvd::rip - full featured DVD copy program
* Kino - free digital video editor
* Sound Juicer CD Extractor - CD ripping tool, supports various audio codecs
* VLC Media Player - media player (video/audio)
* Real Player
* Totem - media player (video/audio)
* Xine - media player, supports various formats; can play DVDs
* Brasero - CD/DVD burning program
* K3B - CD/DVD burning program
* Multimedia Codecs

Programming:

* KompoZer - WYSIWYG HTML editor, similar to Macromedia Dreamweaver, but not as feature-rich (yet)
* Bluefish - text editor, suitable for many programming and markup languages
* Quanta Plus - web development environment, including a WYSIWYG editor

Other:

* VMware Server - lets you run your old Windows desktop as a virtual machine under your Linux desktop, so you don't have to entirely abandon Windows
* TrueType fonts
* Java
* Read-/Write support for NTFS partitions

Sebenarnya list diatas saya dapatkan dari suatu site, cuma saya lupa apa sitenya he2.., So, ini cuma mindahin catatan saya di file *.txt ke blogpost, supaya enaq ntar klo nyarinya.. :D and kali aja berguna buat yang baca.. :) .

About File Extension VFS and Virtual File System

As we know that there are thousand of extension file for computer or program, one of them is which rare we hear is File Extension VFS. The file extension vfs its self stands for the Virtual File System, which creates an abstract layer on top of a concrete file system. Sometimes, this system uses a switch or a single-file to create the "virtual interface". It is used for many different purposes to gain a specialized access to the computer's filing system. More Info Regarding File Extension Vfs here.

Talking about virtual file system, in college, on my first year, I’ve learn little about operating system, we learn especially for Linux operating system. Its also has topic about file system, we also talk about virtual file system. Virtual file system has function to:

- Separate operation from the generic implementation with defines the vfs interface that is still new
- Vfs file based on the structure of representation-called vnode, which consists of numeric designator for the unique network-wide

As the implementation of the directory which is the implementation of the file system implementation, directory implementation has linear algorithms such as List and Hashtable. Directory on the CP/M is a system with a single directory. Directory on the MS/Dos is a hierarchical system with the directory tree. Directory on UNIX is a traditional directory structure.


Mengatasi Virus Komputer Cara Saya

Cara-cara ini merupakan hasil pengalaman pribadi, dan Alhamdulillah sampai sejauh ini cukup ampuh buat saya, tiga tahun tidak pernah bermasalah dengan yang namanya virus komputer.. :D

1. Watch Out Your Fu*king Flash Disk
Karena hampir sebahagian besar virus yang beredar itu menggunakan media flashdisk, maka perhatikan flashdiskmu baik-baik, hati-hati ketika bergonta-ganti pasangan komputer.

Biasakan menggunakan flashdisk yang bersih dan rapi, maksudnya.., ketika drive flashdisk kamu dibuka, jangan terlalu banyak folder2 gitu lho, Maksimal lima folder sajalah.., hal ini untuk memudahkan mendeteksi jika ada file2 aneh tiba2 muncul di flashdisk kamu. lanjutt..

2. AntiVirusKu Linux
Benaran lho.. :D, hal ini masih bersangkutan dengan point yang pertama.., gini

Misalnya, awalnya kamu punya flashdisk yang bersih dari virus.., trus kamu maen-maen ke warnet, sewaktu tuh flashdisk dicolok-in , tiba2 muncul file2 atau direktori2 aneh.., nah kemugkinan besar kena virus tuh..

Disinilah guna nya linux, ketika kamu nyampe rumah, tuh flashdisk jangan langsung dibuka di windows, booting dulu lah ke linux kamu, cari file2 yang aneh di flashdisk kamu pake linux,  virus (99% yang beredar) khan ga jalan dilinux karena beda system operasinya..

Note: untuk yang satu  ini kamu harus install linux lah di komputer kamu, buat dual boot gt dech, cuma sediakan hardisk 5GB aja cukup koq.., selain itu kali aja ntar kamu bener2 tertarik linux, dan berpindah sistem operasi ke linux.. :D , virus lewat dah..
Saya menyarankan menggunakan linux Ubuntu untuk yang benar2 awam dengan linux.., karena penggunaannya yang cukup mudah, support dokumentasi yang bagus, serta komunitas yang besar..

3. Antivirus Di Windows Juga Perlu
Tidak saya pungkiri memang, menginstall antivirus masih diperlukan untuk pertahanan akhir apabila kita kurang waspada atau lengah.., saya rekomendasikan Kaspersky Anti Virus, saya cukup puas dengan kinerja antivirus yang satu ini.., cukup ampuh menurut saya..

Kesimpulanya,

- Menghindari itu lebih baik dari pada mengobati, so jangan sampai terinfeksi virus
- Kewaspadaan kita/user menjadi unsur paling penting untuk menghadapi virus
- Klo mau yang sangat relatif lebih aman.. pake linux dunk.. :D , safe from virus.. :)

Itu dulu dech.., mungkin bisa komen di bawah klo ada yang mo maki-maki didiskusikan.. :D

Virtual Host With Apache2 - Debian

Its usually we used http://localhost in our box, how about make a different things with a domain name like http://spydeeyk.com in our box??
http://localhost --> http://spydeeyk.com (in local box)
We can do that.., its called Virtual Host.


1. First add a domain name you want to the host list at /etc/hosts. In this case we add virtual host/domain spydeeyk.com for 127.0.0.1
debian:~# vim /etc/hosts
127.0.0.1 localhost spydeeyk.com
127.0.1.1 debian.eepis-its.edu debian

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
debian:~#
2. Make a file called virtual at /etc/apache2/conf.d
edit /etc/apache2/conf.d/virtual, write NameVirtualHost * , then save!

3. Copy /etc/apache2/site-available/default to make a backup.
debian:~# cp /etc/apache2/sites-available/default /etc/apache2/sites-available/default.backup
4. Edit /etc/apache2/site-available/default.

NameVirtualHost * --> Remove this line
<VirtualHost *>
NameServer your-name-server.com --> Add the virtual host name
ServerAdmin webmaster@localhost

DocumentRoot /var/www/ --> Change to whatever..
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/> --> Change to whatever..
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
RedirectMatch ^/$ /apache2-default/ --> Block this
</Directory>
...
...

This my configuration:
<VirtualHost *>
ServerName spydeeyk.com
ServerAdmin webmaster@localhost

DocumentRoot /home/spydeeyk/public_html
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/spydeeyk/public_html>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
# RedirectMatch ^/$ /apache2-default/
</Directory>

...
...
Let's check it at browser..