Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Thursday, September 19, 2024

5 Faedah RTOS Linux Kernel - Apa Itu Sistem Operasi Masa Nyata (RTOS) di Malaysia



Paparan sistem operasi masa nyata (RTOS) yang menunjukkan antara muka kawalan industri dengan jadual masa tugas dan data masa nyata. Graf dan maklumat pemprosesan dipaparkan untuk memantau aliran data kritikal dalam sektor seperti telekomunikasi atau peralatan perubatan, menekankan keandalan dan ketepatan masa.

Di VIENNA dimana selepas 20 Tahun, Real-Time Linux Akhirnya Masuk ke Dalam Kernel Utama Linux. Itulah pada yang memahami bagaimana berkembangnya Linux di permulaan dahulu sehingga lah setelah 20 tahun menanti, akhirnya Real-Time Linux (PREEMPT_RT) secara rasmi telah dimasukkan ke dalam kernel utama Linux. Linus Torvalds, pengasas Linux, telah mengesahkan kod ini ketika berada di Open Source Summit Europe. Ini pekara yang tersohor dan terpenting untuk difahami bagi menuju ke masa hadapan.

Eh .. apa Itu Sistem Operasi Masa Nyata (RTOS)?

Sistem operasi masa nyata atau Real-Time Operating System (RTOS) adalah sistem yang direka untuk mengendalikan tugas-tugas kritikal dengan ketepatan masa yang tinggi. Tidak seperti sistem operasi biasa seperti Windows atau macOS, RTOS memastikan semua proses berlaku dalam tempoh masa tertentu, biasanya dalam milisaat atau mikro saat. Sebagaimana Steven Rostedt, seorang jurutera Google, menjelaskan, "Real-time is the fastest worst-case scenario”

Maknanya, RTOS memastikan setiap tugas kritikal selesai dalam tempoh masa yang ditetapkan, yang sangat penting dalam bidang seperti sistem kawalan industri, peralatan perubatan, dan teknologi aeroangkasa. Contohnya, NASA menggunakan RTOS untuk mengawal rover mereka di Mars, dan Boeing pula menggunakan RTOS untuk menguruskan sistem avionik pesawat mereka.

Sejarah Panjang Real-Time Linux, Real-Time Linux kini akan dimasukkan dalam semua distro Linux melalui kernel Linux 6.12 yang akan datang. Ini bermakna Linux akan mula digunakan dalam lebih banyak peranti kritikal dan peralatan industri. Tetapi, perjalanan untuk mencapai tahap ini agak panjang. 

Segala-galanya bermula pada akhir tahun 1990-an apabila ada keperluan untuk Linux menyokong aplikasi masa nyata. Pelbagai projek seperti KURT, RTAI, dan RTLinux berusaha membangunkan kernel masa nyata berasingan. Namun, pada tahun 2004, Ingo Molnar, seorang pembangun kernel Linux, mula membina asas bagi set patch PREEMPT_RT yang terus digunakan hingga kini.

Walaupun begitu, ia mengambil masa bertahun-tahun untuk menyatukan semua elemen penting ke dalam kernel utama Linux. Pelbagai ciri daripada projek masa nyata ini sebenarnya telah diperkenalkan ke dalam Linux yang kita gunakan hari ini, seperti teknologi "NO_HZ" yang mengurangkan penggunaan kuasa pada mesin dengan banyak CPU.

Kenapa Ambil Masa Lama?

Ramai yang tertanya-tanya, kenapa Real-Time Linux hanya sekarang diterima sepenuhnya? Menurut Rostedt, setiap perubahan yang dimasukkan perlu melalui ujian ketat, dan hampir semua kod ditulis semula beberapa kali sebelum disahkan. Selain itu, faktor politik dan kekurangan dana juga menjadi cabaran besar.

Hanya pada tahun 2015, Linux Foundation menubuhkan projek Real-Time Linux untuk menyelaraskan usaha ini. Cabaran terakhir adalah mengatasi masalah dengan fungsi `print_k`, alat debugging yang kritikal. Selepas perbincangan panjang, akhirnya penyelesaian dicapai, dan kini Real-Time Linux menjadi kenyataan.

Ini merupakan kemenangan untuk Semua Pengguna Linux  dengan penggabungan patch Real-Time Linux ini, Linux kini boleh digunakan dalam aplikasi yang memerlukan prestasi rendah latensi seperti sistem kawalan industri, robotik, dan pengeluaran audio. Ini bukan hanya satu kemenangan untuk pengeluar peranti masa nyata, tetapi juga untuk semua pengguna Linux.

Dengan adanya Real-Time Linux, masa depan Linux sebagai pemain utama dalam dunia RTOS semakin cerah. Manakala Di Malaysia, penggunaan RTOS (Real-Time Operating System) boleh dilihat dalam pelbagai industri kritikal yang memerlukan ketepatan masa dan kebolehpercayaan tinggi. Berikut adalah beberapa contoh aplikasi RTOS di Malaysia:

  1. Sistem Kawalan Industri: Banyak kilang di Malaysia, terutamanya dalam sektor pembuatan automotif dan elektronik, menggunakan RTOS untuk mengawal proses automasi kilang. Sistem ini memastikan mesin dan robot bekerja dengan tepat mengikut masa yang ditetapkan.

  2. Telekomunikasi: Syarikat telekomunikasi tempatan menggunakan RTOS untuk mengurus rangkaian dan infrastruktur komunikasi mereka, memastikan data dihantar dan diterima dalam masa nyata, penting untuk aplikasi seperti panggilan suara dan video.

  3. Sistem Kawalan Trafik Udara: Lapangan terbang utama seperti KLIA menggunakan RTOS untuk sistem kawalan trafik udara yang memerlukan ketepatan masa yang tinggi untuk memastikan pesawat berlepas dan mendarat dengan selamat tanpa gangguan.

  4. Sistem Pengurusan Tenaga: Dalam industri tenaga, RTOS digunakan untuk menguruskan rangkaian elektrik, terutama dalam memantau dan mengawal grid pintar yang memerlukan tindak balas masa nyata bagi mengelakkan gangguan bekalan elektrik.

  5. Perubatan: Hospital-hospital di Malaysia menggunakan peralatan perubatan yang dikendalikan oleh RTOS, seperti mesin ventilator dan peralatan pemantauan kesihatan, yang memerlukan ketepatan masa untuk memastikan keselamatan pesakit.

Contoh-contoh ini menunjukkan bagaimana RTOS memainkan peranan penting dalam sektor industri kritikal di Malaysia, di mana ketepatan masa dan keandalan adalah faktor utama.

#Linux, #RealTimeLinux, #PREEMPTRT, #OpenSource, #KernelLinux, #Teknologi, #SistemOperasi, #RTOS, #PembangunanPerisian, #InovasiTeknologi, #LinusTorvalds, #SoftwareDevelopment, #OpenSourceCommunity, #TeknologiMasaNyata, #LinuxKernel, #Pengaturcaraan, #IndustriTeknologi, #PengurusanMasaNyata, #LinuxDistro, #IT


Wednesday, July 03, 2024

Memasang Linux Sebagai Sub sistem Windows (WSL)


Windows Subsystem for Linux (WSL)
adalah ciri pada Windows 10 dan Windows 11 yang membolehkan pengguna menjalankan persekitaran Linux secara terus pada Windows tanpa memerlukan mesin maya (VM) atau persediaan dual-boot. Dengan WSL, pengguna boleh menggunakan aplikasi dan alat Linux terus dari Windows, memudahkan integrasi antara kedua-dua sistem operasi. Kebiasaannya apabila user nak pasang Kali Linux tanpa perlu dual boot. Untuk itu boleh mulakan dengan 

Langkah untuk menggunakan pautan ini:

  1. Klik pada pautan https://aka.ms/wslstorepage.
  2. Ianya akan diarahkan ke halaman WSL di Microsoft Store. [ Benarkan Microsoft Store dibuka ]
  3. Dari sana, boleh memuat turun dan memasang WSL. [Klik Install]

WSL sangat berguna bagi pembangun dan pengguna yang memerlukan alat dan aplikasi Linux, tetapi ingin terus bekerja dalam persekitaran Windows mereka.

Dengan Windows Subsystem for Linux (WSL) ianya membolehkan pembangun menjalankan persekitaran GNU/Linux, termasuk kebanyakan alat baris perintah, utiliti, dan aplikasi, terus pada Windows tanpa sebarang perubahan. Dengan WSL, anda tidak perlu menggunakan mesin maya tradisional atau melakukan persediaan dual-boot yang kompleks.

Memasang WSL melalui Microsoft Store membolehkan anda mendapatkan kemas kini dan ciri terbaru WSL dengan lebih cepat dan tanpa perlu mengubah versi Windows anda. Untuk maklumat lanjut, sila layari https://aka.ms/wsldocs.

Mulakan pengalaman WSL anda hari ini dan nikmati kemudahan menjalankan aplikasi Linux dalam persekitaran Windows! ... 

Saturday, December 31, 2016

Installation Redmine , PhpMyAdmin and Webmin On Centos 7

Dependencies, dependencies, dependencies
We are dealing with many different software components, and along with them, their dependencies. Installing Ruby requires a C compiler and HTTPD development modules are required for other components.

System Pre-requisites
These are the external packages available as RPMs in the default CentOS repositories.

# Install the various dependencies available through yum
sudo yum -y install zlib-devel curl-devel openssl-devel httpd-devel apr-devel apr-util-devel mysql-devel ftp wget ImageMagick-devel

# For passenger, which is itself another dependency, you'll need the C++ Compiler
sudo yum install gcc-c++

# Download and add the MySQL repository
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm

# Update everything
sudo yum update
Install Ruby
First, download ruby from the most reliable of sources (or download it on a separate machine and FTP it into your machine).

# Create your own Downloads folder
mkdir ~/Downloads
cd ~/Downloads

# Download the Ruby source files
wget https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.1.tar.gz

# Un-tar-gz the archive
tar -zxvf ./ruby-2.3.1.tar.gz
Next, install Ruby.

# Building it from source code
cd ruby-2.3.1
./configure
sudo make

# Install Ruby
sudo make install

# Check if installed
ruby -v
which ruby
Install RubyGems
To determine what is the latest version of RubyGems go to the RubyGems Download Page. There, you can get the link to the TGZ (or download it to FTP into your machine).

# Switch to root (enter your own root password)
su root
Password: **********

# Download the latest version of RubyGems
mkdir ~/Downloads
cd ~/Downloads
wget https://rubygems.org/rubygems/rubygems-2.6.6.tgz

# Un-tar-gz the archive
tar -zxvf ./rubygems-2.6.6.tgz
Next, install RubyGems.

# Install using Ruby
cd rubygems-2.6.6
ruby setup.rb

# Check if installed
gem -v
which gem

# Exit root (if you haven't already)
exit

Install Passenger

Move the original folder apache conf.d

mv /etc/httpd/conf.d /etc/httpd/conf.d-original

Create a new folder and virtual host file for Passenger :

mkdir /etc/httpd/conf.d
vi /etc/httpd/conf.d/passenger.conf

For This Installation

After completed, we copy a notification block in the window to create the configuration file in the next steps (select block notification and press C to copy).

LoadModule passenger_module /usr/local/lib/ruby/gems/2.3.0/gems/passenger-5.1.1/buildout/apache2/mod_passenger.so
   
     PassengerRoot /usr/local/lib/ruby/gems/2.3.0/gems/passenger-5.1.1
     PassengerDefaultRuby /usr/local/bin/ruby
 

Paste the command blocks into the empty file and save it, then restart the Apache service.

service httpd restart

The full name of the Passenger is Phusion Passenger, known as mod_rails or mod_rack, it is a web application intergrate with Apache and it can operate as a standalone web server support for the Ruby On Rails applications.

Execute the following commands :

gem install passenger
passenger-install-apache2-module

For New Installation

After completed, we copy a notification block in the window to create the configuration file in the next steps (select block notification and press C to copy).

LoadModule passenger_module /usr/local/lib/ruby/gems/2.3.0/gems/passenger-5.1.1/buildout/apache2/mod_passenger.so
   
     PassengerRoot /usr/local/lib/ruby/gems/2.3.0/gems/passenger-5.1.1
     PassengerDefaultRuby /usr/local/bin/ruby
 

Paste the command blocks into the empty file and save it, then restart the Apache service.

service httpd restart

Install MySQL Server
MySQL Server repository for CentOS is not included in the default installation. You will need to download and add it. Refer to the prerequisites in a previous section. Assuming the repository is included, run the following:

# Install MySQL Server
sudo yum install mysql-server

# Verify that it is running
sudo chkconfig mysqld on
sudo systemctl start mysqld

# Configure root password. Note that initial password is blank, just hit .
/usr/bin/mysql_secure_installation
Next, create a Redmine database and account.

# Access MySQL as root
mysql -uroot -p
Enter password: **********

# Create Redmine database
mysql> create database redmine character set utf8;

# Create associated redmine account
mysql> create user 'redmine'@'localhost' identified by 'my_password';
mysql> grant all privileges on redmine.* to 'redmine'@'localhost';
mysql> flush privileges;
mysql> exit;

Install Redmine
Redmine is a main program of the project management system, we will download and install the program from the website of Redmine.

# Download the latest version of Redmine
cd ~/Downloads
wget http://www.redmine.org/releases/redmine-3.3.0.tar.gz

# Un-tar-gz the archive
tar -zxvf redmine-3.3.0.tar.gz

# Move it to an appropriate location
sudo mv ./redmine-3.3.0 /var/www/redmine

Configuring the Database

The next, we need to configure the database was created from the above steps.

cd /var/www/redmine/config
cp database.yml.example database.yml
vi database.yml

All lines in the file should be commented out except for the following, with the appropriate entries for password and database credentials configured in a previous section.

production:
  adapter: mysql2
  database: redmine
  host: localhost
  username: redmine
  password: "********"
  encoding: utf8

Setting up Rails
Install the package library support for Rails using the Bundle.

cd /var/www/redmine
gem install bundler
bundle install
rake generate_secret_token

If got error

/usr/local/lib/ruby/gems/2.3.0/gems/htmlentities-4.3.1/lib/htmlentities/mappings/expanded.rb:465: warning: key "inodot" is duplicated and overwritten on line 466

vi /usr/local/lib/ruby/gems/2.3.0/gems/htmlentities-4.
3.1/lib/htmlentities/mappings/expanded.rb

Search the duplicate key "inodot" on line 466

  #
  # This table added by Philip (flip) Kromer
  # using the mapping by John Cowan (25 July 1997) at
  #   ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MISC/SGML.TXT
  #
  # The following table maps SGML character entities from various
  # public sets (namely, ISOamsa, ISOamsb, ISOamsc, ISOamsn, ISOamso,
  # ISOamsr, ISObox, ISOcyr1, ISOcyr2, ISOdia, ISOgrk1, ISOgrk2,
  # ISOgrk3, ISOgrk4, ISOlat1, ISOlat2, ISOnum, ISOpub, ISOtech,
  # HTMLspecial, HTMLsymbol) to corresponding Unicode characters.
  #
  # The table has five tab-separated fields:
  #     :bare   => SGML character entity name
  #     :hex    => Unicode 2.0 character code
  #     :entity => SGML character entity
  #     :type   => SGML public entity set
  #     :udesc  => Unicode 2.0 character name (UPPER CASE)
  #
  # Entries which don't have Unicode equivalents have "0x????" for
  # :hex and a lower case :udesc (from the public entity set DTD).
  #?ino
search hit TOP, continuing at BOTTOM'ijlig'=> 0x0133,   # LATIN SMALL LIGATURE IJ
    'Imacr'=> 0x012a,   # LATIN CAPITAL LETTER I WIITH MACRON
    'imacr'=> 0x012b,   # LATIN SMALL LETTER I WITHH MACRON
    'image'=> 0x2111,   # xhtml      BLACK-LETTER CAPITAL I
    'incare'=> 0x2105,   # CARE OF
    'infin'=> 0x221e,   # xhtml      INFINITY
    'inodot'=> 0x0131,   #    dupLATIN SMALL LETTER DOTLESSS I
    'inodot'=> 0x0131,   #    dupLATIN SMALL LETTER DOTLESSS I <---- delete="" line="" p="" this="">    'int'=> 0x222b,   # xhtml      INTEGRAL
    'intcal'=> 0x22ba,   # INTERCALATE
    'IOcy'=> 0x0401,   # CYRILLIC CAPITAL LETTER IIO
    'iocy'=> 0x0451,   # CYRILLIC SMALL LETTER IO
    'Iodot'=> 0x0130,   # LATIN CAPITAL LETTER I WIITH DOT ABOVE
    'Iogon'=> 0x012e,   # LATIN CAPITAL LETTER I WIITH OGONEK
    'iogon'=> 0x012f,   # LATIN SMALL LETTER I WITHH OGONEK

The next, we create the database table for the Redmine application.

RAILS_ENV=production rake db:migrate
RAILS_ENV=production rake redmine:load_default_data

Activate FCGI

cd /var/www/redmine/public
mkdir plugin_assets
cp dispatch.fcgi.example dispatch.fcgi
cp htaccess.fcgi.example .htaccess

Setting up Apache and FastCGI

cd /var/www/
rpm --import https://fedoraproject.org/static/0608B895.txt
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm
yum -y install mod_fcgid
rm -rf epel-release-6-8.noarch.rpm

Creating Files Directory
This directory contains data files generated during the operation of Redmine as document or image file, we create a new directory in the "/opt".

mkdir -p /opt/redmine/files
chown -R apache:apache /opt/redmine
cd /var/www/redmine/config
cp configuration.yml.example configuration.yml
vi configuration.yml

Enter the directory path containing the data files you just created in the previous step into the line "attachments_storage_path".

Note: You must add a space at the begin of the path "/opt/redmine/files" after character ":"

Configuring Email
Another very important function of Redmine is using email to notify members when the contents of each project changes, Redmine can use many different methods to send email that is Sendmail, SMTP, GMail ...

To configure the email we will edit the configuration file.

nano /var/www/redmine/config/configuration.yml
The simplest is you use features of the default SendMail in the Centos OS by settings :

  email_delivery:
   delivery_method: :sendmail
Note : Do not use the Tab key to indent when editing the configuration file, you need to use the space bar on the keyboard.

If you use GMail's SMTP, you need to register an email account with the login methods used password normal and disable two-step authentication by smart phone.

Enter your Gmail account as below :

  email_delivery:
   delivery_method: :smtp
   smtp_settings:
        enable_starttls_auto: true
        address: "smtp.gmail.com"
        port: 587
        domain: "smtp.gmail.com"
        authentication: :plain
        user_name: "your_email@gmail.com"
        password: "your_password"
Save the file configuration and exit.


Create Virtual Host for Redmine
Create an Apache configuration file for the Redmine application at the port 80.

vi /etc/httpd/conf.d/redmine.conf

Copy the text below and paste into the editor window, note the information to change your domain name.


        ServerName your_domain
        ServerAdmin your_domain@domain.com
        DocumentRoot /var/www/redmine/public/
        ErrorLog logs/redmine_error_log
       
                Options Indexes ExecCGI FollowSymLinks
                Order allow,deny
                Allow from all
                AllowOverride all
       


Save the file configuration and exit.

Permissions, permissions, permissions
With CentOS, you get SELinux. Security comes with a cost, and if that cost is some additional lines of code in addition to the usual chmod and chown,
that's not too bad, right?

# Allow requests on TCP ports 80 and 443 through
sudo firewall-cmd --zone=public --add-port=80/tcp --permanent
sudo firewall-cmd --zone=public --add-port=443/tcp --permanent
sudo firewall-cmd --reload

# Change ownership of Redmine folder to Apache
sudo chown -R apache:apache /var/www/redmine

# Change access permissions to Redmine folder
sudo chmod -R 0755 /var/www/redmine

# Enable the serving of files off Apache
sudo chcon -R -t httpd_sys_content_t /var/www/redmine

# Allow httpd to write only to specific folders
sudo chcon -R -t httpd_sys_rw_content_t /var/www/redmine/log
sudo chcon -R -t httpd_sys_rw_content_t /var/www/redmine/tmp/cache
sudo chcon -R -t httpd_sys_rw_content_t /var/www/redmine/files

# Enable sending of emails
sudo setsebool -P httpd_can_network_connect 1
As with all configurations done to Apache and its folders, a restart is necessary.

# Restart Apache once again
sudo systemctl restart httpd



Install PHP and phpMyAdmin
Because we use MySQL database management system, so we need to install phpMyAdmin program management.

phpMyAdmin is a free open source tool written by PHP language to manage MySQL database via a web browser.

It can create, modify or delete databases, tables, fields or records, perform SQL statements, or managing users and permissions.

The command to install PHP and the packages :

yum -y install php php-mysql php-gd php-imap php-ldap php-mbstring php-odbc php-pear php-xml php-xmlrpc php-pecl-apc php-soap
yum -y install php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-snmp php-soap curl curl-devel

systemctl restart httpd.service

phpMyAdmin installation
phpMyAdmin is a web interface through which you can manage your MySQL databases.
phpMyAdmin can now be installed as follows:

yum install phpMyAdmin

Now we configure phpMyAdmin. We change the Apache configuration so that phpMyAdmin allows connections not just from localhost (by commenting out the stanza):
We also will configure Virtual Host to run on port 8080 because port 80 is using by Redmine

vi /etc/httpd/conf.d/phpMyAdmin.conf

[...]
Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin


   
     # Apache 2.4
     
     #  Require ip 127.0.0.1
     #  Require ip ::1
        Require all granted
   
 
   
     # Apache 2.2
     Order Deny,Allow
     Deny from All
     Allow from 127.0.0.1
     Allow from ::1
 


[...]

#Add Virtual Host run on port 8080


    DocumentRoot /usr/share/phpmyadmin/
    ServerName your_domain.com


We also need to add the command to allows listening on the port 8080 in the file "httpd.conf"

vi /etc/httpd/conf/httpd.conf

# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 80
Listen 8080

Next we change the authentication in phpMyAdmin from cookie to http:
vi /etc/phpMyAdmin/config.inc.php

[...]
$cfg['Servers'][$i]['auth_type']     = 'http';    // Authentication method (config, http or cookie based)?
[...]

# Allow requests on TCP ports 8080 through
sudo firewall-cmd --zone=public --add-port=8080/tcp --permanent
sudo firewall-cmd --reload

Restart Apache:
systemctl restart  httpd.service

Afterwards, you can access phpMyAdmin under http://192.168.0.100:8080/phpmyadmin/

Install Webmin on CentOS 7

Step 1. First add Webmin official repository.

Webmin isn’t available in the default CentOS repositories, you must add its repository to your system before installing. To do that, run the commands below to create a repository file for Webmin:

vi /etc/yum.repos.d/webmin.repo

And add the following lines:

[Webmin]
name=Webmin Distribution Neutral
#baseurl=http://download.webmin.com/download/yum
mirrorlist=http://download.webmin.com/download/yum/mirrorlist
enabled=1

We’ll need to install webmin GPG key now, using following command:

wget http://www.webmin.com/jcameron-key.asc
rpm --import jcameron-key.asc

Next step is to update the repositories and all available package updates, to make sure we’re installing the latest version of Webmin. Run following command:

yum check-update

Step 2. Install Webmin.

Install Webmin with the following command:

yum install webmin -y

Start the service and make it start automatically every time you reboot your server:

chkconfig webmin on
service webmin start

By default, Webmin will listen on port 10000. Enable webmin port:


firewall-cmd --permanent --zone=public --add-port=10000/tcp
firewall-cmd --reload


Step 3. Access Webmin.

Wednesday, April 08, 2015

Enable and use “ifconfig” in CentOS 7 minimal servers

So dalam CentOS 7 minimal servers command ifconfig x de macamana nak wat ni .. Adoyai.

Korang kena la cari pakej mana yg bagi command ifconfig ni 
command:
yum provides ifconfig
Sample Output:
Loaded plugins: fastestmirror Loading mirror speeds from cached host file * base: mirror.axarva.co.id * extras: mirror.smartmedia.net.id * updates: mirror.poliwangi.ac.id net-tools-2.0-0.17.20131004git.el7.x86_64 : Basic networking tools Repo : @baseMatched from: Filename : /usr/sbin/ifconfig
Atau guna command ni :
yum whatprovides ifconfig
Maka, “provides” or “whatprovides” digunakan untuk mengenalpasti yang mana feature or file yang diperlukan.
Outputnya net-tools package yg mengandungi ifconfig command.
Guna command ni plak untuk install:
yum install net-tools
Jeng .. jeng dah ada command tu.
ifconfig -a

Thursday, October 09, 2014

Teknik Linux Command dalam Windows

Pada hardcore linux , mmg x  best guna command dalam windows selalu tersalah command. Contohnya nak listkan file selalu terguna command ls then dapat la error ... sbb windows x kenal command tu.

Huh aku pon sama terlibat hal ni.

So aku pun mencari di Pakcik Google hasilnya:

Install cygwin kat windows korang

https://cygwin.com/index.html

Then letakan path kat dalam korangnya windows enviroment

;C:\Cygwin\bin


Tuesday, August 05, 2014

Install Server Ubuntu Dalam Vmware

Hari nak kongsi apa yang dah dibuat di agensi , mereka mohon bantuan untuk setup satu virtual server dalam vmware. So alang-alang nak install kat situ ,baik kita berkongsi ilmu :)

1.Pengenalan 
  Vmware
  • Software utk virtual mesin
  •  Fungsi untuk menjalankan banyak OS (guest OS) dalam satu hardware
  • Tiada batasan untuk menjalankan OS melainkan kebergantungan kepada spesifikasi host/server utama
  • Berkonsep optimumkan penggunaan hardware seperti cpu, memory, hardisk dan technology hardware.  
2.Spesifikasi Server Ubuntu

Install Type: Server
RAM: 2GB ram
Hard Drive Space: 10 GB

3.Create vhost dalam vmware
 Cadangan
 ip:- x.x.x.x
Datastore :- SAN/NFS/local ?
Installer:- (dalam storage mana ?)

4.Server OS
Install Ubuntu 12.04 Server LTS

5.Install Webmin (Opensource Web Management - mcm Cpanel tapi free punya)
Go to http://www.webmin.com/tgz.html
Get the latest tar.gz
Command to install Webmin
cd /tmp
sudo wget http://prdownloads.sourceforge.net/webadmin/webmin-1.690.tar.gz
sudo gunzip webmin-1.690.tar.gz
sudo tar xf webmin-1.690.tar
cd webmin-1.690
sudo  ./setup.sh /usr/local/webmin

6.Install Apache, MySQL , PHP

a. To install apache, open terminal and type in these commands:
sudo apt-get update
sudo apt-get install apache2

b. To install MySQL, open terminal and type in these commands:
sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql

c. To install PHP, open terminal and type in this command.
sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt
d. Check php
sudo nano /var/www/info.php
Add in the following line:

// Show all information, defaults to INFO_ALLphpinfo();// Show just the module information.
// phpinfo(8) yields identical results.
phpinfo(INFO_MODULES);?>
Restart apache so that all of the changes take effect:
sudo service apache2 restart

e. Install phpMyAdmin
The easiest way to install phpmyadmin is through apt-get:
sudo apt-get install phpmyadmin

Friday, April 01, 2011

Dionea - Honeypot

Copy N Paste from
http://networkdefense.com.au/2010/06/12/first-experiences-with-dionaea/
After a lot of reading, a few very late nights, and a fair bit of indecision I decided to install Dionaea. It was down to mwcollectd or Dionaea as my next choice for a 30 day test, but I had quite a few issues getting mwcollectd running properly. I think this is mostly due to my lack of experience compiling stuff in linux, and also not understanding what to do when things fail or don't compile as expected. So I moved on and began to follow Markus' extensive Dionaea install documentation.

My first few attempts failed, in epic fashion. Initially for some unknown reason I decided to install Python 3 from testing... even though the documentation says to compile it. This brought up issues with sqlite3, again frustrating but a good learning experience. Follow the doco! In the end I had to make a slight modification to the ./configure script when compiling Dionaea, as Cython was not being found. Other than that the install was very smooth. I installed Dionaea under Debian 64bit, chose KDE graphical install and left the 'Standard System' and 'Desktop Environment' options checked.

I thought it would be a good idea to post the steps I took to install Dionaea, not sure if it is of use to anyone else. It's basically just a rehash of Markus' documentation.

1. Stuff from APT
apt-get install libglib2.0-dev libssl-dev libcurl4-openssl-dev libreadline-dev libsqlite3-dev python-dev libtool automake autoconf build-essential subversion git-core flex bison pkg-config

2. gettext / glib
apt-get install gettext
wget http://ftp.gnome.org/pub/gnome/sources/glib/2.20/glib-2.20.4.tar.bz2
tar xfj glib-2.20.4.tar.bz2
rm glib-2.20.4.tar.bz2
cd glib-2.20.4/
./configure --prefix=/opt/dionaea
make
make install
cd ..

3. liblcfg
git clone git://git.carnivore.it/liblcfg.git liblcfg
cd liblcfg/code
autoreconf -vi
./configure --prefix=/opt/dionaea
make install
cd /usr/local/src

4. libemu
git clone git://git.carnivore.it/libemu.git libemu
cd libemu
autoreconf -vi
./configure --prefix=/opt/dionaea
make install
cd ..

5. libnl (optional)
git clone git://git.kernel.org/pub/scm/libs/netlink/libnl.git
cd libnl
autoreconf -vi
export LDFLAGS=-Wl,-rpath,/opt/dionaea/lib
./configure --prefix=/opt/dionaea
make
make install
cd ..

6. libev
wget http://dist.schmorp.de/libev/Attic/libev-3.9.tar.gz
tar xfz libev-3.9.tar.gz
rm libev-3.9.tar.gz
cd libev-3.9
./configure --prefix=/opt/dionaea
make install
cd ..

7. Cython
wget http://cython.org/release/Cython-0.12.1.tar.gz
tar xfz Cython-0.12.1.tar.gz
rm Cython-0.12.1.tar.gz
cd Cython-0.12.1
python setup.py build
python setup.py install

8. sqlite3
apt-get install sqlite3

9. Python 3.1.2
wget http://python.org/ftp/python/3.1.2/Python-3.1.2.tgz
tar xfz Python-3.1.2.tgz
rm Python-3.1.2.tgz
cd Python-3.1.2/
./configure --enable-shared --prefix=/opt/dionaea --with-computed-gotos \
--enable-ipv6 LDFLAGS="-Wl,-rpath=/opt/dionaea/lib/"
make
make install
cd ..

10. libxml2-dev
apt-get install libxml2-dev

11. libxslt1-dev
aptitude install libxslt1-dev

12. lxml
wget http://codespeak.net/lxml/lxml-2.2.6.tgz
tar xfz lxml-2.2.6.tgz
rm lxml-2.2.6.tgz
cd lxml-2.2.6
/opt/dionaea/bin/2to3 -w src/lxml/html/_diffcommand.py
/opt/dionaea/bin/2to3 -w src/lxml/html/_html5builder.py
/opt/dionaea/bin/python3 setup.py build
/opt/dionaea/bin/python3 setup.py install
cd ..

13. udns
wget http://www.corpit.ru/mjt/udns/udns_0.0.9.tar.gz
tar xfz udns_0.0.9.tar.gz
rm udns_0.0.9.tar.gz
cd udns-0.0.9/
./configure
make shared
cp udns.h /opt/dionaea/include/
cp *.so* /opt/dionaea/lib/
cd /opt/dionaea/lib
ln -s libudns.so.0 libudns.so
cd /usr/local/src

14. Curl & C-ares
wget http://c-ares.haxx.se/c-ares-1.7.3.tar.gz
tar xfz c-ares-1.7.3.tar.gz
cd c-ares-1.7.3
./configure --prefix=/opt/dionaea
make
make install
cd ..

wget http://curl.haxx.se/download/curl-7.20.0.tar.bz2
tar xfj curl-7.20.0.tar.bz2
rm curl-7.20.0.tar.bz2
cd curl-7.20.0
./configure --prefix=/opt/dionaea
make
make install
cd ..

15. libpcap
wget http://www.tcpdump.org/release/libpcap-1.1.1.tar.gz
tar xfz libpcap-1.1.1.tar.gz
rm libpcap-1.1.1.tar.gz
cd libpcap-1.1.1
./configure --prefix=/opt/dionaea
make
make install
cd ..

16. Dionaea (with my own changes on the Cython line from '/usr/local/bin' to '/usr/bin')
git clone git://git.carnivore.it/dionaea.git dionaea

cd dionaea
autoreconf -vi

./configure --with-lcfg-include=/opt/dionaea/include/ \
--with-lcfg-lib=/opt/dionaea/lib/ \
--with-python=/opt/dionaea/bin/python3.1 \
--with-cython-dir=/usr/bin \
--with-udns-include=/opt/dionaea/include/ \
--with-udns-lib=/opt/dionaea/lib/ \
--with-emu-include=/opt/dionaea/include/ \
--with-emu-lib=/opt/dionaea/lib/ \
--with-gc-include=/usr/include/gc \
--with-ev-include=/opt/dionaea/include \
--with-ev-lib=/opt/dionaea/lib \
--with-nl-include=/opt/dionaea/include \
--with-nl-lib=/opt/dionaea/lib/ \
--with-curl-config=/opt/dionaea/bin/ \
--with-pcap-include=/opt/dionaea/include \
--with-pcap-lib=/opt/dionaea/lib/ \
--with-glib=/opt/dionaea

make
make install

Running Dionaea
cd /opt/dionaea/bin/
./dionaea -l all,-debug -L '*'

Within moments of launching Dionaea connection attempts began pouring in, mostly rejected attempts. After around 30 minutes the first sample was received along with some interesting colours flying past - looking forward to going through the logs later this evening. Now all that's left to do is get the p0f ihandler turned on. So far things are looking promising.

Getting Dionaea up and running has been a great experience. I've learned a lot about compiling, dependencies, issues, and Debian in general. I'm very keen to see what kind of information it can produce over the coming month.

- Cooper

*update: 27th November 2010 - Updated Dionaea Install Instructions

Friday, March 25, 2011

Metasploit Framework

Installation on Ubuntu Linux

The Metasploit Framework is well-supported on the Ubuntu platform. The following instructions should also apply to Kubuntu, Xubuntu, and Debian.

If these instructions do not work for your version of Ubuntu, please try the Generic Linux instructions instead.
Dependencies

Install the Ruby dependencies:
$ sudo apt-get install ruby libopenssl-ruby libyaml-ruby libdl-ruby libiconv-ruby libreadline-ruby irb ri rubygems


Install the Subversion client:
$ sudo apt-get install subversion

In order to build the native extensions (pcaprub, lorcon2, etc), the following packages need to be installed:
$ sudo apt-get install build-essential ruby-dev libpcap-dev

Metasploit Framework

Once the dependencies have been installed, download the Unix tarball from the download page and run the following commands:
$ tar xf framework-3.X.tar.gz
$ sudo mkdir -p /opt/metasploit3
$ sudo cp -a msf3/ /opt/metasploit3/msf3
$ sudo chown root:root -R /opt/metasploit3/msf3
$ sudo ln -sf /opt/metasploit3/msf3/msf* /usr/local/bin/

When you've completed this step, you should have a working installation and be able to run modules, pivot through compromised systems, and use most of the Metasploit Framework's features. The following optional installation steps will give you extra functionality.
Database Configuration (optional)
Now that the framework is installed, you'll want to configure a database connection, and enable the Metasploit Framework to connect to it:
For postgres, see postgres_setup (recommended)
For mysql, see mysql_setup
For sqlite, see sqlite_setup (not supported!!).
Extensions (optional)

The Metasploit Framework includes a few native Ruby extensions that must be compiled in order to use certain types of modules.

To enable raw socket modules:
$ sudo apt-get install libpcap-dev
$ sudo bash
# cd /opt/metasploit3/msf3/external/pcaprub/
# ruby extconf.rb
# make && make install


To enable WiFi modules:
$ sudo bash
# cd /opt/metasploit3/msf3/external/ruby-lorcon2/
# svn co http://802.11ninja.net/svn/lorcon/trunk lorcon2
# cd lorcon2
# ./configure --prefix=/usr && make && make install
# cd ..
# ruby extconf.rb
# make && make install
Updates

The Metasploit Framework is updated daily with the latest exploits, payloads, features, and bug fixes. To update your installation of the Metasploit Framework:
$ sudo svn update /opt/metasploit3/msf3/


This can also be installed into the root user's crontab:
$ sudo crontab -e -u root # enter the line below
1 * * * * /usr/bin/svn update /opt/metasploit3/msf3/ >> /var/log/msfupdate.log 2>&1

Saturday, February 20, 2010

Installing a minimal Ubuntu installation with a minimal Gnome desktop

Original Post are from http://linuxuser.se/~lassekongo83/2009/05/installing-a-minimal-ubuntu-installation-with-a-minimal-gnome-desktop/

Don’t mind my old guide, this one will explain it a bit better. If you’re like me and don’t like all the software Ubuntu comes with by default you can install a minimal base system without any extra software like OpenOffice, Evolution, Gnome Games for example. You could also install Debian only if you prefer a very stable system. I prefer Ubuntu though because of the more recent up to date software in the repositories.

Getting started

If this is the first time that you install a minimal Ubuntu installation you can test it in a virtual machine before you install it on your main computer. I highly recommend that. Even if it’s a very easy process you may get trouble later on. Try VirtualBox if you want to test it in a virtual machine. You’ll now need the Alternate installation CD – http://www.ubuntu.com/getubuntu/downloadmirrors#alternate or the minimal installation CD – https://help.ubuntu.com/community/Installation/MinimalCD

When the Alternate CD is booted you must select your language. Then press F4 and select Install a command-line system. Press enter and start installing. The installation process should be quite straightforward if you have an internet connection and all. No need for me to explain all the easy steps. Same goes for the minimal CD except that you need to type CLI before you start the installation instead of pressing F4.

Installing a graphical user interface

So your system is up and running and you’re logged in with your new user in the command line. Now for the fun, building your own installation with the software you want. Before you continue, run sudo apt-get update && upgrade to upgrade your Ubuntu installation to the more recent up to date software. Now you need a user interface, run: sudo apt-get install xorg gdm gnome-core to get a graphical login manager and a minimal Gnome desktop. The current system isn’t very pretty when you start Gnome, to change this you can install some gtk-engines and themes with sudo apt-get install gtk2-engines human-theme. Now it’s all up to you what software you want to use, so check http://packages.ubuntu.com/ to see what software you need. You’ll probably want a browser and an archive-manager – sudo apt-get install firefox file-roller gdebi. Have fun with the rest. Gnome without a lot of bloat feels much better.

Wednesday, February 17, 2010

Reset your lost Ubuntu Password

If you ever get locked out of your Ubuntu installation as I found myself to be tonight, you can reset your password quite easily using the following steps.

1.Power up your computer.
2.Press ESC at the grub menu.
3.Press e for edit.
4.Highlight the line that begins “Ubuntu, KERNEL ………” and press e.
5.Go to the end of this line, add rw init=/bin/bash and press enter.
6.Press b to boot your system.
7.Your system will boot up to a passwordless root shell.
8.Type in passwd username where username is the username you lost the password for.
9.Set your password.
10.Type in reboot.
That is it! you can now log in using your new password. You can even reset your root password here but cannot login with it at the login screen.

Monday, September 15, 2008

Ubuntu Proxy : Error opening/creating log file. (check ownership and access rights).

Ubuntu Proxy- Dansguardian + Squid : Error opening/creating log file. (check ownership and access rights).
cd /var/log/dansguardian (if it doesn't exist, then mkdir /var/log/dansguardian then cd /var/log/dansguardian.

touch access.log (this will create the file)
chown root.root access.log (this sets owner and group)
chmod 666 access.log (this sets r/w permissions)

then run command again :
service dansguardian restart
service squid restart

Friday, September 12, 2008

How To Mount CD Rom Linux Shell Command

Mount to the cdrom

Code
mount /dev/cdrom

Listing all mounted cdrom

Code
ls

Change to the mounted cdrom

Code
cd /media/cdrom

Wednesday, August 13, 2008

OCS Inventory ERROR: can't write in directory (on dbconfig.inc.php)

1. Find the correct path for the dbconfig.inc.php - use this command

cd
cd ..
find / -name dbconfig.inc.php

Ok for me,it will return the path here :-

/usr/share/ocsinventory-server/ocsreports/dbconfig.inc.php

After that u just use this command to change it right

cd /usr/share/ocsinventory-server/ocsreports/
chmod 666 dbconfig.inc.php

Ok .. Please try and give the feedback here :

Thank You

Tuesday, August 12, 2008

Setup LAMP + OCS Inventory

Apache

Install Apache
sudo apt-get install apache2 apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert
Testing HTTP Server by open a web browser and enter http://localhost

PHP

Install PHP5
sudo apt-get install libapache2-mod-php5 libapache2-mod-ruby php5
php5-common php5-curl php5-dev php5-gd php5-idn php-pear php5-imagick
php5-imap php5-json php5-mcrypt php5-memcache php5-mhash php5-ming
php5-mysql php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy

php5-xmlrpc php5-xsl
Stop/Restart Apache
sudo /etc/init.d/apache2 restart
Test the installation
sudo gedit /var/www/testphp.php
Insert this following line into testphp.php file.

Save this new file.
Open a web browser and enter http://localhost/testphp.php
Be sure to remove the file afterwards, as it may pose a security risk.
sudo rm /var/www/testphp.php

MySQL

Install MySQL Server
sudo apt-get install mysql-server mysql-client libmysqlclient15-dev
MySQL initially only allows connections from the localhost (127.0.0.1). We’ll need to remove that restriction if you wish to make it accessible to everyone on the internet. Open the file /etc/mysql/my.cnf
sudo vi /etc/mysql/my.cnf
Find the line bind-address = 127.0.0.1 and comment it out then save the file.
MySQL comes with no root password as default. This is a huge security risk. You’ll need to set one. So that the local computer gets root access as well, you’ll need to set a password for that too. The local-machine-name is the name of the computer you’re working on.
mysqladmin -u root password newpassword
mysqladmin -h root@local-machine-name -u root -p password newpassword
sudo /etc/init.d/mysql restart

MySQL for Apache HTTP Server
sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
To get PHP to work with MySQL, open the php.ini file
sudo vi /etc/php5/apache2/php.ini
You’ll need to uncomment the “;extension=mysql.so” line so that it looks like this
extension=mysql.so
Restart Apache
sudo /etc/init.d/apache2 restart

Thursday, July 31, 2008

Install dansguardian, tinyproxy, and firehol

Original post from http://ubuntuforums.org/showpost.php?p=1222237&postcount=21

Install dansguardian, tinyproxy, and firehol

Code:
sudo apt-get install dansguardian tinyproxy firehol
Edit /etc/dansguardian/dansguardian.conf...

Code:
sudo nano -w /etc/dansguardian/dansguardian.conf
and leave everything at default. You will just need to comment out the UNCONFIGURED line

Code:
# Comment this line out once you have modified this file to suit your needs
#UNCONFIGURED
Next, you will need to edit the tinyproxy.conf

Code:
sudo nano -w /etc/tinyproxy/tinyproxy.conf
and make the following changes

Code:
##
## tinyproxy.conf -- tinyproxy daemon configuration file
##

#
# Name of the user the tinyproxy daemon should switch to after the port
# has been bound.
#
User nobody
Group nogroup

#
# Port to listen on.
#
#Port 8888
Port 3128
Now the last file to be edited is /etc/firehol/firehol.conf

Code:
sudo nano -w /etc/firehol/firehol.conf
and here is my entire firehol.conf file

Code:
#
# $Id: client-all.conf,v 1.2 2002/12/31 15:44:34 ktsaou Exp $
#
# This configuration file will allow all requests originating from the
# local machine to be send through all network interfaces.
#
# No requests are allowed to come from the network. The host will be
# completely stealthed! It will not respond to anything, and it will
# not be pingable, although it will be able to originate anything
# (even pings to other hosts).
#

version 5
iptables -t filter -I OUTPUT -d 127.0.0.1 -p tcp --dport 3128 -m owner ! --uid-owner dansguardian -j DROP
transparent_squid 8080 "nobody root"

# Accept all client traffic on any interface
interface any world
 policy drop
 protection strong
 client all accept
Then restart the services

Code:
sudo /etc/init.d/dansguardian restart
sudo /etc/init.d/tinyproxy restart
sudo /etc/init.d/firehol restart
You should now have a working internet filter without any changes being made to the proxy settings.

How to uninstall and remove webmin

How to uninstall and remove webmin after you have installed it with rmp, you can do this:
How can I uninstall Webmin?

Just run the command

COMMAND:
/etc/webmin/uninstall.sh



If you have installed the RPM version of Webmin like i have, you can use

rpm -e webmin

Dansguardian Can't locate Compress/Zlib.pm from Webmin

If you get this error try to do this

Install this package

libdate-manip-perl,
libhtml-parser-perl,
libcompress-zlib-perl

Centos or Debian

sudo apt-get install libdate-manip-perl libhtml-parser-perl libcompress-zlib-perl

Monday, July 21, 2008

How to: Install Network Monitoring Tool (Nagios+Nagmin+Webmin+Mysql+Apache2+RRDTool+NMAP) on OpenSUSE 10.2

Originally Taken From

http://opensource-2u.blogspot.com/2007/08/how-to-install-network-monitoring-tool.html

Tuesday, August 28, 2007

How to: Install Network Monitoring Tool (Nagios+Nagmin+Webmin+Mysql+Apache2+RRDTool+NMAP) on OpenSUSE 10.2

These are step by step how to setup network monitoring tool on OpenSUSE 10.2:

Install MySql, RRDTool, NMAP and Apache2:
1. Open the YaST software management. Select package mysql, mysql-client, mysql-shared, rrdtool, nmap and apache2. (*Accept all dependencies)
2. After install all package run this command mysqladmin -u root password "yourpassword"
3. Start mysql by run this command rcmysql start
4. Make this service automatically start after reboot by type chkconfig mysql on
5. Start apache2 by typing rcapache2 start
6. Make apache2 auto start after reboot by typing chkconfig apache2 on

Install Webmin:1. Download webmin from webmin.com. I recommend you to download the noarch package for support all machine architecture. Save it, such as at your desktop.
2. Go to your desktop and type rpm -Uvh webmin_name
3. Start webmin by typing /etc/init.d/webmin start
4. Log in to webmin interface by opening your browser and type https://localhost:10000

Install Nagios:
1. Open YaST and select libcrypt, perl-Net-SNMP, fping, postgresql-libs, radiusclient, apache2, gd, and perl-URI.
2. Download nagios package (
nagios-2.5-24.i586.rpm, nagios-nrpe-2.5.2-28.i586.rpm , nagios-nsca-2.5-39.i586.rpm , nagios-plugins-1.4.5-5.i586.rpm , nagios-plugins-extras-1.4.5-5.i586.rpm , nagios-plugins-sap-ccms-0.7.3-38.i586.rpm and nagios-www-2.5-24.i586.rpm )
at http://download.opensuse.org/distribution/10.2/repo/oss/suse/i586/.
I recommend use nagios version 2.5 because most stable and many package are supported.
3. Install all these packages by typing rpm -Uvh nagios*.rpm
4. Start nagios by typing rcnagios start
5. Make nagios autostart after reboot by type chkconfig nagios on
6. Check your nagios by typing http://localhost/nagios/ on your browser (firefox etc)

Install Nagmin:
Nagmin is a webmin module. To install:
1. Download nagmin from http://sourceforge.net/project/showfiles.php?group_id=77010
I recommend you to download nagmin-2.1.0.tar.gz . It is because easy to install by a setup script. Other nagmin doesn't have a setup script.
2. Extract the nagmin by typing tar xvzf yournagminname .
3. Go to the nagmin folder and type ./setup to intall. Follow this guide

Database name to use or create : [Enter]
Nagios Root directory
: /etc/nagios
[Enter]
Nagios ETC directory
: /etc/nagios [Enter]
Nagmin root directory
: [Enter]
Nagios Configuration File: :
[Enter]
CGI Configuration File:
: [Enter]
Entries will be displayed for accuracy, select Y to continue.
Script will continue with its process.
Select N to question for viewing the SQL file
Select Y to other question

4. Now acces webmin and install the Nagmin plugin

Configure Nagmin setting:
Configure Nagmin Nagios by clicking Module Config in webmin. Change the configuration to the following value:
Nagios BIN directory /usr/bin
Nagios ETC directory /etc/nagios
Nagios LIBEXEC directory /usr/lib/nagios/plugins
5. Open your terminal and type vi /etc/nagios/cgi.cfg
find use_authentication=1; chage 1 to 0
find default_user_name = user, chage the user by deamon
6. Save and quit.
7. Now install NagMin module for webmin. To install go to Webmin --> Webmin Configuration --> Webmin Modules. Install the nagmin module from the nagmin folder that you extract before. The file name is look like
nagmin-2.x.x.wbm

The Error
1. (Error: version issue):
Some error found when your login webmin --> Server --> nagMIN Network Monitoring.
Error message:
The MySQL client program /usr/bin/mysql does not appear to be the correct version. Webmin only supports MySQL versions 3 and above.
The command /usr/bin/mysql -V returned :
/usr/bin/mysql  Ver 14.12 Distrib 5.0.22, for redhat-linux-gnu (i686) using readline 5.0
Suggested fix:open terminal and type vi /usr/libexec/webmin/nagmin/index.cgi
find "distrib" and add "| 5" after 4 at same line
save and quit the vi.

2.
error found when your login webmin --> Server --> nagMIN Network Monitoring --> in column System Databases --> nagios

error message:
"Error - Perl execution failed
Can't use an undefined value as a HASH reference at /path/to/mysql.pm line 113"
Suggested fix:
Location mysql.pm on Suse /usr/lib/perl5/vendor_perl/5.8.8/i586-linux-thread-multi/DBD/mysql.pm
At around line 109 of mysql.pm:

------------------------------------
 # Avoid warnings for undefined values
 $username ||= '';
 $password ||= '';

 # create a 'blank' dbh
 my($this, $privateAttrHash) = (undef, $attrhash);
 $privateAttrHash = { %$privateAttrHash,
'Name' => $dsn,
'user' => $username,
'password' => $password
 };
-------------------------------------

Needs to be changed to

-------------------------------------
# Avoid warnings for undefined values
 $username ||= '';
 $password ||= '';
 $attrhash ||= {};

 # create a 'blank' dbh
 my($this, $privateAttrHash) = (undef, $attrhash);
 $privateAttrHash = { %$privateAttrHash,
'Name' => $dsn,
'user' => $username,
'password' => $password
 };

Finish.

Tuesday, May 29, 2007

Apa itu Pfsense@Firewall?

Firewall
Firewall adalah alat keselamatan teknologi maklumat yang terletak ditengah hubungan rangkaian dan mempunyai tugas untuk memeriksa data yang keluar/masuk atau memjadi pusat pengesahan bagi aktiviti rangkaian dan sebagai benteng pemisah bagi sesuatu sistem rangkaian.

Apa itu Pfsense ?

Apa Itu Firewall
Sebelum kita tau Pfsense kita kena tau , apa itu firewall. Firewall = dinding terbakar ... hehehehehehe. Ntah kalau ikut direct translation , pening gak yer. Ok

Baru Beli 3D Printer? Ini 10 Laman Web untuk Cari Model 3D Percuma

 Sejak mula menggunakan Bambu Lab P2S Combo , antara soalan pertama yang bermain dalam kepala saya ialah: “Dekat mana nak cari benda menarik...