About Linux & Solaris Config

KONFIGURASI PROXY

1.            Cek port squid

# rpm –qa | grep squid

2.      Konfigurasi squid

         # vi /etc/squid/squid.conf

* —————————————

*   menentukan http_port, default 3128, boleh 8000

http_port 3128

*   Menentukan cache_mgr (alamat email)

cache_mgr wanda@hotelbumiwiyata.oke

*   Menentukan cache_effective user & group

Default squid

*   Menentukan visible_hostname (alamat web)

*   Menentukan direktori untuk cache   

Cache_dir ufs /var/spool/squid/cache

Besar 100 kb, 16 subfolder, 26 subfolder level 2

* —————————————-

 

3.      Buat direktori cache

         #mkdir /var/spool/squid/cache

4.      Beri ijin akses

         #chown –R squid.squid /var/spool/squid

5.      Aktifasi/Inisiasi cache

         #squid -Z

6.      Restart squid

         # service squid restart

         # /etc/initd.d/squid restart

 

Setting Samba

1.      Cek Paket Samba

# rpm –qa | grep samba

Samba

Samba Client

Samba-

 2.      Konfigurasi Samba (Smb.Conf)

# vi  /etc/samba/smb.conf

* ————————-

* Global Setting

workgroup       = bunga

netbios name    = melati

Security            = share

* ——————-

 

# Share Definisikan

*————————————-

[wanda]

comment          = hello ini wanda

path                  = /home/wanda

read only          = Yes

public               = yes   

* ————————–

 

3. Restart Samba

# service smb restart

# /etc/init.d/smb restart

 4. Tes Samba

# Sub Client_L Local host

Password = (Enter)

Konfigurasi Samba Swat

# vi /etc/xinetd.d/Swat

Ganti disable = No

 Restart xinetd

# /etc/init.d /xinetd restart

Buka Browser

http : //localhost:901

Setting POSTFIX

1.      Cek Poket postfix/imap

# rpm –qa  | grep postfix

# rpm –qa  | grep imap

2.      Postfikon postfix yang hidup

# /etc/init.d/sendmail stop

# /etc/init.d/postfix start

 3.      Cek port 25

# netstat –tan | grep 25

4.      Konfigurasi postif

# vi /etc/postfix/main.cf

* ——————————————–

*  Internet Host and Domain.Host

    myhostname = mail.mawar.oye

    mydomain                 = mawar.oye

* SENDING MAIL

   myorigin                    = $mydomain

* RECEIVING MAIL

   inet_interface             = all     

* my_destination           = $ myhostname,$mydomain

* TRUST ANDRELAY CONTROL

    My networks            = 192.1680.0.0/24,127.0.0.0.018

* ———————————————————————-

1.      Konfigurasi POP/IMAP server

# vi /etc/xinetd.d/ipop3

disable = Yes No

# vi /etc/xinetd.d/imap

disables = Yes No

 2.      Restart POP/IMAP/Postfix

# /etc/init.d/postfix restart

# /etc/init.d/xinetd restart

 3.      UJI STMP (25), POP (110), IMAP (143)

1.      Samba Server

2.      SquidServer

3.      Dial-up Internet

Samba            (File, Printer)

NFS               (File)

Lpd                 (Printer)

Setting WEB SERVER

1.      Cek httpd

# rpm –qa | grep httpd

2.      Restart apache (httpd)

# service httpd restart# /etc/init.d/httpd restart

3.      Lihat port 80

# netstat –tan | grep 8

4.      Buka Browser

http://localhosthttp://127.0.0.1

5.      Konfigurasi Apache

Bukalah file httpd.conf pd file # vi /etc/httpd/conf/httpd.conf

1. Aktifkan Servername

Server Name new.host.name : 80

# service httpd restart (restart ulang) 2. Web Hostinga.      Konfigurasi pd Document  Root

– Buka kembali file # vi /etc/httpd/conf/httpd.conf

– Cari data DocumentsRoot “/var/www/html”– Masuk ke dir # cd /var/www/html

– #vi index.html

         Restart Apache

         Buka Browser http://localhost

# cd /var/www/hml

# mkdir keu; #cd keu; # vi index.html

# mkdir sdm; #cd sdm; # vi index.html

# mkdir /var/web

            * Buka file httpd.conf

    * ————————

# DocumentRoot “/var/www/html”

DocumentRoot “/var/web”

* —————————–

 

* buat file pd /var/web

#cd /var/web

#vi index.html

*Restart Apache

*Buka Browser http://localhost

Pendukung :

# vi /etc/httpd/http.conf letak html

# /var/www/html

Direktori PHP

# /etc/php.ini

mysqld

 a.      UserDir

Buka httpd.conf, cari UserDir

#User Dir disable

UserDir Public_html

* Beri ijin akses pd home directory

# chmod 755 /home/wanda

#su wanda

#cd

#ls

#mkdir public_html

#cd Public_html

#vi index.html

 b.      VirtualHost

Buka httpd.conf

Cari

* ——————————

#Name Virtual Host

ganti

Name Virtual Host 192.168.0.

<Virtual Host 192.168.0. >

    Server Admin root@localhost

    DocumentRoot /home/wanda

    Server name http://www.hotelbumiwiyata.oke

</Virtual Host>

* —————————————–

*Restart Apache

* Buka Browser http://www.hotelbumiwiyata.oke

3.  Directory Index

Index.html  index.php main.html

Pendelegasian pada server

$TTL 86400

$ORIGIN oke.

@    IN SOA ns.oke. root (

  

  

 

  

@     IN  NS ns.oke.

@     IN  MX 10 mail.oye.oke

ns  IN A 19.168.0.113

  

melati       IN NS ns.melati.oye

ns.melati  IN A 192.168.0.118

mawar      IN NS ns.mawar.oye

ns.melati  IN A 192.168.0.119

sakura       IN NS ns.melati.oye

ns.melati  IN A 192.168.0.120

Setting DNS SERVER

# nslookup www.yahoo.com

# dig www.yahoo.com

Setting

1.      Cek Port Bind

# rpm –qa | grep bind

2.      Konfigurasi named.conf

# vi /etc/named.conf

* —————————-

Zone “.”

           

           

Zone “localhost”

           

           

Zone  “0.0.127.m-addrarpa”

           

           

Zone “hotelbumiwiyata.oke” IN {

            Type master;

            File “hotelbumiwiyata.oke.zone”;

};

* ———————————— 

1.      Buat Zone pada /var/named

# cd /var/named# cp localhost.zone hotelbumiwiyata.oke.zone# vi hotelbumiwiyata.oke.zone* ——————————–

$ TTL 8600

$ ORIGIN hotelbumiwiyata.oke

@                IN SOA ns.hotelbumiwiyata.oke. root (

42         : serial  (d. adans)

3H    : refresh

15M : retry

1 W  : expiry

1 D   : minimum

@                 IN NS  ns.hotelbumiwiyata.oke.

@                 IN MX 10  mail.hotelbumiwiyata.oke.

www IN A 192.168.0.1

mail IN A 192.168.0.1

@ IN A 192.168.0.1

ns1 IN A 192.168.0.1

ns2 IN A 192.168.0.1

* ———————–

 

1.      Restart named

# killall named# service named start

2.      Matikan firewall

# service iptables stop

3.      Cek Port 53

# netstat –tan | grep 53

4.      Arahkan name server ke komputer DNS Server

# vi /etc/resolv.conf

5.      Test Hasil

# nslookup http://www.hotelbumiwiyata.oke

 

Setting WVDIAL

/etc/wvdial.conf

1. cek wvdial

# rpm –qa | grep wvdial

2. Pasang modem

3. Aktifkan modem

 #  wvdialconf /etc/wvdial.conf

4. Konfigurasi wvdial.conf 

(#vi /etc/wvdial.conf)

Phone        = 080989999

Username  = telkomnet@instan

Password   = telkom

5. Service wvdial restart

# wvdial

Setting Gateway

# route –n   ~>cek

# route del default  ~>hapus gw

# route add default gw 192.168.0.1 ~> memberi gw

MEMBERIKAN IP ADDRESS

# ifconfig eth0 192.168.0.1 netmask 255.255.255.0# ifconfig cara diatas akan jika di restart akan kembali ke IP semula 

Cara 2

# service netmask restart   (restart netmask)

# echo “ifconfig eth0 192.168.0.1” >> /etc/rc.local cara diatas masih hilang saat direstart 

Cara 3 (buka script)

 #vi /etc/sysconfig/network-scripts/ifcfg-eth0 

aplikasi untuk menulis pada file diatasi nama netconfig

 # netconfig

Utility

1. wc(word account)     $wc /etc/passwd

$wc file1 

2. head & tail

$head file1   (menampilkan baris pertama)$head file1  /etc/passwd$head –s /etc/passwd$tail file1  (menampilkan 10 baris terakhir)$tail /etc/group$tail –s /etc/shadow 

3. grep (mencari string)

$grep baris file1$grep budi /etc/passwd$grep budi* /etc/passwd$global /etc/php.ini 

4. grep (mencari string)

$grep baris file1$grep budi /etc/passwd$grep budi* /etc/passwd$global /etc/php.ini 

5. find (mencari file / dir)

$find –name file1$find /home –name file1$find /home –user budi 

6. lpr (print)

$lpr file1$lpr file2$lpg (melihat gue)$global /etc/php.ini 

7. ps (proses)

$ps$ps –ax  (seluruh proses dalam computer) 

8. kill (menghentikan proses)

$kill -9 1742 

9. Mencari Progran Aplikasi

$whereis mozilla$which mozilla$whereis gimp 

10. zip & unzip

$gzip file1$ls$gunzip file1.gz 

Kalau ada zip dari windows

$unzip file1.zip 

11. arsip membuat bundle dile

$tar –c arsipfile file1

Membuka Storage Unit

Floppy                         =    /dev/fd0  (tercantum /etc/fstab)

CDROM                      =    /dev/cdrom

Flash USB                    =    /dev/sda

Partisi Harddisk            =    /dev/had

  1.  Buka Floppy

  •  # mount /mnt/floppy  
  • # ls /mnt/floppy   
  • # umount /mnt/floppy 

2.  Buka Cdrom

  • # mount /mnt/cdrom
  • # ls /mnt/cdrom
  • # umount /mnt/cdrom
  • # eject   (keluar CD)
  • # eject –t  (tutup CD)

 3.  Buka USB Flash Disk

  • # mkdir /mnt/usb
  • # mount /dev/sda1 /mnt/usb
  • # ls /mnt/usb
  • # umount /mnt/usb Alternatif
  • # mount –t usbfs none /proc/bus/usb
  • # mount –t vfat /dev/sda1 /mnt/usb 

4.  Baca Partisi Harddisk lain (missal windows)

  • # mkdir /mnt/windows
  • # mount /dev/hda1 /mnt/windows
  • # ls /mnt/windows
  • # umount /mnt/windows

 

Mengubah pemilih (owner/change owner) harus pakai root

$su

$chown file

Mengubah atribut (mode/change mode)

$chmod ugofx file1

$ls –l

$chmod 775 file1

Ijin Akses FIle & Direktori

$ ls -l

drwxrw-rw-rw-   3  budi    budi    4096   jan 2006 coba1

drwxrw-rw-rw-   3  budi    budi        15   jan 2006 coba2

r = read  =4

w=write = 2

x = execute =1

 

 

 

About Solaris About Solaris About Solaris About Solaris About Solaris

Mengcopi tar

tar cf -. | (cd todir; tar xvfBp-)

 

Membuat Mount aktif saat boot

/etc/vfstab

 

Mengganti Hostname

/etc/hosts

/etc/hostname.nge0

/etc/nodename

 

Setting Telnet (untuk root)

Cd /etc/default

Vi login

Non aktifkan console

Setting MIRROR

drvconfig

  1. jalankan smc->storage->enhanced storage
  2. State Database buat lock (Action->Create Replicate->pilih(lock) c1 dan c2
  3. enhanced storage (create mirror)

         Action->create volume (don’t create state database replicate)->concatenation(disk mau di mirror) d0

         Action->Create(don’t create) d1

  1. Memirrorkan 

Action->pilih mirror(raid1)->d2 (metadisk)

  1. mount data (vfstab mount waktu boot)

$cd  /dev/md/rdsk/

#newfs –m 0 /dev/md/rdsk/d2

#mount /dev/md/dsk/d2

  1. Mengecek Mirror

cd /usr/sbin

            ./metastat

3 Comments

  1. Posted September 21, 2007 at 9:53 am | Permalink

    tks mas yoyok…. info di atas sangat bermanfaat. semoga kebaikan anda dibalas oleh Yang Maha Kuasa….

  2. indesign
    Posted September 24, 2007 at 3:20 am | Permalink

    Haturnuhun Pisan yah

  3. Posted Mei 10, 2008 at 4:23 pm | Permalink

    Hatur nuhun


Tulis sebuah Komentar

You must be logged in to post a comment.
%d blogger menyukai ini: