DEPHUT dan Wako Jakpus

Bulan ini training untuk dua institusi , minggu pertama untuk DEPHUT yang training linux fundamental buntu. Sedang untuk wako Jakpus taining dari basic sampai network administration dan Networking, distro yang difunakan REDHAT Enterprise.



Kompilasi Kernel centos 5.3

Berikut ini beberapa alasan yang  mungkin menjadi alasan utama bagi   atau anda 
anda untuk melakukan kompilasi kernel, yaitu:
* Untuk mengoptimasikan kernel linux terhadap hardware  anda.
* Untuk mengoptimasikan sistem anda untuk aplikasi
aplikasi spesifik seperti  Oracle atau MySQL database server  atau sebagai sistem yang akan ditujukan 
sebagai dedicated router atau firewall. 
*Untuk meningkatkan security dengan menggunakan kernel patches seperti 
grsecurity atau LIDS.
Ada Beberapa Alasan kenapa kita harus melakukan kompilasi kernel. *Agar sistem anda dapat mendukung hardware  terbaru yang ingin anda 
gunakan.
*Ingin menggunakan fitur-fitur spesifik  seperti LVM atau Sistem 
File NTFS dan fitur­fitur lainnya.
*Memperbaiki atau menghilangkan bugs  yang ada pada  kernel anda saat ini.
* Ingin memperbaharui/mengupgrade versi kernel agar up to date

Sedikit ada perbedaan untuk kompilasi dari versi yang lama, ikuti langkah2 berikut:
1. pastikan GNU gcc, make, glibc, binutils sudah tersedia.

2. yum -y install kernel-devel kernel-headers

3. yum -y groupinstall “Development-Tools”

4.cd /usr/src

5. wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.31.4.tar.bz2

6.tar -jxvf linux-2.6.31.4.tar.bz2

7.cd /usr/src/linux-2.6.31.4/

8.make menuconfig

9.make clean

10.make dep

11.make bzImage

12. make modules

13.make modules_install

14.make install

perintah make install akan mengkopi System.map, vmlinuz dan initial ram disk initrd-2.6.31.4.img ke direktori /boot.
Selamat mencoba.



UJK untuk Ristek

Minggu ini training untuk UJK Ristek. Peserta 20 orang, masih banyak yang baru mengenal linux. Mudah-mudahan ujiannya nanti pada bisa semua.



Ubuntu Surveyor indonesia

Setelah training orang IT surveyor Indonesia. Sudah ada beberapa divisi yang dimigrasikan ke linux. Sekarang giliran client, distro yang digunakan adalah ubuntu. Nampanya mereka mulai senang karena solusi yang biasa mereka pakai sudah bisa diatasi oleh ubuntu. Kalai ini ada 2 kali periode training, pertama 8 orang kedua 6 orang. Alhamdulilah training berjalan lancar. Semoga migrasinya sukses.



Monitoring Web Server dengan AWSTATS

AWASTATS

AWStats adalah singkatan dari Advanced Web Statistics. AWStats sangat powerful untuk log analyzer yang bisa digunakan untuk memonitoring web, ftp, mail dan streaming server statistics. Laporan disajikan dalam bentuk grafis dan statistik sehinnga mudah untuk dibaca.

AWStats dapat dijalankan melalui browser web CGI (Common Gateway Interface) atau langsung dari command line. AWStats ini dapat dengan cepat menganalisa log file yang besar. AWStats dapat menganalisa file log dari Apache (NCSA gabungan / XLF / ELF atau umum / CLF log format), Microsoft IIS (log W3C format), dan sebagian besar WebStar web, proxy, wap dan streaming media server serta server ftp dan mail log.

anda dapat mengunduh file awstats di http://awstats.sourceforge.net/ , untuk fitur-fitu yang ada di awstats dilahkan baca saja diwebsitenya.

Instalasi.

Setelah anda mengunduh anda extrak filenya

#tar -xzvf awstats-6.9.zip

Direktori default awstats adalah /usr/local/awstats. Jika kita melakukan ekstrak tidak pada direktori tersebut tidak masalah. Kita bisa pindahkan saja direktori hasil extrak ke /usr/local/awstats,  atau ke defaullt direktori apache ( /var/www/html).

# mv awstat-6.9 /var/www/html

Kemudian anda masuk ke dalam direktori awstat untuk mengeksekusi aplikasinya.

# cd /var/www/html/awstats/tools/

#perl awstats_configure.pl atau ./awstats_configure.pl

-—-> Running OS detected: Linux, BSD or Unix
Warning: AWStats standard directory on Linux OS is ‘/usr/local/awstats’.
If you want to use standard directory, you should first move all content
of AWStats distribution from current directory:
/var/www/html/awstats
to standard directory:
/usr/local/awstats
And then, run configure.pl from this location.
Do you want to continue setup from this NON standard directory [yN] ?

( Anda jawab dengan  Y )

—–> Check for web server install
Enter full config file path of your Web server.
Example: /etc/httpd/httpd.conf
Example: /usr/local/apache2/conf/httpd.conf
Example: c:\Program files\apache group\apache\conf\httpd.conf
Config file path (’none’ to skip web server setup):

( masukan direktori sesuai dengan konfigurasi apache yang anda miliki)

> /etc/httpd/conf/httpd.conf

—–> Need to create a new config file ?
Do you want me to build a new AWStats config/profile
file (required if first install) [y/N] ?

( jawab dengan y untuk membuat file config awstats )

-—-> Define config file name to create
What is the name of your web site or profile analysis ?
Example: www.mysite.com
Example: demo
Your web site, virtual server or profile name:

( Masukan nama domain yang anda miliki)

> www.fery.ok

A SIMPLE config file has been created: /etc/awstats/awstats.www.fery.ok.ok.conf
You should have a look inside to check and change manually main parameters.
You can then manually update your statistics for ‘www.fery.ok’ with command:
> perl awstats.pl -update -config=www.fery.ok
You can also build static report pages for ‘www.fery.ok’ with command:
> perl awstats.pl -output=pagetype -config=www.fery.ok

Press ENTER to finish…

Selanjutnya edit file /etc/awstats/awstat.www.fery.ok.conf

cocokan logfile berdasarkan distro anda masing-masing.

LogFile=”/var/log/httpd/access_log”

ubah Sitedomain sesuai dengan nama domain anda

SiteDomain=”www.fery.ok”

ubah hostalias

HostAliases=”192.168.1.52 www.fery.ok 127.0.0.1 localhost”

Ubah Dirdata sesuai dengan direktori dimana anda meletakan awstats

DirData=”/var/www/html/awstats”


kemudian cek file konfigurasi apache ( /etc/httpd/conf/httpd.conf). Kemudian ubah direktori sesuai dengan tempat awstats yang kita install tadi. dan cek juga akses mengunakan scipts cgi-bin.

#vi /etc/httpd/conf/httpd.conf

#
# Directives to allow use of AWStats as a CGI
#
Alias /awstatsclasses “/var/www/html/awstats-6.9/wwwroot/classes/”
Alias /awstatscss “/var/www/html/awstats-6.9/wwwroot/css/”
Alias /awstatsicons “/var/www/html/awstats-6.9/wwwroot/icon/”
ScriptAlias /awstats/ “/var/www/html/awstats-6.9/wwwroot/cgi-bin/”

#
# This is to permit URL access to scripts/files in AWStats directory.
#
<Directory “/var/www/html/awstats/wwwroot”>
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>

Kemudian restart Apache anda.

Kemudian coba akses melalui browser http://localhost/awstats/awstats.pl?config=www.fery.ok

nah, dibrowser anda akan di tampilkan laporan akses website anda fiturnya mulai laporan perbulan, perhari atau perjam. ada who, navigation, referrer dan others.

AWSTATS untuk monitoring MAIL Server

Jika anda ingin memonitoring mail server anda bisa merubah konfigurasi file awstats (awstat.conf). Awstats sudah terdapat converter maillog agar bisa dibaca dan ditampilkan statistiknya, terdapat di directory tools/maillogconvert.pl

Anda masuk ke direktori awstats kemudian kopi file awstats.model.conf

# cp awstats.model.conf  awstats.mail.conf

kemudian rubah file awstats.mail.conf menjadi:

LogFile=”perl /usr/bin/maillogconvert.pl standard < /var/log/maillog |”
LogType=M
LogFormat=”%time2 %email %email_r %host %host_r %method %url %code %bytesd”

SiteDomain=”www.fery.ok”  ( rubah bagian ini sesuai dengan domain anda masing2)
LevelForBrowsersDetection=0
LevelForOSDetection=0
LevelForRefererAnalyze=0
LevelForRobotsDetection=0
LevelForWormsDetection=0
LevelForSearchEnginesDetection=0
LevelForFileTypesDetection=0
ShowMenu=1
ShowSummary=HB
ShowMonthStats=HB
ShowDaysOfMonthStats=HB
ShowDaysOfWeekStats=HB
ShowHoursStats=HB
ShowDomainsStats=0
ShowHostsStats=HBL
ShowAuthenticatedUsers=0
ShowRobotsStats=0
ShowEMailSenders=HBML
ShowEMailReceivers=HBML
ShowSessionsStats=0
ShowPagesStats=0
ShowFileTypesStats=0
ShowFileSizesStats=0
ShowBrowsersStats=0
ShowOSStats=0
ShowOriginStats=0
ShowKeyphrasesStats=0
ShowKeywordsStats=0
ShowMiscStats=0
ShowHTTPErrorsStats=0
ShowSMTPErrorsStats=1

Kemudian buat cron agar database awstat bisa selalu diupdate.

00 */1 * * * /var/www/awstats/awstats.pl -update -config=mail
00 */2 * * * /var/www/awstats/awstats.pl -update -config=localhost.localdomain

kemudian lakukan perintah

#  awstats_updateall.pl now



Lightsquid sebagai monitoring proxy squid

Untuk memudahkan anda untuk memonitoring user-user yang mengakse interner lewat proxy. Anda bisa mengunakan aplikasi berbasis web untuk melakukan itu. Lightsquit diantara aplikasi yang bisa anda gunakan.

Silahkan unduh di http://lightsquid.souceforge.net, untuk kali ini kita coba versi terbaru yaitu 1.8. Sebelumnya pastikan dulu tiga paket yang terlebih dahulu telah terinstal:

1.Apache

2.Perl

3.Modperl

Tanpa babibu lagi kita langung melakukan instlalasi lightsquid.1.8.

Pertama extrak paket yang telah diunduh.

#tar -xzvf lightsquid-1.8.txg

Maka akan terbentuk sebuah direktori baru bernama lightsquid-1.8. Pindahkan folder ini ke /var/www/html/squid (buat dulu direktori squid)

#mv lightsquid-1.8 /var/www/html/squid

Kemudian pindah ke direktori /var/www/html/squid

#cd /var/www/html/squid

Ubah nama direktori lightsquid-1.8 me cginjadi lightsquid

#mv lightsquid-1.8 lightsquid

Masuk ke direktori lightsquid

#cd  lightsquid

Agar file cgi dan perl bisa di eksekusi, ubah permissionnya dengan perintah berikut.

#chmod o+x *.pl

#chmod o+x *cgi

Sekarang kita perlu merubah kepemilikan file dan direktori ke user dan group yang menjalankan web server anda.

#chown apache:apache  * -R

Tambakan pada file konfigurasi web server agar file .cgi dikenali sebagai scipt cgi, dengan menambahkan option ExecCGI

#vi /etc/httpd/conf/httpd.conf

<Directori “/var/www/html/squid/lightsquid”>

AddHandler cgi-script .cgi

AllowOverride All

Option ExecCGI

</Directory>

Simpan file konfigurasi apache ini, kemudian restart

# service httpd restart

Sekarang kita harus merubah konfigurasi lightsquid, file konfigurasinya ada pada file “lightsquid.cfg”.

Buka filenya kemudian lakukan perubahan seperti berikut:

# vi lightsquid.cfg

#path to additional `cfg` files
$cfgpath             =”/var/www/html/squid/lightsquid”;
#path to `tpl` folder
$tplpath             =”/var/www/html/squid/lightsquid/tpl”;
#path to `lang` folder
$langpath            =”/var/www/html/squid/lightsquid/lang”;
#path to `report` folder
$reportpath          =”/var/www/html/squid/lightsquid/report”;
#path to access.log
$logpath             =”/var/log/squid”;
#path to `ip2name` folder
$ip2namepath         =”/var/www/html/monitor/lightsquid/ip2name”;

#path to `lockfile` ;-)
$lockpath            =$reportpath;

file konfigurasi ini harus sesuaikan dengan direktori tempat anda menyimpan lightsquid, dan harus cocok dengan configurasi pada httpd.conf, yang paling penting tentu saja $logpath ini diarahkan untuk log squid, jadi harus sama dengan tempat anda menyimpan log squid anda.

Setelah anda merubah konfigurasi lightsquid.cfg, sekarang anda harus menginstall perl-GD

#yum install perl-GD

#apt-get install libgd-gd2-perl (untuk ubuntu)

atau bisa juga dengan mengupdate paket anda

#yum update

Tapi biasanya untuk turunan redhat sudah masuk didalam paketnya anda jalankan perintah

# yum install gd gd-devel

Jika sudah berhasil sekarang kita harus menjalan lightpaser.pl untuk menghasilkan laporan. tapi sebelumnya anda harus menjalankan check-setup.pl

#perl check-setup.pl

#perl lightpaser.pl

Jika tidak terdapat error, maka tidak ada pesan yang di tampilkan. Tapi jika ada kan ada pesan bagiam mana yang bermasalah. Biasanya yang sering bermalah adalah penamaan direktori salah ketik.

Sekarang untuk mengakses lightsuid lewat browser ketikan

http://localhost/squid/lightsquid

Makan akan muncul squid monitoring di layar monitor anda.

Untuk memudahkan anda ada sedikti tambahan untuk Konfigurasi lebih lanjut anda bisa memberikan nama pada IP yang terdaftar, sehingga informasinya akan lebih valid lagi dan lebih mudah dibaca, contoh konfigursi nama dan group adalah seperti ini :
Untuk nama user :

# vi realname.cfg
192.168.1.1 similikiti
192.168.1.2 venus
192.168.1.32 efrizal

untuk group :

# vi group.cfg
192.168.1.1 01 server
192.168.1.2 02 venus

192.168.1.3 02 staff
maksudnya IP 192.168.1.1 nomer groupnya 01 nama groupnya server.

Untuk menjalankan script lightparser.pl secara otomatis tambahkan di crontab

#crontab -e

*/50 * * * * /var/www/html/squid/lightsquid/lihgtparser.pl today

Berarti setiap 50 menit lightparser akan di jalankan.

Selamat mencoba.



Instalasi MRTG pada Centos

Multi Route Traffic Grapher, biasanya aplikasi ini digunakan untuk memantau lalulintas bandwith dalam suatu jaringan. Aplikasi ini aplikasi web-base.
Untuk melakukan instalasi MRTG, sedianya sudah terinstall perlr dalam system anda dan ada beberapa aplikasi yang harus kita install:
a.net-snmp
b.gd
c.zlib
d.httpd
e.mrtg

net-snmp adalah paket untuk Simple Network Management Protokol (SNMP), yang berfungsi sebagai penyedia data untuk server sistem manajemen jaringan. Data yang dikirim bisa dalam bentuk jumlah proses yang berjalan, jumlah data yang telah dikirim, pengunaan kapasitas hardisk dll.
lakukan instalasi paket net-snmp

#yum install net-snmp

kemudian edit file snmpd.conf menjadi seperti berikut :

# vi /etc/snmp/snmpd.conf
sysDescr Enterprise Proxy Server
sysContact netmaster@enterprise.co.id
sysName gfhsvrproxy02.corp.enterprise.co.id
sysLocation Ruang Server Head Office

com2sec public default public
group public v1 public
group public v2c public
group public usm public
view all included .1
access public "" any noauth exact all none none

Kemudian jalankan daemon snmp

# service snmpd restart
Stopping snmpd: [ OK ]
Starting snmpd: [ OK ]

Sekarang snmp sudah aktif. Kita lanjutkan dengan menginstal paket lainya.

#yum install dg
#yum install zlib
#yum install png
#yum install httpd
#yum install mrtg

Skenarionya kita akan menginstal mrtg pada server 192.168.10.2, piranti yang akan kita ambil datanya 202.134.0.155 dan 192.16.1.1
Sekarang kita konfigurasi MRTG dengan menjalankan perintah:

# /usr/bin/cfgmaker --global 'WorkDir: /var/www/mrtg' --global 'Options[_]:growright,bits’ –output=/etc/mrtg/mrtg.cfg public@202.134.0.144 public@192.168.1.1

* /var/www/mrtg, adalah tempat untuk meletakkan file-file hasil program mrtg.
* /etc/mrtg/mrtg.cfg, file konfigurasi hasil dari program cfgmaker.
* publicc adalah nama user snmp untuk membaca data.

Kemudian buat file index.html dengan perintah :

# /usr/bin/indexmaker --output /var/www/mrtg/index.html --title="Traffic analisys " --columns=1 /etc/mrtg/mrtg.cfg

Lakukan perintah berikut ini paling tidak tiga kali agar semua file yang diperlukan dibuat. Selanjutnya data akan selalu diupdate melalui proses cron setiap lima menit.

# LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg \
--lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok



Root Jail

Biasanya root jail difunakan untuk meningkatkan keaamanan dari suatu service dengan meubah perspektif dari proses service tersebut. Sehingga root jail terpisah dari root environment. Biasanya juga disebut sebagai root filesystem mini.

contoh sekarang kita akan membuat root jail untuk service httpd:

1.cek file yang berhubungan dengan httpd

[root@localhost ~]# rpm -ql httpd
/etc/httpd
/etc/httpd/conf
/etc/httpd/conf.d
/etc/httpd/conf.d/README
/etc/httpd/conf.d/proxy_ajp.conf
/etc/httpd/conf.d/welcome.conf
/etc/httpd/conf/httpd.conf
/etc/httpd/conf/magic

2. Lihat lokasi daemon httpd

#which httpd

3.Periksa librari yang berhubungan dengan httpd

[root@localhost ~]# ldd /usr/sbin/httpd
linux-gate.so.1 =>  (0×00a22000)
libm.so.6 => /lib/i686/nosegneg/libm.so.6 (0×00e68000)
libpcre.so.0 => /lib/libpcre.so.0 (0×00cfc000)
libselinux.so.1 => /lib/libselinux.so.1 (0×009d7000)
libaprutil-1.so.0 => /usr/lib/libaprutil-1.so.0 (0×00110000)

4. Membuat root file system mini

<!– @page { size: 8.5in 11in; margin: 0.79in } P { margin-bottom: 0.08in } –>

mkdir -p /var/jail/bin

# mkdir -p /var/jail/sbin

# mkdir -p /var/jail/etc

# mkdir -p /var/jail/dev

# mkdir -p /var/jail/tmp

# mkdir -p /var/jail/lib

# mkdir -p /var/jail/proc

# mkdir -p /var/jail/usr/bin

# mkdir -p /var/jail/usr/sbin

# mkdir -p /var/jail/usr/lib

# mkdir -p /var/jail/var/run

# mkdir -p /var/jail/var/lib

# mkdir -p /var/jail/var/log

# mkdir -p /var/jail/home

# mkdir -p /var/jail/etc/init.d

# mkdir -p /var/jail/etc/rc.d/init.d

# mkdir -p /var/jail/var/lock/subsys

5. Mmembuat file yang diperlukan

<!– @page { size: 8.5in 11in; margin: 0.79in } P { margin-bottom: 0.08in } –>

# mknod /var/jail/dev/zero c 1 5

# mknod /var/jail/dev/null c 1 3

# mknod /var/jail/dev/urandom c 1 9

# mknod /var/jail/dev/random c 1 8

# chmod 666 /var/jail/dev/*

6. Menyalin file program httpd dengan dependencynya

Langkah berikutnya adalah menyalin file program daemon httpd beserta dependency nya, serta bebrapa tool lainnya yang dibutuhkan serta file-file konfigurasi yang penting.
Menyalin file httpd dan dependency nya:
# cp /usr/sbin/httpd /var/jail/usr/sbin/
# cp /lib/libm.so.6 /var/jail/lib/
# cp /lib/libpcre.so.0 /var/jail/lib/
# cp /lib/libselinux.so.1 /var/jail/lib/
# cp /usr/lib/libaprutil-1.so.0 /var/jail/usr/lib/
—- lanjutkan penyalinan untuk library lainnya sebagaimana yang terdaftar dari hasil perintah ldd /usr/sbin/httpd —–

<!– @page { size: 8.5in 11in; margin: 0.79in } P { margin-bottom: 0.08in } –>

# cp /etc/services /var/jail/etc/

# cp -rf /etc/ld.so.c* /var/jail/etc/

# cp /sbin/ldconfig /var/jail/sbin/

# cd /var/jail/lib/

# ln -s bash sh

# cp -rf /lib/libnss_* /var/jail/lib/

# cp /etc/fstab /var/jail/etc

# cp /bin/grep /var/jail/bin/

# mkdir /var/jail/etc/init.d

# mkdir -p /var/jail/etc/rc.d/init.d/

# cp /lib/libtermcap.so.2 /var/jail/lib/

# cp /etc/rc.d/init.d/functions /var/jail/etc/rc.d/init.d/

# cp /sbin/consoletype /var/jail/sbin/

# cp /etc/shells /var/jail/etc/

# cp /etc/mime.types /var/jail/etc/

# cp /bin/usleep /var/jail/bincp /etc/passwd /var/jail/etc

# cp /etc/group /var/jail/etc

# cp /etc/shadow /var/jail/etc

# cp /etc/bashrc /var/jail/etc

# cp /etc/profile /var/jail/etc

# cp /etc/profile /var/jail/etc

# cp /etc/localtime /var/jail/etc

# cp /etc/hosts /var/jail/etc

# cp -rf /etc/profile.d /var/jail/etc

# cp /lib/ld-* /var/jail/lib/

# cp /bin/bash /var/jail/bin/

# cp /etc/nsswitch.conf /var/jail/etc/

# cp /usr/bin/getent /var/jail/usr/bin/

# cp /etc/services /var/jail/etc/

# cp -rf /etc/ld.so.c* /var/jail/etc/

# cp /sbin/ldconfig /var/jail/sbin/

# cd /var/jail/lib/

# ln -s bash sh

# cp -rf /lib/libnss_* /var/jail/lib/

# cp /etc/fstab /var/jail/etc

# cp /bin/grep /var/jail/bin/

# mkdir /var/jail/etc/init.d

# mkdir -p /var/jail/etc/rc.d/init.d/

# cp /lib/libtermcap.so.2 /var/jail/lib/

# cp /etc/rc.d/init.d/functions /var/jail/etc/rc.d/init.d/

# cp /sbin/consoletype /var/jail/sbin/

# cp /etc/shells /var/jail/etc/

# cp /etc/mime.types /var/jail/etc/

# cp /bin/usleep /var/jail/bin

<!– @page { size: 8.5in 11in; margin: 0.79in } P { margin-bottom: 0.08in } –>

Menyalin tool lainnya beserta dependency , misal tool ‘ls’ :

[root@localhost]# which ls

/bin/ls

[root@localhost]# cp /bin/ls /var/jail/bin/

[root@localhost]# ldd /bin/ls

linux-gate.so.1 => (0×00110000)

librt.so.1 => /lib/librt.so.1 (0×001a4000)

libacl.so.1 => /lib/libacl.so.1 (0×00681000)

libselinux.so.1 => /lib/libselinux.so.1 (0×00229000)

libc.so.6 => /lib/libc.so.6 (0×004fa000)

libpthread.so.0 => /lib/libpthread.so.0 (0×00668000)

/lib/ld-linux.so.2 (0×004dd000)

libattr.so.1 => /lib/libattr.so.1 (0×002b7000)

libdl.so.2 => /lib/libdl.so.2 (0×00662000)

libsepol.so.1 => /lib/libsepol.so.1 (0×00242000)

[root@localhost]# cp -rf /lib/librt.so.1 /var/jail/lib/

[root@localhost]# cp -rf /lib/libacl.so.1 /var/jail/lib/

[root@localhost]# cp -rf /lib/libselinux.so.1 /var/jail/lib/

[root@localhost]# cp -rf /lib/libc.so.6 /var/jail/lib/

[root@localhost]# cp -rf /lib/libpthread.so.0 /var/jail/lib/

[root@localhost]# cp -rf /lib/libattr.so.1 /var/jail/lib/

[root@localhost]# cp -rf /lib/libdl.so.2 /var/jail/lib/

[root@localhost]# cp -rf /lib/libsepol.so.1 /var/jail/lib/

Ulangi langkah yang hampir sama untuk menyalin beberapa tool lainnya.

<!– @page { size: 8.5in 11in; margin: 0.79in } P { margin-bottom: 0.08in } –>

Setelah chroot environment dibangun langkah berikutnya coba Anda akses chroot environment tersebut dengan perintah sebagai berikut :

#chroot /var/jail

-bash-3.1$ ls

<!– @page { size: 8.5in 11in; margin: 0.79in } P { margin-bottom: 0.08in } –>

Jika akses ke root jail berhasil coba Anda menjalankan daemon httpd :

#chroot /var/jail /usr/sbin/httpd

atau

#chroot /var/jail /etc/init.d/httpd start

biasanya pada saat mencoba perinta di atas jika masih ada kekeurangan librari atau depency akan di beri tahu.

misal yang kurang lib perl.so, maka anda cari dengan perintah:

locate perl.so

/usr/lib/perl.so kemudian kopi lagi ke root jailnya

cp /usr/lib/perl.so /var/jail/usr/lib

kemudian ulanngi menjalan kan perintah chrootnya. kalau sudah tidak ada masalah lagi lakukan perintah:

<!– @page { size: 8.5in 11in; margin: 0.79in } P { margin-bottom: 0.08in } –>

# pgrep httpd

16424

<!– @page { size: 8.5in 11in; margin: 0.79in } P { margin-bottom: 0.08in } –>

[root@labtop1 ~]# ls -al /proc/16424

maka akan ditampilkan pesan

<!– @page { size: 8.5in 11in; margin: 0.79in } P { margin-bottom: 0.08in } –>

lrwxrwxrwx 1 root root 0 Sept 1 04:15 root -> /var/jail



Zimbra CLI

Start, stop, status of the Zimbra servers.
zmcontrol
Performs mailbox management tasks
zmmailbox
Performs all provisioning tasks in Zimbra LDAP,
zmprov
example: zmprov sp adminname@domain.com password
zmprov ca namauser@domain.com password
zmprov sp namauser@domain.com New_Password
When you create an account, you may want to pre-create some tags and folders. You can invoke zmmailbox inside of zmprov by using “selectMailbox(sm)”

root@efrizal-laptop:/opt/zimbra# /opt/zimbra/bin/zmprov
prov> ca efri@mail.fery.ok password
953df672-097f-4b5c-b152-0d6e33232026

prov> sm efri@mail.fery.ok
mailbox: efri@mail.fery.ok, size: 0 B, messages: 0, unread: 0
mbox efri@mail.fery.ok>

To find the mailbox size for an account
zimbra@efrizal-laptop:~$ zmmailbox -z-m imi@mail.fery.ok gms 1.60 MB Start, stop, or find the status of zimbra LDAP ldap Perform a search on an LDAP server ldapsearch Start, stop, or find the status of the MySql logmysql Start, stop the SQL instance for the logger logmysql.server Send myslqadmin commands to the logger mysql logmysqladmin Start, stop, find the status of the mailboxd server mailboxd Enters interactive command-line MySQL session mysql Start, stop the SQL instance for the mailbox mysql.server Send admin commands to MySQL mysqladmin Postfix command to view or modify the postfix postconf Start, stop, reload, flush, check, upgrade- postfix Lists the accounts and gives the status of zmaccts Start, stop, or find the status of the Amavis-D zmamavisdctl Sart, stop, reload, status for anti-spam service zmantispamctl Start, stop, reload, status for the anti-virus service zmantivirusctl Start, stop, status of Apache service (for spell zmapachectl Performs full backups and incremental backups zmbackup Stops a backup that is in process. zmbackupabort Find a specific full backup set zmbackupquery Start, stop, or find the status of Clam AV zmclamdctl Clean iPlanet ICS calendar files zmcleaniplanetics Start, stop, the conversion server or find the zmconvertctl manage self-signed and commercial certificates zmcertmgr General information about the server zmdumpenv Fixes calendar entries with incorrect TZ offset zmfixtz Find the hostname of the Zimbra server zmhostname Start, stop and status of a HSM session. zmhsm Execute Java with Zimbra-specific environment zmjava Changes the LDAP password zmldappasswd View and install your Zimbra license zmlicense testing tool zmlmtpinject Used to set or get the local configuration of a zmlocalconfig Zimbra server Start, stop, reload, or find the status of the Zimbra zmloggerctl Start, stop, status of the swatch that is monitoring zmlogswatchctl logging Start, stop, reload, or find the status of the zmmailboxdctl Used to move selected mailboxes from one zmmailboxmove zibra server to another. Search across mailboxes to find messages and zmmboxsearch example: zmmboxsearch -m user1@yourdomain.com,user2@yourdomain.com -q “in:inbox” -d /var/tmp Trace messages zmmsgtrace Start, stop, or find the status of the MTA zmmtaconfigctl Start, stop, or find the status of the MTA zmmtactl Change logger MySQL password zmmylogpasswd Change MySQL passwords zmmypasswd Status of mailbox SQL instance zmmysqlstatus Start, stop, or find the status of the perdition IMAP zmperditionctl Start or stop IMAP proxy service zmproxyctl Performs full restores and incremental restores zmrestore Restore accounts from the LDAP backup zmrestoreldap Performs full restore when the Zimbra server zmrestoreoffline Start, stop, or find the status of saslauthd zmsaslauthdctl Schedule backups zmschedulebackup Used for other zm scripts, do not use zmshutil Retrieve spam and relocate it to a specified directory zmspamextract Start, stop, or find the status of the spell check zmspellctl server Generate Zimbra’s SSH encryption keys zmsshkeygen



Surveyor Indonesia

Surveyor Indonesia.

Hari ini ngasih tranining Linux networking di surveyor indonesia. Yang ikut hanya 4 orang bagian IT saja. Mereka berharap bulan depan sudah mulai bisa migrasi ke Linux.
Mereka memilih Ubuntu untuk deskto client sedang Server mereka pakai Centos 5. Alhamdulillah training berjalan lancar, cuman kendala waktu sharing printer. Printernya baru kali ini saya lihat HP berapa ya lupa. Ukuranya sebesar meja kerja. Akhirnya bisa juga pakai CUPS.
Minggu ini akan ada dari kita kesana untuk pendampingan migrasi. Semoga sukse migrasinya