Installing Cacti On Oracle Linux

cacti

Just test and installing Cacti on Oracle Linux 6.4
Before you go ahead installing cacti on your linux distrubition, there are some requirement to fullfill.

Cacti required :
1. AMP : Apache, Mysql, PHP
2. Some packages : RRDTool, net-snmp

Assumming your AMP is running, and we can go ahead to next steps.

1. Downloding latest cacti
http://www.cacti.net/download_cacti.php

2. Extract it into your http web folder, in linux tipically : /var/www/html

3. prepare database to be used by cacti:
– login mysql and create database and cacti user and grant it with following sql command:

CREATE USER 'cacti'@'localhost' IDENTIFIED BY '***';GRANT USAGE ON *.* TO 'cacti'@'localhost' IDENTIFIED BY '***' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;CREATE DATABASE IF NOT EXISTS `cacti`;

 

GRANT ALL PRIVILEGES ON `cacti`.* TO 'cacti'@'localhost';

4. Import default cacti database with cacti.sql
you can get file “cacti.sql” inside your cacti folder that you just extracted.

[root@localhost cacti]# pwd
/var/www/html/cacti
[root@localhost cacti]# ls -l cacti.sql
-rw-r--r-- 1 1000 users 178349 Aug  7 09:31 cacti.sql
[root@localhost cacti]#
[root@localhost cacti]# mysql -u root -p cacti < cacti.sql

5. Open your browser to install cacti. http://localhost/cacti
and follow the instruction.

Screenshot

viola.. installation is done. now you can login with default usernam and password :
username : admin
password : admin

Advertisements

Extend root filesystems on Oracle Linux

Before you begin :
1. Verify your new disk is detect on the systems
in this case, I’m using /dev/sdb
2. Identify your volgroup
in this case, my my root vg is vg_allen.

Here we go :

[root@allen ~]# fdisk /dev/sdb 
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x079df05d.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): 
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1566, default 1): 
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-1566, default 1566): 
Using default value 1566

Command (m for help): t
Selected partition 1
Hex code (type L to list codes): 8e
Changed system type of partition 1 to 8e (Linux LVM)

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@allen ~]# fdisk -l

Disk /dev/sda: 12.9 GB, 12884901888 bytes
255 heads, 63 sectors/track, 1566 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: 0x0009af64

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          64      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              64        1567    12069888   8e  Linux LVM

Disk /dev/sdb: 12.9 GB, 12884901888 bytes
255 heads, 63 sectors/track, 1566 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: 0x079df05d

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        1566    12578863+  8e  Linux LVM

Disk /dev/mapper/vg_allen-lv_root: 10.2 GB, 10242490368 bytes
255 heads, 63 sectors/track, 1245 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: 0x00000000


Disk /dev/mapper/vg_allen-lv_swap: 2113 MB, 2113929216 bytes
255 heads, 63 sectors/track, 257 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: 0x00000000

[root@allen ~]# partprobe 
Warning: WARNING: the kernel failed to re-read the partition table on /dev/sda (Device or resource busy).  As a result, it may not reflect all of your changes until after reboot.
[root@allen ~]# pvcreate /dev/sdb
sdb   sdb1  
[root@allen ~]# pvcreate /dev/sdb1 
  Writing physical volume data to disk "/dev/sdb1"
  Physical volume "/dev/sdb1" successfully created
[root@allen ~]# vgextend vg_allen /dev/sdb1 
  Volume group "vg_allen" successfully extended
[root@allen ~]# lvextend /dev/vg_allen/lv_
lv_root  lv_swap  
[root@allen ~]# lvextend /dev/vg_allen/lv_root /dev/sdb1 
  Extending logical volume lv_root to 21.53 GiB
  Logical volume lv_root successfully resized
[root@allen ~]# df -h /
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_allen-lv_root
                      9.4G  8.5G  504M  95% /
[root@allen ~]# resize2fs /dev/vg_allen/lv_root 
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/vg_allen/lv_root is mounted on /; on-line resizing required
old desc_blocks = 1, new_desc_blocks = 2
Performing an on-line resize of /dev/vg_allen/lv_root to 5644288 (4k) blocks.
The filesystem on /dev/vg_allen/lv_root is now 5644288 blocks long.

[root@allen ~]# df -h /
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_allen-lv_root
                       22G  8.5G   12G  42% /