About

Friday, October 12, 2012

How to install GUI on Ubuntu 12.04 (Precise) Server

How to install GUI on Ubuntu 12.04 (Precise) Server 

We have already discussed how to install ubuntu 12.04 LAMP server .If you are a new user and not familiar with command prompt you can install GUI for your ubuntu LAMP server using one of the 2 options

1) Install desktop Environment
2) Install Webmin

1) Install desktop Environment

First you nee to make sure you have enabled Universe and multiverse repositories in /etc/apt/sources.list file once you have enable you need to use the following command to install GUI
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install ubuntu-desktop
The above command will install GNOME desktop
If you wan to install a graphical desktop manager without some of the desktop addons like Evolution and OpenOffice, but continue to use the server flavor kernel use the following command
sudo apt-get install --no-install-recommends ubuntu-desktop
If you want to install light weight desktop install xfce using the following command
sudo apt-get install xubuntu-desktop
If you want to install KDE desktop use the following command
sudo apt-get install kubuntu-desktop

Thursday, October 11, 2012

Installation of openmeetings on Ubuntu 10.04.


Installation of openmeetings on Ubuntu 10.04.

Introduction

Details

Edit the sources to include partner so that the sun-jre will install
sudo apt-get install sun-java6-bin sun-java6-jdk sun-java6-jre sun-java6-fonts mysql-server imagemagick gs-gpl libt1-5 zip unzip subversion git-core checkinstall yasm texi2html libfaac-dev libfaad-dev libmp3lame-dev libsdl1.2-dev libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev libogg-dev sox libvorbis-dev libgsm1 libgsm1-dev libfaad2 flvtool2 lame gcc-multilib autoconf automake1.9 libtool ffmpeg automake
and now the openoffice bits
sudo apt-get install openoffice.org-writer openoffice.org-calc openoffice.org-impress openoffice.org-draw openoffice.org-math openoffice.org-gcj openoffice.org-filter-binfilter openoffice.org-java-common
now the prerequisites for swftools http://www.swftools.org need to be installed
Starting with freetype, get the latest from here http://download.savannah.gnu.org/releases/freetype/
mkdir freetype
cd freetype
wget http://download.savannah.gnu.org/releases/freetype/freetype-2.4.5.tar.gz
tar -zxvf freetype-2.4.5.tar.gz
cd freetype-2.4.5
./configure
make
sudo make install
now jpeglib
sudo apt-get install libjpeg-progs libjpeg62 libjpeg62-dev  
and some more
sudo apt-get install libgif-dev libgif4 
now we can progress with swftools
get the latest from here http://www.swftools.org/download.html
mkdir swftools
cd swftools
wget http://www.swftools.org/swftools-2011-01-23-1815.tar.gz
tar -zxvf swftools-2011-01-23-1815.tar.gz
cd swftools-2011-01-23-1815
because of some missing items from later versions of libjpeg, xpdf needs to be put into the build
get the latest from ftp://ftp.foolabs.com/pub/xpdf/
cd ./lib/pdf
wget ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.02.tar.gz
now we can get on with the build
cd ../..
./configure
make
sudo make install
With all pre-reqs now installed, we can get on with openmeetings, get the latest version fromhttp://code.google.com/p/openmeetings/downloads/list
mkdir openmeetings
cd openmeetings
wget http://openmeetings.googlecode.com/files/openmeetings_1_7_0_r3822.zip
sudo mkdir /opt/red5
sudo cp openmeetings_1_7_0_r3822.zip /opt/red5
cd /opt/red5
sudo unzip openmeetings_1_7_0_r3822.zip
sudo rm openmeetings_1_7_0_r3822.zip
now make the scripts executable and change the ownership.
sudo chmod +x /opt/red5/*.sh
sudo chmod +x /opt/red5/webapps/openmeetings/jod/*.sh
sudo chown -R nobody\: /opt/red5
now you need to create a red5 startup script
sudo nano /etc/init.d/red5
#! /bin/sh
#
# red5 red5 initscript
#
# Author: Simon Eisenmann .
#
set -e
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DESC="Red5 flash streaming server"
NAME=red5
RED5_HOME=/opt/red5
DAEMON=$RED5_HOME/$NAME.sh
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME# Gracefully exit if the package has been removed.
test -x $DAEMON || exit 0
# Read config file if it is present.
if [ -r /etc/default/$NAME ]
then
            . /etc/default/$NAMEfi
#
# Function that starts the daemon/service.
#
d_start() {
            start-stop-daemon --start -c nobody --pidfile $PIDFILE --chdir $RED5_HOME --background --make-pidfile --exec $DAEMON}
#
# Function that stops the daemon/service.
#
d_stop() {
            start-stop-daemon --stop --quiet --pidfile $PIDFILE --name java
            rm -f $PIDFILE}
case "$1" in
            start)
   echo -n "Starting $DESC: $NAME"
   d_start
   echo "."
            ;;
            stop)
   echo -n "Stopping $DESC: $NAME"
            d_stop
   echo "."
            ;;

            restart|force-reload)
   echo -n "Restarting $DESC: $NAME"
   d_stop
   sleep 1
   d_start
   echo "."
            ;;

            *)
   echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
   exit 1
            ;;
esac
exit 0
exit 0
now make it executable and set to autostart
sudo chmod +x /etc/init.d/red5
sudo update-rc.d red5 defaults
the database needs to be configured
echo "CREATE USER openmeetings@localhost;" | mysql -u root -p
echo "CREATE DATABASE openmeetings DEFAULT CHARACTER SET 'utf8';" | mysql -u root -p
echo "GRANT ALL PRIVILEGES ON openmeetings.* TO 'openmeetings'@'localhost' IDENTIFIED BY '<password>' WITH GRANT OPTION;" | mysql -u root -p
echo "FLUSH PRIVILEGES;" | mysql -u root -p
where
<password>
is the password that you want to use for the openmeetings user
The openmeetings configuration file needs to be updated with the database details
sudo nano /opt/red5/webapps/openmeetings/conf/hibernate.cfg.xml
Change
<property name="connection.username">root</property>
<property name="connection.password"></property>
to
<property name="connection.username">openmeetings</property>
<property name="connection.password"><password></property>
where
<password>
is the password that you used when configuring MySQL
Go to a browser and go to http://f.q.d.n:5080/openmeetings/install to complete the install

TCExam Installation


TCExam Installation

System Requirements

The installation instructions assumes that you have a fully functioning web server.

These are the minimum requirements needed before installation of TCExam can be successful:
For help with the installation and configuration of the web server and the required libraries please refer to the specific manuals.
If installing on your home or office computer (for local testing only) there are a number of packages for the various operating systems that will assist in establishing these requirements:
If you are using a Debian/Ubuntu OS, we suggest to install the following packages:
  • For MySQL:
    sudo apt-get install acpid apache2 ghostscript gsfonts imagemagick libapache2-mod-auth-mysql libapache2-mod-auth-plain libapache2-mod-php5 libauthen-pam-perl libio-pty-perl libmd5-perl libnet-ssleay-perl libpam-runtime lm-sensors mysql-client mysql-server openssl perl php5 php5-cli php5-gd php5-imagick php5-curl php5-mcrypt php5-memcache php5-mysql php5-xcache ssh tetex-base tetex-bin tetex-extra texlive-base-bin zbar-tools
  • For PostgreSQL:
    sudo apt-get install acpid apache2 ghostscript gsfonts imagemagick libapache2-mod-auth-pgsql libapache2-mod-auth-plain libapache2-mod-php5 libauthen-pam-perl libio-pty-perl libmd5-perl libnet-ssleay-perl libpam-runtime lm-sensors openssl perl php5 php5-cli php5-gd php5-imagick php5-curl php5-mcrypt php5-memcache php5-pgsql php5-xcache postgresql postgresql-client postgresql-contrib ssh tetex-base tetex-bin tetex-extra texlive-base-bin zbar-tools
On remote, hosted or dedicated servers the configuration and availability of these applications will depend on the host provider or the operating system that is installed upon the server. If you encounter a problem with your host provider and the use of TCExam check the support and services page.

Configuring DBMS

In order for TCExam to work properly, you will need to have a functioning MySQL or PostgreSQL Database prior to beginning the install process.
TCExam will create a database and the associated tables, provided the details are correctly entered, during the installation process. On occasion however, it may be necessary to create the database ahead of time. Just make a note of the appropriate settings before proceeding with the installation:
  • The name of your MySQL/PostgreSQL database. This may be pre-set on some hosted server set-ups.
  • The name of the MySQL/PostgreSQL host. This is usually called "localhost" if you are installing on a PC or a local server. However, if you are using shared hosting, check with your hosting provider to be sure this is the case.
  • A MySQL/PostgreSQL username. This may have been allocated by your server provider. A local MySQL installation generally has the default administrator username set as "root".
  • A MySQL/PostgreSQL password. This may have been allocated by your server provider. Local MySQL installation generally has the default administrator password set to a blank field. TCExam always requires a non-blank password. To change the password use the following syntax:
    [MySQL]
    mysql - u root
    UPDATE mysql.user SET Password=PASSWORD('mypassword') WHERE User='root';
    FLUSH PRIVILEGES;
    quit;
    [PostgreSQL]
    sudo su postgres -c psql template 1
    ALTER USER postgres WITH PASSWORD 'mypassword';
    q

Configuring PHP

For the correct use of TCExam, PHP has to be configured to support the systems and libraries indicated above.
Some parameters of PHP must also be set as the following:
  • php.ini
    date.timezone = Europe/Rome ; http://php.net/manual/en/timezones.php 
    arg_separator.output = "&"
    magic_quotes_gpc = On
    magic_quotes_runtime = Off
    magic_quotes_sybase = Off
    request_order = "GPC"
  • Apache module (/etc/httpd/conf/httpd.conf):
    AddDefaultCharset UTF-8
    php_value arg_separator.output "&"
    php_value magic_quotes_gpc On
    php_value magic_quotes_runtime Off
    php_value magic_quotes_sybase Off
    php_value request_order "GPC"

Installation

When installing TCExam for the first time, verify the system requirements. Assuming you have a working Apache/IIS web server, with PHP and a MySQL/PostgreSQL DBMS, you are on your way to installing TCExam.

TCExam Upgrade

The TCExam upgrade process may vary at each release. Detailed instructions are contained on the UPGRADE.TXT file attached to each TCExam release.

Getting the files

TCExam can be downloaded from SourceForge.net. The file is a compressed archive so you will need an utility program, either locally or on your host server, that can "unzip" the file (i.e. WinZip, WinRAR, 7Zip). Ensure that you choose latest stable release version.

Installing Files

We are assuming you have established a working web server, with the necessary requirements, and that you know where to put files to display on the web server.
Unzip the distribution file into a directory under your web server root. If you are using the Apache web server, this is typically c:apache groupapachehtdocs on the Windows OS and/usr/local/apache/htdocs or /var/www/ on a UNIX-like system but it my vary particularly on hosted servers and between different distributions of GNU-Linux OS.
What you do to install TCExam on a remote host is largely dependant upon the facilities your host provides - with regard to Control Panel software and connection resources. It may also depend upon your own skills concerning server access methods. A simple and typical procedure may involve: unzip the TCExam distribution file to a local directory on your local computer and then FTP the files to the host server placing them either directly under, or in, a directory under the web server root. There are many free FTP programs available for this operation, such as Filezilla. A Google search or visit to any of the open source resource sites will assist you in finding a suitable tool.

When you have finished uploading the files and folders, change the files owner to the Web server user (typically "www-data" or "apache"). On POSIX based systems (like Unix, Linux, etc), change to the TCExam directory and enter the following system command (substitute the user name appropriate for your system): chown -R apache:apache /var/www/tcexam.
Change the files access permission so that all user can write into the them. On POSIX based systems change to the TCExam directory and enter the following system command: chmod -R 777 /var/www/tcexam. For security reasons, you must properly set the permissions of these files at the end of the installation process.

Browser Installation

This type of installation will automatically install the database and will configure the essential system parameters. The installation process will delete any data of previous installations of TCExam, reason why in this case it is advisable to make backup copy of these data.

Point your Web browser (i.e. Mozilla Firefox or Internet Explorer) to the TCExam installation script (http://www.yoursite.com/install/install.php or http://yoursite.com/tcexam_folder/install/install.php). To start the installation you must fill up the form completely and press the button INSTALL.
The required fields are:
  • db type: type of DBMS (the default is MySQL).
  • db host: name of the database host (usually localhost).
  • db port: database port (usually 3306 for MySQL or 5432 for PostgreSQL).
  • db user: name of the database user (usually it is root for MySQL and postgres for PostgreSQL).
  • db password: user's password to access the database.
  • db name: name of the database (usually TCExam). This name has to be changed just when there are other copies of TCExam in the same system.
  • tables prefix: prefix that will be added to the table names (usually tce_).
  • host URL: the domain name of your site (i.e. http://www.yoursite.com or https://www.yoursite.com).
  • relative URL: relative path from the root of your webserver where the TCExam files are located (usually / or /tcexam_folder/).
  • TCExam path: complete path of the folder where TCExam is installed (i.e. /usr/local/apache/htdocs/TCExam/ or c:/Inetpub/wwwroot/TCExam/).
  • TCExam port: default connection port (usually 80 for HTTP or 443 for SSL - HTTPS).
If the installation completed succesfully the system is ready for the first execution. At this point you can jump to the Post Installation and Configuration section.
In case the installation did not complete succesfully you can use the manual procedure described in the next section.

Manual Installation

In order to manually install TCExam you must edit some configuration files and install the database.

The essential files and configuration parameters are:
  • shared/config/cp_db_config.php
    • K_DATABASE_TYPE (database type, usually MYSQL or POSTGRESQL)
    • K_DATABASE_HOST (name of the database host, usually localhost)
    • K_DATABASE_NAME (database name, usually TCExam)
    • K_DATABASE_USER_NAME (name of the database user, it usually is root)
    • K_DATABASE_USER_PASSWORD (password to access the database)
    • K_TABLE_PREFIX (prefix that will be added to the table names, usually tce_)
  • shared/config/cp_paths.php
    • K_PATH_HOST (the domain name of your site, i.e. http://www.yoursite.com)
    • K_PATH_TCEXAM (relative path from the root of your webserver where the TCExam files are located, usually / or /tcexam_folder/)
    • K_PATH_MAIN (complete path to the folder where TCExam is installed, i.e. /usr/local/apache/htdocs/TCExam/ or c:/Inetpub/wwwroot/TCExam/)
    • K_STANDARD_PORT (http communication port, usually 80 or 443 for SSL)

Database Installation

In the install folder there are all the SQL files with the structure and data of the database:
  • mysql_db_structure.sql - Contains the MySQL database structure.
  • pgsql_db_structure.sql - Contains the PostgreSQL database structure.
  • db_data.sql - Contains the default database data.
If you want to change the prefix of the tables you must use a text editor with the search and replace function and perform the following substitutions:
  • In the ..._db_structure.sql file substitute CREATE TABLE tce_ with CREATE TABLE yourprefix
  • In the db_data.sql file substitute INSERT INTO tce_ with INSERT INTO yourprefix
To execute the SQL files you can use the DBMS commands from the command shell of the server. For MySQL you can use the following syntax:
mysql -u root -p
mysql> CREATE DATABASE TCExam;
mysql> quit
shell> mysql -u root -p TCExam < mysql_db_structure.sql
shell> mysql -u root -p TCExam < db_data.sql
As another option you can use an external DBMS manager (i.e. phpMyAdmin, phpPgAdmin, pgAdmin3, etc.) to create the database and run the SQL files by using the specific commands.

Post Installation and Configuration

Once the installation is completed you must:
  • delete the install folder since it is not necessary anymore and represent a security issue for the system (rm -fR /var/www/tcexam/install);
  • there are additional commands required to ensure that files can not be altered unless intended by the administrator; on POSIX system you can use the following commands:
    cd /var/www/tcexam
    find . -exec chown -R apache:apache {} ;
    find . -type f -exec chmod 544 {} ;
    find cache/ -type f -exec chmod 644 {} ;
    find cache/backup -type f -exec chmod 644 {} ;
    find cache/lang -type f -exec chmod 544 {} ;
    find admin/log/ -type f -exec chmod 644 {} ;
    find public/log/ -type f -exec chmod 644 {} ;
    find . -type d -exec chmod 755 {} ;

    (n this example /var/www/tcexam is the installation folder, apache is the name of Apache user and group)
  • configure TCExam to fit your needs and activate additional features.

Configuration

Once the above installation procedure is successfully completed, TCExam will work in "basic" mode. Some additional configuration steps are required in order to activate some features (RADIUS, email, LaTeX) and to personalize some settings to fit your needs. All you have to do is to manually edit the following configuration files:
  • shared/config/ - Main configuration files:
    • lang/ - language files
      • language_tmx.xml - TMX language file (contains all translations)
    • tce_cas.php - Configuration file for CAS (Central Authentication Service)
    • tce_config.php - system general configuration
    • tce_db_config.php - database configuration
    • tce_email_config.php - general configuration of the email system
    • tce_general_constants.php - general constants
    • tce_latex.php - LaTeX configuration
    • tce_ldap.php - LDAP configuration
    • tce_mime.php - MIME associations to file extensions
    • tce_paths.php - file and folder paths within the system
    • tce_pdf.php - configuration of the format and the headers of the PDF documents
    • tce_radius.php - RADIUS configuration
    • tce_user_registration.php - user registration configuration
  • admin/config/ - Configuration files for the administration area:
    • tce_auth.php - access levels configuration for the administration modules
    • tce_config.php - general configuration for the administration panel
  • public/config/ - Configuration files for the public area:
    • tce_auth.php - access levels configuration for the public modules
    • tce_config.php - general configuration for the public area
Configuration files are self-explanatory. If you encounter a problem please check the Support and Services page.

Access and Security

Once the installation and configuration procedures are completed, you can access the administration section by pointing your Web browser to http://www.yoursite.com/tcexam_folder/admin/code/ and using the following username and password:
  • name: admin
  • password: 1234
In order to protect your system and be granted with an unique personal access, remember to change the password with the Users form.

To achieve a better level of security you have to protect the whole admin folder with a web-based user autentication system. For Apache check the Apache Authentication, Authorization, and Access Control.

Open Campus dan E-Learning dengan Dokeos


Open Campus dan E-Learning dengan Dokeos

E-Learning, adalah kecendrungan yang menjadi trend saat ini. Dimana metode pendidikan konvensional -dengan semua kekurangan dan kelebihannya- telah mulai bergeser menjadi pendidikan modern yang mengedepankan dan memanfaatkan media teknologi informasi sebagai infrastrukturnya. (sorri kalo kalimatnya seperti wartawan :))
Kalau anda pernah mendengar bahkan pernah memanfatkan Moodle, maka kali ini saya informasikan bahwa ada aplikasi yang lebih dahsyat dari itu. Nama aplikasi ini adalah Dokeos.
Menurut situs resminya, Dokeos adalah Learning Management System yang telah digunakan oleh lebih 600 perusahaan dan administrasi publik dalam membangun e-learning dan blended learning program.
Oke, cukup berita bagusnya, dan sekarang berita lebih bagusnya lagi adalah kita akan installkan Dokeos di sistem kita.
1. download aplikasi dokeos disini
Maka anda akan mendapatkan file dengan nama dokeos.1.8.4.zip (ketika tutorial ini dibuat). Sebaiknya pindahkan file tersebut ke home directory anda untuk mempermudah proses instalasi berikutnya
2. extract file tersebut
$ sudo unzip dokeos.1.8.4.zip
maka akan terbentuk folder dengan nama “dokeos”
3. pindahkan folder dokeos tersebut ke direktori web server
$ sudo mv dokeos /opt/lampp/htdocs/
4. pindah ke lokasi direktori web server
$ cd /opt/lampp/htdocs/
4. rubah file permission dari beberapa folder dokeos agar dapat kita eksekusi
$ sudo chmod 777 dokeos/main/inc/config/
$ sudo chmod 777 dokeos/main/garbage/
$ sudo chmod 777 dokeos/main/upload/
$ sudo chmod 777 dokeos/main/default_course_document/images/
$ sudo chmod 777 dokeos/archive/
$ sudo chmod 777 dokeos/course/
$ sudo chmod 777 dokeos/home/
Instalasi Dokeos
buka browser kemudian ketik http://localhost/dokeos
dokeos-install-1.png
Klik pada tombol “Click to INSTALL DOKEOS”
Step 1
Pilih bahasa yang akan digunakan pada proses instalasi. Defaultnya adalah bahasa inggris
dokeos-install-2.png
Step 2
Perhatikan pada bagian Requirement. Beberapa hal yang harus anda cermati terbagi menjadi 3 bagian. 1). Server requirements 2). Recommended setting 3). Directory and file permission. Sebaiknya keterangan yang muncul untuk setiap kategori tersebut harus berwarna HIJAU. Bila masih ada yang salah, segera perbaiki bagian yang dimaksud. Bila semua sudah ok, click pada tombol “New installation”.
dokeos-install-21.pngdokeos-install-22.pngdokeos-install-23.png
Step 3
Pada langkah ini akan menampilkan Lisensi GNU Versi 2. Tentu anda harus menyetujui lisensi ini dengan meng-click tombol “I accept”
dokeos-install-31.png
Step 4
Pada bagian ini anda diminta untuk melengkapi konfigurasi database mysql. isi beberapa kolom yang disediakan
———————————————————————————-
Database Host : isi dengan “localhost”
Database Username : isi dengan “root”
Database Password : isi dengan password root untuk mysql (bila ada)
MySQL database prefix : kosongkan
Main Dokeos database (DB) : isi dengan “dokeos_main”
Tracking DB. : isi dengan “dokeos_stats
User DB : isi dengan “dokeos_user”
Enable Tracking : pilih “Yes”
Use one or several DB for Dokeos : pilih “Several”
———————————————————————————-
klik pada tombol “Next”
dokeos-install-4.png
Step 5
Pada bagian Config Setting anda diminta melengkapi kolom kosong yang sudah disediakan
———————————————————————————–
Main Language : pilih “Indonesia” kecuali anda terbiasa “english”
URL of Dokeos : isi dengan “http://localhost/dokeos/”
Administrator email : isi dengan “alamat email kita”Administrator last name : isi dengan “nama belakang kita”
Administrator first name : isi dengan “nama depan kita”
Administrator telephone : isi dengan “nomor HP kita”
Admnistrator login : isi dengan “admin”
Administrator password : isi dengan “admin” (untuk memudahkan saja)
Your portal name : anda bisa isi dengan kalimat sebarang (contoh “Open Campus”)
Your organization short name : isi dengan “nama organisasi”
URL of this organisation : isi dengan “alamat situs organisasi kita”
Encrypt user password in database : pilih “Yes”
Allow self-registration : pilih “Yes”
Allow self-registration as cource creator : pilih “Yes”
———————————————————————————–
Klik pada tombol “Next”
dokeos-install-5.png
Step 6
Tekan saja tombol “Install Dokeos”
dokeos-install-6.png
Step 7
Pada bagian ini kita harus merubah file permission beberapa file
$ sudo chmod 444 /opt/lampp/htdocs/dokeos/main/inc/conf/configuration.php
$ sudo chmod 444 /opt/lampp/htdocs/dokeos/main/install/index.php
Anda bisa segera login pada http://localhost/dokeos dengan username dan password “admin” dan segera buat materi pembelajaran yang bisa diakses oleh semua orang.
Semoga bermanfaat. Anda bisa segera memanfaatkan aplikasi ini untuk membuat situs e-learning yang bisa dibaca orang, minimal anda simpan aplikasi ini diserver lokal sekolah/organisasi/lembaga kursus/pelatihan dsb agar siswa/peserta bisa belajar secara online dari situs ini.

Sumber : http://papinazwa.wordpress.com/2007/12/22/open-campus-dan-e-learning-dengan-dokeos/

How To Install Cacti on Slackware


How To Install Cacti on Slackware

25 08 2008
 
 
 
 
 
 
1 Vote

This sections about mini how to install cacti on Slackware (12.0). Isone mung iki, Peace!
All done with simple step :
Packages was installed on my system:
1. Apache/2.2.4 (Unix)
2.PHP 5.2.5 (cli) enables : with-snmp, with-zlib, with-gd, enable-ucd-snmp-hack
3.Mysql-5.0.27
4.rrdtool-1.2.23-i486-1gds
5.Net-snmp-5.4

1. Extract the cacti distribution tarball on web directory
root@dianseh:# cd /var/www/htdocs/
root@dianseh:# tar zxvf cacti-version.tar.gz
root@dianseh:# mv cacti-version cacti
root@dianseh:# cd cacti


2. Created the user and group
root@dianseh:# groupadd cacti
root@dianseh:# useradd -g cacti cacti


3. Create the MySQL database, import the default database, create username and password for cacti:
root@dianseh:# mysqladmin --user=root -p create cacti
root@dianseh:# mysql cacti GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'yourpassword';
mysql> flush privileges;


4. Edit include/config.php and specify the database type, name, host, user and password for your Cacti configuration.
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "yourpassword";


5. Change directory permissions
root@dianseh# chown -R cacti:cacti rra/ log/

6. Add a line to your crontab
root@dianseh# su - cacti
cacti@dianseh# crontab -e
*/5 * * * * php /var/www/htdocs/cacti/poller.php > /dev/null 2>&1

cacti@dianseh# exit

7. Try to open full path url http://cactiserver/cacti/
All done with following those step carefully.
Begitu ceritanya, cacti saya sudah dapat berjalan dengan mengikuti langkah-langkah tersebut di atas.
Selamat mencoba, Good Luck

Reference :
1. http://www.cacti.net/downloads/docs/html/unix_configure_cacti.html

Wednesday, October 10, 2012

SNMP Server (snmpd) and Client (snmp) Installation and Configuration in Debian


SNMP Server (snmpd) and Client (snmp) Installation and Configuration in Debian



What is net-snmp ?

Simple Network Management Protocol (SNMP) is a widely used protocol for monitoring the health and welfare of network equipment (eg. routers), computer equipment and even devices like UPSs. Net-SNMP is a suite of applications used to implement SNMP v1, SNMP v2c and SNMP v3 using both IPv4 and IPv6.

Net-SNMP Tutorials
http://www.net-snmp.org/tutorial/tutorial-5/
 


Download Net-SNMP
http://www.net-snmp.org/download.html

 
Net-SNMP Documentation
http://www.net-snmp.org/docs/readmefiles.html

 
Installing SNMP Server in Debian

If you want to install snmp server in debian you need to install snmpd package using the following command

#apt-get install snmpd

This will complete the installation process.

Configuring SNMP Server in Debian

Default Configuration files are located at /etc/snmp directory this contains the following files.

snmpd.conf snmptrapd.conf

/etc/snmp/snmpd.conf - configuration file for the Net-SNMP SNMP agent.

/etc/snmp/snmptrapd.conf - configuration file for the Net-SNMP trap daemon.

Now we need to concentrate on snmpd.conf file for our configuration. If you want to see the default snmpd.conf file.

Before doing any changes to your /etc/snmp/snmpd.conf file take a copy of original file using the following command

#cp /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.orig

Set up the snmp server to allow read access from the other machines in your network for this you need to open the file /etc/snmp/snmpd.conf change the following Configuration and save the file.

 first step

# sec.name           source  community
   com2sec paranoid default public
#com2sec readonly default public
#com2sec readwrite default private

to

#com2sec paranoid default public
   com2sec local   localhost public
   com2sec localNet 192.168.0.0 /24 public
#com2sec readwrite default private

you can define the source whichever way you want like only allow from local machine for that you need to add 127.0.0.1 under source and you can define your community in this case we are using public as our community.

Second Step

####
# Second, map the security names into group names:

# sec.model sec.name
group MyROSystem v1 paranoid
group MyROSystem v2c paranoid
group MyROSystem usm paranoid
group MyROGroup v1 readonly
group MyROGroup v2c readonly
group MyROGroup usm readonly
group MyRWGroup v1 readwrite
group MyRWGroup v2c readwrite
group MyRWGroup usm readwrite

to

group MyROSystem v1 local
group MyROSystem v2c local
group MyROSystem usm local
group MyROGroup v1 localnet
group MyROGroup v2c localnet
group MyROGroup usm localnet
group MyRWGroup v1 local
group MyRWGroup v2c local
group MyRWGroup usm local

Third Step

####
# Third, create a view for us to let the groups have rights to:

# incl/excl subtree mask
view all included .1 80
view system included .iso.org.dod.internet.mgmt.mib-2.system

Don't chnage anything here leave this one as default setting

Final Step

####
# Finally, grant the 2 groups access to the 1 view with different
# write permissions:

# context sec.model sec.level match read write notif
access MyROSystem "" any noauth exact system none none
access MyROGroup "" any noauth exact all none none
access MyRWGroup "" any noauth exact all all none

Don't chnage anything here leave this one as default setting.

Optional Configuration

# System contact information

syslocation Unknown (configure /etc/snmp/snmpd.local.conf)
syscontact Root <root@localhost> (configure /etc/snmp/snmpd.local.conf)

to

syslocation MainDatacenter
syscontact webmaster@debianhelp.co.uk

Now the above configuration able to access local and 192.168.0.0 /24 network machines to use full functionality of MIB's this is very important if you want to collect the information from existing machines in above network.

Now you need to restart the snmp services using the following command

#/etc/init.d/snmpd restart

Now the SNMP server configuration is active and running.

Testing your Configuration

#snmpwalk localhost -c public -v1

SNMPv2-MIB::sysDescr.0 = STRING: Linux sritest 2.4.27-2-386 #1 Wed Aug 17 09:33:35 UTC 2005 i686
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
SNMPv2-MIB::sysUpTime.0 = Timeticks: (656698) 1:49:26.98
SNMPv2-MIB::sysContact.0 = STRING: webmaster@debianhelp.co.uk
SNMPv2-MIB::sysName.0 = STRING: debiantest
SNMPv2-MIB::sysLocation.0 = STRING: Maindatacenter
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORID.1 = OID: IF-MIB::ifMIB
SNMPv2-MIB::sysORID.2 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.3 = OID: TCP-MIB::tcpMIB
SNMPv2-MIB::sysORID.4 = OID: IP-MIB::ip
SNMPv2-MIB::sysORID.5 = OID: UDP-MIB::udpMIB
SNMPv2-MIB::sysORID.6 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup
SNMPv2-MIB::sysORID.7 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.8 = OID: SNMP-MPD-MIB::snmpMPDCompliance
SNMPv2-MIB::sysORID.9 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance

If you want more options and how to use snmpd.conf file you need to check snmpd.conf man page

If you want to monitor your server or desktop machine resources like disk capacity,load,process check here

SNMP Client installation in debian

Now we have seen how to configure SNMP server in above section now we need to install client in other machines for this you need to install snmp or scli packages

#apt-get install snmp scli tkmib

This will complete the snmp client installation.

Configuration

The system wide configuration file is /etc/snmp/snmp.conf check the community name is same as server if not you need to change the community name and you need to restart the snmp service.Edit the /etc/snmp/snmp.conf file and change the following settings and save the file

com2sec paranoid default public
#com2sec readonly default public
#com2sec readwrite default private
to:

#com2sec paranoid default public
com2sec readonly 127.0.0.1 public
#com2sec readwrite default private

Now you need to restart the snmp service using the following command

#/etc/init.d/snmp restart

Testing your Configuration

#snmpwalk -v 2c -c public remotemachineipaddress system

SNMPv2-MIB::sysDescr.0 = STRING: Linux sritest 2.4.27-2-386 #1 Wed Aug 17 09:33:35 UTC 2005 i686
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
SNMPv2-MIB::sysUpTime.0 = Timeticks: (168871) 0:28:08.71
SNMPv2-MIB::sysContact.0 = STRING: webmaster@debianhelp.co.uk
SNMPv2-MIB::sysName.0 = STRING: debiantest
SNMPv2-MIB::sysLocation.0 = STRING: maindatacenter
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORID.1 = OID: IF-MIB::ifMIB
SNMPv2-MIB::sysORID.2 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.3 = OID: TCP-MIB::tcpMIB
SNMPv2-MIB::sysORID.4 = OID: IP-MIB::ip
SNMPv2-MIB::sysORID.5 = OID: UDP-MIB::udpMIB
SNMPv2-MIB::sysORID.6 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup
SNMPv2-MIB::sysORID.7 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.8 = OID: SNMP-MPD-MIB::snmpMPDCompliance
SNMPv2-MIB::sysORID.9 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance
SNMPv2-MIB::sysORDescr.1 = STRING: The MIB module to describe generic objects for network interface sub-layers
SNMPv2-MIB::sysORDescr.2 = STRING: The MIB module for SNMPv2 entities
SNMPv2-MIB::sysORDescr.3 = STRING: The MIB module for managing TCP implementations
SNMPv2-MIB::sysORDescr.4 = STRING: The MIB module for managing IP and ICMP implementations
SNMPv2-MIB::sysORDescr.5 = STRING: The MIB module for managing UDP implementations
SNMPv2-MIB::sysORDescr.6 = STRING: View-based Access Control Model for SNMP.


Alternately, you can use scli, #scli localhost
 and then type in show or monitor.
This will confirm the SNMP service is active and working properly.

sumber : http://www.debianhelp.co.uk/snmp.htm

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Lady Gaga , Salman Khan