반응형


Oracle version이 10.2.0.4로 동일하고 DB간 character set 도 동일하다고 가정한다면....

 

그냥 데이타파일을 copy하면 안되고요...

Cross-Platform Transportable Tablespaces 기능을 사용하시면 됩니다.

 

이때 Source 와 Target DB에서 아래를 조회해서 endian format이 같은지 검사해서...

아래 경우 little endian인데...source db와 target db의 os가 동일한 endian이면 상관없지만

 

 

        SQL> select PLATFORM_ID, PLATFORM_NAME  from v$database;
       
        PLATFORM_ID PLATFORM_NAME
        ----------- ------------------------------
                 10 Linux IA (32-bit)

 

        SQL> select  * from v$transportable_platform;
       
        PLATFORM_ID PLATFORM_NAME                  ENDIAN_FORMAT
        ----------- ------------------------------ --------------
                  1 Solaris[tm] OE (32-bit)        Big
                  2 Solaris[tm] OE (64-bit)        Big
                  7 Microsoft Windows IA (32-bit)  Little  
                 10 Linux IA (32-bit)              Little   <--- Little endian임.
                  6 AIX-Based Systems (64-bit)     Big
                  3 HP-UX (64-bit)                 Big
                  5 HP Tru64 UNIX                  Little
                  4 HP-UX IA (64-bit)              Big
                 11 Linux IA (64-bit)              Little
                 15 HP Open VMS                    Little
                  8 Microsoft Windows IA (64-bit)  Little
                  9 IBM zSeries Based Linux        Big
                 13 Linux 64-bit for AMD           Little
                 16 Apple Mac OS                   Big
                 12 Microsoft Windows 64-bit for A Little
                    MD

 

다를 경우 Rman으로 Data File Conversion 을 해야 합니다.

 

     - Source 에서
       > rman target=/
       RMAN> Convert Tablespace 'FINANCE, HR' to Platform ='AIX_Based System (64-bit)'  <--    

                  v$transportable_platform.platform_name
                     DB_FILE_NAME_CONVERT = '/orahome/dbs1', '/orahome/dbs/transport_aix',
                                            '/orahome/dbs2', '/orahome/dbs/transport_aix'; 
         <--해당 디렉토리 아래 FINANCE, HR TS에 해당하는 모든 것을 convert하여 지정된 디렉토리 아래로 copy
        
     또는
    
     - Target 에서
       > rman target=/    
       RMAN> Convert Datafile '/tmp/transport_stage/*' From Platform = 'Solaris[tm] OE (32-bit)'
                     DB_FILE_NAME_CONVERT = '/tmp/transport_stage/fin', '/orahome/dbs1/fin',
                                            '/tmp/transport_stage/hr',  '/orahome/db2/hr';
     - DB_FILE_NAME_CONVERT 가 없으면 flash recovery area에 같은 이름으로 만들어진다.
     - Parallelism option은 parallel하게 복수개의 file을 convert할때 사용.  Convert 시간은 Rman으로
       백업할때 걸리는 시간과 같다. Convert 전후의 file size는 변함이 없다.





TDB라는 방법도 있습니다.

http://www.oracle.com/technetwork/database/features/availability/maa-wp-10gr2-platformmigrationtdb-131164.pdf


HP.UX -> AIX로 진행 해 봤는데..

시간이 많이 걸리던 순서대로 나열하면 exp/imp, TTS, TDB 순서 더군요...

참고 하세요..





반응형
반응형

몇일전 NAT를 걸어놨던 외부 IP로 부터 리눅스 시스템이 해킹을 당했다 -_-ㅋ

아놔....

무슨 광고 사이트가 뜨고 침입한 녀석 IP까지 찾았다...

외국 IP이라... 하앍....

오라클 리스너 설정 변경, apache 웹 시스템 적용 등

알수 없는 짓들만 실컷(?) 하고 나갔다....

그래서 간만에 rkhunter를 사용하여 점검중에 있다.

홈페이지 : http://www.rootkit.nl/projects/rootkit_hunter.html
다운로드 : http://sourceforge.net/projects/rkhunter/


* 지원 OS 버젼들... 참고로 내 리눅스는 centos 5.3이었다.

 Supported operating systems
Supported:
- Most Linux distributions
- Most *BSD distributions

Currently unsupported:
- NetBSD

Tested on:
- AIX 4.1.5 / 4.3.3
- ALT Linux
- Aurora Linux
- CentOS 3.1 / 4.0
- Conectiva Linux 6.0
- Debian 3.x
- FreeBSD 4.3 / 4.4 / 4.7 / 4.8 / 4.9 / 4.10
- FreeBSD 5.0 / 5.1 / 5.2 / 5.2.1 / 5.3
- Fedora Core 1 / Core 2 / Core 3
- Gentoo 1.4, 2004.0, 2004.1
- Macintosh OS 10.3.4-10.3.8
- Mandrake 8.1 / 8.2 / 9.0-9.2 / 10.0 / 10.1
- OpenBSD 3.4 / 3.5
- Red Hat Linux 7.0-7.3 / 8 / 9
- Red Hat Enterprise Linux 2.1 / 3.0
- Slackware 9.0 / 9.1 / 10.0 / 10.1
- SME 6.0
- Solaris (SunOS)
- SuSE 7.3 / 8.0-8.2 / 9.0-9.2
- Ubuntu
- Yellow Dog Linux 3.0 / 3.01

Confirmed to work also on:
- CLFS
- DaNix (Debian clone)
- PCLinuxOS
- VectorLinux SOHO 3.2 / 4.0
- CPUBuilders Linux
- Virtuozzo (VPS)





뭐 간단히 /tmp/에 파일을 복사하여 넣고

gzip -d rkhunter-1.3.6.tar.gz (압축 풀고)
tar xvf rkhunter-1.3.6.tar (타르 파일 풀고)


/tmp/rkhunter-1.3.6/ 디렉토리 파일이 풀린다...

뭐. 설치는 어렵지않다.

/tmp/rkhunter-1.3.6/installer.sh --install

/tmp/rkhunter-1.3.6/installer.sh 쉘을 치면 설명이 나온다.... 한번 읽어 보면 좋다.

1. 설치 화면

 # ./installer.sh  --install
Checking system for:
 Rootkit Hunter installer files: found
 A web file download command: wget found
Starting installation:
 Checking installation directory "/usr/local": it exists and is writable.
 Checking installation directories:
  Directory /usr/local/share/doc/rkhunter-1.3.6: creating: OK
  Directory /usr/local/share/man/man8: exists and is writable.
  Directory /etc: exists and is writable.
  Directory /usr/local/bin: exists and is writable.
  Directory /usr/local/lib64: exists and is writable.
  Directory /var/lib: exists and is writable.
  Directory /usr/local/lib64/rkhunter/scripts: creating: OK
  Directory /var/lib/rkhunter/db: creating: OK
  Directory /var/lib/rkhunter/tmp: creating: OK
  Directory /var/lib/rkhunter/db/i18n: creating: OK
 Installing check_modules.pl: OK
 Installing filehashmd5.pl: OK
 Installing filehashsha1.pl: OK
 Installing filehashsha.pl: OK
 Installing stat.pl: OK
 Installing readlink.sh: OK
 Installing backdoorports.dat: OK
 Installing mirrors.dat: OK
 Installing programs_bad.dat: OK
 Installing suspscan.dat: OK
 Installing rkhunter.8: OK
 Installing ACKNOWLEDGMENTS: OK
 Installing CHANGELOG: OK
 Installing FAQ: OK
 Installing LICENSE: OK
 Installing README: OK
 Installing language support files: OK
 Installing rkhunter: OK
 Installing rkhunter.conf: OK
Installation complete

2. 위의 정상적으로 설치 완료 화면을 보고 난뒤
    /usr/local/bin/rkhunter 폴더를 볼수 있다.
    - 실행해 보기

 # ./rkhunter

Usage: rkhunter {--check | --unlock | --update | --versioncheck |
                 --propupd [{filename | directory | package name},...] |
                 --list [{tests | {lang | languages} | rootkits}] |
                 --version | --help} [options]

Current options are:
         --append-log                  Append to the logfile, do not overwrite
         --bindir <directory>...       Use the specified command directories
     -c, --check                       Check the local system
  --cs2, --color-set2                  Use the second color set for output
         --configfile <file>           Use the specified configuration file
         --cronjob                     Run as a cron job
                                       (implies -c, --sk and --nocolors options)
         --dbdir <directory>           Use the specified database directory
         --debug                       Debug mode
                                       (Do not use unless asked to do so)
         --disable <test>[,<test>...]  Disable specific tests
                                       (Default is to disable no tests)
         --display-logfile             Display the logfile at the end
         --enable  <test>[,<test>...]  Enable specific tests
                                       (Default is to enable all tests)
         --hash {MD5 | SHA1 | SHA224 | SHA256 | SHA384 | SHA512 |
                 NONE | <command>}     Use the specified file hash function
                                       (Default is SHA1, then MD5)
     -h, --help                        Display this help menu, then exit
 --lang, --language <language>         Specify the language to use
                                       (Default is English)
         --list [tests | languages |   List the available test names, languages,
                 rootkits]             or checked for rootkits, then exit
     -l, --logfile [file]              Write to a logfile
                                       (Default is /var/log/rkhunter.log)
         --noappend-log                Do not append to the logfile, overwrite it
         --nocolors                    Use black and white output
         --nolog                       Do not write to a logfile
--nomow, --no-mail-on-warning          Do not send a message if warnings occur
   --ns, --nosummary                   Do not show the summary of check results
 --novl, --no-verbose-logging          No verbose logging
         --pkgmgr {RPM | DPKG | BSD |  Use the specified package manager to obtain or
                   NONE}               verify file hash values. (Default is NONE)
         --propupd [file | directory | Update the entire file properties database,
                    package]...        or just for the specified entries
     -q, --quiet                       Quiet mode (no output at all)
  --rwo, --report-warnings-only        Show only warning messages
     -r, --rootdir <directory>         Use the specified root directory
   --sk, --skip-keypress               Don't wait for a keypress after each test
         --summary                     Show the summary of system check results
                                       (This is the default)
         --syslog [facility.priority]  Log the check start and finish times to syslog
                                       (Default level is authpriv.notice)
         --tmpdir <directory>          Use the specified temporary directory
         --unlock                      Unlock (remove) the lock file
         --update                      Check for updates to database files
   --vl, --verbose-logging             Use verbose logging (on by default)
     -V, --version                     Display the version number, then exit
         --versioncheck                Check for latest version of program
     -x, --autox                       Automatically detect if X is in use
     -X, --no-autox                    Do not automatically detect if X is in use


헉스,,, 옵션을 줘야 한다.

처음에는 rkhunter가 사용하는 DB부터 만들어주는것을 권고한다.

# rkhunter --propupd

끝나면

실제로 check를 해보자

# rhunter -c

실행화면 (칼라로 나온다 잇힝...)

 [ Rootkit Hunter version 1.3.6 ]

Checking system commands...

  Performing 'strings' command checks
    Checking 'strings' command                               [ OK ]

  Performing 'shared libraries' checks
    Checking for preloading variables                        [ None found ]
    Checking for preloaded libraries                         [ None found ]
    Checking LD_LIBRARY_PATH variable                        [ Not found ]

  Performing file properties checks
    Checking for prerequisites                               [ OK ]
    /bin/awk                                                 [ Warning ]
    /bin/basename                                            [ OK ]
    /bin/bash                                                [ OK ]
    /bin/cat                                                 [ OK ]
    /bin/chmod                                               [ OK ]
    /bin/chown                                               [ OK ]
    /bin/cp                                                  [ OK ]
    /bin/csh                                                 [ OK ]
    /bin/cut                                                 [ OK ]
    /bin/date                                                [ OK ]
    /bin/df                                                  [ OK ]
    /bin/dmesg                                               [ OK ]
    /bin/echo                                                [ OK ]
    /bin/ed                                                  [ OK ]
    /bin/egrep                                               [ OK ]
    /bin/env                                                 [ OK ]
    /bin/fgrep                                               [ OK ]
    /bin/grep                                                [ OK ]
    /bin/kill                                                [ OK ]
    /bin/logger                                              [ OK ]
    /bin/login                                               [ OK ]
    /bin/ls                                                  [ OK ]
    /bin/mail                                                [ OK ]
    /bin/mktemp                                              [ OK ]
    /bin/more                                                [ OK ]
    /bin/mount                                               [ OK ]
    /bin/mv                                                  [ OK ]
    /bin/netstat                                             [ OK ]
    /bin/ps                                                  [ OK ]
    /bin/pwd                                                 [ OK ]
    /bin/rpm                                                 [ Warning ]
    /bin/sed                                                 [ OK ]
    /bin/sh                                                  [ OK ]
    /bin/sort                                                [ OK ]
    /bin/su                                                  [ OK ]
    /bin/touch                                               [ OK ]
    /bin/uname                                               [ OK ]
    /bin/gawk                                                [ Warning ]
    /bin/tcsh                                                [ OK ]
    /usr/bin/awk                                             [ Warning ]
    /usr/bin/chattr                                          [ OK ]
    /usr/bin/curl                                            [ Warning ]
    /usr/bin/cut                                             [ OK ]
    /usr/bin/diff                                            [ OK ]
    /usr/bin/dirname                                         [ OK ]
    /usr/bin/du                                              [ OK ]
    /usr/bin/elinks                                          [ Warning ]
    /usr/bin/env                                             [ OK ]
    /usr/bin/file                                            [ OK ]
    /usr/bin/find                                            [ OK ]
    /usr/bin/groups                                          [ Warning ]
    /usr/bin/head                                            [ OK ]
    /usr/bin/id                                              [ OK ]
    /usr/bin/kill                                            [ OK ]
    /usr/bin/killall                                         [ OK ]
    /usr/bin/last                                            [ OK ]
    /usr/bin/lastlog                                         [ OK ]
    /usr/bin/ldd                                             [ Warning ]
    /usr/bin/less                                            [ OK ]
    /usr/bin/links                                           [ Warning ]
    /usr/bin/locate                                          [ OK ]
    /usr/bin/logger                                          [ OK ]
    /usr/bin/lsattr                                          [ OK ]
    /usr/bin/md5sum                                          [ OK ]
    /usr/bin/newgrp                                          [ OK ]
    /usr/bin/passwd                                          [ OK ]
    /usr/bin/perl                                            [ Warning ]
    /usr/bin/pgrep                                           [ OK ]
    /usr/bin/pstree                                          [ OK ]
    /usr/bin/readlink                                        [ OK ]
    /usr/bin/runcon                                          [ OK ]
    /usr/bin/sha1sum                                         [ OK ]
    /usr/bin/sha224sum                                       [ OK ]
    /usr/bin/sha256sum                                       [ OK ]
    /usr/bin/sha384sum                                       [ OK ]
    /usr/bin/sha512sum                                       [ OK ]
    /usr/bin/size                                            [ OK ]
    /usr/bin/stat                                            [ OK ]
    /usr/bin/strings                                         [ OK ]
    /usr/bin/sudo                                            [ OK ]
    /usr/bin/tail                                            [ OK ]
    /usr/bin/test                                            [ OK ]
    /usr/bin/top                                             [ OK ]
    /usr/bin/tr                                              [ OK ]
    /usr/bin/uniq                                            [ OK ]
    /usr/bin/users                                           [ OK ]
    /usr/bin/vmstat                                          [ OK ]
    /usr/bin/w                                               [ OK ]
    /usr/bin/watch                                           [ OK ]
    /usr/bin/wc                                              [ OK ]
    /usr/bin/wget                                            [ OK ]
    /usr/bin/whatis                                          [ Warning ]
    /usr/bin/whereis                                         [ OK ]
    /usr/bin/which                                           [ OK ]
    /usr/bin/who                                             [ OK ]
    /usr/bin/whoami                                          [ OK ]
    /usr/bin/gawk                                            [ Warning ]
    /sbin/chkconfig                                          [ OK ]
    /sbin/depmod                                             [ OK ]
    /sbin/fuser                                              [ OK ]
    /sbin/ifconfig                                           [ OK ]
    /sbin/ifdown                                             [ Warning ]
    /sbin/ifup                                               [ Warning ]
    /sbin/init                                               [ OK ]
    /sbin/insmod                                             [ OK ]
    /sbin/ip                                                 [ OK ]
    /sbin/kudzu                                              [ OK ]
    /sbin/lsmod                                              [ OK ]
    /sbin/modinfo                                            [ OK ]
    /sbin/modprobe                                           [ OK ]
    /sbin/nologin                                            [ OK ]
    /sbin/rmmod                                              [ OK ]
    /sbin/runlevel                                           [ OK ]
    /sbin/sulogin                                            [ OK ]
    /sbin/sysctl                                             [ OK ]
    /sbin/syslogd                                            [ OK ]
    /usr/sbin/adduser                                        [ OK ]
    /usr/sbin/chroot                                         [ OK ]
    /usr/sbin/groupadd                                       [ OK ]
    /usr/sbin/groupdel                                       [ OK ]
    /usr/sbin/groupmod                                       [ OK ]
    /usr/sbin/grpck                                          [ OK ]
    /usr/sbin/kudzu                                          [ OK ]
    /usr/sbin/lsof                                           [ OK ]
    /usr/sbin/prelink                                        [ OK ]
    /usr/sbin/pwck                                           [ OK ]
    /usr/sbin/sestatus                                       [ OK ]
    /usr/sbin/tcpd                                           [ OK ]
    /usr/sbin/useradd                                        [ OK ]
    /usr/sbin/userdel                                        [ OK ]
    /usr/sbin/usermod                                        [ OK ]
    /usr/sbin/vipw                                           [ OK ]
    /usr/local/bin/rkhunter                                  [ OK ]
    /etc/rkhunter.conf                                       [ OK ]

[Press <ENTER> to continue]


Checking for rootkits...

  Performing check of known rootkit files and directories
    55808 Trojan - Variant A                                 [ Not found ]
    ADM Worm                                                 [ Not found ]
    AjaKit Rootkit                                           [ Not found ]
    Adore Rootkit                                            [ Not found ]
    aPa Kit                                                  [ Not found ]
    Apache Worm                                              [ Not found ]
    Ambient (ark) Rootkit                                    [ Not found ]
    Balaur Rootkit                                           [ Not found ]
    BeastKit Rootkit                                         [ Not found ]
    beX2 Rootkit                                             [ Not found ]
    BOBKit Rootkit                                           [ Not found ]
    cb Rootkit                                               [ Not found ]
    CiNIK Worm (Slapper.B variant)                           [ Not found ]
    Danny-Boy's Abuse Kit                                    [ Not found ]
    Devil RootKit                                            [ Not found ]
    Dica-Kit Rootkit                                         [ Not found ]
    Dreams Rootkit                                           [ Not found ]
    Duarawkz Rootkit                                         [ Not found ]
    Enye LKM                                                 [ Not found ]
    Flea Linux Rootkit                                       [ Not found ]
    FreeBSD Rootkit                                          [ Not found ]
    Fu Rootkit                                               [ Not found ]
    Fuck`it Rootkit                                          [ Not found ]
    GasKit Rootkit                                           [ Not found ]
    Heroin LKM                                               [ Not found ]
    HjC Kit                                                  [ Not found ]
    ignoKit Rootkit                                          [ Not found ]
    iLLogiC Rootkit                                          [ Not found ]
    IntoXonia-NG Rootkit                                     [ Not found ]
    Irix Rootkit                                             [ Not found ]
    Kitko Rootkit                                            [ Not found ]
    Knark Rootkit                                            [ Not found ]
    ld-linuxv.so Rootkit                                     [ Not found ]
    Li0n Worm                                                [ Not found ]
    Lockit / LJK2 Rootkit                                    [ Not found ]
    Mood-NT Rootkit                                          [ Not found ]
    MRK Rootkit                                              [ Not found ]
    Ni0 Rootkit                                              [ Not found ]
    Ohhara Rootkit                                           [ Not found ]
    Optic Kit (Tux) Worm                                     [ Not found ]
    Oz Rootkit                                               [ Not found ]
    Phalanx Rootkit                                          [ Not found ]
    Phalanx2 Rootkit                                         [ Not found ]
    Phalanx2 Rootkit (extended tests)                        [ Not found ]
    Portacelo Rootkit                                        [ Not found ]
    R3dstorm Toolkit                                         [ Not found ]
    RH-Sharpe's Rootkit                                      [ Not found ]
    RSHA's Rootkit                                           [ Not found ]
    Scalper Worm                                             [ Not found ]
    Sebek LKM                                                [ Not found ]
    Shutdown Rootkit                                         [ Not found ]
    SHV4 Rootkit                                             [ Not found ]
    SHV5 Rootkit                                             [ Not found ]
    Sin Rootkit                                              [ Not found ]
    Slapper Worm                                             [ Not found ]
    Sneakin Rootkit                                          [ Not found ]
    'Spanish' Rootkit                                        [ Not found ]
    Suckit Rootkit                                           [ Not found ]
    SunOS Rootkit                                            [ Not found ]
    SunOS / NSDAP Rootkit                                    [ Not found ]
    Superkit Rootkit                                         [ Not found ]
    TBD (Telnet BackDoor)                                    [ Not found ]
    TeLeKiT Rootkit                                          [ Not found ]
    T0rn Rootkit                                             [ Not found ]
    trNkit Rootkit                                           [ Not found ]
    Trojanit Kit                                             [ Not found ]
    Tuxtendo Rootkit                                         [ Not found ]
    URK Rootkit                                              [ Not found ]
    Vampire Rootkit                                          [ Not found ]
    VcKit Rootkit                                            [ Not found ]
    Volc Rootkit                                             [ Not found ]
    Xzibit Rootkit                                           [ Not found ]
    X-Org SunOS Rootkit                                      [ Not found ]
    zaRwT.KiT Rootkit                                        [ Not found ]
    ZK Rootkit                                               [ Not found ]

  Performing additional rootkit checks
    Suckit Rookit additional checks                          [ OK ]
    Checking for possible rootkit files and directories      [ None found ]
    Checking for possible rootkit strings                    [ None found ]

  Performing malware checks
    Checking running processes for suspicious files          [ None found ]
    Checking for login backdoors                             [ None found ]
    Checking for suspicious directories                      [ None found ]
    Checking for sniffer log files                           [ None found ]
    Checking for Apache backdoor                             [ Not found ]

  Performing Linux specific checks
    Checking loaded kernel modules                           [ OK ]
    Checking kernel module names                             [ OK ]

[Press <ENTER> to continue]


Checking the network...

  Performing check for backdoor ports
    Checking for TCP port 1524                               [ Not found ]
    Checking for TCP port 1984                               [ Not found ]
    Checking for UDP port 2001                               [ Not found ]
    Checking for TCP port 2006                               [ Not found ]
    Checking for TCP port 2128                               [ Not found ]
    Checking for TCP port 6666                               [ Not found ]
    Checking for TCP port 6667                               [ Not found ]
    Checking for TCP port 6668                               [ Not found ]
    Checking for TCP port 6669                               [ Not found ]
    Checking for TCP port 7000                               [ Not found ]
    Checking for TCP port 13000                              [ Not found ]
    Checking for TCP port 14856                              [ Not found ]
    Checking for TCP port 25000                              [ Not found ]
    Checking for TCP port 29812                              [ Not found ]
    Checking for TCP port 31337                              [ Not found ]
    Checking for TCP port 33369                              [ Not found ]
    Checking for TCP port 47107                              [ Not found ]
    Checking for TCP port 47018                              [ Not found ]
    Checking for TCP port 60922                              [ Not found ]
    Checking for TCP port 62883                              [ Not found ]
    Checking for TCP port 65535                              [ Not found ]

  Performing checks on the network interfaces
    Checking for promiscuous interfaces                      [ None found ]

[Press <ENTER> to continue]


Checking the local host...

  Performing system boot checks
    Checking for local host name                             [ Found ]
    Checking for system startup files                        [ Found ]
    Checking system startup files for malware                [ None found ]

  Performing group and account checks
    Checking for passwd file                                 [ Found ]
    Checking for root equivalent (UID 0) accounts            [ Warning ]
    Checking for passwordless accounts                       [ None found ]
    Checking for passwd file changes                         [ None found ]
    Checking for group file changes                          [ None found ]
    Checking root account shell history files                [ OK ]

  Performing system configuration file checks
    Checking for SSH configuration file                      [ Found ]
    Checking if SSH root access is allowed                   [ Warning ]
    Checking if SSH protocol v1 is allowed                   [ Not allowed ]
    Checking for running syslog daemon                       [ Found ]
    Checking for syslog configuration file                   [ Found ]
    Checking if syslog remote logging is allowed             [ Not allowed ]

  Performing filesystem checks
    Checking /dev for suspicious file types                  [ None found ]
    Checking for hidden files and directories                [ Warning ]

[Press <ENTER> to continue]


Checking application versions...

    Checking version of GnuPG                                [ OK ]
    Checking version of Apache                               [ Warning ]
    Checking version of OpenSSL                              [ Warning ]
    Checking version of PHP                                  [ Warning ]
    Checking version of Procmail MTA                         [ OK ]
    Checking version of OpenSSH                              [ Warning ]


System checks summary
=====================

File properties checks...
    Files checked: 134
    Suspect files: 14

Rootkit checks...
    Rootkits checked : 253
    Possible rootkits: 0

Applications checks...
    Applications checked: 6
    Suspect applications: 4

The system checks took: 1 minute and 56 seconds

All results have been written to the log file (/var/log/rkhunter.log)

One or more warnings have been found while checking the system.
Please check the log file (/var/log/rkhunter.log)

 



자 끝났다... 실제 체크 옵션의 Warning 부분인데.. 어라.. 자세히 안나온다

자세한 내용은 /var/log/rkhunter.log를 살펴보자... 그럼 더 자세한 경고 문구들이 나온다.

조치방법은 워낙 많기 때문에 구글링(www.google.co.kr)을 통해 검색해 보자 ~

하앍.............
반응형

'OS > Linux' 카테고리의 다른 글

CENTOS 7에 XRDP 설치하기  (0) 2017.08.26
리눅스 백업 및 복구  (0) 2013.01.25
삼성 컴퓨터 유분투 설치기.  (0) 2012.02.06
ps auxc 와 ps aux 결과 비교하기  (0) 2010.01.21
AWK & SED chunk_1  (0) 2010.01.21
반응형


; 비프음 안듣기
[HKEY_CURRENT_USER\Control Panel\Sound]
"Beep"="no"

; 비프음 안듣기
[HKEY_USERS\.DEFAULT\Control Panel\Sound]
"Beep"="no"

반응형
반응형

어느날 갑자기... PUTTY로 접속을 하려는데

다음과 같은 에러를 발생하며 접속이 안된다...

물론 id / password를 다 넣었다.

Server unexpectedly closed network connection

서버로 네트워크 연결이 예상지 못하게 종료되었습니다.

라는 뜻인데...

우선 로그를 살펴보았다.

/var/log/secure

 pam_unix(sshd:session): session opened for user test01 by test01(uid=100)
 pam_loginuid(sshd:session): set_loginuid failed opening loginuid
 pam_loginuid(sshd:session): set_loginuid failed

로그를보면 test01이라는 계정이 set_loginuid 의 열기 실패했다고 볼수 있다.

관련 내용을 구글링을 통해 검색해 보았다.

Server unexpectedly closed network connection

-> 즉 2가지 수정안인데... 나와 같이 특정계정만 막힌 경우는 해결되지 않았다.

 Server unexpectedly closed network connection"

라는 에러 메시지와 함께 접속 안 되는 경우가 생깁니다

그럴 경우에는 /etc/ssh/sshd_config 에서 UseDNS no 라고 추가 시켜 준 다음에

ssh 데몬(sshd)를 재시작(하거나 kill 로 죽인 다음에 다시 실행)하면 됩니다

추가
이전 키는 삭제 해야 합니다

리눅스에서는 ~계졍명/.ssh/known_hosts 에 해당하는 주소에 키를 삭제 하면 되고

윈도우에서 putty를 쓸 경우에는 레지스트리에서
HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\SshHostKeys
에 해당하는 키를 삭제하면 됩니다--moon.ft.co.kr

출처 : http://www.hostingland.co.kr/service/memo_view.htm?mode=view&code=memo&kind=h_qna&num=140448&idx_num=198

그러다가 로그의 내용을 중심으로 다시 구글링을 해보았다.

그랬더니 centos의 일종의 버그였다.

# grep pam_loginuid.so /etc/pam.d/*

/etc/pam.d/crond:session required pam_loginuid.so
/etc/pam.d/login:session required pam_loginuid.so
/etc/pam.d/remote:session required pam_loginuid.so
/etc/pam.d/sshd:session required pam_loginuid.so

위의 내용중 제일 하단에 결과를 보면 /etc/pam.d/sshd 파일의 세션 정보에서 pam_loguid.so를 사용함을 알수 있다.

즉, ssh를 통한 접속시 pam_loginuid를 이용하는 것을 알수 있다.

이부분을 # 처리하고

# service restart sshd

명령을 통해 sshd를 재시작하면 정상적으로 접속이 된다.

출처 : http://forums.powervps.com/showthread.php?p=19872

위의 출처를 통해 가보면 로그인을 통한 메모리 이득을 취할 수 있다고 하는데...

더 분석을 해봐야 겠다...
반응형
반응형


자바 스크립트 키 코드 값 구하는 함수.


<script language="JavaScript">
document.onkeydown = checkKeycode





function checkKeycode(e) {
var keycode;
if (window.event) keycode = window.event.keyCode;
else if (e) keycode = e.which;
alert("keycode: " + keycode);
}
</script>
 

/*
*
* 한글 입력 체크하기 위한 함수
* ex) <input type="text" name="Name" size="10" maxlength="15" onKeyPress="hangul();" style="ime-mode:active;" >
*
*
*/
function hangul()
{
 if((event.keyCode < 12592) || (event.keyCode > 12687))
  event.returnValue = false;
}
/*
*
* 숫자 입력 체크하기 위한 함수
* ex) <input type="text" name="jumin" size="10" maxlength="13" onKeyPress="only_number();" style="IME-MODE: disabled;" >
*
*
*/
function only_number()
{
 if((event.keyCode < 48) || (event.keyCode > 57))
  event.returnValue = false;
}
 
 

Key Code Reference Table


Key Pressed

Javascript Key Code

backspace

8

tab

9

enter

13

shift

16

ctrl

17

alt

18

pause/break

19

caps lock

20

escape

27

page up

33

page down

34

end

35

home

36

left arrow

37

up arrow

38

right arrow

39

down arrow

40

insert

45

delete

46

0

48

1

49

2

50

3

51

4

52

5

53

6

54

7

55

8

56

9

57

a

65

b

66

c

67

d

68

e

69

f

70

g

71

h

72

i

73

j

74

k

75

l

76

m

77

n

78

o

79

p

80

q

81

r

82

s

83

t

84

u

85

v

86

w

87

x

88

y

89

z

90

left window key

91

right window key

92

select key

93

numpad 0

96

numpad 1

97

numpad 2

98

numpad 3

99

numpad 4

100

numpad 5

101

numpad 6

102

numpad 7

103

numpad 8

104

numpad 9

105

multiply

106

add

107

subtract

109

decimal point

110

divide

111

f1

112

f2

113

f3

114

f4

115

f5

116

f6

117

f7

118

f8

119

f9

120

f10

121

f11

122

f12

123

num lock

144

scroll lock

145

semi-colon

186

equal sign

187

comma

188

dash

189

period

190

forward slash

191

grave accent

192

open bracket

219

back slash

220

close braket

221

single quote

222




반응형
반응형


exp system/oracle file=exp_pipe full=y log=daily.log buffer=80960000 CONSISTENT=y & gzip < exp_pipe > DW_FULL_BACKUP.dmp.gz



exp는 보조 백업의 의미로 테이블 단위의 복구가 필요할 때 주로 사용한다.
하지만 장애시점까지의 복구가 아니라 백업받은 시점으로의 복구만 가능하다.
0. exp/imp 제한
   - Export 파일(.dmp)을 네트워크를 통해 전송할 때는 반드시

     이진(Binary) 형태로 전송
   - SQL*Net 을 이용해서 exp/imp를 수행할 수 있음

     (exp userID/password@TNS_ALIAS ...)
   - Stored Procedure, 함수, 패키지를 Import 할 때 재 컴파일의

     필요성이 생길 수 있음
   - exp 도중에 시퀀스(sequence)를 사용하게 된다면,

     시퀀스 번호는 skip 될 수 있음
   - imp할 때 Long Type의 컬럼은 언제나 성공적으로 수행되는 것은 아님

     (imp 대신 copy 명령 사용)
1. 일반적으로 많이 사용하는 exp/imp 명령어
   ---------------------------------------
   % exp userid/password file=./dmp/TEST.dmp          \
         direct=y buffer=10240000 grants=y            \
         compress=n constraints=y indexes=y rows=y    \
         triggers=n tables=XXXX,YYYY,ZZZZ             \
         feedback=10000 log=./log/exp_test.log
   % imp dbaid/password file=./dmp/TEST.dmp           \
         fromuser=userid touser=otherid               \
         commit=y ignore=y buffer=10240000 grants=y   \
         constraints=y indexes=y rows=y               \
         tables=XXXX,YYYY,ZZZZ                        \
         feedback=10000 log=./log/imp_test.log
2. pipe를 통하여 백업 & 압축하는 exp/imp 명령어
   --------------------------------------------
   % rm /tmp/exp_test
   % /usr/sbin/mknod /tmp/exp_test p
   % compress </tmp/exp_test> ./dmp/TEST.dmp.Z &
   % exp userid/password file=/tmp/exp_test           \
         direct=y buffer=10240000 grants=y            \
         compress=n constraints=y indexes=y rows=y    \
         triggers=n tables=XXXX,YYYY,ZZZZ             \
         feedback=10000 log=./log/exp_test.log
   % rm /tmp/exp_test
   % rm -f /tmp/imp_test
   % /usr/sbin/mknod /tmp/imp_test p
   % uncompress<./dmp/TEST.dmp.Z> /tmp/imp_test &
   % imp dbaid/password file=/tmp/imp_test            \
         fromuser=userid touser=otherid               \
         commit=y ignore=y buffer=10240000 grants=y   \
         constraints=y indexes=y rows=y               \
         tables=XXXX,YYYY,ZZZZ                        \
         feedback=10000 log=./log/imp_test.log
   % rm -f /tmp/imp_test
    참고) exp와 imp를 연결하여 실행
          ftp가 지원되지 않고 TNS로 연결이 가능한 경우 사용한다.
          (파이프를 이용하여 exp하고 곧바로 imp로 연결하여 실행)
          % vi exp_and_imp.sh

            rm  /tmp/exp_node
            /usr/sbin/mknod /tmp/exp_node p
            exp dbaid/password@TNS_ALIAS FILE=/tmp/exp_node OWNER=us_test \

                INDEXES=n BUFFER=204800000 DIRECT=y LOG=exp_test.log &
            imp dbaid/password FILE=/tmp/exp_node FROMUSER=us_test        \

                TOUSER=us_test INDEXES=n COMMIT=y BUFFER=204800000        \

                FEEDBACK=100000 IGNORE=y LOG=imp_test.log
            rm  /tmp/exp_node
                 :wq

3. 파티션된 테이블의 파티션 exp 명령어
   --------------------------------------------
   % exp userid/password file=./dmp/TEST.dmp                     \
         direct=y buffer=10240000 grants=y                       \
         compress=n constraints=y indexes=y rows=y               \
         triggers=n tables=XXX:PT_XXX_2007,YYY:PT_YYY_2007       \
         feedback=10000 log=./log/exp_test.log
   % imp dbaid/password file=./dmp/TEST.dmp                      \
         fromuser=userid touser=otherid                          \
         commit=y ignore=y buffer=10240000 grants=y              \
         constraints=y indexes=y rows=y                          \
         tables=XXX:PT_XXX_2007,YYY:PT_YYY_2007                  \
         feedback=10000 log=./log/imp_test.log
   % rm -f /tmp/imp_test
4. FILESIZE를 이용한 SPLIT exp/imp 명령(8i)
   --------------------------------------------
   % exp userid/password file=./dmp/TEST01.dmp,                  \
                              ./dmp/TEST02.dmp,                  \
                              ./dmp/TEST03.dmp                   \
         direct=y buffer=10240000 grants=y                       \
         compress=n constraints=y indexes=y rows=y               \
         feedback=10000 filesize=100M log=./log/exp_test.log     \
         tables=TEST
   % imp dbaid/password file=./dmp/TEST01.dmp,                   \
                             ./dmp/TEST02.dmp,                   \
                             ./dmp/TEST03.dmp                    \
         fromuser=userid touser=otherid                          \
         commit=y ignore=y buffer=10240000 grants=y              \
         constraints=y indexes=y rows=y                          \
         tables=TEST                                             \
         feedback=10000 log=./log/imp_test.log
5. remote에서 exp하는 명령어
   --------------------------------------------
   % exp userid/password@TNS_ALIAS file=./dmp/TEST.dmp          \
         direct=y buffer=10240000 grants=y                      \
         compress=n constraints=y indexes=y rows=y              \
         triggers=n tables=XXXX,YYYY,ZZZZ                       \
         feedback=10000 log=./log/exp_test.log

참고) \는 UNIX에서 다음 라인과 이어진다는 표시의 기호임.

반응형
반응형

 

*patch 순서 정리
1. shared_pool_size/java_pool_size=>150M요구
① SYS> show parameter sga_m <-확인
② SYS> shutdown immediate
③ SYS> create pfile from spfile
④ SYS> vi /u01/app/oracle/product/10.2.0/db_1/dbs/initdb01.ora
⑤ sga_max_size=293601280(280*1024*1024=293601280)
⑥ SYS> create spfile from pfile
⑦ SYS> startup
⑧ SYS> show parameter sga_m <-확인
⑨ SYS> alter system set shared_pool_size=100m;
⑩ SYS> alter system set java_pool_size=100m;

2. patch전 서비스 종료
① db shutdown -> SQL*PLUS 종료
② lsnrctl stop -> Listener 종료
③ emctl stop dbsonsole -> emctl 종료
④ root 계정에서
/u01/app/oracle/product/10.2.0/db_1/bin/crsctl stop crs
-> asm 설치할때 필요한 crs입니다.

3. patch 설치 -> ./runinstall
① next
② script 확인
③ y

4. startup upgrade
① export ORACLE_SID=db01 -> 접속
② sqlplus /as sysdba
③ startup upgrade

5. $ORACLE_HOME/rdbms/admin/catupgrd.sql
① @/u01/app/oracle/product/10.2.0/db_1/rdbms/admin/catupgrd.sql

6. shutdown immediate

7. startup

8. $ORACLE_HOME/rdbms/admin/utlrp.sql
-> dba_objects.status의 값이 invalid가 없을 때까지 재실행!!!
① @/u01/app/oracle/product/10.2.0/db_1/rdbms/admin/utlrp.sql
② select status from dba_objects;

[출처] Oracle 10.2.0.1.0 to 10.2.0.4.0 Upgrade (Oracle University (Korea)) |작성자 마이너스

반응형
반응형

이클립스를 통해 개발하던중... 로컬 웹서비스를 가동하려고 하는데

어... 사용하는 포트가 있다고 뜨는것이다...

뭐지...도대체 감으로 찾아봐도.. 찾기 힘들었다.

그래서 인터넷 검색을 통해 찾던중 CurrPorts 란 프로그램을 찾게 되었다.

홈페이지 : http://www.nirsoft.net/utils/cports.html
다운로드 : http://www.nirsoft.net/utils/cports.zip


무설치 버젼으로 제공하였으며 실행한 화면은 다음과 같다.


여기서는 내컴퓨터의 사용 포트를 확인해야 하므로 Local Port 부분을 누르면(오름차순, 내림차순 정렬) 정렬된다.

정렬한뒤 Local Port의 80번을 사용하는 프로그램의 프로퍼티를 조회한다.


* 위에서 해당 프로세스를 죽일때에는 Kill Processes Of Selected Ports 부분을 클릭하면 되고... 신중히 실행해야 한다 !!!
잘못하면 치명적인 오류 및 시스템이 종료될 수 도 있다.

아래는 TeamViewer.exe(팀뷰어) 라는 프로세스가 TCP 프로토콜에 80번 포트(웹 포트)를 사용하여 수신응답 대기중임을 알수 있다.

즉, 내 컴퓨터에서 웹서비스를 사용하려고 할때 충돌 났던 이유는 원격 지원 프로그램(TEAMVIEWER)를 사용함으로써 발생 했었음을 알수 있다...


반응형
반응형
반응형
반응형


CSS는 문자의 스타일들을 정의하는 몇몇 옵션이 있다.

이러한 옵션들은 <font>태그를 완전히 치환할수 있고 그 이상도 가능하다.

CSS는 당신의 평범한 HTML 을 더 많이 강력한 스타일 정의를 가능하게 한다.

Font 속성들

속성 값들 NS IE 예제
 font-family font name
generic font 
4+
4+
4+
4+
font-family:arial
font-family:arial, helvetica
 font-style normal
italic
oblique
4+
4+
4+
4+
4+ 
font-style:normal
font-style:italic
font-style:oblique
 font-variant normal
small-caps
  4+
4+
font-variant:normal
font-variant:small-caps
 font-weight normal
bold
bolder
lighter
100-900
4+
4+
4W
4W
4+
4+
4+
4+
4+
4+
font-weight:normal
font-weight:bold
font-weight:bolder
font-weight:lighter
font-weight:250
 font-size normal
length
length
absolute
absolute
absolute
absolute
absolute
absolute
absolute
relative
relative
percentage
4+
4+
4+
4+
4+
4+
4+
4+
4+
4+
4+
4+
4+
4+
4+
4+
4+
4+
4+
4+
4+
4+
4+
4+
4+
4+
font-size:normal
font-size:14px
font-size:14pt
font-size:xx-small
font-size:x-small
font-size:small
font-size:medium
font-size:large
font-size:x-large
font-size:xx-large
font-size:smaller
font-size:larger
font-size:75%

4+ : 4 버전 이상 , 4P : 문제가 있음, 4M : Mac 만 가능, 4W : 윈도우즈만 가능

모든 폰트 속성을 한번에 지정하기

전형적인 폰트정의 예 :

 B {font-family:arial, helvetica; font-size:12px; font-weight:bold;}

그러나 모든 폰트 속성들은 실제 font 속성으로 표현할 수 있다.

 B {font:arial, helvetica 12px bold}

짧게 쓰는 경우는 모든 스타일을 동일할 때를 제외하고 사용하지 않는 것이 좋다.
실제로 명시적으로 작성한 경우가 더 알기 쉽고 수정할 때도 용이하다

TEXT 속성들

속성 값들 NS IE 예제
 line-height normal
number
length
percentage
4W
4+
4+
4+
4+
4P
4+
4P
line-height:normal
line-height:1.5
line-height:22px
line-height:150%
 text-decoration none
underline
overline
line-through
blink
4+
4+

4+
4+
4M
4+
4W
4+
text-decoration:none
text-decoration:underline
text-decoration:overline
text-decoration:line-through
text-decoration:blink
 text-transform none
capitalize
uppercase
lowercase
4+
4+
4+
4+
4W
4W
4W
4W
text-transform:none
text-transform:capitalize
text-transform:uppercase
text-transform:lowercase
 text-align left
right
center
justify
4+
4+
4+
4+
4+
4+
4+
4W
text-align:left
text-align:right
text-align:center
text-align:justify
 text-indent length
percentage
4+
4+
4+
4+
text-indent:20px;
text-indent:10%
 white-space normal
pre
4+
4+
white-space:normal
white-space:pre

4+ : 4 버전 이상 , 4P : 문제가 있음, 4M : Mac 만 가능, 4W : 윈도우즈만 가능

만약 FONT에 색을 추가하고 싶으면 다음과 같은 방법으로 사용한다.

B  {font:arial, helvetica 12px bold; color:red}


CSS Color 속성들

CSS는 페이지들에 대해 텍스트와 뒷배경 영역의  색을 지정하는 몇몇 옵션이 있다.

이러한 옵션들은 단순한 HTML 안에 전체 Color 속성들을  변경 가능하다.

예를들면, 단순한 HTML 안에, 테이블을 포함한 영역에 특별한 색을 강제로 표시할때 당신은 테이블 영역에 정의없이 사용할 수 있다.
테이블의 각각 셀들, <TD> 태그들 안에 class를 통해 쉽게 사용가능하다.

Color 속성들

 Property  Values  NS  IE
 color  <color> 4+ 4+ 
 background-color  transparent
 <color>
4+
4+
4+
4+ 
 background-image  none
 url(<URL>)
4+
4+
4+
4+
 background-repeat  repeat
 repeat-x
 repeat-y
 no-repeat
4+
4+
4+
4+ 
4+
4+
4+
4+ 
 background-attachment  scroll
 fixed
  4+
4+
 background-position  <percentage>
 <length>
 top
 center
 bottom
 left
 right
  4+
4+
4+
4+
4+
4+
4+ 
 background  <background-color>
 <background-image>
 <background-repeat>
 <background-attachment>
 <background-position>
4+
4+
4+
 
 
4+
4+
4+
4+
4+ 

4+ : 4 버전 이상 , 4P : 문제가 있음, 4M : Mac 만 가능, 4W : 윈도우즈만 가능


반응형

+ Recent posts