Category Archives: Linux

Install epel and rpmforge repository CentOS 6


Install rpmforge Repository
Download the rpmforge-release package. Choose one of the two links below, selecting to match your host’s architecture. If you are unsure of which one to use you can check your architecture with the command uname -i

# cd /opt

-For CentOS 6 i686 (32bit):
# wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm

-For CentOS 6 x86_64 (64bit):
# wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
Continue reading

Install denyhosts to block ssh brute force CentOS 6


Install from epel or rpmforge repo, i’m install it from epel:
# yum --enablerepo=epel -y install denyhosts

-(Optional) If need to configure denyhosts, edit file denyhosts.conf, actually default configuration is fine..
# vi /etc/denyhosts.conf

-Start denyhosts service & make start on boot:
# service denyhosts start
# chkconfig denyhosts on

Continue reading

Disable selinux CentOS 6


Disabled with reboot, edit /etc/selinux/config and save..
# vi /etc/selinux/config

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=enforcing
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted

Continue reading

Setup Slave DNS bind chroot CentOS 5


References:
http://www.howtoforge.com/installation-of-bind-as-a-secondary-slave-dns-server-on-centos
http://doc.planet-lab.eu/html/x732.htm

 
I. Skenario:
Primary DNS : 192.168.0.250
Secondary DNS (Mirror) : 192.168.0.251

II. Edit /etc/hosts
# vi /etc/hosts

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.0.251 kucing.example.net kucing

 
III. Edit /etc/resolv/conf

search example.net
nameserver 192.168.0.250
nameserver 192.168.0.251

Continue reading

Setup bind chroot CentOS 5


References:
http://www.wains.be/index.php/2007/12/13/centos-5-chroot-dns-with-bind/
http://adlinux.blogspot.com/2010/04/chroot-dns-with-bind-centos-5.html

 
-Install Bind
# yum -y install bind bind-chroot bind-libs bind-utils caching-nameserver

-Konfigurasi Permision
# chmod 755 /var/named/
# chmod 775 /var/named/chroot/
# chmod 775 /var/named/chroot/var/
# chmod 775 /var/named/chroot/var/named/
# chmod 775 /var/named/chroot/var/run/
# chmod 777 /var/named/chroot/var/run/named/
# cd /var/named/chroot/var/named/
# ln -s ../../ chroot
# cp /usr/share/doc/bind-9.3.6/sample/var/named/named.local /var/named/chroot/var/named/named.local
# cp /usr/share/doc/bind-9.3.6/sample/var/named/named.root /var/named/chroot/var/named/named.root
# touch /var/named/chroot/etc/named.conf

-Setting RNDC
# cd /var/named/chroot/etc
# rndc-confgen > rndc.key
# chown root:named rndc.key
Continue reading

Setup lightsquid 1.8 di CentOS 5.7


References:
http://www.catatanlepas.com/komputer/37-aplikasi-linux/111-monitoring-squid-proxy-menggunakan-sqstat-sarg-dan-lightsquid.html
http://nixnoob.org/?p=22
http://masrifqi.staff.ugm.ac.id/wiki/doku.php?id=squid_proxy

 
1. Install Apache2, PHP and make run at startup
# yum -y install httpd php
# service httpd start
# chkconfig httpd on

2.Instalasi lightsquid
-Install paket Perl GD dari repositori dag wiers yg diperlukan untuk meregenerasi Grafik
# yum --enablerepo=dag install perl-GD

-Download & Install lightsquid1.8.tgz
# mkdir /tmp/lightsquid
# cd /tmp/lightsquid
# wget http://sourceforge.net/projects/lightsquid/files/lightsquid/1.8/lightsquid-1.8.tgz/download/
# tar -zxvf lightsquid-1.8.tgz -C /var/www/html/; cd /var/www/html/
# mv lightsquid-1.8/ lightsquid
# cd lightsquid/
# cp lightsquid.cfg lightsquid.cfg.asli

Continue reading

Catatan tentang Crontab


References:
http://www.catatanlepas.com/komputer/38-sistem-linux/58-eksekusi-otomatis-dengan-crontab.html
http://www.centos.org/docs/5/html/5.2/Deployment_Guide/s2-autotasks-cron-configuring.html

 
Untuk melihat perintah-perintah apa saja yang digunakan di crontab, tuliskan perintah:
# crontab --help

-Pada umumnya, perintah yang sering dipergunakan adalah:
> Mengedit file crontab:
# crontab -e

> Melihat file crontab
# crontab -l

-Command untuk merestart Crontab
# service crond start/stop/restart

-Command service cron at boot time
# chkconfig crond on
Continue reading

Setup squidGuard 1.4.8 di CentOS 5 squid2.7 / squid3.1


References:
http://www.squidguard.org/
http://kusprayitna.staff.uii.ac.id/2010/04/12/instalasi-squidguard-di-centos-filtering-url-di-squid/
http://squidguard.mesd.k12.or.us/
http://www.server-world.info/en/note?os=CentOS_5&p=squid&f=3

Secara default squidGuard via yum Centos 5.6 adalah versi 1.3.x,oleh karena itu akan diinstall squidguard versi lebih baru yang didapat dari search google url rpmbone yaitu rpm squidguard versi 1.4.8 atau bisa langsung install dari epel repositori..

I. Download & Install squidGuard 1.4.8
# mkdir /tmp/squidguard1.4
# cd /tmp/squidguard1.4
# wget ftp://ftp.pbone.net/mirror/download.fedora.redhat.com/pub/fedora/epel/5/i386/squidGuard-1.4-8.el5.i386.rpm
# rpm -ivh squidGuard-1.4-8.el5.i386.rpm

Continue reading

PDC Samba LDAP on CentOS 5.7


References:
http://www.howtoforge.com/centos-5.x-samba-domain-controller-with-ldap-backend-p2
http://www.rainingpackets.com/wiki/doku.php?id=setting_up_a_samba_pdc_setup_using_openldap_on_centos
http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/

 
1. Initial Config:
-Setelah install CentOS 5.7 lanjutkan install repositori dag dan epel
-Ip Address: 192.168.88.10
-Hostname: pdc.example.net

-Update server
# yum -y update

-Edit /etc/hosts:
# vi /etc/hosts

192.168.88.10 pdc.example.net pdc

-Install paket openldap dan samba
# yum install openldap openldap-clients openldap-servers nss_ldap samba samba-client samba-common

-Install paket smbldap-tools
# yum --enablerepo=epel install smbldap-tools
Continue reading