วันอังคารที่ 27 มกราคม พ.ศ. 2558

Image Processing with Java on Ubuntu Gnome 15.04

         ผมเคยเขียนบทความง่าย ๆ เกี่ยวกับ Image Processing บน Linux ด้วยภาษา Python
 โดยใช้ชุดโปรแกรม (Library) สำหรับการประมวลผลภาพ คือ Python Image Library มาแล้ว
แต่ไม่เคยลองเขียนโปรแกรมประมวลผลภาพด้วยภาษา Java สักครั้ง  วันนี้ติดตั้งภาษา Java
บน Ubuntu Gnome 15.04 แล้วเลยลองเขียนโปรแกรมประมวผลภาพด้วยภาษา Java
        ก่อนอื่นต้องติดตั้งภาษา Java และ Compiler ก่อน  ผมเลือกติดตั้ง Oracle Java 8 ตาม
ตัวอย่าง http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html หลัง
ติดตั้งตรวจสอบว่าเรามี Java และ Compiler ใช้งานด้วยคำสั่ง ดังตัวอย่าง

submarine@submarine:~$ java -version
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)
submarine@submarine:~$ 


submarine@submarine:~$ javac -version
javac 1.8.0_31
submarine@submarine:~$ 
submarine@submarine:~$ 


submarine@submarine:~$ cd images/
submarine@submarine:~/images$ 

submarine@submarine:~/images$ nano MyFirstJavaProgram.java

public class MyFirstJavaProgram{
/* This is my first java program.
 * This will print 'Hello World' as the output
 */
 public static void main(String[]args){
System.out.println("Hello World  ทดสอบภาษาไทยครับ,,,");// prints Hello World
}
}


submarine@submarine:~/images$ javac MyFirstJavaProgram.java 
submarine@submarine:~/images$ 
submarine@submarine:~/images$ java MyFirstJavaProgram 
Hello World  ทดสอบภาษาไทยครับ,,,






import java.awt.*;
import java.awt.image.BufferedImage;

import java.io.*;

import javax.imageio.ImageIO;
import javax.swing.JFrame;

public class GrayScale {

   BufferedImage  image;
   int width;
   int height;
 
   public GrayScale() {
 
      try {
         File input = new File("submarine.jpg");
         image = ImageIO.read(input);
         width = image.getWidth();
         height = image.getHeight();
       
         for(int i=0; i<height; i++){
       
            for(int j=0; j<width; j++){
         
               Color c = new Color(image.getRGB(j, i));
               int red = (int)(c.getRed() * 0.299);
               int green = (int)(c.getGreen() * 0.587);
               int blue = (int)(c.getBlue() *0.114);
               Color newColor = new Color(red+green+blue,
             
               red+green+blue,red+green+blue);
             
               image.setRGB(j,i,newColor.getRGB());
            }
         }
       
         File ouptut = new File("submarine1.jpg");
         ImageIO.write(image, "jpg", ouptut);
       
      } catch (Exception e) {}
   }
 
   static public void main(String args[]) throws Exception
   {
      GrayScale obj = new GrayScale();
   }
}

OpenSUSE 13.2 on My Laptop Acer Aspire E5 Pentium(R) 2.16 GHz




วันจันทร์ที่ 19 มกราคม พ.ศ. 2558

ติดตั้งภาษา Java บน OpenSUSE 13.2 ด้วย Yast


       ภาษา Java เป็นภาษาคอมพิวเตอร์ชั้นสูง เป็นภาษาสคริปต์นิยมใช้เขียนโปรแกรมเชิงวัตถุ
บนระบบปฏิบัติการ OpenSUSE ได้ติดตั้งภาษา Java เวอร์ชั่น 1.8 มาเป็นค่าเริ่มต้น ขาดแต่
โปรแกรมภาษา Java ที่เป็นตัวแปลภาษา (Compiler) หากต้องการเขียนดปรแกรมภาษา Java
จะต้องติดตั้งเพิ่มเติม
        ในบทความนี้ผู้เขียนจะติด jAVA Compiler 1.8.0.40 โดยใช้ Yast ซึ่งเป็นเครื่องมือในการจัดการ
ระบบของ OpenSUSE ลองทำดังนี้  

       ตรวจสอบเวอร์ชั่นของภาษา Java

submarine@Sotharavej:~> java -version
openjdk version "1.8.0_40"
OpenJDK Runtime Environment (build 1.8.0_40-b10)
OpenJDK 64-Bit Server VM (build 25.40-b14, mixed mode)

          ตรวจสอบการติดตั้ง Java compiler ด้วยคำสั่ง javac -version

submarine@Sotharavej:~> javac -version
If 'javac' is not a typo you can use command-not-found to lookup the package that contains it, like this:
    cnf javac

        พบว่ายังไม่มีการติดตั้ง








submarine@Sotharavej:~> javac -version
If 'javac' is not a typo you can use command-not-found to lookup the package that contains it, like this:
    cnf javac
submarine@Sotharavej:~> javac -version
javac 1.8.0_40
submarine@Sotharavej:~>




submarine@Sotharavej:~> cd Java/
submarine@Sotharavej:~/Java> nano HelloWorld.java

public class HelloWorld {
   public static void main(String[] args) {
      System.out.println("Hello, World ทดสอบภาษาไทยด้วยครับ");
   }
}

submarine@Sotharavej:~/Java> javac HelloWorld.java
submarine@Sotharavej:~/Java> java HelloWorld

Hello, World ทดสอบภาษาไทยด้วยครับ

submarine@Sotharavej:~/Java>










วันศุกร์ที่ 16 มกราคม พ.ศ. 2558

Upgrade CentOS

[submarine@CentOS66 ~]$ su
Password:
[root@CentOS66 submarine]# uname -a
Linux CentOS66.srichaj.com 2.6.32-504.el6.i686 #1 SMP Wed Oct 15 03:02:07 UTC 2014 i686 i686 i386 GNU/Linux
[root@CentOS66 submarine]#
[root@CentOS66 submarine]# lsb_release -a
LSB Version:    :base-4.0-ia32:base-4.0-noarch:core-4.0-ia32:core-4.0-noarch:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-ia32:printing-4.0-noarch
Distributor ID:    CentOS
Description:    CentOS release 6.6 (Final)
Release:    6.6
Codename:    Final
[root@CentOS66 submarine]#
[root@CentOS66 submarine]#



 [root@CentOS66 submarine]# yum update
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Update Process
Determining fastest mirrors
 * base: mirrors.hosting.in.th
 * extras: mirrors.hosting.in.th
 * updates: mirrors.hosting.in.th
Resolving Dependencies
--> Running transaction check
---> Package at.i686 0:3.1.10-43.el6_2.1 will be updated
---> Package at.i686 0:3.1.10-44.el6_6.2 will be an update
---> Package autofs.i686 1:5.0.5-109.el6 will be updated
---> Package autofs.i686 1:5.0.5-109.el6_6.1 will be an update
---> Package bind-libs.i686 32:9.8.2-0.30.rc1.el6 will be updated
---> Package bind-libs.i686 32:9.8.2-0.30.rc1.el6_6.1 will be an update
---> Package bind-utils.i686 32:9.8.2-0.30.rc1.el6 will be updated
---> Package bind-utils.i686 32:9.8.2-0.30.rc1.el6_6.1 will be an update
---> Package curl.i686 0:7.19.7-37.el6_5.3 will be updated
---> Package curl.i686 0:7.19.7-40.el6_6.3 will be an update
---> Package cyrus-sasl.i686 0:2.1.23-15.el6 will be updated
---> Package cyrus-sasl.i686 0:2.1.23-15.el6_6.1 will be an update
---> Package cyrus-sasl-gssapi.i686 0:2.1.23-15.el6 will be updated
---> Package cyrus-sasl-gssapi.i686 0:2.1.23-15.el6_6.1 will be an update
---> Package cyrus-sasl-lib.i686 0:2.1.23-15.el6 will be updated
---> Package cyrus-sasl-lib.i686 0:2.1.23-15.el6_6.1 will be an update
---> Package cyrus-sasl-md5.i686 0:2.1.23-15.el6 will be updated
---> Package cyrus-sasl-md5.i686 0:2.1.23-15.el6_6.1 will be an update
---> Package cyrus-sasl-plain.i686 0:2.1.23-15.el6 will be updated
---> Package cyrus-sasl-plain.i686 0:2.1.23-15.el6_6.1 will be an update
---> Package device-mapper.i686 0:1.02.90-2.el6 will be updated
---> Package device-mapper.i686 0:1.02.90-2.el6_6.1 will be an update
---> Package device-mapper-event.i686 0:1.02.90-2.el6 will be updated
---> Package device-mapper-event.i686 0:1.02.90-2.el6_6.1 will be an update
---> Package device-mapper-event-libs.i686 0:1.02.90-2.el6 will be updated
---> Package device-mapper-event-libs.i686 0:1.02.90-2.el6_6.1 will be an update
---> Package device-mapper-libs.i686 0:1.02.90-2.el6 will be updated
---> Package device-mapper-libs.i686 0:1.02.90-2.el6_6.1 will be an update
---> Package firefox.i686 0:31.1.0-5.el6.centos will be updated
---> Package firefox.i686 0:31.4.0-1.el6.centos will be an update
---> Package glibc.i686 0:2.12-1.149.el6 will be updated
---> Package glibc.i686 0:2.12-1.149.el6_6.4 will be an update
---> Package glibc-common.i686 0:2.12-1.149.el6 will be updated
---> Package glibc-common.i686 0:2.12-1.149.el6_6.4 will be an update
---> Package glibc-devel.i686 0:2.12-1.149.el6 will be updated
---> Package glibc-devel.i686 0:2.12-1.149.el6_6.4 will be an update
---> Package glibc-headers.i686 0:2.12-1.149.el6 will be updated
---> Package glibc-headers.i686 0:2.12-1.149.el6_6.4 will be an update
---> Package initscripts.i686 0:9.03.46-1.el6.centos will be updated
---> Package initscripts.i686 0:9.03.46-1.el6.centos.1 will be an update
---> Package iproute.i686 0:2.6.32-32.el6_5 will be updated
---> Package iproute.i686 0:2.6.32-33.el6_6 will be an update
---> Package jasper-libs.i686 0:1.900.1-15.el6_1.1 will be updated
---> Package jasper-libs.i686 0:1.900.1-16.el6_6.2 will be an update
---> Package java-1.6.0-openjdk.i686 1:1.6.0.0-11.1.13.4.el6 will be updated
---> Package java-1.6.0-openjdk.i686 1:1.6.0.33-1.13.5.1.el6_6 will be an update
---> Package java-1.7.0-openjdk.i686 1:1.7.0.65-2.5.1.2.el6_5 will be updated
---> Package java-1.7.0-openjdk.i686 1:1.7.0.71-2.5.3.2.el6_6 will be an update
---> Package kernel.i686 0:2.6.32-504.3.3.el6 will be installed
---> Package kernel-firmware.noarch 0:2.6.32-504.el6 will be updated
---> Package kernel-firmware.noarch 0:2.6.32-504.3.3.el6 will be an update
---> Package kernel-headers.i686 0:2.6.32-504.el6 will be updated
---> Package kernel-headers.i686 0:2.6.32-504.3.3.el6 will be an update
---> Package kpartx.i686 0:0.4.9-80.el6 will be updated
---> Package kpartx.i686 0:0.4.9-80.el6_6.2 will be an update
---> Package libXfont.i686 0:1.4.5-3.el6_5 will be updated
---> Package libXfont.i686 0:1.4.5-4.el6_6 will be an update
---> Package libcurl.i686 0:7.19.7-37.el6_5.3 will be updated
---> Package libcurl.i686 0:7.19.7-40.el6_6.3 will be an update
---> Package libipa_hbac.i686 0:1.11.6-30.el6 will be updated
---> Package libipa_hbac.i686 0:1.11.6-30.el6_6.3 will be an update
---> Package libipa_hbac-python.i686 0:1.11.6-30.el6 will be updated
---> Package libipa_hbac-python.i686 0:1.11.6-30.el6_6.3 will be an update
---> Package libsss_idmap.i686 0:1.11.6-30.el6 will be updated
---> Package libsss_idmap.i686 0:1.11.6-30.el6_6.3 will be an update
---> Package libxml2.i686 0:2.7.6-14.el6_5.2 will be updated
---> Package libxml2.i686 0:2.7.6-17.el6_6.1 will be an update
---> Package libxml2-python.i686 0:2.7.6-14.el6_5.2 will be updated
---> Package libxml2-python.i686 0:2.7.6-17.el6_6.1 will be an update
---> Package lvm2.i686 0:2.02.111-2.el6 will be updated
---> Package lvm2.i686 0:2.02.111-2.el6_6.1 will be an update
---> Package lvm2-libs.i686 0:2.02.111-2.el6 will be updated
---> Package lvm2-libs.i686 0:2.02.111-2.el6_6.1 will be an update
---> Package mailx.i686 0:12.4-7.el6 will be updated
---> Package mailx.i686 0:12.4-8.el6_6 will be an update
---> Package mdadm.i686 0:3.3-6.el6 will be updated
---> Package mdadm.i686 0:3.3-6.el6_6.1 will be an update
---> Package net-snmp.i686 1:5.5-49.el6_5.3 will be updated
---> Package net-snmp.i686 1:5.5-50.el6_6.1 will be an update
---> Package net-snmp-libs.i686 1:5.5-49.el6_5.3 will be updated
---> Package net-snmp-libs.i686 1:5.5-50.el6_6.1 will be an update
---> Package nss.i686 0:3.16.1-14.el6 will be updated
---> Package nss.i686 0:3.16.2.3-3.el6_6 will be an update
---> Package nss-softokn.i686 0:3.14.3-17.el6 will be updated
---> Package nss-softokn.i686 0:3.14.3-19.el6_6 will be an update
---> Package nss-softokn-freebl.i686 0:3.14.3-17.el6 will be updated
---> Package nss-softokn-freebl.i686 0:3.14.3-19.el6_6 will be an update
---> Package nss-sysinit.i686 0:3.16.1-14.el6 will be updated
---> Package nss-sysinit.i686 0:3.16.2.3-3.el6_6 will be an update
---> Package nss-tools.i686 0:3.16.1-14.el6 will be updated
---> Package nss-tools.i686 0:3.16.2.3-3.el6_6 will be an update
---> Package nss-util.i686 0:3.16.1-3.el6 will be updated
---> Package nss-util.i686 0:3.16.2.3-2.el6_6 will be an update
---> Package ntp.i686 0:4.2.6p5-1.el6.centos will be updated
---> Package ntp.i686 0:4.2.6p5-2.el6.centos will be an update
---> Package ntpdate.i686 0:4.2.6p5-1.el6.centos will be updated
---> Package ntpdate.i686 0:4.2.6p5-2.el6.centos will be an update
---> Package openssh.i686 0:5.3p1-104.el6 will be updated
---> Package openssh.i686 0:5.3p1-104.el6_6.1 will be an update
---> Package openssh-askpass.i686 0:5.3p1-104.el6 will be updated
---> Package openssh-askpass.i686 0:5.3p1-104.el6_6.1 will be an update
---> Package openssh-clients.i686 0:5.3p1-104.el6 will be updated
---> Package openssh-clients.i686 0:5.3p1-104.el6_6.1 will be an update
---> Package openssh-server.i686 0:5.3p1-104.el6 will be updated
---> Package openssh-server.i686 0:5.3p1-104.el6_6.1 will be an update
---> Package openssl.i686 0:1.0.1e-30.el6 will be updated
---> Package openssl.i686 0:1.0.1e-30.el6_6.4 will be an update
---> Package perl.i686 4:5.10.1-136.el6 will be updated
---> Package perl.i686 4:5.10.1-136.el6_6.1 will be an update
---> Package perl-CGI.i686 0:3.51-136.el6 will be updated
---> Package perl-CGI.i686 0:3.51-136.el6_6.1 will be an update
---> Package perl-ExtUtils-MakeMaker.i686 0:6.55-136.el6 will be updated
---> Package perl-ExtUtils-MakeMaker.i686 0:6.55-136.el6_6.1 will be an update
---> Package perl-ExtUtils-ParseXS.i686 1:2.2003.0-136.el6 will be updated
---> Package perl-ExtUtils-ParseXS.i686 1:2.2003.0-136.el6_6.1 will be an update
---> Package perl-Module-Pluggable.i686 1:3.90-136.el6 will be updated
---> Package perl-Module-Pluggable.i686 1:3.90-136.el6_6.1 will be an update
---> Package perl-Pod-Escapes.i686 1:1.04-136.el6 will be updated
---> Package perl-Pod-Escapes.i686 1:1.04-136.el6_6.1 will be an update
---> Package perl-Pod-Simple.i686 1:3.13-136.el6 will be updated
---> Package perl-Pod-Simple.i686 1:3.13-136.el6_6.1 will be an update
---> Package perl-Test-Harness.i686 0:3.17-136.el6 will be updated
---> Package perl-Test-Harness.i686 0:3.17-136.el6_6.1 will be an update
---> Package perl-Test-Simple.i686 0:0.92-136.el6 will be updated
---> Package perl-Test-Simple.i686 0:0.92-136.el6_6.1 will be an update
---> Package perl-devel.i686 4:5.10.1-136.el6 will be updated
---> Package perl-devel.i686 4:5.10.1-136.el6_6.1 will be an update
---> Package perl-libs.i686 4:5.10.1-136.el6 will be updated
---> Package perl-libs.i686 4:5.10.1-136.el6_6.1 will be an update
---> Package perl-version.i686 3:0.77-136.el6 will be updated
---> Package perl-version.i686 3:0.77-136.el6_6.1 will be an update
---> Package policycoreutils.i686 0:2.0.83-19.47.el6 will be updated
---> Package policycoreutils.i686 0:2.0.83-19.47.el6_6.1 will be an update
---> Package python-sssdconfig.noarch 0:1.11.6-30.el6 will be updated
---> Package python-sssdconfig.noarch 0:1.11.6-30.el6_6.3 will be an update
---> Package rpm.i686 0:4.8.0-37.el6 will be updated
---> Package rpm.i686 0:4.8.0-38.el6_6 will be an update
---> Package rpm-libs.i686 0:4.8.0-37.el6 will be updated
---> Package rpm-libs.i686 0:4.8.0-38.el6_6 will be an update
---> Package rpm-python.i686 0:4.8.0-37.el6 will be updated
---> Package rpm-python.i686 0:4.8.0-38.el6_6 will be an update
---> Package rsyslog.i686 0:5.8.10-8.el6 will be updated
---> Package rsyslog.i686 0:5.8.10-10.el6_6 will be an update
---> Package scl-utils.i686 0:20120927-8.el6 will be updated
---> Package scl-utils.i686 0:20120927-23.el6_6 will be an update
---> Package selinux-policy.noarch 0:3.7.19-260.el6 will be updated
---> Package selinux-policy.noarch 0:3.7.19-260.el6_6.1 will be an update
---> Package selinux-policy-targeted.noarch 0:3.7.19-260.el6 will be updated
---> Package selinux-policy-targeted.noarch 0:3.7.19-260.el6_6.1 will be an update
---> Package sssd.i686 0:1.11.6-30.el6 will be updated
---> Package sssd.i686 0:1.11.6-30.el6_6.3 will be an update
---> Package sssd-ad.i686 0:1.11.6-30.el6 will be updated
---> Package sssd-ad.i686 0:1.11.6-30.el6_6.3 will be an update
---> Package sssd-client.i686 0:1.11.6-30.el6 will be updated
---> Package sssd-client.i686 0:1.11.6-30.el6_6.3 will be an update
---> Package sssd-common.i686 0:1.11.6-30.el6 will be updated
---> Package sssd-common.i686 0:1.11.6-30.el6_6.3 will be an update
---> Package sssd-common-pac.i686 0:1.11.6-30.el6 will be updated
---> Package sssd-common-pac.i686 0:1.11.6-30.el6_6.3 will be an update
---> Package sssd-ipa.i686 0:1.11.6-30.el6 will be updated
---> Package sssd-ipa.i686 0:1.11.6-30.el6_6.3 will be an update
---> Package sssd-krb5.i686 0:1.11.6-30.el6 will be updated
---> Package sssd-krb5.i686 0:1.11.6-30.el6_6.3 will be an update
---> Package sssd-krb5-common.i686 0:1.11.6-30.el6 will be updated
---> Package sssd-krb5-common.i686 0:1.11.6-30.el6_6.3 will be an update
---> Package sssd-ldap.i686 0:1.11.6-30.el6 will be updated
---> Package sssd-ldap.i686 0:1.11.6-30.el6_6.3 will be an update
---> Package sssd-proxy.i686 0:1.11.6-30.el6 will be updated
---> Package sssd-proxy.i686 0:1.11.6-30.el6_6.3 will be an update
---> Package system-config-firewall.noarch 0:1.2.27-7.1.el6 will be updated
---> Package system-config-firewall.noarch 0:1.2.27-7.2.el6_6 will be an update
---> Package system-config-firewall-base.noarch 0:1.2.27-7.1.el6 will be updated
---> Package system-config-firewall-base.noarch 0:1.2.27-7.2.el6_6 will be an update
---> Package system-config-firewall-tui.noarch 0:1.2.27-7.1.el6 will be updated
---> Package system-config-firewall-tui.noarch 0:1.2.27-7.2.el6_6 will be an update
---> Package tzdata.noarch 0:2014g-1.el6 will be updated
---> Package tzdata.noarch 0:2014j-1.el6 will be an update
---> Package tzdata-java.noarch 0:2014g-1.el6 will be updated
---> Package tzdata-java.noarch 0:2014j-1.el6 will be an update
---> Package webkitgtk.i686 0:1.4.3-8.el6 will be updated
---> Package webkitgtk.i686 0:1.4.3-9.el6_6 will be an update
---> Package wget.i686 0:1.12-5.el6 will be updated
---> Package wget.i686 0:1.12-5.el6_6.1 will be an update
---> Package xorg-x11-server-Xorg.i686 0:1.15.0-22.el6.centos will be updated
---> Package xorg-x11-server-Xorg.i686 0:1.15.0-25.el6.centos will be an update
---> Package xorg-x11-server-common.i686 0:1.15.0-22.el6.centos will be updated
---> Package xorg-x11-server-common.i686 0:1.15.0-25.el6.centos will be an update
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================
 Package                                 Arch               Version                                Repository           Size
=============================================================================================================================
Installing:
 kernel                                  i686               2.6.32-504.3.3.el6                     updates              27 M
Updating:
 at                                      i686               3.1.10-44.el6_6.2                      updates              59 k
 autofs                                  i686               1:5.0.5-109.el6_6.1                    updates             722 k
 bind-libs                               i686               32:9.8.2-0.30.rc1.el6_6.1              updates             895 k
 bind-utils                              i686               32:9.8.2-0.30.rc1.el6_6.1              updates             184 k
 curl                                    i686               7.19.7-40.el6_6.3                      updates             194 k
 cyrus-sasl                              i686               2.1.23-15.el6_6.1                      updates              78 k
 cyrus-sasl-gssapi                       i686               2.1.23-15.el6_6.1                      updates              34 k
 cyrus-sasl-lib                          i686               2.1.23-15.el6_6.1                      updates             136 k
 cyrus-sasl-md5                          i686               2.1.23-15.el6_6.1                      updates              47 k
 cyrus-sasl-plain                        i686               2.1.23-15.el6_6.1                      updates              31 k
 device-mapper                           i686               1.02.90-2.el6_6.1                      updates             172 k
 device-mapper-event                     i686               1.02.90-2.el6_6.1                      updates             122 k
 device-mapper-event-libs                i686               1.02.90-2.el6_6.1                      updates             116 k
 device-mapper-libs                      i686               1.02.90-2.el6_6.1                      updates             215 k
 firefox                                 i686               31.4.0-1.el6.centos                    updates              61 M
 glibc                                   i686               2.12-1.149.el6_6.4                     updates             4.3 M
 glibc-common                            i686               2.12-1.149.el6_6.4                     updates              14 M
 glibc-devel                             i686               2.12-1.149.el6_6.4                     updates             983 k
 glibc-headers                           i686               2.12-1.149.el6_6.4                     updates             619 k
 initscripts                             i686               9.03.46-1.el6.centos.1                 updates             943 k
 iproute                                 i686               2.6.32-33.el6_6                        updates             362 k
 jasper-libs                             i686               1.900.1-16.el6_6.2                     updates             137 k
 java-1.6.0-openjdk                      i686               1:1.6.0.33-1.13.5.1.el6_6              updates              42 M
 java-1.7.0-openjdk                      i686               1:1.7.0.71-2.5.3.2.el6_6               updates              27 M
 kernel-firmware                         noarch             2.6.32-504.3.3.el6                     updates              14 M
 kernel-headers                          i686               2.6.32-504.3.3.el6                     updates             3.3 M
 kpartx                                  i686               0.4.9-80.el6_6.2                       updates              64 k
 libXfont                                i686               1.4.5-4.el6_6                          updates             145 k
 libcurl                                 i686               7.19.7-40.el6_6.3                      updates             173 k
 libipa_hbac                             i686               1.11.6-30.el6_6.3                      updates              94 k
 libipa_hbac-python                      i686               1.11.6-30.el6_6.3                      updates              88 k
 libsss_idmap                            i686               1.11.6-30.el6_6.3                      updates              99 k
 libxml2                                 i686               2.7.6-17.el6_6.1                       updates             801 k
 libxml2-python                          i686               2.7.6-17.el6_6.1                       updates             315 k
 lvm2                                    i686               2.02.111-2.el6_6.1                     updates             826 k
 lvm2-libs                               i686               2.02.111-2.el6_6.1                     updates             919 k
 mailx                                   i686               12.4-8.el6_6                           updates             225 k
 mdadm                                   i686               3.3-6.el6_6.1                          updates             351 k
 net-snmp                                i686               1:5.5-50.el6_6.1                       updates             305 k
 net-snmp-libs                           i686               1:5.5-50.el6_6.1                       updates             1.5 M
 nss                                     i686               3.16.2.3-3.el6_6                       updates             837 k
 nss-softokn                             i686               3.14.3-19.el6_6                        updates             269 k
 nss-softokn-freebl                      i686               3.14.3-19.el6_6                        updates             156 k
 nss-sysinit                             i686               3.16.2.3-3.el6_6                       updates              44 k
 nss-tools                               i686               3.16.2.3-3.el6_6                       updates             436 k
 nss-util                                i686               3.16.2.3-2.el6_6                       updates              65 k
 ntp                                     i686               4.2.6p5-2.el6.centos                   updates             587 k
 ntpdate                                 i686               4.2.6p5-2.el6.centos                   updates              75 k
 openssh                                 i686               5.3p1-104.el6_6.1                      updates             274 k
 openssh-askpass                         i686               5.3p1-104.el6_6.1                      updates              56 k
 openssh-clients                         i686               5.3p1-104.el6_6.1                      updates             443 k
 openssh-server                          i686               5.3p1-104.el6_6.1                      updates             320 k
 openssl                                 i686               1.0.1e-30.el6_6.4                      updates             1.5 M
 perl                                    i686               4:5.10.1-136.el6_6.1                   updates             9.7 M
 perl-CGI                                i686               3.51-136.el6_6.1                       updates             209 k
 perl-ExtUtils-MakeMaker                 i686               6.55-136.el6_6.1                       updates             293 k
 perl-ExtUtils-ParseXS                   i686               1:2.2003.0-136.el6_6.1                 updates              45 k
 perl-Module-Pluggable                   i686               1:3.90-136.el6_6.1                     updates              40 k
 perl-Pod-Escapes                        i686               1:1.04-136.el6_6.1                     updates              32 k
 perl-Pod-Simple                         i686               1:3.13-136.el6_6.1                     updates             212 k
 perl-Test-Harness                       i686               3.17-136.el6_6.1                       updates             231 k
 perl-Test-Simple                        i686               0.92-136.el6_6.1                       updates             112 k
 perl-devel                              i686               4:5.10.1-136.el6_6.1                   updates             423 k
 perl-libs                               i686               4:5.10.1-136.el6_6.1                   updates             593 k
 perl-version                            i686               3:0.77-136.el6_6.1                     updates              51 k
 policycoreutils                         i686               2.0.83-19.47.el6_6.1                   updates             645 k
 python-sssdconfig                       noarch             1.11.6-30.el6_6.3                      updates             121 k
 rpm                                     i686               4.8.0-38.el6_6                         updates             900 k
 rpm-libs                                i686               4.8.0-38.el6_6                         updates             315 k
 rpm-python                              i686               4.8.0-38.el6_6                         updates              55 k
 rsyslog                                 i686               5.8.10-10.el6_6                        updates             656 k
 scl-utils                               i686               20120927-23.el6_6                      updates              22 k
 selinux-policy                          noarch             3.7.19-260.el6_6.1                     updates             863 k
 selinux-policy-targeted                 noarch             3.7.19-260.el6_6.1                     updates             3.0 M
 sssd                                    i686               1.11.6-30.el6_6.3                      updates              89 k
 sssd-ad                                 i686               1.11.6-30.el6_6.3                      updates             141 k
 sssd-client                             i686               1.11.6-30.el6_6.3                      updates             128 k
 sssd-common                             i686               1.11.6-30.el6_6.3                      updates             825 k
 sssd-common-pac                         i686               1.11.6-30.el6_6.3                      updates             120 k
 sssd-ipa                                i686               1.11.6-30.el6_6.3                      updates             194 k
 sssd-krb5                               i686               1.11.6-30.el6_6.3                      updates             111 k
 sssd-krb5-common                        i686               1.11.6-30.el6_6.3                      updates             159 k
 sssd-ldap                               i686               1.11.6-30.el6_6.3                      updates             167 k
 sssd-proxy                              i686               1.11.6-30.el6_6.3                      updates             116 k
 system-config-firewall                  noarch             1.2.27-7.2.el6_6                       updates             119 k
 system-config-firewall-base             noarch             1.2.27-7.2.el6_6                       updates             434 k
 system-config-firewall-tui              noarch             1.2.27-7.2.el6_6                       updates              39 k
 tzdata                                  noarch             2014j-1.el6                            updates             445 k
 tzdata-java                             noarch             2014j-1.el6                            updates             175 k
 webkitgtk                               i686               1.4.3-9.el6_6                          updates             6.4 M
 wget                                    i686               1.12-5.el6_6.1                         updates             483 k
 xorg-x11-server-Xorg                    i686               1.15.0-25.el6.centos                   updates             1.3 M
 xorg-x11-server-common                  i686               1.15.0-25.el6.centos                   updates              49 k

Transaction Summary
=============================================================================================================================
Install       1 Package(s)
Upgrade      93 Package(s)

Total download size: 239 M
Is this ok [y/N]: y

วันพุธที่ 14 มกราคม พ.ศ. 2558

PostgreSQL Configuration on CentOS 6.6

[submarine@CentOS Python]$
[submarine@CentOS Python]$
[submarine@CentOS Python]$ su - postgres
Password:
-bash-4.1$ psql template1
psql (8.4.20)
Type "help" for help.

template1=# CREATE DATABASE srichaj;
CREATE DATABASE
template1=# GRANT ALL privileges on database srichaj to submarine;
GRANT
template1=# \q
-bash-4.1$ exit
logout
[submarine@CentOS Python]$ psql -d srichaj -U submarine
psql (8.4.20)
Type "help" for help.

srichaj=#


วันศุกร์ที่ 9 มกราคม พ.ศ. 2558

Monitor Linux Server ด้วย Linux-Dash

Sotharavej:/srv/www/htdocs # zypper in git
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following 16 NEW packages are going to be installed:
  cvs cvsps git git-core git-cvs git-email git-gui gitk git-svn git-web libserf-1-1 perl-Authen-SASL perl-Error
  perl-Net-SMTP-SSL subversion subversion-perl

The following 8 recommended packages were automatically selected:
  git-cvs git-email git-gui gitk git-svn git-web perl-Authen-SASL perl-Net-SMTP-SSL

The following package is suggested, but will not be installed:
  git-daemon

16 new packages to install.
Overall download size: 7.6 MiB. Already cached: 0 B  After the operation, additional 31.5 MiB will be used.
Continue? [y/n/? shows all options] (y): y
Retrieving package perl-Authen-SASL-2.16-4.1.3.noarch                     (1/16),  55.1 KiB (105.1 KiB unpacked)
Retrieving: perl-Authen-SASL-2.16-4.1.3.noarch.rpm .......................................................[done]
Retrieving package perl-Error-0.17022-2.1.3.noarch                        (2/16),  34.9 KiB ( 70.0 KiB unpacked)
Retrieving: perl-Error-0.17022-2.1.3.noarch.rpm ..........................................................[done]
Retrieving package perl-Net-SMTP-SSL-1.01-12.1.3.noarch                   (3/16),   7.8 KiB (  4.5 KiB unpacked)
Retrieving: perl-Net-SMTP-SSL-1.01-12.1.3.noarch.rpm ........................................[done (19.3 KiB/s)]
Retrieving package cvs-1.12.12-182.1.2.x86_64                             (4/16), 371.1 KiB (902.3 KiB unpacked)
Retrieving: cvs-1.12.12-182.1.2.x86_64.rpm .................................................[done (385.5 KiB/s)]
Retrieving package cvsps-2.1-181.1.3.x86_64                               (5/16),  56.1 KiB (120.6 KiB unpacked)
Retrieving: cvsps-2.1-181.1.3.x86_64.rpm .................................................................[done]
Retrieving package libserf-1-1-1.3.8-2.4.1.x86_64                         (6/16),  67.5 KiB (144.4 KiB unpacked)
Retrieving: libserf-1-1-1.3.8-2.4.1.x86_64.rpm ..............................................[done (66.9 KiB/s)]
Retrieving package git-core-2.1.2-5.1.x86_64                              (7/16),   2.7 MiB ( 14.0 MiB unpacked)
Retrieving: git-core-2.1.2-5.1.x86_64.rpm ..................................................[done (543.6 KiB/s)]
Retrieving package subversion-1.8.11-2.7.1.x86_64                         (8/16),   2.2 MiB (  8.3 MiB unpacked)
Retrieving: subversion-1.8.11-2.7.1.x86_64.rpm .............................................[done (637.5 KiB/s)]
Retrieving package gitk-2.1.2-5.1.x86_64                                  (9/16), 192.6 KiB (688.6 KiB unpacked)
Retrieving: gitk-2.1.2-5.1.x86_64.rpm ....................................................................[done]
Retrieving package git-web-2.1.2-5.1.x86_64                              (10/16), 143.5 KiB (321.5 KiB unpacked)
Retrieving: git-web-2.1.2-5.1.x86_64.rpm .................................................................[done]
Retrieving package git-gui-2.1.2-5.1.x86_64                              (11/16), 264.3 KiB (  1.2 MiB unpacked)
Retrieving: git-gui-2.1.2-5.1.x86_64.rpm .................................................................[done]
Retrieving package git-email-2.1.2-5.1.x86_64                            (12/16),  95.3 KiB (102.4 KiB unpacked)
Retrieving: git-email-2.1.2-5.1.x86_64.rpm ...............................................................[done]
Retrieving package git-cvs-2.1.2-5.1.x86_64                              (13/16), 144.5 KiB (328.0 KiB unpacked)
Retrieving: git-cvs-2.1.2-5.1.x86_64.rpm ....................................................[done (13.5 KiB/s)]
Retrieving package git-2.1.2-5.1.x86_64                                  (14/16),  66.5 KiB (  2.6 KiB unpacked)
Retrieving: git-2.1.2-5.1.x86_64.rpm .....................................................................[done]
Retrieving package subversion-perl-1.8.11-2.7.1.x86_64                   (15/16), 855.8 KiB (  4.3 MiB unpacked)
Retrieving: subversion-perl-1.8.11-2.7.1.x86_64.rpm ........................................[done (178.0 KiB/s)]
Retrieving package git-svn-2.1.2-5.1.x86_64                              (16/16), 463.2 KiB (977.4 KiB unpacked)
Retrieving: git-svn-2.1.2-5.1.x86_64.rpm ...................................................[done (301.9 KiB/s)]
Checking for file conflicts: .............................................................................[done]
( 1/16) Installing: perl-Authen-SASL-2.16-4.1.3 ..........................................................[done]
( 2/16) Installing: perl-Error-0.17022-2.1.3 .............................................................[done]
( 3/16) Installing: perl-Net-SMTP-SSL-1.01-12.1.3 ........................................................[done]
( 4/16) Installing: cvs-1.12.12-182.1.2 ..................................................................[done]
( 5/16) Installing: cvsps-2.1-181.1.3 ....................................................................[done]
( 6/16) Installing: libserf-1-1-1.3.8-2.4.1 ..............................................................[done]
( 7/16) Installing: git-core-2.1.2-5.1 ...................................................................[done]
( 8/16) Installing: subversion-1.8.11-2.7.1 ..............................................................[done]
( 9/16) Installing: gitk-2.1.2-5.1 .......................................................................[done]
(10/16) Installing: git-web-2.1.2-5.1 ....................................................................[done]
(11/16) Installing: git-gui-2.1.2-5.1 ....................................................................[done]
(12/16) Installing: git-email-2.1.2-5.1 ..................................................................[done]
(13/16) Installing: git-cvs-2.1.2-5.1 ....................................................................[done]
(14/16) Installing: git-2.1.2-5.1 ........................................................................[done]
(15/16) Installing: subversion-perl-1.8.11-2.7.1 .........................................................[done]
(16/16) Installing: git-svn-2.1.2-5.1 ....................................................................[done]
Sotharavej:/srv/www/htdocs #
Sotharavej:/srv/www/htdocs #
Sotharavej:/srv/www/htdocs # git clone https://github.com/afaqurk/linux-dash.git
Cloning into 'linux-dash'...
remote: Counting objects: 2368, done.
remote: Total 2368 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (2368/2368), 3.15 MiB | 49.00 KiB/s, done.
Resolving deltas: 100% (1372/1372), done.
Checking connectivity... done.
Sotharavej:/srv/www/htdocs #

        เรียกใช้งาน linux-dash ที่ url http://ip address/linux-dash



ติดตั้ง Web Server และ Database Server บน OpenSUSE 13.2

submarine@Sotharavej:~>
submarine@Sotharavej:~> su
Password:
Sotharavej:/home/submarine #
Sotharavej:/home/submarine # zypper in apache2 php5 mysql-sver postgresql-server phpMyAdmin phpPgAdmin pgAdmin3
Loading repository data...
Reading installed packages...
'mysql-sver' not found in package names. Trying capabilities.
No provider of 'mysql-sver' found.
Resolving package dependencies...

The following 47 NEW packages are going to be installed:
  apache2 apache2-mod_dnssd apache2-mod_php5 apache2-prefork apache2-utils libapr1 libapr-util1 libmcrypt
  libmspack0 libpq5 libwx_baseu-2_8-0-wxcontainer libwx_baseu_net-2_8-0-wxcontainer
  libwx_baseu_xml-2_8-0-wxcontainer libwx_gtk2u_adv-2_8-0-wxcontainer libwx_gtk2u_aui-2_8-0-wxcontainer
  libwx_gtk2u_core-2_8-0-wxcontainer libwx_gtk2u_html-2_8-0-wxcontainer libwx_gtk2u_stc-2_8-0-wxcontainer
  libwx_gtk2u_xrc-2_8-0-wxcontainer pgadmin3 pgadmin3-lang php5 php5-bz2 php5-ctype php5-dom php5-gd php5-iconv
  php5-json php5-mbstring php5-mcrypt php5-mysql php5-pdo php5-pgsql php5-sqlite php5-tokenizer php5-xmlreader
  php5-xmlwriter php5-zip php5-zlib phpMyAdmin phpPgAdmin postgresql93 postgresql93-server postgresql-init
  postgresql-server pwgen wxWidgets-lang

The following 13 recommended packages were automatically selected:
  apache2-prefork pgadmin3-lang php5-ctype php5-dom php5-iconv php5-json php5-sqlite php5-tokenizer
  php5-xmlreader php5-xmlwriter php5-zip postgresql93-server wxWidgets-lang

The following 3 packages are suggested, but will not be installed:
  php5-gettext php5-pear php5-suhosin

47 new packages to install.
Overall download size: 23.6 MiB. Already cached: 0 B  After the operation, additional 105.0 MiB will be used.
Continue? [y/n/? shows all options] (y): y
Retrieving package postgresql-init-9.3-16.2.2.noarch                      (1/47),  10.3 KiB (  7.5 KiB unpacked)
Retrieving: postgresql-init-9.3-16.2.2.noarch.rpm ...........................................[done (12.4 KiB/s)]
Retrieving package libapr1-1.5.1-4.1.3.x86_64                             (2/47), 100.1 KiB (232.8 KiB unpacked)
Retrieving: libapr1-1.5.1-4.1.3.x86_64.rpm ..................................................[done (26.0 KiB/s)]
Retrieving package libmcrypt-2.5.8-116.1.2.x86_64                         (3/47),  68.5 KiB (199.7 KiB unpacked)
Retrieving: libmcrypt-2.5.8-116.1.2.x86_64.rpm ...........................................................[done]
Retrieving package libmspack0-0.4-5.1.2.x86_64                            (4/47),  56.7 KiB (128.1 KiB unpacked)
Retrieving: libmspack0-0.4-5.1.2.x86_64.rpm .................................................[done (12.8 KiB/s)]
Retrieving package libpq5-9.3.5-2.1.14.x86_64                             (5/47), 152.5 KiB (466.0 KiB unpacked)
Retrieving: libpq5-9.3.5-2.1.14.x86_64.rpm ..................................................[done (46.1 KiB/s)]
Retrieving package libwx_baseu-2_8-0-wxcontainer-2.8.12-26.1.11.x86_64    (6/47), 407.6 KiB (  1.4 MiB unpacked)
Retrieving: libwx_baseu-2_8-0-wxcontainer-2.8.12-26.1.11.x86_64.rpm ........................[done (306.3 KiB/s)]
Retrieving package pwgen-2.06-103.1.2.x86_64                              (7/47),  18.6 KiB ( 33.6 KiB unpacked)
Retrieving: pwgen-2.06-103.1.2.x86_64.rpm ................................................................[done]
Retrieving package libapr-util1-1.5.3-2.1.4.x86_64                        (8/47),  89.3 KiB (229.8 KiB unpacked)
Retrieving: libapr-util1-1.5.3-2.1.4.x86_64.rpm ............................................[done (124.6 KiB/s)]
Retrieving package apache2-mod_dnssd-0.6-22.2.1.x86_64                    (9/47),  17.5 KiB ( 42.3 KiB unpacked)
Retrieving: apache2-mod_dnssd-0.6-22.2.1.x86_64.rpm ......................................................[done]
Retrieving package postgresql93-9.3.5-2.1.14.x86_64                      (10/47),   1.0 MiB (  4.0 MiB unpacked)
Retrieving: postgresql93-9.3.5-2.1.14.x86_64.rpm ...........................................[done (281.2 KiB/s)]
Retrieving package libwx_gtk2u_core-2_8-0-wxcontainer-2.8.12-26.1.11.x86_64
                                                                        (11/47), 1020.6 KiB (  4.3 MiB unpacked)
Retrieving: libwx_gtk2u_core-2_8-0-wxcontainer-2.8.12-26.1.11.x86_64.rpm ...................[done (362.7 KiB/s)]
Retrieving package libwx_baseu_xml-2_8-0-wxcontainer-2.8.12-26.1.11.x86_64
                                                                         (12/47),  22.1 KiB ( 38.7 KiB unpacked)
Retrieving: libwx_baseu_xml-2_8-0-wxcontainer-2.8.12-26.1.11.x86_64.rpm .....................[done (15.0 KiB/s)]
Retrieving package libwx_baseu_net-2_8-0-wxcontainer-2.8.12-26.1.11.x86_64
                                                                         (13/47),  64.2 KiB (197.0 KiB unpacked)
Retrieving: libwx_baseu_net-2_8-0-wxcontainer-2.8.12-26.1.11.x86_64.rpm .....................[done (28.8 KiB/s)]
Retrieving package wxWidgets-lang-2.8.12-26.1.11.noarch                  (14/47), 355.0 KiB (  1.9 MiB unpacked)
Retrieving: wxWidgets-lang-2.8.12-26.1.11.noarch.rpm .......................................[done (120.7 KiB/s)]
Retrieving package postgresql93-server-9.3.5-2.1.14.x86_64               (15/47),   3.2 MiB ( 15.7 MiB unpacked)
Retrieving: postgresql93-server-9.3.5-2.1.14.x86_64.rpm ....................................[done (286.6 KiB/s)]
Retrieving package libwx_gtk2u_stc-2_8-0-wxcontainer-2.8.12-26.1.11.x86_64
                                                                         (16/47), 351.2 KiB (  1.1 MiB unpacked)
Retrieving: libwx_gtk2u_stc-2_8-0-wxcontainer-2.8.12-26.1.11.x86_64.rpm .....................[done (72.1 KiB/s)]
Retrieving package libwx_gtk2u_html-2_8-0-wxcontainer-2.8.12-26.1.11.x86_64
                                                                         (17/47), 199.4 KiB (755.7 KiB unpacked)
Retrieving: libwx_gtk2u_html-2_8-0-wxcontainer-2.8.12-26.1.11.x86_64.rpm ....................[done (39.9 KiB/s)]
Retrieving package libwx_gtk2u_aui-2_8-0-wxcontainer-2.8.12-26.1.11.x86_64
                                                                         (18/47), 130.8 KiB (434.2 KiB unpacked)
Retrieving: libwx_gtk2u_aui-2_8-0-wxcontainer-2.8.12-26.1.11.x86_64.rpm ......................[done (5.2 KiB/s)]
Retrieving package libwx_gtk2u_adv-2_8-0-wxcontainer-2.8.12-26.1.11.x86_64
                                                                         (19/47), 224.8 KiB (905.6 KiB unpacked)
Retrieving: libwx_gtk2u_adv-2_8-0-wxcontainer-2.8.12-26.1.11.x86_64.rpm ....................[done (199.2 KiB/s)]
Retrieving package postgresql-server-9.3-3.1.2.noarch                      (20/47),   3.7 KiB (   83 B unpacked)
Retrieving: postgresql-server-9.3-3.1.2.noarch.rpm .......................................................[done]
Retrieving package libwx_gtk2u_xrc-2_8-0-wxcontainer-2.8.12-26.1.11.x86_64
                                                                         (21/47), 144.6 KiB (609.9 KiB unpacked)
Retrieving: libwx_gtk2u_xrc-2_8-0-wxcontainer-2.8.12-26.1.11.x86_64.rpm ....................[done (116.4 KiB/s)]
Retrieving package pgadmin3-1.18.1-2.1.9.x86_64                          (22/47),   2.1 MiB (  8.7 MiB unpacked)
Retrieving: pgadmin3-1.18.1-2.1.9.x86_64.rpm ...............................................[done (344.9 KiB/s)]
Retrieving package pgadmin3-lang-1.18.1-2.1.9.noarch                     (23/47),   2.3 MiB (  6.3 MiB unpacked)
Retrieving: pgadmin3-lang-1.18.1-2.1.9.noarch.rpm ..........................................[done (164.7 KiB/s)]
Retrieving package php5-5.6.1-4.1.x86_64                                 (24/47),   1.5 MiB ( 10.0 MiB unpacked)
Retrieving: php5-5.6.1-4.1.x86_64.rpm ......................................................[done (298.6 KiB/s)]
Retrieving package apache2-utils-2.4.10-4.1.x86_64                       (25/47), 113.8 KiB (217.1 KiB unpacked)
Retrieving: apache2-utils-2.4.10-4.1.x86_64.rpm ..........................................................[done]
Retrieving package php5-zlib-5.6.1-4.1.x86_64                            (26/47),  51.2 KiB ( 39.3 KiB unpacked)
Retrieving: php5-zlib-5.6.1-4.1.x86_64.rpm ...............................................................[done]
Retrieving package php5-zip-5.6.1-4.1.x86_64                             (27/47),  84.9 KiB (127.9 KiB unpacked)
Retrieving: php5-zip-5.6.1-4.1.x86_64.rpm ................................................................[done]
Retrieving package php5-xmlwriter-5.6.1-4.1.x86_64                       (28/47),  49.7 KiB ( 55.0 KiB unpacked)
Retrieving: php5-xmlwriter-5.6.1-4.1.x86_64.rpm .............................................[done (15.2 KiB/s)]
Retrieving package php5-tokenizer-5.6.1-4.1.x86_64                       (29/47),  43.9 KiB ( 18.5 KiB unpacked)
Retrieving: php5-tokenizer-5.6.1-4.1.x86_64.rpm .............................................[done (45.4 KiB/s)]
Retrieving package php5-pdo-5.6.1-4.1.x86_64                             (30/47),  79.0 KiB (135.5 KiB unpacked)
Retrieving: php5-pdo-5.6.1-4.1.x86_64.rpm ...................................................[done (50.3 KiB/s)]
Retrieving package php5-mcrypt-5.6.1-4.1.x86_64                          (31/47),  51.0 KiB ( 47.0 KiB unpacked)
Retrieving: php5-mcrypt-5.6.1-4.1.x86_64.rpm .............................................................[done]
Retrieving package php5-mbstring-5.6.1-4.1.x86_64                        (32/47), 489.6 KiB (  1.4 MiB unpacked)
Retrieving: php5-mbstring-5.6.1-4.1.x86_64.rpm .............................................[done (158.9 KiB/s)]
Retrieving package php5-json-5.6.1-4.1.x86_64                            (33/47),  53.1 KiB ( 42.7 KiB unpacked)
Retrieving: php5-json-5.6.1-4.1.x86_64.rpm ..................................................[done (27.7 KiB/s)]
Retrieving package php5-iconv-5.6.1-4.1.x86_64                           (34/47),  53.9 KiB ( 42.9 KiB unpacked)
Retrieving: php5-iconv-5.6.1-4.1.x86_64.rpm ..................................................[done (5.5 KiB/s)]
Retrieving package php5-gd-5.6.1-4.1.x86_64                              (35/47), 161.3 KiB (440.1 KiB unpacked)
Retrieving: php5-gd-5.6.1-4.1.x86_64.rpm ...................................................[done (161.4 KiB/s)]
Retrieving package php5-dom-5.6.1-4.1.x86_64                             (36/47),  88.4 KiB (184.2 KiB unpacked)
Retrieving: php5-dom-5.6.1-4.1.x86_64.rpm ................................................................[done]
Retrieving package php5-ctype-5.6.1-4.1.x86_64                           (37/47),  42.2 KiB ( 14.4 KiB unpacked)
Retrieving: php5-ctype-5.6.1-4.1.x86_64.rpm ..................................................[done (5.8 KiB/s)]
Retrieving package php5-bz2-5.6.1-4.1.x86_64                             (38/47),  46.9 KiB ( 27.2 KiB unpacked)
Retrieving: php5-bz2-5.6.1-4.1.x86_64.rpm ................................................................[done]
Retrieving package apache2-2.4.10-4.1.x86_64                            (39/47), 1023.5 KiB (  3.6 MiB unpacked)
Retrieving: apache2-2.4.10-4.1.x86_64.rpm ..................................................[done (306.0 KiB/s)]
Retrieving package php5-sqlite-5.6.1-4.1.x86_64                          (40/47),  61.8 KiB ( 83.9 KiB unpacked)
Retrieving: php5-sqlite-5.6.1-4.1.x86_64.rpm .............................................................[done]
Retrieving package php5-pgsql-5.6.1-4.1.x86_64                           (41/47),  94.7 KiB (191.5 KiB unpacked)
Retrieving: php5-pgsql-5.6.1-4.1.x86_64.rpm .................................................[done (37.1 KiB/s)]
Retrieving package php5-mysql-5.6.1-4.1.x86_64                           (42/47),  93.5 KiB (221.1 KiB unpacked)
Retrieving: php5-mysql-5.6.1-4.1.x86_64.rpm ................................................[done (126.8 KiB/s)]
Retrieving package php5-xmlreader-5.6.1-4.1.x86_64                       (43/47),  48.6 KiB ( 35.0 KiB unpacked)
Retrieving: php5-xmlreader-5.6.1-4.1.x86_64.rpm ..............................................[done (5.9 KiB/s)]
Retrieving package apache2-prefork-2.4.10-4.1.x86_64                     (44/47), 240.5 KiB (595.9 KiB unpacked)
Retrieving: apache2-prefork-2.4.10-4.1.x86_64.rpm ...........................................[done (47.2 KiB/s)]
Retrieving package apache2-mod_php5-5.6.1-4.1.x86_64                     (45/47),   1.3 MiB (  9.4 MiB unpacked)
Retrieving: apache2-mod_php5-5.6.1-4.1.x86_64.rpm ..........................................[done (366.8 KiB/s)]
Retrieving package phpMyAdmin-4.2.13.1-8.1.noarch                        (46/47),   5.3 MiB ( 27.7 MiB unpacked)
Retrieving: phpMyAdmin-4.2.13.1-8.1.noarch.rpm .............................................[done (520.1 KiB/s)]
Retrieving package phpPgAdmin-5.1-2.1.3.noarch                           (47/47), 589.1 KiB (  2.9 MiB unpacked)
Retrieving: phpPgAdmin-5.1-2.1.3.noarch.rpm ................................................[done (182.9 KiB/s)]
Checking for file conflicts: .............................................................................[done]
( 1/47) Installing: postgresql-init-9.3-16.2.2 ...........................................................[done]
Additional rpm output:
Updating /etc/sysconfig/postgresql...


( 2/47) Installing: libapr1-1.5.1-4.1.3 ..................................................................[done]
( 3/47) Installing: libmcrypt-2.5.8-116.1.2 ..............................................................[done]
( 4/47) Installing: libmspack0-0.4-5.1.2 .................................................................[done]
( 5/47) Installing: libpq5-9.3.5-2.1.14 ..................................................................[done]
( 6/47) Installing: libwx_baseu-2_8-0-wxcontainer-2.8.12-26.1.11 .........................................[done]
( 7/47) Installing: pwgen-2.06-103.1.2 ...................................................................[done]
( 8/47) Installing: libapr-util1-1.5.3-2.1.4 .............................................................[done]
( 9/47) Installing: apache2-mod_dnssd-0.6-22.2.1 .........................................................[done]
(10/47) Installing: postgresql93-9.3.5-2.1.14 ............................................................[done]
(11/47) Installing: libwx_gtk2u_core-2_8-0-wxcontainer-2.8.12-26.1.11 ....................................[done]
(12/47) Installing: libwx_baseu_xml-2_8-0-wxcontainer-2.8.12-26.1.11 .....................................[done]
(13/47) Installing: libwx_baseu_net-2_8-0-wxcontainer-2.8.12-26.1.11 .....................................[done]
(14/47) Installing: wxWidgets-lang-2.8.12-26.1.11 ........................................................[done]
(15/47) Installing: postgresql93-server-9.3.5-2.1.14 .....................................................[done]
(16/47) Installing: libwx_gtk2u_stc-2_8-0-wxcontainer-2.8.12-26.1.11 .....................................[done]
(17/47) Installing: libwx_gtk2u_html-2_8-0-wxcontainer-2.8.12-26.1.11 ....................................[done]
(18/47) Installing: libwx_gtk2u_aui-2_8-0-wxcontainer-2.8.12-26.1.11 .....................................[done]
(19/47) Installing: libwx_gtk2u_adv-2_8-0-wxcontainer-2.8.12-26.1.11 .....................................[done]
(20/47) Installing: postgresql-server-9.3-3.1.2 ..........................................................[done]
(21/47) Installing: libwx_gtk2u_xrc-2_8-0-wxcontainer-2.8.12-26.1.11 .....................................[done]
(22/47) Installing: pgadmin3-1.18.1-2.1.9 ................................................................[done]
(23/47) Installing: pgadmin3-lang-1.18.1-2.1.9 ...........................................................[done]
(24/47) Installing: php5-5.6.1-4.1 .......................................................................[done]
(25/47) Installing: apache2-utils-2.4.10-4.1 .............................................................[done]
(26/47) Installing: php5-zlib-5.6.1-4.1 ..................................................................[done]
(27/47) Installing: php5-zip-5.6.1-4.1 ...................................................................[done]
(28/47) Installing: php5-xmlwriter-5.6.1-4.1 .............................................................[done]
(29/47) Installing: php5-tokenizer-5.6.1-4.1 .............................................................[done]
(30/47) Installing: php5-pdo-5.6.1-4.1 ...................................................................[done]
(31/47) Installing: php5-mcrypt-5.6.1-4.1 ................................................................[done]
(32/47) Installing: php5-mbstring-5.6.1-4.1 ..............................................................[done]
(33/47) Installing: php5-json-5.6.1-4.1 ..................................................................[done]
(34/47) Installing: php5-iconv-5.6.1-4.1 .................................................................[done]
(35/47) Installing: php5-gd-5.6.1-4.1 ....................................................................[done]
(36/47) Installing: php5-dom-5.6.1-4.1 ...................................................................[done]
(37/47) Installing: php5-ctype-5.6.1-4.1 .................................................................[done]
(38/47) Installing: php5-bz2-5.6.1-4.1 ...................................................................[done]
(39/47) Installing: apache2-2.4.10-4.1 ...................................................................[done]
Additional rpm output:
/usr/sbin/suexec2: cannot verify root:root 0755 - not listed in /etc/permissions
Updating /etc/sysconfig/apache2...
looking for old 2.0 modules to be renamed...
!!ATTENTION! authz_default was removed from apache version 2.4 or later, CHECK YOUR CONFIGURATION!!!
Done.


(40/47) Installing: php5-sqlite-5.6.1-4.1 ................................................................[done]
(41/47) Installing: php5-pgsql-5.6.1-4.1 .................................................................[done]
(42/47) Installing: php5-mysql-5.6.1-4.1 .................................................................[done]
(43/47) Installing: php5-xmlreader-5.6.1-4.1 .............................................................[done]
(44/47) Installing: apache2-prefork-2.4.10-4.1 ...........................................................[done]
(45/47) Installing: apache2-mod_php5-5.6.1-4.1 ...........................................................[done]
(46/47) Installing: phpMyAdmin-4.2.13.1-8.1 ..............................................................[done]
(47/47) Installing: phpPgAdmin-5.1-2.1.3 .................................................................[done]
Sotharavej:/home/submarine #

Sotharavej:/home/submarine #
Sotharavej:/home/submarine # nmap localhost

Starting Nmap 6.47 ( http://nmap.org ) at 2015-01-09 14:00 ICT
Nmap scan report for localhost (127.0.0.1)
Host is up (0.0000080s latency).
Not shown: 997 closed ports
PORT    STATE SERVICE
22/tcp  open  ssh
25/tcp  open  smtp
631/tcp open  ipp

Nmap done: 1 IP address (1 host up) scanned in 2.48 seconds
Sotharavej:/home/submarine # serv
servertool  service    
Sotharavej:/home/submarine # service apache2 start
Sotharavej:/home/submarine # nmap localhost

Starting Nmap 6.47 ( http://nmap.org ) at 2015-01-09 14:01 ICT
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000010s latency).
Not shown: 996 closed ports
PORT    STATE SERVICE
22/tcp  open  ssh
25/tcp  open  smtp
80/tcp  open  http
631/tcp open  ipp

Nmap done: 1 IP address (1 host up) scanned in 2.45 seconds
Sotharavej:/home/submarine #