Make OpenSolaris 2008.11 LiveUSB

--[ whatis ]--
please take a look at this and this.


--[ preparing ]--

. download OpenSolaris file iso .
.. dlc.sun.com
.. genunix.org
.. ftp.df.lth.fc

. burn OpenSolaris file iso .
burn OpenSolaris file iso to CD/DVD with your favorite burning application (nero, cdrecord, k3b, brasero)

. booting OpenSolaris LiveCD.
set boot priority on BIOS to CD-ROM device and following instruction on the screen.


--[ make OpenSolaris LiveUSB ]--

. plug your FlashDisk in to USB port .

. open Terminal application .


. get device information about your FlashDisk .

[jack: ~ ] $ pfexec su -
[root: ~ ] # df
Filesystem 1K-blocks Used Available Use% Mounted on
/devices/ramdisk:a 201463 176183 5134 98% /

swap 425160 756 424404 1% /etc/svc/volatile
/devices/pci@0,0/pci-ide@1f,1/ide@0/sd@0,0:a
675050 675050 0 100%
/.cdrom
/dev/lofi/1 2370064 2370064 0 100% /usr
/.cdrom/solarismisc.zlib
109016 109016 0 100% /mnt/misc
/.cdrom/pkg.zlib 60855 58877 1978 97% /mnt/pkg

/usr/lib/libc/libc_hwcap1.so.1
2370064 2370064 0 100% /lib/libc.so.1
/mnt/misc/opt 109016 109016 0 100% /opt swap 424420 16 424404 1% /tmp
swap 424432 28 424404 1% /var/run
swap 424412 8 424404 1% /root
swap 440820 16416 424404 4% /jack

/dev/dsk/c3t0d0s2 675050 675050 0 100% /media/osol-0811-99b-global

/dev/dsk/c5t0d0s0 3878022 681384 3196638 18% /media/USB Flash Disk

[root: ~ ]# rmformat
Looking for devices...
1. Logical Node: /dev/rdsk/c3t0d0p0

Physical Node: /pci@0,0/pci-ide@1f,1/ide@0/sd@0,0
Connected Device: HL-DT-ST DVD-RAM GH22NP20 1.01
Device Type: DVD Reader/Writer
Bus: IDE

Size: 659.2 MB

Label: <None>
Access permissions: Medium is not write protected.


2. Logical Node: /dev/rdsk/c5t0d0p0

Physical Node: /pci@0,0/pci1043,8179@1d,7/storage@8/disk@0,0

Connected Device: UT163 USB Flash Disk 0.00

Device Type: Removable

Bus: USB

Size: 3.9 GB

Label: <None>
Access permissions: Medium is not write protected.

----------------------------
address partition : /dev/dsk/c5t0d0s0 (newfs, mount and save opensolaris data)
address logical : /dev/rdsk/c5t0d0p0 (fdisk, formated to ufs)
address MBR : /dev/rdsk/c5t0d0s0 (install GNU/GRUB)
---------------------------------------------

. format your FlashDisk to use UFS .

[root: ~ ] # umount /media/USB\ Flash\ Disk/
-- if your flashdisk mounted on /media/USB\ Flash\ Disk/ --
[root: ~ ] # fdisk -B /dev/rdsk/c5t0d0p0
[root: ~ ] # format -e /dev/rdsk/c5t0d0p0
selecting /dev/rdsk/c5t0d0p0
[disk formatted]

FORMAT MENU:

disk - select a disk

type - select (define) a disk type

partition - select (define) a partition table

current - describe the current disk
format - format and analyze the disk

fdisk - run the fdisk program
repair - repair a defective sector

label - write label to the disk

analyze - surface analysis

defect - defect list management

backup - search for backup labels

verify - read and display labels

save - save new disk/partition definitions
inquiry - show vendor, product and revision
scsi - independent SCSI mode selects
cache - enable, disable or query SCSI disk cache

volname - set 8-character volume name
!<cmd> - execute <cmd> , then return
quit


format> quit


[root: ~ ] # newfs -m 0 /dev/dsk/c5t0d0s0
newfs: /dev/rdsk/c5t0d0s0 last mounted as /media/USB Flash Disk
newfs: construct a new file system /dev/rdsk/c5t0d0s0: (y/n)? y

/dev/rdsk/c5t0d0s0: 7876608 sectors in 1282 cylinders of 48 tracks, 128 sectors

3846.0MB in 81 cyl groups (16 c/g, 48.00MB/g, 5824 i/g)
super-block backups (for fsck -F ufs -o b=#) at:

32, 98464, 196896, 295328, 393760, 492192, 590624, 689056, 787488, 885920,
6980512, 7078944, 7177376, 7275808, 7374240, 7472672, 7571104, 7669536, 7767968, 7866400


. copy all file and directory from opensolaris livecd to usb flashdisk .

[root: ~ ] # mkdir /root/liveusb
[root: ~ ] # mount /dev/dsk/c5t0d0s0 /root/liveusb/
[root: ~ ] # (cd /.cdrom/; find . | cpio -pdum /root/liveusb/)
1349520 blocks


. installing GNU/GRUB to MBR of usb pendrive .

[root: ~ ] # installgrub -mf /root/liveusb/boot/grub/stage1 /root/liveusb/boot/grub/stage2 /dev/rdsk/c5t0d0s0
stage1 written to partition 0 sector 0 (abs 4096)
stage2 written to partition 0, 267 sectors starting at 50 (abs 4146)

stage1 written to master boot sector

[root: ~ ] # umount /root/liveusb/


--[ testing ]--
set boot priority on BIOS to USB/FlashDisk device and following instruction on the screen.


--[ links ]--
+ http://www.google.com
+ http://www.opensolaris.org/os/
++++++++++++++++++++++++++++

Make BeleniX (OpenSolaris Distribution) LiveUSB

--[ whatis ]--
please take a look this and this.


--[ preparing of installation ]--

./ download BeleniX file iso
get BeleniX OpenSolaris distribution in this.

./ burn BeleniX file iso
burn BeleniX file iso with your favorite burn apllication (cdrecord, k3b, brasero, nero, etc).

./ booting BeleniX LiveCD
set boot priority on BIOS to CD-ROM device and following instruction on the screen.


--[ installing BeleniX LiveCD to flashdisk ]--

1/ plug in your flashdisk to USB port

2/ open Terminal application

3/ run this command line:
-------------------------------
jack@belenix $ pfexec su -
-bash-3.2# usbdump
Found the following USB devices:
0: /dev/rdsk/c5t0d0p0 3.9 GB UT163 USB Flash Disk 0.00
Enter the number of your choice: 0

WARNING: All data on your USB storage will be lost.
Are you sure you want to install to
UT163 USB Flash Disk 0.00, 3900 MB at /dev/rdsk/c5t0d0p0 ?(y/n) y
1425088 blocks
stage1 written to partition 0 sector 0 (abs 4096)
stage2 written to partition 0, 265 sectors starting at 50 (abs 4146)
stage1 written to master boot sector
-bash-3.2#
------------------------------------


--[ testing ]--
set boot priority on BIOS to USB/FlashDisk device and following instruction on the screen.

[from belenix.org]


--[ links ]--


+ http://www.google.com
+ http://www.belenix.org
++++++++++++++++++++++++

install mrtg (localhost) on opensuse 11.0

--[ what is ]--
please take a look at this and this.

--[ install dependency ]--
please take a look at this.

--[ installing snmp ]--
./ install snmp
[root: ~ ] # yast2 -i net-snmp net-snmp-devel perl-Net-SNMP perl-SNMP php5-snmp snmp-mibs lsof

./ configure snmp.conf
[root: ~ ] # cd /etc/snmp
[root: snmp ] # cp snmpd.conf snmpd.conf.orig
[root: snmp ] # cp /usr/share/doc/packages/net-snmp/EXAMPLE.conf  snmpd.conf
change this line :
#       sec.name  source          community
com2sec local     localhost       COMMUNITY
com2sec mynetwork NETWORK/24      COMMUNITY
to :
#       sec.name  source          community
com2sec local     localhost       public
#com2sec mynetwork NETWORK/24      COMMUNITY

from:
group MyRWGroup v1         local
group MyRWGroup v2c        local
group MyRWGroup usm        local
group MyROGroup v1         mynetwork
group MyROGroup v2c        mynetwork
group MyROGroup usm        mynetwork
to:
group MyRWGroup v1         local
group MyRWGroup v2c        local
group MyRWGroup usm        local
group MyROSystem        v1      local
group MyROSystem        v2c     local
group MyROSystem        usm     local
#group MyROGroup v1         mynetwork
#group MyROGroup v2c        mynetwork
#group MyROGroup usm        mynetwork

from:
access MyROGroup ""      any       noauth    exact  all    none   none
access MyRWGroup ""      any       noauth    exact  all    all    none
to:
access MyROGroup ""      any       noauth    exact  all    none   none
access MyRWGroup ""      any       noauth    exact  all    all    none
access MyROSystem ""     any       noauth    exact  system none   none

from:
syslocation Right here, right now.
syscontact Me 
to:
syslocation myDC MRTG
syscontact webmaster@blackonsole.com

./ starting snmpd
[root: ~ ] # /etc/init.d/snmpd start

./ check the snmp daemon
[root: ~ ] # lsof -i :199
COMMAND   PID USER   FD   TYPE    DEVICE SIZE NODE NAME
snmpd   31993 root    7u  IPv4 230549956       TCP localhost:smux (LISTEN)
or
[root: ~ ] # ps aux | grep snmp
root     11352  0.0  0.3  12948  3420 ?        S    07:14   0:00 /usr/sbin/snmpd -r -A -LF d /var/log/net-snmpd.log -p /var/run/snmpd.pid

--[ installing mrtg ]--
./ install mrtg
[root: ~ ] # yast2 -i mrtg

./ preparing for mrtg configuration
[root: ~ ] # mkdir /etc/mrtg
[root: ~ ] # mkdir /srv/www/htdocs/mrtg
[root: ~ ] # touch /var/log/mrtg.log

./ make mrtg configuration file
[root: ~ ] # cfgmaker --global "WorkDir: /srv/www/htdocs/mrtg" --output /etc/mrtg/mrtg.cfg public@localhost

./ configure mrtg.cfg file
[root: ~ ] # vi /etc/mrtg/mrtg.cfg
# add this line :

#### Global Default

Options[_]: growright, bits
EnableSnmpV3: yes
Forks: 4

# #####################################################
# manual konfigurasi
#######################################################

#
# load MIBs
LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt,/usr/share/snmp/mibs/HOST-RESOURCES-MIB.txt,/usr/share/snmp/mibs/UCD-SNMP-MIB.txt,/usr/share/snmp/mibs/TCP-MIB.txt,/usr/share/snmp/mibs/HOST-RESOURCES-TYPES.txt


#
# Free Memory
#

Target[localhost.mem]: .1.3.6.1.4.1.2021.4.6.0&.1.3.6.1.4.1.2021.4.6.0:public@localhost
PageTop[localhost.mem]:<H1>Free Memory</H1>
Options[localhost.mem]: nopercent,growright,gauge,noinfo
Title[localhost.mem]: Free Memory
MaxBytes[localhost.mem]: 1000000
kMG[localhost.mem]: k,M,G,T,P,X
YLegend[localhost.mem]: bytes
ShortLegend[localhost.mem]: bytes
LegendI[localhost.mem]: Free Memory:
LegendO[localhost.mem]:
Legend1[localhost.mem]: Free memory, not including swap, in bytes

#
# Swaps
#

Target[localhost.swap]: memAvailSwap.0&memAvailSwap.0:public@localhost
PageTop[localhost.swap]:<H1>Swap Memory</H1>
Options[localhost.swap]: nopercent,growright,gauge,noinfo
Title[localhost.swap]: Free Memory
MaxBytes[localhost.swap]: 1000000
kMG[localhost.swap]: k,M,G,T,P,X
YLegend[localhost.swap]: bytes
ShortLegend[localhost.swap]: bytes
LegendI[localhost.swap]:  Free Memory:
LegendO[localhost.swap]:
Legend1[localhost.swap]: Swap memory avail, in bytes


#
# CPU Monitoring
# (Scaled so that the sum of all three values doesn't exceed 100)
#

Target[localhost.cpu]:ssCpuRawUser.0&ssCpuRawUser.0:public@localhost + ssCpuRawSystem.0&ssCpuRawSystem.0:public@localhost + ssCpuRawNice.0&ssCpuRawNice.0:public@localhost
Title[localhost.cpu]: Server CPU Load
PageTop[localhost.cpu]:<H1>CPU Load - System, User and Nice Processes</H1>
MaxBytes[localhost.cpu]: 100
ShortLegend[localhost.cpu]: %
YLegend[localhost.cpu]: CPU Utilization
Legend1[localhost.cpu]: Current CPU percentage load
LegendI[localhost.cpu]: Used
LegendO[localhost.cpu]:
Options[localhost.cpu]: growright,nopercent
Unscaled[localhost.cpu]: ymwd

#
# Load Average
#

Target[localhost.loadavg]: laLoadInt.2&laLoadInt.3:public@localhost
MaxBytes[localhost.loadavg]: 5000
Title[localhost.loadavg]: Load Average * 100
PageTop[localhost.loadavg]:<H1> Load Average * 100</H1>
YLegend[localhost.loadavg]: Load Average
ShortLegend[localhost.loadavg]:
Legend1[localhost.loadavg]: Load average 5 min
Legend2[localhost.loadavg]: Load average 15 min
LegendI[localhost.loadavg]:  5min load avg
LegendO[localhost.loadavg]:  15min load avg
Options[localhost.loadavg]: nopercent,growright,noinfo,gauge


#
# Memory Monitoring (Total Versus Available Memory)
#

Target[localhost.memory]: memAvailReal.0&memTotalReal.0:public@localhost
Title[localhost.memory]: Free Memory
PageTop[localhost.memory]:<H1>Free Memory</H1>
MaxBytes[localhost.memory]: 100000000000
ShortLegend[localhost.memory]: B
YLegend[localhost.memory]: Bytes
LegendI[localhost.memory]: Free
LegendO[localhost.memory]: Total
Legend1[localhost.memory]: Free memory, not including swap, in bytes
Legend2[localhost.memory]: Total memory
Options[localhost.memory]: gauge,growright,nopercent
kMG[localhost.memory]: k,M,G,T,P,X

#
# Memory Monitoring (Percentage usage)
#

Target[localhost.mempercent]: ( memTotalReal.0&memTotalReal.0:public@localhost ) * 100 / ( memTotalReal.0&memTotalReal.0:public@localhost)
Title[localhost.mempercent]: Percentage Free Memory
PageTop[localhost.mempercent]:<H1>Percentage Free Memory</H1>
options[localhost.mempercent]: growright,gauge,transparent,nopercent
Unscaled[localhost.mempercent]: ymwd
MaxBytes[localhost.mempercent]: 100
YLegend[localhost.mempercent]: Memory %
ShortLegend[localhost.mempercent]: Percent
LegendI[localhost.mempercent]: Used
LegendO[localhost.mempercent]: Used
Legend1[localhost.mempercent]: Percentage Free Memory
Legend2[localhost.mempercent]: Percentage Free Memory

#
# New TCP Connection Monitoring (per minute)
#

Target[localhost.newconns]: tcpPassiveOpens.0&tcpActiveOpens.0:public@localhost
Title[localhost.newconns]: Newly Created TCP Connections
PageTop[localhost.newconns]:<H1>New TCP Connections</H1>
MaxBytes[localhost.newconns]: 10000000000
ShortLegend[localhost.newconns]: c/s
YLegend[localhost.newconns]: Conns / Min
LegendI[localhost.newconns]: In
LegendO[localhost.newconns]: Out
Legend1[localhost.newconns]: New inbound connections
Legend2[localhost.newconns]: New outbound connections
Options[localhost.newconns]: growright,nopercent,perminute

#
# Established TCP Connections
#

Target[localhost.estabcons]: tcpCurrEstab.0&tcpCurrEstab.0:public@localhost
Title[localhost.estabcons]: Currently Established TCP Connections
PageTop[localhost.estabcons]:<H1>Established TCP Connections</H1>
MaxBytes[localhost.estabcons]: 10000000000
ShortLegend[localhost.estabcons]:
YLegend[localhost.estabcons]: Connections
LegendI[localhost.estabcons]: In
LegendO[localhost.estabcons]:
Legend1[localhost.estabcons]: Established connections
Legend2[localhost.estabcons]:
Options[localhost.estabcons]: growright,nopercent,gauge


#
# Bandwidt TCP
#

Target[backb]: 1:public@localhost
Title[backb]: Bandwidth
PageTop[backb]:<H1>TCP Bandwidth</H1>
MaxBytes[backb]: 12500000
YLegend[backb]: Bytes / Sec
LegendI[backb]: In
LegendO[backb]: Out
Legend1[backb]: Bandwidth in
Legend2[backb]: Bandwidth out
Options[backb]: growright 


#
# Disk Usage Monitoring
#


Target[localhost.disk]: dskPercent.1&dskPercent.1:public@localhost
Title[localhost.disk]: Disk Partition Usage
PageTop[localhost.disk]:<H1>Disk Partition Usage / </H1>
MaxBytes[localhost.disk]: 100
ShortLegend[localhost.disk]: %
YLegend[localhost.disk]: Utilization
LegendI[localhost.disk]: /
LegendO[localhost.disk]: /var
Options[localhost.disk]: gauge,growright,nopercent
Unscaled[localhost.disk]: ymwd

#
# SWAP Usage
#

Target[localhost.SWAP_USAGE]:.1.3.6.1.4.1.2021.4.3.0&.1.3.6.1.4.1.2021.4.4.0:public@localhost
RouterUptime[localhost.SWAP_USAGE]: public@localhost
Title[localhost.SWAP_USAGE]: Swap Space
MaxBytes[localhost.SWAP_USAGE]: 10000000000
Options[localhost.SWAP_USAGE]: growright, gauge, nopercent
ShortLegend[localhost.SWAP_USAGE]:KB
YLegend[localhost.SWAP_USAGE]: Available Swap
Legend1[localhost.SWAP_USAGE]: Used Swap
LegendI[localhost.SWAP_USAGE]: Available Swap
LegendO[localhost.SWAP_USAGE]: Used Swap
PageTop[localhost.SWAP_USAGE]:<H1>Swap Usage</H1>

./ run mrtg.cfg
[root: ~ ] # env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --logging=/var/log/mrtg.log

./ make index.html of mrtg
[root: ~ ] # indexmaker --output=/srv/www/htdocs/mrtg/index.html  /etc/mrtg/mrtg.cfg

./ add mrtg service to crontab
[root: ~ ] # crontab -e
# add this line:
*/5 * * * * /usr/bin/mrtg /etc/mrtg/mrtg.cfg --logging=/var/log/mrtg.log

--[ testing ]--
open your web browser application and goto url:

http://yourdomain/mrtg


--[ links ]--
+ http://www.google.com/linux
+ http://oss.oetiker.ch/mrtg/
++++++++++++++++++++++++++++++

install opensolaris 2008.11

. what is .

please look at this.


. download opensolaris .iso .

_ dlc.sun.com
_ genunix.org

--
burn file iso of opensolaris with your favorite burn application (brasero, cdrecord, k3b, nero) and booting in your PC.
--

. installing opensolaris .









. links .
+ htttp://www.google.com
+ my mind
++++++++++++++++++++++++++

install and configure geoip on opensuse 11.0

. what is .
please take a look at this.


. depencency .

_apache
_php
_GeoIP C Lib


. install apache and php .

please take a look at this.


. install geoip c library .

/download package

[root: ~ ] wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP-1.4.5.tar.gz

/compile the package

[root: ~ ] # tar -xzvf GeoIP-1.4.5.tar.gz
[root: ~ ] # cd GeoIP-1.4.5/
[root: GeoIP-1.4.5 ] # ./configure
[root: GeoIP-1.4.5 ] # make && make check && make install


. install geoip for apache2 .

/download the package

[root: ~ ] # wget http://geolite.maxmind.com/download/geoip/api/mod_geoip2/mod_geoip2_1.2.5.tar.gz

/compile the package

[root: ~ ] # tar -xzvf mod_geoip2_1.2.5.tar.gz
[root: ~ ] # cd mod_geoip2_1.2.5/
[root: mod_geoip2_1.2.5 ] # apxs2 -i -a -L/usr/local/lib -I/usr/local/include -lGeoIP -c mod_geoip.c
--
-I/usr/local/include is where the GeoIP.h header file is installed
-L/usr/local/lib is where the libGeoIP library is located
--
[root: mod_geoip2_1.2.5 ] # chmod 755 /usr/lib/apache2/mod_geoip.so


. configurasi in httpd.conf .

/configure apache2

[root: ~ ] # vi /etc/apache2/httpd.conf

---[ add this line ]---

<IfModule mod_geoip.c>
GeoIPEnable On
GeoIPDBFile /usr/local/share/GeoIP/GeoIP.dat
</IfModule>

---

/restart apache daemond

[root: ~ ] # /etc/init.d/apache2 restart


. testink .

/make file .php for tested

[root: ~ ] # vi /srv/www/htdocs/geoip.php

---[add this line]--

<html>
<body>
<?php
$country_code = apache_note("GEOIP_COUNTRY_CODE");
print "Code : " . $country_code . "<br/>";
$country_name = apache_note("GEOIP_COUNTRY_NAME");
print "Country: " . $country_name . "<br/>";
?>
</body>
</html>

------

/testing with web browser

open your web browser aplication and goto url:

http://yourdomain/geoip.php



. links .

+ http://www.google.com/linux
+ http://www.maxmind.com
+++++++++++++++++++++++++++++++++

install ioncube encoder and zend optimizer on opensuse 11.0

. what's .

please take a look at this (ioncube and zend)


. dependency .
_ php
_ apache (httpd)


. install dependency .

please take a look at this.


. install zend and ioncube .

--+ get info about your php version +--

[root: ~ ] # php -v
PHP 5.2.6 with Suhosin-Patch 0.9.6.2 (cli) (built: Nov 14 2008 16:48:49)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies

--+ download the packages +--

[root: ~ ] # wget http://downloads.zend.com/optimizer/3.3.3/ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz
[root: ~ ] # wget http://downloads.ioncube.com/eval_download_packages/ioncube_encoder/linux_i686/en/ioncube_encoder_evaluation.tar.gz

--+ extract package +--

[root: ~ ] # tar -xzvf ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz
[root: ~ ] # tar -xzvf ioncube_encoder_evaluation.tar.gz

--+ add ioncube and zend to library +--

[root: ~ ] # mkdir /usr/local/lib/Zend
[root: ~ ] # mkdir /usr/local/lib/ioncube
[root: ~ ] # cp ZendOptimizer-3.3.3-linux-glibc23-i386/data/5_2_x_comp/ZendOptimizer.so /usr/local/lib/Zend/
[root: ~ ] # cp ioncube_encoder_evaluation/loaders/ioncube_loader_lin_5.2.so /usr/local/lib/ioncube/

-> if your php version is 5.2.x, you can do that. if your php version isn't 5.2.x please chose acceptable the files with your php version.

--+ configure php.ini file +--

[root: ~ ] # vim /etc/php5/apache2/php.ini
;
; add this line
zend_extension=/usr/local/lib/ioncube/ioncube_loader_lin_5.2.so
zend_extension=/usr/local/lib/Zend/ZendOptimizer.so
zend_optimizer.optimization_level=15

--+ restart httpd +--

[root: ~ ] # /etc/init.d/apache2 restart

--+ make file info.php +--

[root: ~ ] # vim /srv/www/htdocs/info.php

. add this line :
<?php
phpinfo();
?>


. testing .

open your web browser application and going to url :

http://yourdomain.com/info.php


. links .

+ http://www.google.com/linux
+ http://www.ioncube.com
+ http://www.zend.com
+++++++++++++++++++++++++++++++++

install awstats on opensuse 11.0

*. whatis .*
please check this.

*. dependency .*
_ php
_ perl
_ mysql (db server)
_ apache (httpd)

*. install dependency .*
you can check this.

*. installing awstats .*
--+ download +--
[root: ~ ] # wget http://prdownloads.sourceforge.net/awstats/awstats-6.9.tar.gz
[root: ~ ] # tar -xzvf awstats-6.9.tar.gz
[root: ~ ] # mv awstats-6.9 awstats
[root: ~ ] # mv awstats /srv/www/htdocs/

--+ compiling +--
[root: ~ ] # mkdir /srv/www/htdocs/awstats/data
[root: ~ ] # chown -R wwwrun:www /srv/www/htdocs/awstats/
[root: ~ ] # cd /srv/www/htdocs/awstats/tools/
[root: tools ] # perl awstats_configure.pl
----- AWStats awstats_configure 1.0 (build 1.8) (c) Laurent Destailleur -----
This tool will help you to configure AWStats to analyze statistics for
one web server. You can try to use it to let it do all that is possible
in AWStats setup, however following the step by step manual setup
documentation (docs/index.html) is often a better idea. Above all if:
- You are not an administrator user,
- You want to analyze downloaded log files without web server,
- You want to analyze mail or ftp log files instead of web log files,
- You need to analyze load balanced servers log files,
- You want to 'understand' all possible ways to use AWStats...
Read the AWStats documentation (docs/index.html).

-----> 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:
/srv/www/htdocs/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] ? 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):
> /etc/apache2/httpd.conf

-----> Check and complete web server config file '/etc/apache2/httpd.conf'
  Add 'Alias /awstatsclasses "/srv/www/htdocs/awstats/wwwroot/classes/"'
  Add 'Alias /awstatscss "/srv/www/htdocs/awstats/wwwroot/css/"'
  Add 'Alias /awstatsicons "/srv/www/htdocs/awstats/wwwroot/icon/"'
  Add 'ScriptAlias /awstats/ "/srv/www/htdocs/awstats/wwwroot/cgi-bin/"'
  Add '' directive
AWStats directives added to Apache config file.
-----> Update model config file '/srv/www/htdocs/awstats/wwwroot/cgi-bin/awstats.model.conf'
File awstats.model.conf updated.

-----> 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] ? y

-----> 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:
> blackonsole.com

-----> Define config file path
In which directory do you plan to store your config file(s) ?
Default: /etc/awstats
Directory path to store config file(s) (Enter for default):
>{just Enter}

-----> Create config file '/etc/awstats/awstats.blackonsole.com.conf'
Config file /etc/awstats/awstats.blackonsole.com.conf created.

-----> Restart Web server with '/sbin/service httpd restart'
service: no such service httpd

-----> Add update process inside a scheduler
Sorry, configure.pl does not support automatic add to cron yet.
You can do it manually by adding the following command to your cron:
/srv/www/htdocs/awstats/wwwroot/cgi-bin/awstats.pl -update -config=blackonsole.com
Or if you have several config files and prefer having only one command:
/srv/www/htdocs/awstats/tools/awstats_updateall.pl now
Press ENTER to continue...

{just Enter}

--+ configure awstats +--
[root: ~ ] # vim /etc/awstats/awstats.blackonsole.com.conf
// change below options configure like :
LogFile="/var/log/apache2/awstats.log.1"
LogType=W
LogFormat=1
SiteDomain="blackonsole.com"
HostAliases="www.blackonsole.com blackonsole.com"
DirData="/srv/www/htdocs/awstats/data/"
AllowToUpdateStatsFromBrowser=1
DefaultFile="index.php index.html"

--+ setup awstats on httpd +--
[root: ~ ] # vim /etc/apache2/httpd.conf
// add this line in awstats cgi configure :
CustomLog "/var/log/apache2/awstats.log.1" combined

// so the configure like this :
#
# Directives to allow use of AWStats as a CGI
#
Alias /awstatsclasses "/srv/www/htdocs/awstats/wwwroot/classes/"
Alias /awstatscss "/srv/www/htdocs/awstats/wwwroot/css/"
Alias /awstatsicons "/srv/www/htdocs/awstats/wwwroot/icon/"
ScriptAlias /awstats/ "/srv/www/htdocs/awstats/wwwroot/cgi-bin/"
CustomLog "/var/log/apache2/awstats.log.1" combined
#
# This is to permit URL access to scripts/files in AWStats directory.
#
<Directory "/srv/www/htdocs/awstats/wwwroot">
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>

--+ restart httpd +--
[root: ~ ] # /etc/init.d/apache2 restart

--+ setup crontab for awstats +--
[root: ~ ] # crontab -e
// add this line:
0 3 * * * /srv/www/htdocs/awstats/wwwroot/cgi-bin/awstats.pl -update -config=blackonsole.com

--+ make awstats file logs +--
[root: ~ ] # cd /var/log/apache2/
[root: apache2 ] # touch awstats.log awstats.log.1

--+ update awstats log +--
[root: ~ ] # /srv/www/htdocs/awstats/wwwroot/cgi-bin/awstats.pl -update -config=blackonsole.com
-> you don't do this if you are configure awstats for update over web browser (AllowToUpdateStatsFromBrowser=1)

*. tezting .*
open your web browser application and goto the url :
http://yourdomain.com/awstats/awstats.pl?config=yourawstatsconfigname
example:
http://blackonsole.com/awstats/awstats.pl?config=blackonsole.com

-> klik 'Update now' for update the awstats log.



*. protect with .htaccess .*
--+ make .htaccess +--
[root: ~ ] # vi /srv/www/htdocs/awstats/.htaccess
#
# add this line:
AuthUserFile /srv/www/htdocs/awstats/.htpasswd
AuthGroupFile /dev/null
AuthName "Null"
AuthType Basic

<Limit GET>
order deny,allow
require valid-user
</Limit>

--+ make .htpasswd +--
[root: ~ ] # htpasswd -c /srv/www/htdocs/awstats/.htpasswd


--+ configure .htaccess on httpd +--
[root: ~ ] # vim /etc/apache2/httpd.conf
#
# change on this configuration :
<Directory "/srv/www/htdocs/awstats/wwwroot">
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthType Basic
AuthName stats
AuthUserFile /srv/www/htdocs/awstats/.htpasswd
require valid-user
</Directory>

--+ restart httpd +--
[root: ~ ] # /etc/init.d/apache2 restart

*. links .*
+
+ http://google.com/linux
+ http://www.awstats.org
+++++++++++++++++++++++++++
:: Cheap Web Hosting :: ~ only from Rp. 900/mo; 250Mb/mo of Bandwidth ~ :: Web Hosting Murah Meriah :: ~ mulai dari Rp. 900/bln; Bandwidth 250Mb/bln ~