'분류 전체보기'에 해당되는 글 113건

  1. 2010.01.01 XE 외부페이지를 통한 세션공유
  2. 2009.12.26 firefox web developer
  3. 2009.12.14 CentOS 5.3 php compile시 Installing PDO headers: /usr/local/php/include/php/ext/pdo/ 메세지와 함께 install이 중지될때
  4. 2009.07.29 Oracle Commit와 Rollback,Transaction(커밋,롤백,트랜잭션)의 개념.
  5. 2009.07.29 CentOS(Fedora,RHEL)에서 PC스피커음(비프음) 완전히 끄기..
  6. 2009.07.29 chkconfig 리눅스에서의 데몬관리
  7. 2009.07.26 Making Linux Streaming Server RED5 스트리밍 리눅스서버 만들기
  8. 2009.07.25 티스토리 초대장 5장 발부합니다. 8
  9. 2009.07.25 CentOS 리눅스에서 완벽 동영상 재생하기
  10. 2009.07.24 오라클 테이블 작성.
  11. 2009.07.24 오라클 vi를 이용해 SQL문 작성시..
  12. 2009.07.24 오라클 계정으로 오라클 가동..
  13. 2009.07.24 오라클 DB생성과 DB유져생성
  14. 2009.07.24 오라클 system, sys 비밀번호 재설정
  15. 2009.07.24 CentOS에서 윈도우서체 쓰기..
  16. 2009.07.23 CentOS Flash plugin 10 설치하기
  17. 2009.07.16 레드헷 리눅스에서 Apache + Oracle + PostgreSQL + MySQL + PHP + Tomcat + JAVA 서버구성3 (버추얼호스팅 Virtual hosting) 1
  18. 2009.07.15 레드헷 리눅스에서 Apache + Oracle + PostgreSQL + MySQL + PHP + Tomcat + JAVA 서버구성2
  19. 2009.07.15 레드헷 리눅스에서 Apache + Oracle + PostgreSQL + MySQL + PHP + Tomcat + JAVA 서버구성1 1
  20. 2009.07.15 레드헷 계열 리눅스에서 MySQL설치
  21. 2009.07.15 레드헷계열 리눅스에서 PostgreSQL의 설치
  22. 2009.07.15 레드헷 리눅스에서의 오라클의 자동 시동
  23. 2009.07.14 레드헷 계열 리눅스에서 오라클11설치하기
  24. 2009.07.07 gmail을 이용하여 자기도메인 메일만들기. make my domain mail by Gmail service
  25. 2009.06.21 CSS 풀다운메뉴...CSS 가로형 메뉴
  26. 2009.06.18 페도라코어에서 putty 한글 사용법 2
  27. 2009.06.17 브라우져 전쟁 IE, Opera , Firefox , Safari , Chrome 그리고 W3C 3
  28. 2009.06.14 Moodle theme작성(무들 테마작성) 게시판목록 꾸미기
  29. 2009.06.13 무들의 테마작성 - Making Moodle Theme
  30. 2009.06.13 무들의 본격 설치 – Install Moodle for Linux 2
2010. 1. 1. 14:45

XE 외부페이지를 통한 세션공유


XE와 같은 통합 솔루션으로 홈페이지를 작성하는 작업을 할때, 가장 신경쓰이는 부분이 외부페이지작업인듯 하다. 물론 XE도 페이지 메뉴를 통하여 위젯을 삽입하거나 모듈을 읽어오거나 직접 작성할수 있지만 드림위버로 제작하는것보다  제약이 많이 따르기 때문이다.

특히 form이나 회원의 로그인정보가 필요한 외부페이지에 대하여는 실로 난감함 문제가 아닐수 없다.

이 문제를 해결 방법은 ...
 <?
 define('__ZBXE__', true);
 require_once('config/config.inc.php');
 $oContext = &Context::getInstance();
 $oContext->init();
   
 $logged_info = Context::get('logged_info');
 $id = $logged_info->user_id;
   
 if($logged_info)
    {
  echo("
   로그인 하셨네요.^^
   <br>$id 회원님이시네요.
  ");
 }
 else
 {
  echo("
   로그인 해주셔야죠.^^   
  ");
 }
?>

가장 중요한 부분은 노란색부분으로 표시된 부분이다. xe가 설치된 경로 바로아래 config디렉토리를 해당소스가 들어가는 php파일의 상대경로나 절대경로로 표시해주면 된다. 어려우면 /home/test/public_html/xe/config 이런식으로 절대경로로 표시하자..
그 다음으로 눈여겨 봐야할것이..

노가다를 통해서 로그인정보를 작성했다. XE안에서 함수부분으로 정의되어 있겠지만.. 소스를 찾는것보다 작성하는게 빠르다고 생각했다.

XE는 식별자(이후 xe로 표시)_member_group 테이블에 그룹 권한을 정의한다. 보통 관리자는 group_srl : 1 준회원 : 2 정회원 :3 으로 디폴트 정의되어있다..

xe_member테이블에는 회원 개개인의 member_srl을 갖는다. 위 소스에서 id로 xe_member테이블을 검색하여 해당 아이디의 member_srl을 찾고 xe_member_group_member테이블에서 해당 member_srl을 찾은값으로 group_srl을 가지고온다..

그러면 id와 그룹권한을 가지고 php코드를 자유롭게 작성할수 있다. 물론 xe_member 테이블에는 그외 모든 사용자정보가 들어있으니 언제든 검색해서 불러오면 되고 세션을 자유롭게 XE와 공유할수 있다. 

또 다른 방법으로는 $logged_info변수에는 회원정보에 들어가는 모든 데이타가 저장된다.
echo $logged_info->nick_name."; 이런식으로 변수명을 정해주면 로그인된 회원의 닉네임이 출력된다.
그와 같은 방법으로 로그인정보를 이용하여 외부페이지에 적용하면 된다.

     : -----0 [member_srl]
     : -----1 [user_id]
     : -----2 [email_address]
     : -----3 [email_id]
     : -----4 [email_host]
     : -----5 [user_name]
     : -----6 [nick_name]
     : -----7 [homepage]
     : -----8 [blog]
     : -----9 [birthday]
     : -----10 [allow_mailing]
     : -----11 [allow_message]
     : -----12 [denied]
     : -----13 [limit_date]
     : -----14 [regdate]
     : -----15 [last_login]
     : -----16 [is_admin]
     : -----17 [description]
     : -----18 [profile_image]
     : -----19 [image_name]
     : -----20 [image_mark]
     : -----21 [group_list]
     : -----22 [is_openid]



 
2009. 12. 26. 12:25

firefox web developer


웹개발자들을 위한 툴..

사이트의 CSS정보나 디비젼등의 정보를 알수있는 웹개발자들의 필수품


다운로드 : https://addons.mozilla.org/ko/firefox/search?q=web+developer&cat=all&advancedsearch=1&as=1&appid=1&lver=any&atype=0&pp=20&pid=5&sort=&lup=

에서 얻을수 있다. 파이어폭스에서 링크로 이동하여 다운을 받으면 다운즉시 설치에 들어간다.


파이어폭스 웹 디벨로퍼를 이용하여 작업하고 있다.

2009. 12. 14. 16:59

CentOS 5.3 php compile시 Installing PDO headers: /usr/local/php/include/php/ext/pdo/ 메세지와 함께 install이 중지될때


CentOS 5.3 PHP설치시 많이 발생하는 에러라고 하는군요..

Ubunto나 FC시스템에서 발생하지 않았는데.. Cent에서는 발생하는군요..

이것은 make가 끝난 상황에 make install시에 발생되는 일종의 버그같은 느낌입니다.

압축을 푼 디렉토리로 이동하여..

[root@localhost php-5.2.11]# cp php.ini-dist /usr/local/httpd/conf/php.ini

이와같이 php.ini로 카피를 해줍니다.

* php.5.3x 버젼부터는 php.ini-dist가 아닌 php.ini-development 와 php.ini-product의 형태로 파일이 제공됩니다. php.ini-product파일로 php.ini파일로 변환 카피해주시면 됩니다.

그다음
[root@localhost php-5.2.11]# vi /usr/local/httpd/conf/httpd.conf

파일을 열어서..
DirectoryIndex부분에 index.php를 추가해주시고요..

AddType Apllication/x-httpd-php .php .html

을 추가해주시면 됩니다.




2009. 7. 29. 15:51

Oracle Commit와 Rollback,Transaction(커밋,롤백,트랜잭션)의 개념.

 SQL> insert into MUSIC values('00001','Yesterday','yesterday.mp3','Beatles','M.
Jack','/rtps/data/Y/','02');
1 개의 행이 만들어졌습니다.

앞전 포스팅에서 만든 테이블에 위와 같이 데이타를 입력합니다.

select문을 이용하여 insert된 데이타를 조회합니다.
 SQL> select title from Music;

TITLE
-----------------------------------------------------------------------

Yesterday

SQL>

commit하여 완전히 DB상에 저장을 합니다.
 SQL> commit;

커밋이 완료되었습니다.

SQL>

두번째 데이타를 넣어봅시다.
 
SQL> insert into MUSIC values('00002','Say Yes','sayyes.mp3','ChangeAska','CA','
/rtps/data/S/','81');

1 개의 행이 만들어졌습니다.
SQL> select title from Music;

TITLE
-------------------------------------------------------------------------

Yesterday
Say Yes

SQL>

여기서 롤백을 실시해봅시다.
 SQL> rollback;

롤백이 완료되었습니다.

롤백후에 데이타를 조회해봅니다.
 SQL> select title from Music;

TITLE
-----------------------------------------------------------------------

Yesterday

commit는 작업된 SQL문을 완전히 오라클테이블스페이스에 적용시키는것입니다.
rollback은 마지막으로 commit된 곳으로 되돌리는 기능을 하게됩니다.

단, 테이블의 생성과 테이블의 삭제의 경우에는 적용되지 않습니다.

즉 우리말로 말하자면 승인과 취소의 역활을 하는 것이지요..인터넷에서 무언가를 입력할때 확인과 취소의 역활을 한다고 보면 됩니다. 그걸 영어로 어렵게 말하면 commit하고 rollback한다고 유식쟁이들이 말하는겁니다.

이런 방법을 트랜잭션이라고 말합니다만 단순 확인/취소보다는 약간 어려운 개념이 있습니다.
여러명이 DB를 열고 데이타를 추가하거나 삭제,변경시에는 어느 시기에 commit된 시각이 적용되느냐하는 어려움이 남게 되지요...바로 이럴때 교통정리까지 해주는 기능을 또한번 유식쟁이들은 트랜잭션이라고 하는거지요..
2009. 7. 29. 13:18

CentOS(Fedora,RHEL)에서 PC스피커음(비프음) 완전히 끄기..

조용함이 반드시 필요한 병원이나 도서관,사무실에서 비프음을 완전히 없애는 방법이다.

[root@akaslinux modprobe.d]# vi /etc/modprobe.d/blacklist

 #
# Listing a module here prevents the hotplug scripts from loading it.
# Usually that'd be so that some other driver will bind it instead,
# no matter which driver happens to get probed first.  Sometimes user
# mode tools can also control driver binding.
#
# Syntax:  driver name alone (without any spaces) on a line. Other
# lines are ignored.
#

# watchdog drivers
blacklist i8xx_tco

# framebuffer drivers
blacklist aty128fb
blacklist atyfb
blacklist radeonfb
blacklist i810fb
blacklist cirrusfb
blacklist intelfb
blacklist kyrofb
blacklist i2c-matroxfb
blacklist hgafb
blacklist nvidiafb
blacklist rivafb
blacklist savagefb
blacklist sstfb
blacklist neofb
blacklist tridentfb
blacklist tdfxfb
blacklist virgefb
blacklist vga16fb

# ISDN - see bugs 154799, 159068
blacklist hisax
blacklist hisax_fcpcipnp

#Login Beep OffMode
blacklist pcspkr


위와 같이 작성하고 리부팅하여 그놈이나 KDE로그인시 비프음이 들리나 확인하자.

2009. 7. 29. 10:51

chkconfig 리눅스에서의 데몬관리

부팅시 로딩하고 싶지 않은 데몬이 있다면...간단히 죽일수 있는 명령어이다.
물론 rpm형태로 제공된 데몬들만 다룰수있다.

KISA정책으로 인해 고정IP가 없는 유져들에게는 sendmail이 사실 유명무실해진 서비스..
예로 sendmail를 죽여보도록 하자.

[root@akaslin ~]# chkconfig sendmail off

간단히 sendmail을 부팅시 로딩안되게 만들었다.
콘솔상에서 다시 이 데몬을 임시로 쓰고 싶다면

service sendmail start

다시 sendmail 부팅시 구동시키기 위해서는
[root@akaslin ~]# chkconfig sendmail on
해주면 된다.

물론 service항목을 수정해도 같은 결과가 된다.

list옵션으로 서비스되고 있는 데몬을 확인할수 있다.

[root@akaslin ~]# chkconfig --list

[root@akaslin ~]# chkconfig rlogin off

예로 xinetd 기반의 서비스인 rlogin을 해제한다.


2009. 7. 26. 05:55

Making Linux Streaming Server RED5 스트리밍 리눅스서버 만들기

또한번의 리눅스 스트리밍서버 구성 포스팅을 쓴다.

리눅스로 데탑용으로 넘어온지 벌써 15일째..
너무 편하고 너무 좋다..ㅋ 그넘의 액티브X만 인터넷에서 안보인다면 말이야.. 다운도 끊김없이 쉽게 받아지고..윈도우즈용 서체도등록해주니 파월인지 익스플로러인지 구분이 안갈정도로 너무 편하다. 가장 좋은것은..터미널에 익숙한 나에게 마우스조작없이 키보드로왠만한 작업이 가능하니 이보다 더 편할수가...

리눅스에서 Xwindows는 그냥 폼같이 생각했었다. GUI용 프로그램은 윈도우에서 돌리고 서버용은 다 서버리눅스에 설치해 윈도우에서 원격으로 제어했으니깐...

이놈의 스트리밍 서버때문에 골치아프다.
MS의 WMS를 쓰면 구현은 무쟈게 쉬운데 라이센스 정책때문에 배보다 배꼽이 더 커버리는 현상이 생기게 된다.
그래서 그동안 포기했던 리눅스용 스트리밍서버로 다시 정책을 변환해볼까 생각하다 그동안 시도하지 못했던 RED5 스트리밍 서버에 대해 포스팅에 들어간다.

이 포스팅이 발행되면, 일단은 RED5서버가 성공한것이 된다.
성공후 운영상에 생기는 임포트와 동영상 제작에 관한 lib와 기법은 나중에 다시 카테고리를 따로 만들어 다뤄보기로 하고...

내가 구상하는 서버구성으로는 오라클서버 + 아파치톰캣서버 + 스트리밍서버 + DNS서버이다.
각설하고 RED5 Streming Server에 대해 알아보자.

서버환경
Linux 2.6.18-128.el5 #1 SMP Wed Jan 21 10:44:23 EST 2009 i686 i686 i38-(CentOS 5.3)
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 14
model name      : Genuine Intel(R) CPU           T2400  @ 1.83GHz
stepping        : 8
cpu MHz         : 1000.000
cache size      : 2048 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
apicid          : 0
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mcacmov pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nxconstant_tsc pni monitor vmx est tm2 xtpr
bogomips        : 3664.90

*나의 4년된 노트북이다.. 이참에 공개되네.. Dell INSPORION 6400.. 아직도 쓸만하단 말이야..~

맨처음으로 설치해야 할것이 apache ant이다.
apache ant는 도대체 뭐하는것인가 ? Apache ant는 프로그램을 설치할때 쓰는 make와 비슷한 개념의 프로그램이다.  make의 의존성과 셀상에서만 구동되는 한계성으로 이프로그램을 개발했다고 하는것만 알고.. 설치를 해보자.

APACHE-ANT
[root@AkasLinux download]# wget http://apache.mirror.cdnetworks.com/ant/binaries/apache-ant-1.7.1-bin.tar.bz2
[root@AkasLinux download]# tar -xvf apache-ant-1.7.1-bin.tar.bz2

apache-ant-1.7.1/lib/libraries.properties
apache-ant-1.7.1/lib/xercesImpl.jar
apache-ant-1.7.1/lib/xml-apis.jar
[root@AkasLinux download]# mv apache-ant-1.7.1 /usr/local/ant
[root@AkasLinux download]# vi ~/.bashrc
# .bashrc

# User specific aliases and functions

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi
export ANT_HOME=/usr/local/ant
export PATH=${PATH}:${ANT_HOME}/bin



JDK
JSP서버 만들기에서 설치한 그 JDK이다. 톰캣 구성을 완료한 서버에서는 따로 안해주고 건너띄어도 된다. 그러나, 이번에 만들 네트워크 구성안은 웹서버와 스트리밍 서버의 분리이다. 스트리밍 서버는 부하가 많이 걸리기 때문에, 별도회선으로 서비한다는 개념이다. JSP와 APACHE-TOMCAT서버는 별도로 두기 때문에, JDK를 설치한다. 포스팅은 간단히..

다운로드: 
http://www.snowrice.com/freepds/1103
http://java.sun.com/javase/downloads/

jdk-6u14-linux-i586-rpm.bin
jdk는 jdk와 jre로 구성되어있다. jdk는 한마디로 개발툴이고 jre는 자바용 프로그램들을 시스템에서 구현해주는 툴이라고 보면 된다. jdk설치로 두 가지다 설치된다.

[[root@AkasLinux download]# chmod +x jdk-6u14-linux-i586-rpm.bin
[root@AkasLinux download]#./jdk-6u14-linux-i586-rpm.bin
2. LICENSE TO USE. Subject to the terms and conditions of
this Agreement, including, but not limited to the Java

Do you agree to the above license terms? [yes or no]
yes
엔터계속
물음에 모두 yes로 답한다
Unpacking...
Checksumming...
Extracting...
UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (
Zip-Bugs@lists.wku.edu).
  inflating: jdk-6u14-linux-i586.rpm
  inflating: sun-javadb-common-10.4.2-1.1.i386.rpm
  inflating: sun-javadb-core-10.4.2-1.1.i386.rpm
  inflating: sun-javadb-client-10.4.2-1.1.i386.rpm
  inflating: sun-javadb-demo-10.4.2-1.1.i386.rpm
  inflating: sun-javadb-docs-10.4.2-1.1.i386.rpm
  inflating: sun-javadb-javadoc-10.4.2-1.1.i386.rpm
준비 중...               ########################################### [100%]
   1:jdk                    ########################################### [100%]
Unpacking JAR files...
        rt.jar...
        jsse.jar...
        charsets.jar...
        tools.jar...
        localedata.jar...
        plugin.jar...
        javaws.jar...
        deploy.jar...
Installing JavaDB
준비 중...               ########################################### [100%]
   1:sun-javadb-common      ########################################### [ 17%]
   2:sun-javadb-core        ########################################### [ 33%]
   3:sun-javadb-client      ########################################### [ 50%]
   4:sun-javadb-demo        ########################################### [ 67%]
   5:sun-javadb-docs        ########################################### [ 83%]
   6:sun-javadb-javadoc     ########################################### [100%]

Java(TM) SE Development Kit 6 successfully installed.

Product Registration is FREE and includes many benefits:
* Notification of new versions, patches, and updates
* Special offers on Sun products, services and training
* Access to early releases and documentation

Product and system data will be collected. If your configuration
supports a browser, the Sun Product Registration form for
the JDK will be presented. If you do not register, none of
this information will be saved. You may also register your
JDK later by opening the register.html file (located in
the JDK installation directory) in a browser.

For more information on what data Registration collects and
how it is managed and used, see:
http://java.sun.com/javase/registration/JDKRegistrationPrivacy.html

Press Enter to continue.....


Done.


이것으로 Java의 설치는 끝이다.
확인을 위해서 아래의 사항을 점검한다.
[root@localhost Desktop]# rpm -qa | grep jdk
java-1.6.0-openjdk-1.6.0.0-0.25.b09.el5
jdk-1.6.0_14-fcs
[root@AkasLinux download]# java
Usage: java [-options] class [args...]
           (to execute a class)
   or  java [-options] -jar jarfile [args...]
           (to execute a jar file)
where options include:
    -d32          use a 32-bit data model if available
    -d64          use a 64-bit data model if available
    -client       to select the "client" VM
    -server       to select the "server" VM
    -hotspot      is a synonym for the "client" VM  [deprecated]
                  The default VM is client.

    -cp <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
                  A : separated list of directories, JAR archives,
                  and ZIP archives to search for class files.
    -D<name>=<value>
                  set a system property
    -verbose[:class|gc|jni]
                  enable verbose output
    -version      print product version and exit
    -version:<value>
                  require the specified version to run
    -showversion  print product version and continue
    -jre-restrict-search | -jre-no-restrict-search
                  include/exclude user private JREs in the version search
    -? -help      print this help message
    -X            print help on non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
                  enable assertions with specified granularity
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
                  disable assertions with specified granularity
    -esa | -enablesystemassertions
                  enable system assertions
    -dsa | -disablesystemassertions
                  disable system assertions
    -agentlib:<libname>[=<options>]
                  load native agent library <libname>, e.g. -agentlib:hprof
                  see also, -agentlib:jdwp=help and -agentlib:hprof=help
    -agentpath:<pathname>[=<options>]
                  load native agent library by full pathname
    -javaagent:<jarpath>[=<options>]
                  load Java programming language agent, see java.lang.instrument
    -splash:<imagepath>
                  show splash screen with specified image
See
http://java.sun.com/javase/reference for more details.



jdk의 설치는 무난히 끝났다. 모두 그렇지만 윈도우 프로그램처럼 setup.exe만 실행시킨후 모든게 끝나면 얼마나 좋겠냐만은, 작은 설정이 필요하다.
 [root@AkasLinux download]# ls /usr/java
default  jdk1.6.0_14  latest
[root@AkasLinux download]# mv  /usr/java/ /usr/java_temp
[root@AkasLinux download]# mv  /usr/java/jdk1.6.0_14 /usr/java
[root@AkasLinux download]# cp  /usr/java/java_temp/* /usr/java/
[root@AkasLinux download]# vi ~/.bashrc
# .bashrc

# User specific aliases and functions

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi
export ANT_HOME=/usr/local/ant
export PATH=${PATH}:${ANT_HOME}/bin
export JAVA_HOME=/usr/java
export JAVA_VERSION=1.5
export PATH=${PATH}:${ANT_HOME}/bin:${JAVA_HOME}/bin

[root@localhost Desktop]# source ~/.bashrc (bashrc재적용)


RED5

RED5의 설치를 시작해보자.

[root@AkasLinux download]# wget http://dl.fancycode.com/red5/red5-0.6.2.tar.gz
--05:15:32--  http://dl.fancycode.com/red5/red5-0.6.2.tar.gz
Resolving dl.fancycode.com... 213.133.108.69
Connecting to dl.fancycode.com|213.133.108.69|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 61551443 (59M) [application/x-gzip]
Saving to: `red5-0.6.2.tar.gz'

100%[=============================>] 61,551,443   462K/s   in 4m 55s

05:20:31 (204 KB/s) - `red5-0.6.2.tar.gz' saved [61551443/61551443]
[root@AkasLinux download]# tar xvf red5-0.6.2.tar.gz
./red5-0.6.2/red5.bat
./red5-0.6.2/red5.sh
./red5-0.6.2/red5-shutdown.bat
./red5-0.6.2/Makefile
[root@AkasLinux download]# cd red5-0.6.2
[root@AkasLinux red5-0.6.2]# make
mentation.  It can only be used in the following types of documentation: method, inline text.
  [javadoc] /root/red5-0.6.2/src/org/red5/server/so/SharedObjectEvent.java:42: warning - Tag @inheritDoc cannot be used in constructor documentation.  It can only be used in the following types of documentation: method, inline text.

javadoc_compatibility:

dist:
     [copy] Copying 1205 files to /root/red5-0.6.2/dist/doc
     [copy] Copying 77 files to /root/red5-0.6.2/dist/lib
     [copy] Copying 32 files to /root/red5-0.6.2/dist/conf
     [copy] Copying 97 files to /root/red5-0.6.2/dist/webapps
     [copy] Copying 4 files to /root/red5-0.6.2/dist

BUILD SUCCESSFUL
Total time: 51 seconds

Total time: 42 seconds
[root@AkasLinux red5-0.6.2]# make install
mkdir -p /usr/lib/red5
install dist/red5.jar /usr/lib/red5
install -m 755 dist/red5.sh /usr/lib/red5
cp -r dist/conf /usr/lib/red5
cp -r dist/lib /usr/lib/red5
cp -r dist/webapps /usr/lib/red5


RED5의 실행
 [root@AkasLinux red5-0.6.2]#  /usr/lib/red5/red5.sh &

웹브라이져에서 http://ip:5080/으로 접속해서 아래와 같은 메세지가 생기면 성공


<성공적인 설치가 끝난다고 보고하는 페이지>

이제 세부적인 설정에 들어가는듯 하다. 설정 포스팅은 다음번에 올리기로 하고...

# 기존 서버(Tomcat,Oracle)에서 설치하였을때는 자바에러가 뜬다. 참조하시기를..
2009. 7. 25. 20:45

티스토리 초대장 5장 발부합니다.

티스토리 초대장 5장 발부합니다.
많지는 않지만 내 블로그에 오셔서 신청하시는 분만 발부해드립니다.
수고들 하세요..
2009. 7. 25. 20:26

CentOS 리눅스에서 완벽 동영상 재생하기

설치환경 : CentOS 5.3

무료할때 영화 한편 때리는것도 좋은 일이다. 영화를 보기위해 리눅스로 작업하다가 다시 윈도우로 로그인하기 구찮은 데탑용 리눅스머신에서는 토템이나 Mplayer로서 보면 된다. 하지만, 짜증나는 코덱설치가 윈도우즈의 곰플레이어나 통합코덱처럼 제공되질 않는다.

그럼 우선 해야할일은..YUM을 통해 여러가지 파일들만 시스템에 설치해주면 된다.

[root@AkasLinux Desktop]# yum -y install yum-priorities
Installed: yum-priorities.noarch 0:1.1.16-13.el5.centos
Complete!
[root@AkasLinux Desktop]#rpm -Uvh http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm(을)를 복구합니다
경고: /var/tmp/rpm-xfer.I0IdFc: Header V3 DSA signature: NOKEY, key ID 6b8d79e6
준비 중...               ########################################### [100%]
   1:rpmforge-release       ########################################### [100%]
[root@AkasLinux Desktop]# yum -y install gstreamer gstreamer-tools gstreamer-plugins-base  gstreamer-plugins-good

Updated: gstreamer-plugins-base.i386 0:0.10.20-3.0.1.el5_3 gstreamer-plugins-good.i386 0:0.10.9-1.el5_3.2
Complete!
[root@AkasLinux Desktop]#yum -y install gstreamer-plugins-bad gstreamer-plugins-ugly
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
 * rpmforge: ftp-stud.fht-esslingen.de
 
Installed: gstreamer-plugins-bad.i386 0:0.10.8-3.el5.rf gstreamer-plugins-ugly.i386 0:0.10.9-1.el5.rf
Dependency Installed: SDL_gfx.i386 0:2.0.19-1.el5.rf a52dec.i3860:0.7.4-8.el5.rf amrnb.i386 0:7.0.0.2-1.el5.rf amrwb.i3860:7.0.0.3-1.el5.rf compat-libstdc++-296.i386 0:2.96-138 cppunit.i3860:1.12.0-3.el5.rf dirac.i386 0:1.0.2-1.el5.rf directfb.i3860:1.2.4-1.el5.rf divx4linux.i386 0:5.0.5-0.el5.rf faac.i3860:1.26-1.el5.rf faad2.i386 0:2.6.1-1.el5.rf ffmpeg.i386 0:0.5-2.el5.rfffmpeg-libpostproc.i386 0:0.5-2.el5.rf gsm.i386 0:1.0.13-1.el5.rfimlib2.i386 0:1.4.0-1.el5.rf lame.i386 0:3.98.2-1.el5.rflibcdaudio.i386 0:0.99.12p2-12.el5.rf libcdio.i386 0:0.77-1.el5.rflibdca.i386 0:0.0.5-1.el5.rf libdvdcss.i386 0:1.2.10-1.el5.rflibdvdread.i386 0:0.9.7-1.el5.rf libid3tag.i386 0:0.15.1b-3.el5.rflibmad.i386 0:0.15.1b-4.el5.rf libmms.i386 0:0.3-1.el5.rflibmpcdec.i386 0:1.2.6-1.el5.rf libquicktime.i386 0:1.1.3-1.el5.rflibsidplay.i386 0:1.36.59-1.2.el5.rf libsndfile.i386 0:1.0.17-1.el5.rfmjpegtools.i386 0:1.9.0-0.6.rc2.el5.rf mpeg2dec.i386 0:0.4.1-2.el5.rfsoundtouch.i386 0:1.3.1-1.el5.rf tslib.i386 0:1.0-1.el5.rf x264.i3860:0.0.0-0.4.20090708.el5.rf xvidcore.i386 0:1.2.2-1.el5.rf
Complete!
[root@AkasLinux Desktop]# yum -y install mplayer
Installed: mplayer.i386 0:1.0-0.40.svn20090711.el5.rf
Dependency Installed: aalib.i386 0:1.4.0-5.el5.rf arts.i386 8:1.5.4-1enca.i386 0:1.9-4.el5.rf freeglut.i386 0:2.4.0-7.1.el5 fribidi.i3860:0.10.7-5.1 libXvMC.i386 0:1.0.2-2.1 libcaca.i3860:0.99-0.1.beta11.el5.rf lirc.i386 0:0.6.6-4.el5.rf lzo2.i3860:2.02-3.el5.rf mplayer-fonts.noarch 0:1.1-3.0.rf openal.i3860:0.0.8-2.el5.rf svgalib.i386 0:1.9.25-1.el5.rf
Complete!

해당동영상을 MPLAYER로 열면, 우측 하단에 리모콘이 열리는데, 리모콘 아무데나 오른쪽 마우스 버튼을 클릭하면, Preference메뉴를 클릭하고 아래와 같이 편집한다.

폰트를 아래 포스팅을 참조하여, 한글 폰트로 설정하고 인코딩을 유니코드로 설정후


자막부분 설정에서 인코딩을 한국 문자셋 (Korean charset)로 설정하면 된다.


설정후에는 재생중인 동영상이 멈추며, 다시 기동하였을때 자막과 영상이 제대로 보이기 시작한다..
아쉽게도 토템에서 자막이 있는 동영상은 자막을 인식하지 못한다는 메세지를 보인다..
Mplayer로 즐거운 시간을..
즐거운 리눅스 시간을..~


2009. 7. 24. 18:40

오라클 테이블 작성.


oracle_bas테이블스페이스를 만들고 bestakas의 디폴트 테이블스페이스를 oracle_bas로 전 포스팅에 주었다.
그럼 이제..~ 테이블을 만들어보자..

CD관련 테이블을 간단히 만들어본다.. sqlplus에서 해당아이디로 접속후,..!를 치고 셀상으로 빠져나와 vi 파일명.sql을 작성한다..

 /************************************************************
테이블명 : music
내용 : 음원기록
************************************************************/

create table MUSIC (
                       EMPNO varchar2(05) NOT NULL,
                       TITLE varchar2(100) NOT NULL,
                       FILENAME varchar2(100),
                       SINGER varchar2(12),
                       COPYRIGHT varchar2(12),
                       directory varchar2(100),
                       NATION varchar2(2),
                    CONSTRAINT PK_MUSIC PRIMARY KEY(EMPNO)  );

다시 exit하여 sqlplus로 들어가서..
 [oracle@AkasLinux ~]$ exit
exit

SQL> @misc.sql

Table created.

SQL> select * from tabs;

TABLE_NAME                     TABLESPACE_NAME
------------------------------ ------------------------------
CLUSTER_NAME                   IOT_NAME                       STATUS
------------------------------ ------------------------------ --------
  PCT_FREE   PCT_USED  INI_TRANS  MAX_TRANS INITIAL_EXTENT NEXT_EXTENT
---------- ---------- ---------- ---------- -------------- -----------
MIN_EXTENTS MAX_EXTENTS PCT_INCREASE  FREELISTS FREELIST_GROUPS LOG B   NUM_ROWS
----------- ----------- ------------ ---------- --------------- --- - ----------
    BLOCKS EMPTY_BLOCKS  AVG_SPACE  CHAIN_CNT AVG_ROW_LEN
---------- ------------ ---------- ---------- -----------
AVG_SPACE_FREELIST_BLOCKS NUM_FREELIST_BLOCKS
------------------------- -------------------
DEGREE
----------------------------------------
INSTANCES                                CACHE                TABLE_LO
---------------------------------------- -------------------- --------
SAMPLE_SIZE LAST_ANAL PAR IOT_TYPE     T S NES BUFFER_ ROW_MOVE GLO USE
----------- --------- --- ------------ - - --- ------- -------- --- ---
DURATION        SKIP_COR MON CLUSTER_OWNER                  DEPENDEN COMPRESS
--------------- -------- --- ------------------------------ -------- --------
COMPRESS_FOR       DRO REA
------------------ --- ---
MUSIC                          ORACLE_BAS

TABLE_NAME                     TABLESPACE_NAME
------------------------------ ------------------------------
CLUSTER_NAME                   IOT_NAME                       STATUS
------------------------------ ------------------------------ --------
  PCT_FREE   PCT_USED  INI_TRANS  MAX_TRANS INITIAL_EXTENT NEXT_EXTENT


테이블을 좀 보니..주저리 주저리 뭔말들이 나온다..

오라클 SQL Developer로 확인하여 보자..
정상적으로 테이블이 생성됨을 알수있다.

의도한대로 원하는 테이블스페이스에 테이블이 생성되었다.. ㅋ..

Oracle SQL Developer는
 /home/oracle/oracle11/product/11.1.0/db_1/sqldeveloper에 위치한다.
다음 포스팅은 JDBC를 구성하고..
php와 jsp를 통해서 오라클 쿼리를 이용하여 웹상에서 직접 데이타를 넣어보자...
오늘은 배고프므로.. 여기서 고만... 밥줄인 서버맹글기 일하러 갑니다.

2009. 7. 24. 17:35

오라클 vi를 이용해 SQL문 작성시..

간단하다..아주..
외부에서 vi나 gedit로 SQL문을 작성해서

SQL> @파일명

해주면 끝...

지금보는 Oracle교재가 순전히 정통 SQL문으로만 서술하네...ㅋ
 

2009. 7. 24. 17:24

오라클 계정으로 오라클 가동..


오라클을 부팅시 자동시동하니..
리눅스 머신이 너무 무거워지는듯 하다.
그래서 데탑용 리눅스 머신에서 자동시동기능을 없애고...
오라클 계정으로만 오라클을 만질때 써야긋다.

 /home/oracle/oracle11/product/11.1.0/db_1/bin/emctl start dbconsole
/home/oracle/oracle11/product/11.1.0/db_1/bin/lsnrctl start
/home/oracle/oracle11/product/11.1.0/db_1/bin/sqlplus "/as sysdba"
SQL*Plus: Release 11.1.0.6.0 - Production on Thu Jul 23 17:04:01 2009

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area  849530880 bytes
Fixed Size                  1303216 bytes
Variable Size             461376848 bytes
Database Buffers          381681664 bytes
Redo Buffers                5169152 bytes
Database mounted.
Database opened.
SQL>




2009. 7. 24. 15:32

오라클 DB생성과 DB유져생성

[oracle@AkasLinux emd]$ sqlplus

SQL*Plus: Release 11.1.0.6.0 - Production on Thu Jul 23 15:20:00 2009

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

Enter user-name: system
Enter password:

Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> create tablespace oracle_bas datafile '/home/oracle/oracle11/oradata/orcl/bas.dbf' size 10M;

Tablespace created.

SQL> create user bestakas identified by password default tablespace oracle_bas;

User created.

SQL> grant connect, resource to bestakas;

Grant succeeded.

SQL> connect bestakas/password
Connected.
SQL>

Let's Go Oracle
2009. 7. 24. 14:43

오라클 system, sys 비밀번호 재설정

 [oracle@AkasLinux bin]$ sqlplus "/ as sysdba"

SQL*Plus: Release 11.1.0.6.0 - Production on Thu Jul 23 14:32:51 2009

Copyright (c) 1982, 2007, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> show user
USER is "SYS"
SQL> alter user sys identified by password;

User altered.

SQL> alter user system identified by password;

User altered.


SQL> quit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@AkasLinux bin]$ sqlplus

SQL*Plus: Release 11.1.0.6.0 - Production on Thu Jul 23 14:34:33 2009

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

Enter user-name: system
Enter password:

Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>

확인 끝   
2009. 7. 24. 11:19

CentOS에서 윈도우서체 쓰기..


적용환경 : centos 5.3

어느덧 윈도우즈 로그인을 제대로 안하게된다.

리눅스에 드림위버와 포토샵이 있다면 얼마나 좋을까...익스플로러같은건 전혀 쓸모없으니깐..

그러나 윈도우즈에서 가장 부러운건 역시 수많은 폰트이다..그리고 한국의 웹사이트들이 윈도우즈 굴림체에 맞게 이쁘게 출력되므로..

역시 인터넷글꼴은 윈도우 글꼴이 좋다.

윈도우즈에서 글꼴을 받아다가.. /usr/share/fonts/msfont라는 곳에 저장후..아래와 같이 실행시켜주면 된다.

# cd /usr/share/fonts/msfont
# mkfontscale
# ttmkfdir
# mkfontdir

그후~ 파이어폭스에서 대표글꼴을 굴림체로 해주면 끝..

그러나 굴림체를 시스템에 적용할경우에는 Gnome에서 에러가 폭주되니..주의할것..! 그럴경우 영문모드로 들어와서 글꼴을 변경해주어야 한다...

글꼴을 설치하고 나니 한영키가 먹히네...오~! 굳굳

하지만 인터넷이 느린감이 있다.. 이걸 해결해야지.. 그리고...그림추가등의 문제가 생긴다..

2009. 7. 23. 16:17

CentOS Flash plugin 10 설치하기

1. 일단은 adobe사이트에서 yum을 통해 인스톨한후..
2. yum과 rpm을 해도 정상적으로 출력되지 않으니깐..adobe사이트에서 install_flash_player_10_linux를 다운받아 압축을 푼후 /usr/lib/mozilla/plugins 디렉토리에 libflashplayer.so를 카피하면 끝난다.

다운로드는 파이어폭스 접속시 플래쉬플러그인을 만나면 adobe사이트로 접속되기 때문에, 별도 링크를 하지 않는다.. 끝..
(Flash Site - Olympus Japan : Browser Firefox In CentOS )


2009. 7. 16. 06:08

레드헷 리눅스에서 Apache + Oracle + PostgreSQL + MySQL + PHP + Tomcat + JAVA 서버구성3 (버추얼호스팅 Virtual hosting)


어느덧 아침이 밝아온다. jsp용 웹호스팅세팅만 끝나면 그동안 실현하고자 했던 웹서버 구현이 완성이 된다. 사용자 환경에 quata와 ftp,ssh만 적용하고 안정적인 회선과 IP만 공급되면 웹서버로서의 충분한 실현가치를 할수 있을것이라고 본다.

우선 테스트환경으로 별도의 DNS서버를 만들지 않고 사용자계정을 이용한 jsp서버를 완성한다.
http://ip/~account 식의 도메인이 붙을것이다.


테스트용 DNS서버를 만들어서 아파치의 버추얼호스트 기능과 함께 완벽하게 개별 도메인하에서 jsp가 작동하는지 알아보자.

1. user의 생성과 아파치설정 변경
/etc/skel디렉토리에 유져 등록시 자동 생성되는 파일이나 디렉토리를 정의후, 유져를 등록하면 편하다. jsp스크립트를 확인하기 위하여 skel디렉토리에 jsp코드로 된 파일을 생성하고 테스트용 유져를 등록했다.
테스트용이므로 test계정에는 php,html코드로 된 파일들도 생성한다.

[root@localhost ~]# cd /etc/skel
[root@localhost skel]# ls
public_html
[root@localhost skel]# vi public_html/index.jsp
<HTML>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>AKAS'S BLOG</title>
</head>

 <BODY>
  <h1><h1><% out.print("akasアカウントです"); %></h1><br /></h1>
  <h1>
http://bestakas.tistory.com <br /></h1>
  <h1>
http://snowrice.com<br /></h1>

 </BODY>
</HTML>

[root@localhost skel]# useradd test
[root@localhost skel]# passwd test
Changing password for user test.
New UNIX password:
BAD PASSWORD: it is too short
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@localhost skel]# useradd akas
[root@localhost skel]# passwd akas
Changing password for user akas.
New UNIX password:
BAD PASSWORD: it is too short
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@localhost skel]# chmod -R 755 /home/test
[root@localhost skel]# chmod -R 755 /home/akas
[root@localhost skel]# ls /home/akas
public_html
[root@localhost skel]# cd /home/test/public_html/
[root@localhost public_html]# cp index.jsp index.html
[root@localhost public_html]# vi index.php
<?='this is test'?>
아파치에서 사용자계정을 사용해서 사용자 디렉토리에 접근할수 있도록 설정해보자.
[root@test home]# vi /usr/local/httpd/conf/httpd.conf
# User home directories
Include conf/extra/httpd-userdir.conf
#Include문앞에 주석을 제거한다.
[root@test home]# /usr/local/httpd/bin/httpd -k restart


우선, http://ip/~test/index.php를 실행시켜본다.


php사용을 위해서 httpd.conf에서
 #JkMount /* loadbalancer
처럼 #주석을 주고 아파치를 재가동하면  정상출력된다. 즉 php스크립트가 먹힌다는 이야기다.
그럼 이제, index.html를 가동하여 보자.

위에 만들어놓은 jsp용 스크립트를 실행시켜보자.
index.jsp index.html을 public_html디렉토리에 이와같이 만든다.
 <HTML>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>AKAS'S BLOG</title>
</head>

 <BODY>
  <h1><h1><% out.print("akasアカウントです"); %></h1><br /></h1>
  <h1>
http://bestakas.tistory.com <br /></h1>
  <h1>
http://snowrice.com<br /></h1>

 </BODY>
</HTML>


http://ip/~test/http://ip/~test/index.jsp로 접속하여 보자.


하지만 html의 경우 jkmount를 시켰기 때문에 읽을수 없다. 그럼~! 계정용 디렉토리의 index.jspl가 정상출력되면 jsp연동이 잘되었다는 이야기이다. 이제 출력되게끔 설정에 들어가자.

test 계정에서
[test@localhost public_html]$ mkdir /home/test/public_html/WEB-INF
[test@localhost public_html]$ exit
exit
[root@localhost ~]# vi /usr/local/tomcat/conf/server.xml
<Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">

      <Context path="/~test" docBase="/home/test/public_html" debug="0" reloadable="true" />

        <!-- SingleSignOn valve, share authentication between web applications
             Documentation at: /docs/config/valve.html -->
        <!--
        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
        -->

        <!-- Access log processes all example.
             Documentation at: /docs/config/valve.html -->
        <!--
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
        -->

      </Host>
    </Engine>
  </Service>
</Server>
[root@localhost conf]# /usr/local/httpd/bin/httpd -k restart
[root@localhost conf]# /usr/local/tomcat/bin/catalina.sh stop
Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:       /usr/local/jdk
[root@localhost conf]# /usr/local/tomcat/bin/catalina.sh start
Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:       /usr/local/jdk



위와 같이 public_html아래에 WEB-INF를 만들고 루트로 돌아와 /usr/local/tomcat/conf/server.xml에 <Context path="/~test" docBase="/home/test/public_html" debug="0" reloadable="true" />식으로 </host>위에 입력하고 저장하고 톰캣을 다시 시동한다.

로칼에서 http://ip/~testhttp://ip/~test.jsp 입력하여 보자.
 jsp파일이 정상 출력되는것을 알수있다. 하지만 html은 <% %>코드는 먹히질 않는다.

 

jsp가 잘 적용되었음을 알수있다. 
이제 도메인을 주고 사용자 계정에 도메인을 붙여 jsp가 잘 구동되는지 알아봐야 한다.

테스터 서버에 도메인을 붙이기 위해, 가상의 DNS를 만들어보자.(네임서버 포스팅이 아니기 때문에 대략적으로..이놈의 네임서버 오랜만에 구성해보네^^)
[root@localhost named]#yum install caching-nameserver
[root@localhost named]#yum install bind

[root@localhost named]# vi /etc/named.caching-nameserver.conf
//
// named.caching-nameserver.conf
//
// Provided by Red Hat caching-nameserver package to configure the
// ISC BIND named(8) DNS server as a caching only nameserver
// (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
// DO NOT EDIT THIS FILE - use system-config-bind or an editor
// to create named.conf - edits to this file will be lost on
// caching-nameserver package upgrade.
//
options {
        listen-on port 53 { any; };
        listen-on-v6 port 53 { ::1; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";

        // Those options should be used carefully because they disable port
        // randomization
         query-source    port 53;
        // query-source-v6 port 53;

        //allow-query     { localhost; };
};
logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};
view localhost_resolver {
        match-clients      { any; };
        match-destinations { any; };
        recursion yes;
        include "/etc/named.rfc1912.zones";
};

[root@localhost named]# vi /etc/named.rfc1912.zones
// named.rfc1912.zones:
//
// Provided by Red Hat caching-nameserver package
//
// ISC BIND named zone configuration for zones recommended by
// RFC 1912 section 4.1 : localhost TLDs and address zones
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
zone "." IN {
        type hint;
        file "named.ca";
};

zone "localdomain" IN {
        type master;
        file "localdomain.zone";
        allow-update { none; };
};

zone "localhost" IN {
        type master;
        file "localhost.zone";
        allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
        type master;
        file "named.local";
        allow-update { none; };
};

zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
        type master;
        file "named.ip6.local";
        allow-update { none; };
};

zone "255.in-addr.arpa" IN {
        type master;
        file "named.broadcast";
        allow-update { none; };
};

zone "0.in-addr.arpa" IN {
        type master;
        file "named.zero";
        allow-update { none; };
};

zone "test.com" IN {
        type master;
        file "test.com.zone";
        allow-update { none; };
};

[root@localhost named]# vi /var/named/test.com.zone
$TTL    86400
@               IN SOA  ns.test.com. root.test.com (
                                        42              ; serial (d. adams)
                                        3H              ; refresh
                                        15M             ; retry
                                        1W              ; expiry
                                        1D )            ; minimum
                IN NS           ns.test.com.
                IN MX 10        mail.test.com.
                IN A            192.168.100.132
ns             IN A            192.168.100.132
www         IN A            192.168.100.132
akas         IN A            192.168.100.132
ftp             IN CNAME        @
*               IN CNAME        @
mail           IN CNAME        www

[root@localhost etc]# service named restart
named を停止中:                                            [  OK  ]
named を起動中:                                            [  OK  ]
[root@localhost etc]#
[root@localhost named]# system-config-securitylevel-tui
53:tcp , 53:udp 방화벽 해제


테스트서버이므로 방화벽을 아예 꺼버리는것이 신경안쓰고 좋다.


윈도우에서 위와 같이 지금의 테스트 서버로 DNS서버를 맞춘다.


 일본윈도우(테스트 클라이언트- 인코딩테스터기)에서 DNS변경후 제대로 출력됨을 알수있다. 이제 가상 내부 DNS를 가지고 www.test.com과  akas.test.com이라는 두 도메인을 만들어서 톰캣 가상호스팅을 해보자


윈도우에서 DNS서버를 테스터서버 IP로 주고 인터넷에 연결해 www.test.com에 접속해본다. 외부에서 DNS서버로 이용하고 싶으면 포트포워딩을 하거나 직접 공인ip에 DNS서버를 물리면 바로 DNS서버로 이용가능하다.
www.test.com이 제대로 DNS서버에서 인식하였는지 확인하여 본다.

DNS서버가 정상적으로 운영되고 있음을 알수있다.


DNS서버 zone파일에서 www와 akas를 지정해서 www.test.com으로 접속하면 test계정의 웹디렉토리로 접속하고 akas.test.com으로 접속하면 akas계정으로 접속을 시도한다.

이것을 위해서 test계정의 index 세파일을 akas계정으로 카피한다.

[root@test public_html]# cp /home/test/public_html/* /home/akas/public_html/
cp: omitting directory `/home/test/public_html/WEB-INF'
cp: `/home/akas/public_html/index.jsp' を上書きしてもよろしいですか(yes/no)? yes
[root@test public_html]# ls /home/akas/public_html/
index.html  index.jsp  index.php

세파일을 아래와 같이 변형한다.
[root@test public_html]# vi index.html
<HTML>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>AKAS'S BLOG</title>
</head>

 <BODY>
  <h1><h1><% out.print("akasアカウントです"); %><br /></h1>
  <h1>
http://bestakas.tistory.com <br /></h1>
  <h1>
http://snowrice.com<br /></h1>

 </BODY>
</HTML>


[root@test public_html]# vi index.jsp
<HTML>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>AKAS'S BLOG</title>
</head>

 <BODY>
  <h1><h1><% out.print("akasアカウントです"); %><br /></h1>
  <h1>
http://bestakas.tistory.com <br /></h1>
  <h1>
http://snowrice.com<br /></h1>

 </BODY>
</HTML>


[root@test public_html]# vi index.php
<?='this is AKAS'?>


이제 위의 httpd.conf를 수정하여 www.test.com과 akas.test.com을 버추얼 호스팅 하여보자.
vi /usr/local/httpd/conf/httpd.conf 의 #Include conf/extra/httpd-vhosts.conf주석을 제거한다.

[root@test named]# vi /usr/local/httpd/conf/httpd.conf
# Virtual hosts
Include conf/extra/httpd-vhosts.conf

아래와 같이 일반 아파치 버추얼 호스팅처럼 httpd-vhosts.conf 수정한다.
[root@test named]# vi /usr/local/httpd/conf/extra/httpd-vhosts.conf
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80
#
www.test.com
<VirtualHost *:80>
    DocumentRoot /home/test/public_html
    ErrorLog logs/www.test.com_error_log
    CustomLog logs/www.test.com_access_log common
    ServerName
www.test.com
    ServerAlias www.test.com
</VirtualHost>
<Directory /home/test/public_html/>
    AllowOverride All
</Directory>

#akas.test.com
<VirtualHost *:80>
    DocumentRoot /home/akas/public_html
    ErrorLog logs/akas.test.com_error_log
    CustomLog logs/akas.test.com_access_log common
    ServerName akas.test.com
    ServerAlias akas.test.com
</VirtualHost>
<Directory /home/akas/public_html/>
    AllowOverride All
</Directory>

[root@test named]# /usr/local/httpd/bin/httpd -k restart


웹서버 다시 가동

www.test.comindex.php index.jsp index.html이 모두 출력되나 php코드는 적용되고 jsp코드는 적용이 안됨을 알수있다. akas.test.com의 파일들을 열어보자. php의 출력모습이 틀리는것을 확인하니, 버추얼 호스트가 잘 적용되었다. 



이제부터 jsp도 적용할수 있게 jsp버추얼호스팅을 하자.
httpd-vhosts.conf의 내용을 수정해야 한다. 우선 위에서 입력한 버추얼호스팅 변경부분을 지우고 아래의 내용으로 변경한다. (물론 파일안에 예시 구문들은 모두 #처리하거나 지워주어애 한다.)

[root@test named]# vi /usr/local/httpd/conf/extra/httpd-vhosts.conf
#
www.test.com
<VirtualHost *:80>
 ServerAdmin        
webmaster@test.com
 DocumentRoot        /home/test/public_html
 ServerName         
www.test.com
 ServerAlias         www.test.com
 DirectoryIndex      index.jsp index.html
 ErrorLog            logs/www.test.com-error.log
 CustomLog           logs/www.test.com-access.log common
          JkMount /*.jsp loadbalancer
          JkMount /*.do loadbalancer
          JkMount /*.html loadbalancer
          JkMount /servlet/* loadbalancer
          #JkMount /* loadbalancer
          JkMount /*.gif loadbalancer

</VirtualHost>
<Directory /home/test/public_html/>
    AllowOverride All
</Directory>

#akas.test.com
<VirtualHost *:80>
 ServerAdmin        
webmaster@akas.com
 DocumentRoot        /home/akas/public_html
 ServerName          akas.test.com
 ServerAlias         akas.test.com
 DirectoryIndex      index.jsp index.html
 ErrorLog            logs/akas.test.com-error.log
 CustomLog           logs/akas.test.com-access.log common
          JkMount /*.jsp loadbalancer
          JkMount /*.do loadbalancer
          JkMount /*.html loadbalancer
          JkMount /servlet/* loadbalancer
          #JkMount /* loadbalancer
          JkMount /*.gif loadbalancer

</VirtualHost>
<Directory /home/akas/public_html/>
    AllowOverride All
</Directory>


아주 간단하다. httpd/htdocs의 연동처럼 JkMount만 버추얼호스트 부분에서 첨가해주면 된다.
다음으로  /usr/local/tomcat/conf/server.xml을 수정한다. </host>로 끝나는 태그 아래에 추가한다.

 [root@test public_html]# vi /usr/local/tomcat/conf/server.xml

      <Host name="
www.test.com"  appBase="home/test/public_html"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">

      </Host>
      <Host name="akas.test.com"  appBase="home/akas/public_html"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">
      </Host>


사이트 이름의 디렉토리를 /usr/local/tomcat/conf/Catalina에서 만든다.
[root@test conf]# mkdir /usr/local/tomcat/conf/Catalina/www.test.com
[root@test conf]# mkdir /usr/local/tomcat/conf/Catalina/akas.test.com
[root@test conf]# vi /usr/local/tomcat/conf/Catalina/www.test.com/ROOT.xml
<Context path="" reloadable="true" debug="1" docBase="/home/test/public_html" />
[root@test conf]# vi /usr/local/tomcat/conf/Catalina/akas.test.com/ROOT.xml
<Context path="" reloadable="true" debug="1" docBase="/home/akas/public_html" />

jsp가 적용될 계정의 public_html의 아래에 WEB-INF 디렉토리를  만들고 /usr/local/tomcat/webapps/WEB-INF의 web.xml을 계정 디렉토리의 WEB-INF에 카피한다.
[root@test conf]# cp /usr/local/tomcat/webapps/ROOT/WEB-INF/web.xml /home/test/public_html/WEB-INF/
[root@test conf]# cp /usr/local/tomcat/webapps/ROOT/WEB-INF/web.xml /home/akas/public_html/WEB-INF/

이제 설정은 끝났다. 다시 웹서버와 톰캣을 재시동하자.
[root@test conf]# /usr/local/httpd/bin/httpd -k restart
[root@test conf]# /usr/local/tomcat/bin/catalina.sh stop
Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:       /usr/local/jdk
[root@test conf]# /usr/local/tomcat/bin/catalina.sh start
Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:       /usr/local/jdk

브러우져에서 php와 index.html을 모두 로드해본다.
두 사이트 모두 의도한대로 정상적으로 출력된다.


Apache + PHP + MySQL + Oracle + PostGreSQL + JSP의 모든 연동이 끝났다.

2009. 7. 15. 15:02

레드헷 리눅스에서 Apache + Oracle + PostgreSQL + MySQL + PHP + Tomcat + JAVA 서버구성2

기본적 APM과 Oracle,PostgreSQL까지 구성이 끝났다. 지금 상태에서도 왠만한 사이트와 프로젝트는 수행할 능력이 된다. Oracle과 PostGreSQL을 제외한 APM만으로도 충분히 웹서버의 기능을 할수있다.

한동안 웹용 언어(CGI)로서 인기가 많았던 PHP의 경우 인기가 시들어가고 있다. 물론 지금도 PHP소스는 강력하다. 전세계용 웹어플리케이션인 Moodle이나 우리나라 웹사이트들이 많이 사용하는 제로보드,그누보드,테터툴즈,설치형 블로그등은 모두 PHP로 작성된 언어들이다. APM은 설치법이 다른 서버류보다 많이 일반화 되어 있고 한번에 설치해주는 툴도 많이 나와있다. 또한 리눅스,유닉스,윈도우즈 버젼으로 대개의 운영체제로 지원되기 때문에 유포형 웹솔루션으로서는 APM용 솔루션이 가장 적합하다.

그만큼 PHP는 나름 대중화 되어 있는 웹언어라고 할수 있다.
C를 약간 접한 사람이라면 PHP가 매우 친숙하다. PHP는 문법의 틀이 C의 구조와 매우 비슷하기 때문이다.

ASP는 MicroSoft사에서 개발한 웹용언어이다. ASP는 일단 Windows NT용이라는 생각이 머리에 꽂히게 된다. 보통의 APM이 Windows나 Linux와 유닉스에서도 모두 쓸수있다는 장점이 있지만, NT를 사용하지 않는 유져들은 ASP를 접할 기회가 드물다. 물론 Windows XP에서도 ASP는 돌릴수는 있다. 하지만 개인용 XP에 웹서버를 운영한다는것이 바로 자원의 낭비라는것을 곧바로 알게될것이다.

MS용 웹어플리케이션으로는 Apache에 대응하는 IIS가 있고, MySQL에 대응하는 MSSQL이 있다. ASP는 IIS와 MSSQL에 연동해 많이 쓰인다.

각설하고, 이 포스팅은 레드헷 계열(CentOS, Fedora, RHE)에서 서버구성의 발자취..즉 노트를 만드는 일이다.
그럼 지금 쓰는 포스팅.. JSP는 무엇인가?

JSP는 PHP와 ASP와 같은 스크립트 언어이다.
PHP가 C를 따르고 ASP가 비주얼베이직을 따랐다면, JSP는 Java를 따르고 있다.
제작사도 Java를 만드는 Sun사이다.

JSP는 PHP로 코딩하는것보다 더 어렵다. 많은 사람이 이치만 깨우치면 쉽다라고 하지만, 모든 표현을 객체화하여 표현하기 때문에 라이브러리 중심의 PHP보다 참조나 변형이 어렵다는것을 금방 알게된다. 또한 서블릿이라는 java로 컴파일한 객체를 사용할수 있다고 하는데 이분야는 좀더 연구를 해봐야겠다. 연구를 하면서 서블릿에 대한 포스팅도 시작하여야 겠다.

이제 그만 잡소리하고..설치를 해보도록 하자.

JAVA (jdk)
다운로드: 
http://www.snowrice.com/freepds/1103
http://java.sun.com/javase/downloads/


jdk-6u14-linux-i586-rpm.bin
jdk는 jdk와 jre로 구성되어있다. jdk는 한마디로 개발툴이고 jre는 자바용 프로그램들을 시스템에서 구현해주는 툴이라고 보면 된다. jdk설치로 두 가지다 설치된다.

[root@localhost Desktop]# chmod +x jdk-6u14-linux-i586-rpm.bin
[root@localhost Desktop]# ./jdk-6u14-linux-i586-rpm.bin
2. LICENSE TO USE. Subject to the terms and conditions of
this Agreement, including, but not limited to the Java

Do you agree to the above license terms? [yes or no]
yes
엔터계속
물음에 모두 yes로 답한다
Unpacking...
Checksumming...
Extracting...
UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (
Zip-Bugs@lists.wku.edu).
  inflating: jdk-6u14-linux-i586.rpm
  inflating: sun-javadb-common-10.4.2-1.1.i386.rpm
  inflating: sun-javadb-core-10.4.2-1.1.i386.rpm
  inflating: sun-javadb-client-10.4.2-1.1.i386.rpm
  inflating: sun-javadb-demo-10.4.2-1.1.i386.rpm
  inflating: sun-javadb-docs-10.4.2-1.1.i386.rpm
  inflating: sun-javadb-javadoc-10.4.2-1.1.i386.rpm
준비 중...               ########################################### [100%]
   1:jdk                    ########################################### [100%]
Unpacking JAR files...
        rt.jar...
        jsse.jar...
        charsets.jar...
        tools.jar...
        localedata.jar...
        plugin.jar...
        javaws.jar...
        deploy.jar...
Installing JavaDB
준비 중...               ########################################### [100%]
   1:sun-javadb-common      ########################################### [ 17%]
   2:sun-javadb-core        ########################################### [ 33%]
   3:sun-javadb-client      ########################################### [ 50%]
   4:sun-javadb-demo        ########################################### [ 67%]
   5:sun-javadb-docs        ########################################### [ 83%]
   6:sun-javadb-javadoc     ########################################### [100%]

Java(TM) SE Development Kit 6 successfully installed.

Product Registration is FREE and includes many benefits:
* Notification of new versions, patches, and updates
* Special offers on Sun products, services and training
* Access to early releases and documentation

Product and system data will be collected. If your configuration
supports a browser, the Sun Product Registration form for
the JDK will be presented. If you do not register, none of
this information will be saved. You may also register your
JDK later by opening the register.html file (located in
the JDK installation directory) in a browser.

For more information on what data Registration collects and
how it is managed and used, see:
http://java.sun.com/javase/registration/JDKRegistrationPrivacy.html

Press Enter to continue.....


Done.


이것으로 Java의 설치는 끝이다.
확인을 위해서 아래의 사항을 점검한다.
[root@localhost Desktop]# rpm -qa | grep jdk
java-1.6.0-openjdk-1.6.0.0-0.25.b09.el5
jdk-1.6.0_14-fcs
[root@localhost Desktop]# java
Usage: java [-options] class [args...]
           (to execute a class)
   or  java [-options] -jar jarfile [args...]
           (to execute a jar file)
where options include:
    -d32          use a 32-bit data model if available
    -d64          use a 64-bit data model if available
    -client       to select the "client" VM
    -server       to select the "server" VM
    -hotspot      is a synonym for the "client" VM  [deprecated]
                  The default VM is client.

    -cp <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
                  A : separated list of directories, JAR archives,
                  and ZIP archives to search for class files.
    -D<name>=<value>
                  set a system property
    -verbose[:class|gc|jni]
                  enable verbose output
    -version      print product version and exit
    -version:<value>
                  require the specified version to run
    -showversion  print product version and continue
    -jre-restrict-search | -jre-no-restrict-search
                  include/exclude user private JREs in the version search
    -? -help      print this help message
    -X            print help on non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
                  enable assertions with specified granularity
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
                  disable assertions with specified granularity
    -esa | -enablesystemassertions
                  enable system assertions
    -dsa | -disablesystemassertions
                  disable system assertions
    -agentlib:<libname>[=<options>]
                  load native agent library <libname>, e.g. -agentlib:hprof
                  see also, -agentlib:jdwp=help and -agentlib:hprof=help
    -agentpath:<pathname>[=<options>]
                  load native agent library by full pathname
    -javaagent:<jarpath>[=<options>]
                  load Java programming language agent, see java.lang.instrument
    -splash:<imagepath>
                  show splash screen with specified image
See
http://java.sun.com/javase/reference for more details.



jdk의 설치는 무난히 끝났다. 모두 그렇지만 윈도우 프로그램처럼 setup.exe만 실행시킨후 모든게 끝나면 얼마나 좋겠냐만은, 작은 설정이 필요하다.
 [root@localhost Desktop]# ls /usr/java
default  jdk1.6.0_14  latest
[root@localhost Desktop]# ln -s /usr/java/jdk1.6.0_14 /usr/local/jdk
[root@localhost Desktop]# vi /etc/profile
# /etc/profile

# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc

pathmunge () {
        if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then
           if [ "$2" = "after" ] ; then
              PATH=$PATH:$1
           else
              PATH=$1:$PATH
           fi
        fi
}

# ksh workaround
if [ -z "$EUID" -a -x /usr/bin/id ]; then
        EUID=`id -u`
        UID=`id -ru`
fi

# Path manipulation
if [ "$EUID" = "0" ]; then
        pathmunge /sbin
        pathmunge /usr/sbin
        pathmunge /usr/local/sbin
fi

# No core files by default
ulimit -S -c 0 > /dev/null 2>&1

if [ -x /usr/bin/id ]; then
        USER="`id -un`"
        LOGNAME=$USER
        MAIL="/var/spool/mail/$USER"
fi

HOSTNAME=`/bin/hostname`
HISTSIZE=1000

if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
    INPUTRC=/etc/inputrc
fi

export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC

for i in /etc/profile.d/*.sh ; do
    if [ -r "$i" ]; then
        . $i
    fi
done

unset i
unset pathmunge

export JAVA_HOME=/usr/local/jdk
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=$JAVA_HOME/lib/tools.jar:.

[root@localhost Desktop]# ls -la /etc/profile
-rw-r--r-- 1 root root 1049  7월 16 00:07 /etc/profile
[root@localhost Desktop]# chmod 755 /etc/profile(실행권한설정)
[root@localhost Desktop]# /etc/profile (갱신된 profile을 적용) 
[root@localhost Desktop]# javac (설치가 잘되었나 확인)
Usage: javac <options> <source files>
where possible options include:
  -g                         Generate all debugging info
  -g:none                    Generate no debugging info
  -g:{lines,vars,source}     Generate only some debugging info
  -nowarn                    Generate no warnings
  -verbose                   Output messages about what the compiler is doing
  -deprecation               Output source locations where deprecated APIs are used
  -classpath <path>          Specify where to find user class files and annotation processors
  -cp <path>                 Specify where to find user class files and annotation processors
  -sourcepath <path>         Specify where to find input source files
  -bootclasspath <path>      Override location of bootstrap class files
  -extdirs <dirs>            Override location of installed extensions
  -endorseddirs <dirs>       Override location of endorsed standards path
  -proc:{none,only}          Control whether annotation processing and/or compilation is done.
  -processor <class1>[,<class2>,<class3>...]Names of the annotation processors to run; bypasses default discovery process
  -processorpath <path>      Specify where to find annotation processors
  -d <directory>             Specify where to place generated class files
  -s <directory>             Specify where to place generated source files
  -implicit:{none,class}     Specify whether or not to generate class files for implicitly referenced files
  -encoding <encoding>       Specify character encoding used by source files
  -source <release>          Provide source compatibility with specified release
  -target <release>          Generate class files for specific VM version
  -version                   Version information
  -help                      Print a synopsis of standard options
  -Akey[=value]              Options to pass to annotation processors
  -X                         Print a synopsis of nonstandard options
  -J<flag>                   Pass <flag> directly to the runtime system


 

APACHE-TOMCAT
jdk만으로 설정이 끝나느냐? 아니다. jsp를 구현하기 위해서는 apache-tomacat을 설치해 주어야 한다.
다운로드
http://www.snowrice.com/freepds/1108
http://mirror.apache-kr.org/tomcat/tomcat-6/v6.0.20/bin/apache-tomcat-6.0.20.tar.gz
 [root@localhost Desktop]# wget http://mirror.apache-kr.org/tomcat/tomcat-6/v6.0.20/bin/apache-tomcat-6.0.20.tar.gz
--00:03:52--  http://mirror.apache-kr.org/tomcat/tomcat-6/v6.0.20/bin/apache-tomcat-6.0.20.tar.gz
Resolving mirror.apache-kr.org... 211.174.58.187
Connecting to mirror.apache-kr.org|211.174.58.187|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5998298 (5.7M) [application/x-gzip]
Saving to: `apache-tomcat-6.0.20.tar.gz'

100%[=======================================================================================================================================================================>] 5,998,298   1.32M/s   in 4.3s

00:03:57 (1.33 MB/s) - `apache-tomcat-6.0.20.tar.gz' saved [5998298/5998298]

[root@localhost Desktop]#


wget을 통해서 apache-tomacat을 다운받았다.

 [root@localhost Desktop]# tar -xvf apache-tomcat-6.0.20.tar.gz
[root@localhost Desktop]# mv apache-tomcat-6.0.20 /usr/local/tomcat
[root@localhost Desktop]# cd /usr/local
[root@localhost local]# ls
bin  etc  games  httpd  include  jdk  lib  libexec  mysql  pgsql  php  sbin  share  src  tomcat
[root@localhost local]# vi /etc/profile
export CATALINA_HOME=/usr/local/tomcat
export PATH=$PATH:$CATALINA_HOME/bin
[root@localhost local]# source /etc/profile
[root@localhost local]# system-config-securitylevel-tui (system-config-firewall-tui)
8080:tcp 8080번 포트를 열어준다.
[root@localhost bin]# /usr/local/tomcat/bin/catalina.sh start
Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:       /usr/local/jdk



로칼에서 http://ip:8080으로 접속하여 보자


설치는 제대로 잘되었다. 여기서 확실히 개념을 잡아야 할것은..
일반 http://domain으로 접속을 하였을때는 apache의 본래의 기능으로 접속을 하고

http://ip:8080으로 접속을 하면 위의 고양이 나오는 그림과 같이 jsp페이지가 떠야한다는것이다.

여기서 개념을 잡아야 할것이 있다.
일반 html으로 접속한것은 아파치의 본래의 기능으로 접속하고 jsp로 접속한것은 tomcat을 이용하여 8080번으로 접속을 한다는 이야기다.

톰캣과 아파치를 연동하면 http://domain을 연결하면 /usr/local/tomcat/webapps의 index.jsp나 index.html을 찾는다. 그러나 이렇게 하면 아파치의 고유기능인 virtual hosting과 어떻게 적절히 움직일수 있느냐 하는 의문점이 남는다.

자 그럼, 우선 계정 사용자를 염두해두지 않고, http://ip식으로 접속하면 루트 사용자만을 위한 /usr/local/httpd/htdocs가 아닌 /usr/local/tomcat/webapps에 접속하는 아파치-톰캣 연동을 하자.

APACHE-TOMCAT CONNECTOR
다운로드
http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.28/tomcat-connectors-1.2.28-src.tar.gz
 [root@localhost Desktop]# wget http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.28/tomcat-connectors-1.2.28-src.tar.gz
--01:26:20--  http://www.apache.org/dist/tomcat/tomcat-connectors/jk/source/jk-1.2.28/tomcat-connectors-1.2.28-src.tar.gz
Resolving www.apache.org... 140.211.11.130
Connecting to
www.apache.org|140.211.11.130|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1541956 (1.5M) [application/x-gzip]
Saving to: `tomcat-connectors-1.2.28-src.tar.gz'

100%[=============================================================>] 1,541,956    588K/s   in 2.6s

01:26:23 (588 KB/s) - `tomcat-connectors-1.2.28-src.tar.gz' saved [1541956/1541956]

[root@localhost Desktop]# tar -xvf tomcat-connectors-1.2.28-src.tar.gz
[root@localhost Desktop]#cd tomcat-connectors-1.2.28-src
[root@localhost tomcat-connectors-1.2.28-src]# cd native
[root@localhost native]# ls
BUILDING.txt  Makefile.in  STATUS.txt  apache-1.3    common        docs  netscape
CHANGES       NEWS         TODO.txt    apache-2.0    configure     iis   nt_service
Makefile.am   README.txt   aclocal.m4  buildconf.sh  configure.in  jni   scripts
[root@localhost native]# ./configure --with-apxs=/usr/local/httpd/bin/apxs
[root@localhost native]# make && make install
make[2]: `install-exec-am'를 위해 할 일이 없습니다
make[2]: `install-data-am'를 위해 할 일이 없습니다
make[2]: Leaving directory `/root/Desktop/tomcat-connectors-1.2.28-src/native'
make[1]: Leaving directory `/root/Desktop/tomcat-connectors-1.2.28-src/native'
[root@localhost native]# ls /usr/local/httpd/modules/mod_jk.so
/usr/local/httpd/modules/mod_jk.so


연동 설정을 위하여 httpd.conf와 workers.properties파일을 수정 생성하자.
 [root@localhost native]# vi /usr/local/httpd/conf/httpd.conf
LoadModule jk_module          modules/mod_jk.so
#Tomcat-connector
JkWorkersFile conf/workers.properties
JkLogFile logs/jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %y]"
JkMount /*.jsp loadbalancer
JkMount /*.do loadbalancer
JkMount /*.html loadbalancer
JkMount /servlet/* loadbalancer
JkMount /* loadbalancer
JkMount /*.gif loadbalancer


#Load Module 맨뒤에 위와같이 추가한다.
ServerName 192.168.123.132

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/usr/local/httpd/htdocs"

#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#


#서버네임에 자신의 도메인이나, IP를 입력하고 위와같이 삽입한다.


workers.properties파일을 새로 생성하고 위와 같이 삽입한다.
[root@localhost conf]# vi /usr/local/httpd/conf/workers.properties
worker.list=loadbalancer
worker.tomcat1.type=ajp13
worker.tomcat1.host=127.0.0.1
worker.tomcat1.port=8008
worker.tomcat1.lbfactor=1
worker.tomcat2.type=ajp13
worker.tomcat2.host=127.0.0.1
worker.tomcat2.port=8009
worker.tomcat2.lbfactor=1
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=tomcat1,tomcat2

[root@localhost conf]# /usr/local/httpd/bin/httpd -k restart
[root@localhost conf]# /usr/local/tomcat/bin/catalina.sh stop
[root@localhost conf]# /usr/local/tomcat/bin/catalina.sh start

아파치와 톰캣을 재시동한다.
http://ip로 접속

아파치와 톰캣의 연동이 성공적으로 끝났다.
하지만.. 앞서 설치한 PHP는 이제부터 쓸수없게 된다!
예로 <?php phpinfo(); ?> php태그를 이용하여 test.php를 작성하여 읽어보자..
웹서버는 test.php를 출력하지 않고 브라우져는 해당파일을 웹페이지로 인식못하고 다운로드 받게 된다.
그러므로 jsp이외의 php파일은 정상적으로 tomcat의 영향을 받지 않고 출력해줘야 한다.

httpd.conf에서
JkMount /* loadbalancer
이부분을 지우고 웹서버를 재가동하면 JkMount부분에서 지정하지 않은 확장자는 모두 본래의 아파치디렉토리에서 정상적으로 읽게된다.

웹호스팅을 기획하지 않고 단일 웹서버로 쓰이는 머신은 여기까지 세팅하면 된다.
작은 사이트의 경우, 거의 모든 플랫폼이 APM에 맞춰있기 때문에 jsp까지 세팅하지 않고 APM+Oracle서버로도 매우 훌륭하다. 

하지만 기필코 jsp와 php 모두 웹호스팅에 적용하고 싶으면 다음 포스팅 +3에서 이어진다.

2009. 7. 15. 06:22

레드헷 리눅스에서 Apache + Oracle + PostgreSQL + MySQL + PHP + Tomcat + JAVA 서버구성1


앞전 3개의 DB Oracle + PostgreSQL + MySQL는 구성을 모두 마쳤다. 그러므로 이제 웹서버와 PHP,JSP용 언어서버들을 구성해 주면 된다.

 Apache.
다운로드
http://www.snowrice.com/?module=file&act=procFileDownload&file_srl=848&sid=daf0b6f9fb2ad0a9f241a0dcf6b9cd4b

[root@akas httpd-2.2.11]# tar -xvf httpd-2.2.11.tar.gz
[root@akas httpd-2.2.11]# cd httpd-2.2.11
[root@akas httpd-2.2.11]# ./configure --prefix=/usr/local/httpd --with-mpm=prefork --enable-ssl --with-ssl=/usr/local/openssl --enable-deflate --with-z=/usr/local/zlib --enable-so --enable-mods-shared=all
생략
config.status: creating build/pkg/pkginfo
config.status: creating build/config_vars.sh
config.status: creating include/ap_config_auto.h
config.status: executing default commands
[root@akas httpd-2.2.11]# make
생략
make[4]: Leaving directory `/root/Desktop/httpd-2.2.11/modules/mappers'
make[3]: Leaving directory `/root/Desktop/httpd-2.2.11/modules/mappers'
make[2]: Leaving directory `/root/Desktop/httpd-2.2.11/modules'
make[2]: Entering directory `/root/Desktop/httpd-2.2.11/support'
make[2]: Leaving directory `/root/Desktop/httpd-2.2.11/support'
make[1]: Leaving directory `/root/Desktop/httpd-2.2.11'
[root@akas httpd-2.2.11]# make install
생략
mkdir /usr/local/httpd/man
mkdir /usr/local/httpd/man/man1
mkdir /usr/local/httpd/man/man8
mkdir /usr/local/httpd/manual
make[1]: Leaving directory `/root/Desktop/httpd-2.2.11'
[root@akas httpd-2.2.11]# ls /usr/local/httpd/bin
ab            apu-1-config  dbmmanage    htcacheclean  htpasswd   logresolve
apachectl     apxs          envvars      htdbm         httpd      rotatelogs
apr-1-config  checkgid      envvars-std  htdigest      httxt2dbm
[root@akas httpd-2.2.11]# /usr/local/httpd/bin/httpd -k start


성공!!

PHP
다운로드
http://www.snowrice.com/?module=file&act=procFileDownload&file_srl=853&sid=b091359f32e2dd92eb8d584c44f0cca5
[root@akas php-5.2.9]# tar -xvf php-5.2.9.tar.gz
[root@akas Desktop]# cd php-5.2.9

[root@akas Desktop]# yum install libxml2-devel  libjpeg-devel libc-client-devel krb5-devel  libjpeg-devel  libpng-devel

[root@akas php-5.2.9]# ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/httpd/bin/apxs --with-oci8=/home/oracle/oracle11/product/11.1.0/db_1 --with-pgsql=/usr/local/pgsql --with-mysql=/usr/local/mysql --with-config-file-path=/usr/local/httpd/conf --with-exec-dir=/usr/local/httpd/bin --with-gd=shared --with-xmlrpc --with-openssl --with-gd --enable-gd-native-ttf  --with-curl=/usr/local/curl --with-zlib --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib --with-kerberos --with-imap-ssl --with-libxml-dir --with-imap=shared --enable-inline-optimization --enable-mbstring

생략
Generating files
updating cache ./config.cache
creating ./config.status
creating php5.spec
creating main/build-defs.h
creating scripts/phpize
creating scripts/man1/phpize.1
creating scripts/php-config
creating scripts/man1/php-config.1
creating sapi/cli/php.1
creating main/php_config.h
creating main/internal_functions.c
creating main/internal_functions_cli.c
+--------------------------------------------------------------------+
| Notice:                                                                                           |
| If you encounter <defunc> processes when using a local Oracle-DB    |
| please recompile PHP and specify --enable-sigchild when configuring |
| (This problem has been reported under Linux using Oracle >= 8.1.5)     |
+--------------------------------------------------------------------+
| License:                                                                                         |
| This software is subject to the PHP License, available in this               |
| distribution in the file LICENSE.  By continuing this installation              |
| process, you are bound by the terms of this license agreement.           |
| If you do not agree with the terms of this license, you must abort          |
| the installation process at this point.                                                   |
+--------------------------------------------------------------------+

Thank you for using PHP.

[root@akas php-5.2.9]# make
Build complete.
Don't forget to run 'make test'.

[root@akas php-5.2.9]# make install
You may want to add: /usr/local/php/lib/php to your php.ini include_path
Installing PDO headers:          /usr/local/php/include/php/ext/pdo/

[root@akas php-5.2.9]# vi /usr/local/httpd/conf/httpd.conf
LoadModule php5_module modules/libphp5.so(검색)
AddType application/x-httpd-php .php .html .htm (365라인에 입력)

[root@akas php-5.2.9]# ls /usr/local/httpd/modules/libphp5.so
/usr/local/httpd/modules/libphp5.so(확인)


[root@akas php-5.2.9]# vi /usr/local/httpd/htdocs/test.php
[root@akas php-5.2.9]# cat /usr/local/httpd/htdocs/test.php
<?php phpinfo(); ?>
[root@akas php-5.2.9]#/usr/local/httpd/bin/httpd -k restart


부팅시 자동 실행

[root@akas conf]# vi /etc/rc.local
[root@akas conf]# cat /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
/etc/init.d/oracle start
/etc/rc.d/init.d/postgresql start
/etc/local/mysql/bin/mysqld_safe --user=mysql &
/usr/local/httpd/bin/httpd -k start

[root@akas conf]#



브라우져로 확인
http://ip/test.php

PHP Logo

PHP Version 5.2.9


System Linux akas.com 2.6.18-128.el5 #1 SMP Wed Jan 21 10:44:23 EST 2009 i686
Build Date Jul 15 2009 05:30:22
Configure Command './configure' '--prefix=/usr/local/php' '--with-apxs2=/usr/local/httpd/bin/apxs' '--with-oci8=/home/oracle/oracle11/product/11.1.0/db_1' '--with-pgsql=/usr/local/pgsql' '--with-mysql=/usr/local/mysql' '--with-config-file-path=/usr/local/httpd/conf' '--with-exec-dir=/usr/local/httpd/bin' '--with-gd=shared' '--with-xmlrpc' '--with-openssl' '--with-gd' '--enable-gd-native-ttf' '--with-curl=/usr/local/curl' '--with-zlib' '--with-jpeg-dir=/usr/lib' '--with-png-dir=/usr/lib' '--with-kerberos' '--with-imap-ssl' '--with-libxml-dir' '--with-imap=shared' '--enable-inline-optimization' '--enable-mbstring'
Server API Apache 2.0 Handler
Virtual Directory Support disabled
Configuration File (php.ini) Path /usr/local/httpd/conf
Loaded Configuration File (none)
Scan this dir for additional .ini files (none)
additional .ini files parsed (none)
PHP API 20041225
PHP Extension 20060613
Zend Extension 220060519
Debug Build no
Thread Safety disabled
Zend Memory Manager enabled
IPv6 Support enabled
Registered PHP Streams php, file, data, http, ftp, compress.zlib, https, ftps
Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, sslv2, tls
Registered Stream Filters string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, convert.iconv.*, zlib.*

Zend logoThis program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies


PHP Credits


Configuration

PHP Core

Directive Local Value Master Value
allow_call_time_pass_reference On On
allow_url_fopen On On
allow_url_include Off Off
always_populate_raw_post_data Off Off
arg_separator.input & &
arg_separator.output & &
asp_tags Off Off
auto_append_file no value no value
auto_globals_jit On On
auto_prepend_file no value no value
browscap no value no value
default_charset no value no value
default_mimetype text/html text/html
define_syslog_variables Off Off
disable_classes no value no value
disable_functions no value no value
display_errors On On
display_startup_errors Off Off
doc_root no value no value
docref_ext no value no value
docref_root no value no value
enable_dl On On
error_append_string no value no value
error_log no value no value
error_prepend_string no value no value
error_reporting no value no value
expose_php On On
extension_dir /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613 /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613
file_uploads On On
highlight.bg #FFFFFF #FFFFFF
highlight.comment #FF8000 #FF8000
highlight.default #0000BB #0000BB
highlight.html #000000 #000000
highlight.keyword #007700 #007700
highlight.string #DD0000 #DD0000
html_errors On On
ignore_repeated_errors Off Off
ignore_repeated_source Off Off
ignore_user_abort Off Off
implicit_flush Off Off
include_path .:/usr/local/php/lib/php .:/usr/local/php/lib/php
log_errors Off Off
log_errors_max_len 1024 1024
magic_quotes_gpc On On
magic_quotes_runtime Off Off
magic_quotes_sybase Off Off
mail.force_extra_parameters no value no value
max_execution_time 30 30
max_input_nesting_level 64 64
max_input_time -1 -1
memory_limit 128M 128M
open_basedir no value no value
output_buffering 0 0
output_handler no value no value
post_max_size 8M 8M
precision 14 14
realpath_cache_size 16K 16K
realpath_cache_ttl 120 120
register_argc_argv On On
register_globals Off Off
register_long_arrays On On
report_memleaks On On
report_zend_debug On On
safe_mode Off Off
safe_mode_exec_dir /usr/local/httpd/bin /usr/local/httpd/bin
safe_mode_gid Off Off
safe_mode_include_dir no value no value
sendmail_from no value no value
sendmail_path /usr/sbin/sendmail -t -i  /usr/sbin/sendmail -t -i 
serialize_precision 100 100
short_open_tag On On
SMTP localhost localhost
smtp_port 25 25
sql.safe_mode Off Off
track_errors Off Off
unserialize_callback_func no value no value
upload_max_filesize 2M 2M
upload_tmp_dir no value no value
user_dir no value no value
variables_order EGPCS EGPCS
xmlrpc_error_number 0 0
xmlrpc_errors Off Off
y2k_compliance On On
zend.ze1_compatibility_mode Off Off

apache2handler

Apache Version Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.9
Apache API Version 20051115
Server Administrator you@example.com
Hostname:Port akas.com:0
User/Group daemon(2)/2
Max Requests Per Child: 10000 - Keep Alive: on - Max Per Connection: 100
Timeouts Connection: 300 - Keep-Alive: 5
Virtual Server No
Server Root /usr/local/httpd
Loaded Modules core prefork http_core mod_so mod_authn_file mod_authn_dbm mod_authn_anon mod_authn_dbd mod_authn_default mod_authz_host mod_authz_groupfile mod_authz_user mod_authz_dbm mod_authz_owner mod_authz_default mod_auth_basic mod_auth_digest mod_dbd mod_dumpio mod_ext_filter mod_include mod_filter mod_substitute mod_deflate mod_log_config mod_log_forensic mod_logio mod_env mod_mime_magic mod_cern_meta mod_expires mod_headers mod_ident mod_usertrack mod_unique_id mod_setenvif mod_version mod_ssl mod_mime mod_dav mod_status mod_autoindex mod_asis mod_info mod_cgi mod_dav_fs mod_vhost_alias mod_negotiation mod_dir mod_imagemap mod_actions mod_speling mod_userdir mod_alias mod_rewrite mod_php5

Directive Local Value Master Value
engine 1 1
last_modified 0 0
xbithack 0 0

Apache Environment

Variable Value
UNIQUE_ID SlzuNMCoCoQAAAj8NC8AAAAA
HTTP_HOST 192.168.10.132
HTTP_CONNECTION keep-alive
HTTP_USER_AGENT Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/2.0.172.33 Safari/530.5
HTTP_ACCEPT application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
HTTP_ACCEPT_ENCODING gzip,deflate,bzip2,sdch
HTTP_ACCEPT_LANGUAGE ko-KR,ko;q=0.8,en-US;q=0.6,en;q=0.4
HTTP_ACCEPT_CHARSET windows-949,utf-8;q=0.7,*;q=0.3
HTTP_IF_NONE_MATCH "15825f-14-46eb073fb6f80"
HTTP_IF_MODIFIED_SINCE Tue, 14 Jul 2009 20:40:46 GMT
PATH /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
SERVER_SIGNATURE no value
SERVER_SOFTWARE Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.9
SERVER_NAME 192.168.10.132
SERVER_ADDR 192.168.10.132
SERVER_PORT 80
REMOTE_ADDR 192.168.10.102
DOCUMENT_ROOT /usr/local/httpd/htdocs
SERVER_ADMIN you@example.com
SCRIPT_FILENAME /usr/local/httpd/htdocs/test.php
REMOTE_PORT 1126
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING no value
REQUEST_URI /test.php
SCRIPT_NAME /test.php

HTTP Headers Information

HTTP Request Headers
HTTP Request GET /test.php HTTP/1.1
Host 192.168.10.132
Connection keep-alive
User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/2.0.172.33 Safari/530.5
Accept application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Encoding gzip,deflate,bzip2,sdch
Accept-Language ko-KR,ko;q=0.8,en-US;q=0.6,en;q=0.4
Accept-Charset windows-949,utf-8;q=0.7,*;q=0.3
If-None-Match "15825f-14-46eb073fb6f80"
If-Modified-Since Tue, 14 Jul 2009 20:40:46 GMT
HTTP Response Headers
X-Powered-By PHP/5.2.9
Keep-Alive timeout=5, max=100
Connection Keep-Alive
Transfer-Encoding chunked
Content-Type text/html

ctype

ctype functions enabled

curl

cURL support enabled
cURL Information libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5

date

date/time support enabled
"Olson" Timezone Database Version 2009.1
Timezone Database internal
Default timezone Asia/Seoul

Directive Local Value Master Value
date.default_latitude 31.7667 31.7667
date.default_longitude 35.2333 35.2333
date.sunrise_zenith 90.583333 90.583333
date.sunset_zenith 90.583333 90.583333
date.timezone no value no value

dom

DOM/XML enabled
DOM/XML API Version 20031129
libxml Version 2.6.26
HTML Support enabled
XPath Support enabled
XPointer Support enabled
Schema Support enabled
RelaxNG Support enabled

filter

Input Validation and Filtering enabled
Revision $Revision: 1.52.2.45 $

Directive Local Value Master Value
filter.default unsafe_raw unsafe_raw
filter.default_flags no value no value

gd

GD Support enabled
GD Version bundled (2.0.34 compatible)
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled

hash

hash support enabled
Hashing Engines md2 md4 md5 sha1 sha256 sha384 sha512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru gost adler32 crc32 crc32b haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5

iconv

iconv support enabled
iconv implementation glibc
iconv library version 2.5

Directive Local Value Master Value
iconv.input_encoding ISO-8859-1 ISO-8859-1
iconv.internal_encoding ISO-8859-1 ISO-8859-1
iconv.output_encoding ISO-8859-1 ISO-8859-1

json

json support enabled
json version 1.2.1

libxml

libXML support active
libXML Version 2.6.26
libXML streams enabled

mbstring

Multibyte Support enabled
Multibyte string engine libmbfl
Multibyte (japanese) regex support enabled
Multibyte regex (oniguruma) version 4.4.4
Multibyte regex (oniguruma) backtrack check On

mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.

Directive Local Value Master Value
mbstring.detect_order no value no value
mbstring.encoding_translation Off Off
mbstring.func_overload 0 0
mbstring.http_input pass pass
mbstring.http_output pass pass
mbstring.internal_encoding no value no value
mbstring.language neutral neutral
mbstring.strict_detection Off Off
mbstring.substitute_character no value no value

mysql

MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version 5.1.32
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_INCLUDE -I/usr/local/mysql/include/mysql
MYSQL_LIBS -L/usr/local/mysql/lib/mysql -lmysqlclient

Directive Local Value Master Value
mysql.allow_persistent On On
mysql.connect_timeout 60 60
mysql.default_host no value no value
mysql.default_password no value no value
mysql.default_port no value no value
mysql.default_socket no value no value
mysql.default_user no value no value
mysql.max_links Unlimited Unlimited
mysql.max_persistent Unlimited Unlimited
mysql.trace_mode Off Off

oci8

OCI8 Support enabled
Version 1.2.5
Revision $Revision: 1.269.2.16.2.44 $
Active Persistent Connections 0
Active Connections 0
Oracle Version 11.1
Compile-time ORACLE_HOME /home/oracle/oracle11/product/11.1.0/db_1
Libraries Used no value
Temporary Lob support enabled
Collections support enabled

Directive Local Value Master Value
oci8.default_prefetch 10 10
oci8.max_persistent -1 -1
oci8.old_oci_close_semantics 0 0
oci8.persistent_timeout -1 -1
oci8.ping_interval 60 60
oci8.privileged_connect Off Off
oci8.statement_cache_size 20 20

openssl

OpenSSL support enabled
OpenSSL Version OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008

pcre

PCRE (Perl Compatible Regular Expressions) Support enabled
PCRE Library Version 7.8 2008-09-05

Directive Local Value Master Value
pcre.backtrack_limit 100000 100000
pcre.recursion_limit 100000 100000

PDO

PDO support enabled
PDO drivers sqlite2, sqlite

pdo_sqlite

PDO Driver for SQLite 3.x enabled
PECL Module version (bundled) 1.0.1 $Id: pdo_sqlite.c,v 1.10.2.6.2.4 2008/12/31 11:17:42 sebastian Exp $
SQLite Library 3.3.7

pgsql

PostgreSQL Support enabled
PostgreSQL(libpq) Version 8.4.0
Multibyte character support enabled
SSL support enabled
Active Persistent Links 0
Active Links 0

Directive Local Value Master Value
pgsql.allow_persistent On On
pgsql.auto_reset_persistent Off Off
pgsql.ignore_notice Off Off
pgsql.log_notice Off Off
pgsql.max_links Unlimited Unlimited
pgsql.max_persistent Unlimited Unlimited

posix

Revision $Revision: 1.70.2.3.2.22 $

Reflection

Reflection enabled
Version $Id: php_reflection.c,v 1.164.2.33.2.55 2008/12/31 11:17:42 sebastian Exp $

session

Session Support enabled
Registered save handlers files user sqlite
Registered serializer handlers php php_binary

Directive Local Value Master Value
session.auto_start Off Off
session.bug_compat_42 On On
session.bug_compat_warn On On
session.cache_expire 180 180
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_httponly Off Off
session.cookie_lifetime 0 0
session.cookie_path / /
session.cookie_secure Off Off
session.entropy_file no value no value
session.entropy_length 0 0
session.gc_divisor 100 100
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
session.hash_bits_per_character 4 4
session.hash_function 0 0
session.name PHPSESSID PHPSESSID
session.referer_check no value no value
session.save_handler files files
session.save_path no value no value
session.serialize_handler php php
session.use_cookies On On
session.use_only_cookies Off Off
session.use_trans_sid 0 0

SimpleXML

Simplexml support enabled
Revision $Revision: 1.151.2.22.2.46 $
Schema support enabled

SPL

SPL support enabled
Interfaces Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject
Classes AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, DirectoryIterator, DomainException, EmptyIterator, FilterIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RegexIterator, RuntimeException, SimpleXMLIterator, SplFileInfo, SplFileObject, SplObjectStorage, SplTempFileObject, UnderflowException, UnexpectedValueException

SQLite

SQLite support enabled
PECL Module version 2.0-dev $Id: sqlite.c,v 1.166.2.13.2.12 2008/12/31 11:17:44 sebastian Exp $
SQLite Library 2.8.17
SQLite Encoding iso8859

Directive Local Value Master Value
sqlite.assoc_case 0 0

standard

Regex Library Bundled library enabled
Dynamic Library Support enabled
Path to sendmail /usr/sbin/sendmail -t -i

Directive Local Value Master Value
assert.active 1 1
assert.bail 0 0
assert.callback no value no value
assert.quiet_eval 0 0
assert.warning 1 1
auto_detect_line_endings 0 0
default_socket_timeout 60 60
safe_mode_allowed_env_vars PHP_ PHP_
safe_mode_protected_env_vars LD_LIBRARY_PATH LD_LIBRARY_PATH
url_rewriter.tags a=href,area=href,frame=src,form=,fieldset= a=href,area=href,frame=src,form=,fieldset=
user_agent no value no value

tokenizer

Tokenizer Support enabled

xml

XML Support active
XML Namespace Support active
libxml2 Version 2.6.26

xmlreader

XMLReader enabled

xmlrpc

core library version xmlrpc-epi v. 0.51
php extension version 0.51
author Dan Libby
homepage http://xmlrpc-epi.sourceforge.net
open sourced by Epinions.com

xmlwriter

XMLWriter enabled

zlib

ZLib Support enabled
Stream Wrapper support compress.zlib://
Stream Filter support zlib.inflate, zlib.deflate
Compiled Version 1.2.3
Linked Version 1.2.3

Directive Local Value Master Value
zlib.output_compression Off Off
zlib.output_compression_level -1 -1
zlib.output_handler no value no value

Additional Modules

Module Name

Environment

Variable Value
HOSTNAME akas.com
SHELL /bin/bash
TERM xterm
HISTSIZE 1000
USER root
LS_COLORS no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
MAIL /var/spool/mail/root
PATH /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
INPUTRC /etc/inputrc
PWD /root/Desktop/httpd-2.2.11
LANG ko_KR.UTF-8
SSH_ASKPASS /usr/libexec/openssh/gnome-ssh-askpass
SHLVL 1
HOME /root
LOGNAME root
CVS_RSH ssh
LESSOPEN |/usr/bin/lesspipe.sh %s
G_BROKEN_FILENAMES 1
_ /usr/local/httpd/bin/httpd
OLDPWD /root/Desktop

PHP Variables

Variable Value
_SERVER["UNIQUE_ID"] SlzuNMCoCoQAAAj8NC8AAAAA
_SERVER["HTTP_HOST"] 192.168.10.132
_SERVER["HTTP_CONNECTION"] keep-alive
_SERVER["HTTP_USER_AGENT"] Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/2.0.172.33 Safari/530.5
_SERVER["HTTP_ACCEPT"] application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
_SERVER["HTTP_ACCEPT_ENCODING"] gzip,deflate,bzip2,sdch
_SERVER["HTTP_ACCEPT_LANGUAGE"] ko-KR,ko;q=0.8,en-US;q=0.6,en;q=0.4
_SERVER["HTTP_ACCEPT_CHARSET"] windows-949,utf-8;q=0.7,*;q=0.3
_SERVER["HTTP_IF_NONE_MATCH"] "15825f-14-46eb073fb6f80"
_SERVER["HTTP_IF_MODIFIED_SINCE"] Tue, 14 Jul 2009 20:40:46 GMT
_SERVER["PATH"] /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
_SERVER["SERVER_SIGNATURE"] no value
_SERVER["SERVER_SOFTWARE"] Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.9
_SERVER["SERVER_NAME"] 192.168.10.132
_SERVER["SERVER_ADDR"] 192.168.10.132
_SERVER["SERVER_PORT"] 80
_SERVER["REMOTE_ADDR"] 192.168.10.102
_SERVER["DOCUMENT_ROOT"] /usr/local/httpd/htdocs
_SERVER["SERVER_ADMIN"] you@example.com
_SERVER["SCRIPT_FILENAME"] /usr/local/httpd/htdocs/test.php
_SERVER["REMOTE_PORT"] 1126
_SERVER["GATEWAY_INTERFACE"] CGI/1.1
_SERVER["SERVER_PROTOCOL"] HTTP/1.1
_SERVER["REQUEST_METHOD"] GET
_SERVER["QUERY_STRING"] no value
_SERVER["REQUEST_URI"] /test.php
_SERVER["SCRIPT_NAME"] /test.php
_SERVER["PHP_SELF"] /test.php
_SERVER["REQUEST_TIME"] 1247604276
_SERVER["argv"]
Array
(
)
_SERVER["argc"] 0
_ENV["HOSTNAME"] akas.com
_ENV["SHELL"] /bin/bash
_ENV["TERM"] xterm
_ENV["HISTSIZE"] 1000
_ENV["USER"] root
_ENV["LS_COLORS"] no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
_ENV["MAIL"] /var/spool/mail/root
_ENV["PATH"] /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
_ENV["INPUTRC"] /etc/inputrc
_ENV["PWD"] /root/Desktop/httpd-2.2.11
_ENV["LANG"] ko_KR.UTF-8
_ENV["SSH_ASKPASS"] /usr/libexec/openssh/gnome-ssh-askpass
_ENV["SHLVL"] 1
_ENV["HOME"] /root
_ENV["LOGNAME"] root
_ENV["CVS_RSH"] ssh
_ENV["LESSOPEN"] |/usr/bin/lesspipe.sh %s
_ENV["G_BROKEN_FILENAMES"] 1
_ENV["_"] /usr/local/httpd/bin/httpd
_ENV["OLDPWD"] /root/Desktop

PHP License

This program is free software; you can redistribute it and/or modify it under the terms of the PHP License as published by the PHP Group and included in the distribution in the file: LICENSE

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

If you did not receive a copy of the PHP license, or have any questions about PHP licensing, please contact license@php.net.


Oracle + MySQL + PostgreSQL 모두 PHP모듈로 연동됨.
다음 포스팅 Java, JSP, Apache-Tomcat 설치및 연동,
2009. 7. 15. 04:29

레드헷 계열 리눅스에서 MySQL설치


리눅스 DB설치 3번째 DB 포스팅으로 MySQL입니다.
MySQL은 그전에도 무들에 관한 포스팅을 써본적이 있고... 너무 많은 사람들이 애용하고 사용하는 DB이기 때문에 포스팅에 남길 글이 뭐 없네요.... 구색을 맞추기 위해..어차피 새 테스터 시스템을 만드는거니깐 그냥 자취만 남기는 포스팅을 합니다... 이렇게 포스팅을 남겨두면 나중에 시스템을 구성할때 너무나 편하답니다.

다운받는곳
 http://www.snowrice.com/?module=file&act=procFileDownload&file_srl=851&sid=d3755b335988fa2bf2f0465b97d6e6be

 [root@akas Desktop]# tar -xvf mysql-5.1.32.tar.gz
생략
mysql-5.1.32/plugin/fulltext/configure.in
mysql-5.1.32/configure.in
mysql-5.1.32/Makefile.in
[root@akas Desktop]# cd mysql-5.1.32

[root@akas mysql-5.1.32]# ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --with-charset=utf8 --with-mysql-user=mysql --sysconfdir=/etc --enable-thread-safe-client
생략
Remember to check the platform specific part of the reference manual for
hints about installing MySQL on your platform. Also have a look at the
files in the Docs directory.

Thank you for choosing MySQL!
[root@akas mysql-5.1.32]#make
생략
make[2]: Leaving directory `/root/Desktop/mysql-5.1.32/server-tools/instance-manager'
make[1]: Leaving directory `/root/Desktop/mysql-5.1.32/server-tools'
Making all in win
make[1]: Entering directory `/root/Desktop/mysql-5.1.32/win'
make[1]: `all'를 위해 할 일이 없습니다
make[1]: Leaving directory `/root/Desktop/mysql-5.1.32/win'
[root@akas mysql-5.1.32]#make install
생략
make[1]: Entering directory `/root/Desktop/mysql-5.1.32/win'
make[2]: Entering directory `/root/Desktop/mysql-5.1.32/win'
make[2]: `install-exec-am'를 위해 할 일이 없습니다
make[2]: `install-data-am'를 위해 할 일이 없습니다
make[2]: Leaving directory `/root/Desktop/mysql-5.1.32/win'
make[1]: Leaving directory `/root/Desktop/mysql-5.1.32/win'


컴파일끝... 세부설정 시작
DB생성..

 [root@akas mysql-5.1.32]# ls /usr/local/
bin  etc  games  include  lib  libexec  mysql  pgsql  sbin  share  src
[root@akas mysql-5.1.32]#  /usr/local/mysql/bin/mysql_install_db
Installing MySQL system tables...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/local/mysql/bin/mysqladmin -u root password 'new-password'
/usr/local/mysql/bin/mysqladmin -u root -h akas.com password 'new-password'

Alternatively you can run:
/usr/local/mysql/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr/local/mysql ; /usr/local/mysql/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /usr/local/mysql/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/local/mysql/bin/mysqlbug script!

The latest information about MySQL is available at http://www.mysql.com/
Support MySQL by buying support/licenses from http://shop.mysql.com/


DB생성확인과 계정생성

 [root@akas mysql-5.1.32]# ls /usr/local/mysql/data
mysql  test
[root@akas mysql-5.1.32]# cat >> /etc/ld.so.conf
/usr/local/mysql/lib

[root@akas mysql-5.1.32]# cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/local/mysql/lib

[root@akas mysql-5.1.32]# ldconfig
[root@akas mysql-5.1.32]# cp /usr/local/mysql/share/mysql/my-medium.cnf /etc/my.cnf
[root@akas mysql-5.1.32]# groupadd mysql
[root@akas mysql-5.1.32]# adduser -M -c Mysql_server -d /usr/local/mysql -g mysql -s /sbin/nologin mysql
[root@akas mysql-5.1.32]# chown root.mysql -R /usr/local/mysql/
[root@akas mysql-5.1.32]# chown mysql.mysql -R /usr/local/mysql/data
[root@akas mysql-5.1.32]# cd /usr/local/mysql/bin


my.cnf오류처리

 [root@akas bin]# vi /etc/my.cnf
# Disable Federated by default
#skip-federated(주석처리)

데몬 실행 & 관리자 루트 비밀번호 생성
 [root@akas bin]# ./mysqld_safe --user=mysql &
[2] 26772
[root@akas bin]# 090715 04:34:38 mysqld_safe Logging to '/usr/local/mysql/data/akas.com.err'.
090715 04:34:38 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
[root@akas bin]# ./mysqladmin -uroot -p password 1234
Enter password:

설정끝 _ 부팅시 자동 로딩
 [root@akas bin]# vi /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
/etc/init.d/oracle start
/etc/rc.d/init.d/postgresql start
/etc/local/mysql/bin/mysqld_safe --user=mysql &


노란색부분만 Ctrl+C Ctrl+V 끝남...

2009. 7. 15. 04:02

레드헷계열 리눅스에서 PostgreSQL의 설치


오라클을 설치한 김에 내친김에 PostgreSQL을 설치해보자.
다운받는곳 :
http://www.snowrice.com/freepds/1112
http://wwwmaster.postgresql.org/download/mirrors-ftp/source/v8.4.0/postgresql-8.4.0.tar.gz

PostgreSQL은 MySQL과 같이 오픈 RDBMS로서 안정성이 각광받고 있는 SQL입니다.
레드헷 배포판에서도 설치옵션이 들어있습니다.
안정성은 MySQL보다 뛰어나나 MySQL보다는 약간 느립니다.
그외 MySQL이 갖고 있지 않는 여러 장점의 기능들이 있지요..엔터프라이즈급 SQL에 준하는 쿼리체계와 안정성을 갖고 있는거라 하겠는데요..

그리고 표준SQL이라 할수 있는 ANSI SQL을 준수하려는 노력이 엿보이는 제품입니다.

각설하고 php,tomcat,java를 설치하기전에 Oracle , PostgreSQL , MySQL을 모두 설치해보는 포스팅을 합니다.
오라클에 이어 두번째 DB인 PostgreSQL입니다. 

다운을 받으면 아무 디렉토리에 옮겨서 압축을 풉니다.
[root@akas postgresql-8.4.0]# ./configure --prefix=/usr/local/pgsql --with-ldap --with-libxml --with-openssl --with-gnu-ld
생략
config.status: linking ./src/backend/port/tas/dummy.s to src/backend/port/tas.s
config.status: linking ./src/backend/port/dynloader/linux.c to src/backend/port/dynloader.c
config.status: linking ./src/backend/port/sysv_sema.c to src/backend/port/pg_sema.c
config.status: linking ./src/backend/port/sysv_shmem.c to src/backend/port/pg_shmem.c
config.status: linking ./src/backend/port/dynloader/linux.h to src/include/dynloader.h
config.status: linking ./src/include/port/linux.h to src/include/pg_config_os.h
config.status: linking ./src/makefiles/Makefile.linux to src/Makefile.port
[root@akas postgresql-8.4.0]#make
생략mkdir ./testtablespace
make[2]: Leaving directory `/root/Desktop/postgresql-8.4.0/src/test/regress'
make[1]: Leaving directory `/root/Desktop/postgresql-8.4.0/src'
make -C config all
make[1]: Entering directory `/root/Desktop/postgresql-8.4.0/config'
make[1]: `all'를 위해 할 일이 없습니다
make[1]: Leaving directory `/root/Desktop/postgresql-8.4.0/config'
All of PostgreSQL successfully made. Ready to install.
[root@akas postgresql-8.4.0]# make install
생략make[2]: Leaving directory `/root/Desktop/postgresql-8.4.0/src/test/regress'
make[1]: Leaving directory `/root/Desktop/postgresql-8.4.0/src'
make -C config install
make[1]: Entering directory `/root/Desktop/postgresql-8.4.0/config'
mkdir -p -- /usr/local/pgsql/lib/pgxs/config
/bin/sh ../config/install-sh -c -m 755 ./install-sh '/usr/local/pgsql/lib/pgxs/config/install-sh'
/bin/sh ../config/install-sh -c -m 755 ./mkinstalldirs '/usr/local/pgsql/lib/pgxs/config/mkinstalldirs'
make[1]: Leaving directory `/root/Desktop/postgresql-8.4.0/config'
PostgreSQL installation complete.

[root@akas postgresql-8.4.0]# ls /usr/local/
bin  etc  games  include  lib  libexec  pgsql  sbin  share  src

설치가 말끔히 끝났다.
이제 관리자 설정을 해주고 DB를 구동시켜보죠.

아래와 같이 관리자계정을 만들고 권한을 줍니다. DB관리자라서 .bash_profile옵션이 없기 때문에 프롬프트 정의가 없어집니다.

[root@akas postgresql-8.4.0]# cd /usr/local/pgsql/bin
[root@akas bin]# ls
clusterdb   createuser  dropuser  pg_config       pg_dump       pg_restore  psql
createdb    dropdb      ecpg      pg_controldata  pg_dumpall    postgres    reindexdb
createlang  droplang    initdb    pg_ctl          pg_resetxlog  postmaster  vacuumdb
[root@akas bin]# adduser -d /usr/local/pgsql postgres
adduser: 경고: 홈디렉토리가 이미 존재합니다.
skel 디렉토리에서 파일을 복사하지 않습니다.
[root@akas bin]# ls /home/
bestakas  oracle
[root@akas bin]# mkdir /usr/local/pgsql/data
[root@akas bin]# chown -R postgres.postgres /usr/local/pgsql
[root@akas bin]#

posrgres로 접속합니다.
db를 초기화합니다.
 [root@akas bin]# su postgres
bash-3.2$ ls
clusterdb   createuser  dropuser  pg_config       pg_dump       pg_restore  psql
createdb    dropdb      ecpg      pg_controldata  pg_dumpall    postgres    reindexdb
createlang  droplang    initdb    pg_ctl          pg_resetxlog  postmaster  vacuumdb
bash-3.2$ pwd
/usr/local/pgsql/bin
bash-3.2$ ./initdb /usr/local/pgsql/data
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale ko_KR.UTF-8.
The default database encoding has accordingly been set to UTF8.
initdb: could not find suitable text search configuration for locale ko_KR.UTF-8
The default text search configuration will be set to "simple".

fixing permissions on existing directory /usr/local/pgsql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 32MB
creating configuration files ... ok
creating template1 database in /usr/local/pgsql/data/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the -A option the
next time you run initdb.

Success. You can now start the database server using:

    ./postgres -D /usr/local/pgsql/data
or
    ./pg_ctl -D /usr/local/pgsql/data -l logfile start


PostgreSQL를 구동합니다. MySQL과 비슷한설정입니다.

 bash-3.2$ ./postmaster -D /usr/local/pgsql/data &
[1] 17637
bash-3.2$ LOG:  database system was shut down at 2009-07-15 03:08:57 KST
LOG:  autovacuum launcher started
LOG:  database system is ready to accept connections

SQL데몬이 정상적으로 가동된것을 알수있습니다.

 bash-3.2$ ps ax | grep post
17494 pts/1    S      0:00 su postgres
17637 pts/1    S      0:00 ./postmaster -D /usr/local/pgsql/data
17639 ?        Ss     0:00 postgres: writer process
17640 ?        Ss     0:00 postgres: wal writer process
17641 ?        Rs     0:00 postgres: autovacuum launcher process
17642 ?        Ss     0:00 postgres: stats collector process
17678 pts/1    R+     0:00 grep post

관리자에게 DB password를 줍니다.
 bash-3.2$ ./psql template1
psql (8.4.0)
Type "help" for help.

template1=# alter user postgres with password '1234;
ALTER ROLE
template1=# select * from pg_user;
 usename  | usesysid | usecreatedb | usesuper | usecatupd |  passwd  | valuntil | useconfig
----------+----------+-------------+----------+-----------+----------+----------+-----------
 postgres |       10 | t           | t        | t         | ******** |          |
(1 row)

/usr/local/pgsql/data/pg_hba.conf를 수정합니다. trust된 항목을 아래와 같이 password로 바꾸어줍니다.

 bash-3.2$ vi pg_hba.conf
# "local" is for Unix domain socket connections only
local   all         all                               password
# IPv4 local connections:
host    all         all         127.0.0.1/32          password
# IPv6 local connections:
host    all         all         ::1/128               password

PostgreSQL을 재가동합니다.
bash-3.2$ pwd
/usr/local/pgsql
bash-3.2$ cd bin
bash-3.2$ ./pg_ctl restart -D /usr/local/pgsql/data
LOG:  received smart shutdown request
LOG:  autovacuum launcher shutting down
LOG:  shutting down
waiting for server to shut down....LOG:  database system is shut down
 done
server stopped
server starting
[1]+  Done                    ./postmaster -D /usr/local/pgsql/data
bash-3.2$ LOG:  database system was shut down at 2009-07-15 03:24:38 KST
LOG:  autovacuum launcher started
LOG:  database system is ready to accept connections

관리자로 template1 DB를 접속하니 Password를 물어봅니다.

 bash-3.2$ ./psql template1
Password:
psql (8.4.0)
Type "help" for help.

template1=# \q


모든 설정이 끝났습니다.

이제 부팅시 자동으로 로드되게 하고, 루트계정으로 가동 및 중지, 재가동이 가능한 스크립트를 작성합시다.
다시 루트로 돌아와 아래와 같은 스크립트를 만들어줍니다.

[root@localhost pgsql]# vi /etc/rc.d/init.d/postgresql
#!/bin/sh
 
# PostgreSQL START/STOP Script
 
SERVER=/usr/local/pgsql/bin/postmaster
PGCTL=/usr/local/pgsql/bin/pg_ctl
PGDATA=/usr/local/pgsql/data
OPTIONS=-i
LOGFILE=/usr/local/pgsql/data/postmaster.log
 
case "$1" in
    start)
        echo -n "Starting PostgreSQL..."
        su -l postgres -c "nohup $SERVER $OPTIONS -D $PGDATA >> $LOGFILE 2>&1 &"
        ;; 
    stop)
        echo -n"Stopping PostgreSQL..."
        su -l postgres -c "$PGCTL -D $PGDATA stop"
        ;; 
    *) 
        echo "Usage: $0 {start|stop}"
        exit 1
        ;; 
esac
exit 0

스크립트 실행권한을 만듭니다.

 [root@localhost pgsql]# chmod 755 /etc/rc.d/init.d/postgresql
[root@akas ~]# ls -la /etc/rc.d/init.d/postgresql
-rwxr-xr-x 1 root root 566  7월 15 03:44 /etc/rc.d/init.d/postgresql

스크립트를 이용하여 stop명령과 start명령을 내려봅니다. OK입니다.

[root@akas ~]# /etc/rc.d/init.d/postgresql stop
-nStopping PostgreSQL...
LOG:  received smart shutdown request
LOG:  autovacuum launcher shutting down
LOG:  shutting down
waiting for server to shut down....LOG:  database system is shut down
 done
server stopped
[root@akas ~]# /etc/rc.d/init.d/postgresql start
Starting PostgreSQL...[root@akas ~]#

오라클과 같이 /etc/rc.local에 등록하여, 부팅시 가동되게 만들어주면 됩니다.

[root@akas ~]# vi /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
/etc/init.d/oracle start
/etc/rc.d/init.d/postgresql start

2009. 7. 15. 02:08

레드헷 리눅스에서의 오라클의 자동 시동


앞전의 포스팅에서 CentOS에서 오라클을 설치해봤다.
그럼 이제는 서버답게 만드는 작업을 해야겠다. 우선 오라클의 시동은 어떻게 해야할까..

login as: oracle
oracle@192.168.10.132's password:
Last login: Tue Jul 14 20:28:38 2009
[oracle@localhost ~]$ lsnrctl start

LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 15-JUL-2009 01:05:16

Copyright (c) 1991, 2007, Oracle.  All rights reserved.

Starting /home/oracle/oracle11/product/11.1.0/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.1.0.6.0 - Production
System parameter file is /home/oracle/oracle11/product/11.1.0/db_1/network/admin/listener.ora
Log messages written to /home/oracle/oracle11/diag/tnslsnr/localhost/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.1.0.6.0 - Production

Start Date                15-JUL-2009 01:05:18
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /home/oracle/oracle11/product/11.1.0/db_1/network/admin/listener.ora
Listener Log File         /home/oracle/oracle11/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
The listener supports no services
The command completed successfully
[oracle@localhost ~]$


가장 간단히 오라클 계정으로 들어가 lsnrctl start해주면 된다.

하지만 더욱 root계정으로 간단히 제어하고 싶다면..

[root@localhost ~]# vi /etc/init.d/oracle
#!/bin/bash
ORA_HOME="/home/oracle/oracle11/product/11.1.0/db_1"
ORA_OWNER="oracle"

if [ ! -f $ORA_HOME/bin/dbstart -o ! -d $ORA_HOME ]
then
        echo "Oracle Startup: failed"
        exit 1
fi

case "$1" in
start)
        echo -n "Oracle Start: "
        su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start"
        su - $ORA_OWNER -c $ORA_HOME/bin/dbstart
        touch /var/lock/subsys/oracle
        echo "OK"
        ;;
stop)
        echo -n "ORACLE Shutdown: "
        su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop"
        su - $ORA_OWNER -c $ORA_HOME/bin/dbshut
        rm -f /var/lock/subsys/oracle
        echo "OK"
        ;;
restart)
        $0 stop
        $0 start
        ;;
*)
        echo "Usage: $0 start|stop|restart"
        exit 1
esac
exit 0
[root@localhost ~]#



/etc/init.d/oracle start | stop | restart 명령을 쓸수 있겠끔 위와 같이 스크립트 만들어준다.

[root@localhost ~]# vi /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
/etc/init.d/oracle start
[root@localhost ~]#


시스템 부팅과 함께 다시 오라클이 구동될수 있도록 /etc/rc.local에 위에서 작성한 스크립트 파일을 삽입한다.


[root@localhost ~]# shutdown -r now

Broadcast message from root (pts/1) (Wed Jul 15 01:59:35 2009):

The system is going down for reboot NOW!
[root@localhost ~]#
login as: bestakas
bestakas@192.168.10.132's password:
Last login: Wed Jul 15 01:57:46 2009 from 192.168.10.102
[bestakas@localhost ~]$ su -
암호:
[root@localhost ~]# ps ax | grep LISTENER
 2602 ?        Ssl    0:00 /home/oracle/oracle11/product/11.1.0/db_1/bin/tnslsnr LISTENER -inherit
 3020 pts/1    S+     0:00 grep LISTENER
[root@localhost ~]#


부팅과 함께 자동으로 오라클이 구동되었다.


2009. 7. 14. 02:26

레드헷 계열 리눅스에서 오라클11설치하기

레드헷계열의 리눅스중 대표적인것이 엔터프라이즈와 CentOS, Fedora이다.
이 세개는 모습이나 쓰는방법이 거의 동일하다. 다만 엔터프라이즈는 돈을 내야 yum이라든지 기술적 지원을 받을수 있다. 돈을 내기 싫다면 안정버젼 엔터프라이즈의 클론 버젼인 CentOS를 사용하면 된다.

오라클은 왜 써야하는가? 하는 생각을 많이 해보았다.
우선 오라클을 써보지 않은 DB유져들은 취직이 힘들다는 점이다. 1980년대부터 서버용 DB를 선점해온 Oracle은 MS의 MSSQL의 어떠한 공격에도 임베디드시장에서의 1위자리를 내준적이 없다.

그만큼 많은 DB서버중 기업체에서 가장 널리 쓰인다고 말할수 있다. 이 말은 즉 오라클을 모르면 DB설계자로서 DBMS관리자로서 취직이 어렵다는 이야기가 된다.

우리가 많이 쓰는 MySQL은 접하기도 쉽고, 구성도 어떤 SQL보다 쉽다. 많은 프로젝트들이 MySQL로도 실현 가능하다. 하지만, MySQL을 이용하지 않고, 오라클만을 고집하며 DB를 구성하는 회사들이 많다.

뭔가 있어보이고, 뭔가 틀려보이는 착각때문일까? 아니면 트랜잭션에 롤백시스템..이라면서 거들먹 거리며 알아듣지도 못하는 영어를 써대며 오라클을 칭송하는 기존 관리자들의 자만심때문일까?

어쨋든, DB manager로서 반드시 오라클을 배워 차후의 프로젝트에서는 오라클을 이용한 DB구성을 해보자는 일념하에 이 포스팅을 시작한다.

오라클의 마지막버젼은 11g로서 오라클의 개발은 리눅스 엔터프라이즈 하에서 이루어진다고 한다.
그 소스들을 가지고 유닉스버젼과 윈도우즈버젼으로 재포팅한다고 하니..
아마도 오라클을 사용하기에 가장 좋은 배포본은 레드헷 계열인듯 싶다. 실제로 금융사나 대형 증권사같은 회사들은 Linux For SYSTEM Z하에서 오라클로 DB구성을 한다고 한다. (보진 못했지만)
돈이 왔다갔다 하는 시스템이니 안정성과 기능,보안에서는 오라클이 가장 알맞은 시스템인것만은 틀림없다.

잡소리는 때려치우고...

오라클은 리소스를 굉장히 많이 잡아먹는 DBMS이다. 최소 Require 물리적 메모리가 1기가에 달한다. 또한 스왑파일의 크기도 최소 1기가를 요구하니 실제적으로 실무에 사용하기 위해서는 적어도 오라클용으로 물리적 메모리로 2기가정도 되는 메모리를 활당해야 겠다. 테스트하는 vmware용 레드헷머신에 과감히 1기가의 메모리를 활당하고 테스트 머신이라 할지라도 disk durid에서 스왑파일로 2기가의 용량을 주기로 하였다.

80기가 하드 노트북에 20기가를 테스트용 리눅스머신에 하드디스크를 활당하고 2기가 램 윈도우시스템에 vmware에 1기가램을 활당하면 상당히 버벅거림을 느낄정도가 되겠다.

그래서 이번 포스팅에서는 가급적 스샷을 자제한다. 난 시스템이 느려지면 작업을 안하는 스타일이라..
기획하고 있는 실무서버에는 4기가 램에 2테라의 하드를 붙일 생각이다. DB로 구성한 스토리지 데이타서버를 만들어 네트워크상에서 언제든 불러올수 있어야 하니..

OS환경 : CentOS 5.3
물리적메모리 : 1G
스왑 : 2기가
하드디스크 : 20기가
오라클버젼 : oracle 11g for linux(i386)
오라클 설치에 필요한 용량 : 3.5기가 이상..
download : 오라클홈페이지 ( 상당히 느리다. 알아서 딴곳에서 받자.)


우선 시스템의 용량에 4기가정도 되는 용량이 있어야 한다. df명령으로 확인하여 보자

[root@localhost ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda1              18G  4.8G   12G  29% /
tmpfs                 506M     0  506M   0% /dev/shm
[root@localhost ~]#

용량은 충분하다. 오라클사이트에 가서 다운을 받자.
http://www.oracle.com/technology/software/products/database/oracle11g/111060_linuxsoft.html

그런데 여기서 다운받으면 우리나라의 경우 약 14시간정도 걸린다. 아마도 웹브라우져가 도중에 서버릴것이다. 다운로드 속도가 매우 느리다.  무료로 다운받게한 오라클이지만, 아마도 자신들의 웹사이트외의 업로드는 금지시켜놓은듯 하다. 북한이나 이란등의 미국의 적대국가에서 강력하게 사용할수 없다고 전제도 하고 있는것보면 무상이지만, 마음대로 자료실에 올리면 안되는듯 싶다. 알아서 찾자.

*오라클은 무료소프트웨어가 아니다. 다만 개인이 학습용이나 개발용으로 다운받아 사용하는것은 허용된다. 이말은 실무에 있어서는 반드시 오라클 라이센스를 취득해야 한다는 말이다.


<다운받은 오라클 리눅스 i386용> 

이제 의존성을 체크하자. 오라클을 설치하기 위한 의존성 프로그램들은 아래와 같다. 일일히 체크할것 없이 yum으로 한번에 설치하자.

* 의존성 체크
binutils-2.15.92.0.2-10
compat-db-4.1.25-9
control-center-2.8.0-12
gcc-3.4.3-9
gcc-c++-3.4.3-9
glibc-2.3.4-2
glibc-common-2.3.4-2
gnome-libs-1.4.1.2.90-44.1
libstdc++-3.4.3-9
libstdc++-devel-3.4.3-9
make-3.80-5
pdksh-5.2.14-30
sysstat-5.0.5-1
xscreensaver-4.18-5

yum -y install binutils compat-db control-center gcc glibc gcc-c++ glibc-common gnome-libs libstdc++ libstdc++-devel make pdksh sysstat xscreensaver

[root@localhost ~]# yum -y install binutils compat-db control-center gcc glibc gcc-c++ glibc-common gn                                                                                                          ome-libs libstdc++ libstdc++-devel make pdksh sysstat xscreensaver
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * extras: centos.mirror.cdnetworks.com
 * updates: centos.mirror.cdnetworks.com
 * base: centos.mirror.cdnetworks.com
 * addons: centos.mirror.cdnetworks.com
Setting up Install Process
Parsing package install arguments
Package binutils-2.17.50.0.6-9.el5.i386 already installed and latest version
Package 1:control-center-2.16.0-16.el5.i386 already installed and latest version
Package gcc-4.1.2-44.el5.i386 already installed and latest version
Package glibc-2.5-34.i686 already installed and latest version
Package gcc-c++-4.1.2-44.el5.i386 already installed and latest version
Package glibc-common-2.5-34.i386 already installed and latest version
No package gnome-libs available.
Package libstdc++-4.1.2-44.el5.i386 already installed and latest version
Package libstdc++-devel-4.1.2-44.el5.i386 already installed and latest version
Package 1:make-3.81-3.el5.i386 already installed and latest version
No package pdksh available.
Package xscreensaver is obsoleted by gnome-screensaver, trying to install gnome-screensaver-2.16.1-8.el5.i386 instead
Package gnome-screensaver-2.16.1-8.el5.i386 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package sysstat.i386 0:7.0.2-3.el5 set to be updated
---> Package compat-db.i386 0:4.2.52-5.1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================
 Package                  Arch                Version                       Repository           Size
======================================================================================================
Installing:
 compat-db                i386                4.2.52-5.1                    base                1.7 M
 sysstat                  i386                7.0.2-3.el5                   base                169 k

Transaction Summary
======================================================================================================
Install      2 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total download size: 1.8 M
Downloading Packages:
(1/2): sysstat-7.0.2-3.el5.i386.rpm                                                                                                                                                      | 169 kB     00:00
(2/2): compat-db-4.2.52-5.1.i386.rpm                                                                                                                                                     | 1.7 MB     00:00
----------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                           2.8 MB/s | 1.8 MB     00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : sysstat                                           [1/2]
  Installing     : compat-db                                         [2/2]

Installed: compat-db.i386 0:4.2.52-5.1 sysstat.i386 0:7.0.2-3.el5
Complete!


배포본을 최신버젼을 설치하였더니, 없는 프로그램의 두개이다.

1. 오라클 설치용 계정만들기

[root@localhost ~]# groupadd -g 5000 dba
[root@localhost ~]# useradd -g dba oracle
[root@localhost ~]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@localhost ~]# mkdir -p /home/oracle/oracle11
[root@localhost ~]# chmod 775 -R /home/oracle/oracle11
[root@localhost ~]# chown oracle:dba /home/oracle/


2. 커널 매개변수를 변경한다.

[root@localhost backup]# sysctl -a | grep kernel.shmall
kernel.shmall = 2097152
[root@localhost backup]# sysctl -a | grep kernel.shmmax
kernel.shmmax = 33554432
[root@localhost backup]# sysctl -a | grep kernel.shmmni
kernel.shmmni = 4096
[root@localhost backup]# sysctl -a | grep kernel.sem
kernel.sem = 250        32000   32      128
[root@localhost backup]# sysctl -a | grep fs.file-max
fs.file-max = 24589
[root@localhost backup]# sysctl -a | grep net.ipv4.ip_local_port_range
net.ipv4.ip_local_port_range = 32768    61000
[root@localhost backup]# sysctl -a | grep kernel.msgmni
kernel.msgmni = 16
[root@localhost backup]# sysctl -a | grep kernel.msgmax
kernel.msgmax = 8192
[root@localhost backup]# sysctl -a | grep kernel.msgmnb
kernel.msgmnb = 16384

 /etc/sysctl.conf

# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and
# sysctl.conf(5) for more details.

# Controls IP packet forwarding
net.ipv4.ip_forward = 0

# Controls source route verification
net.ipv4.conf.default.rp_filter = 1

# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0

# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0

# Controls whether core dumps will append the PID to the core filename
# Useful for debugging multi-threaded applications
kernel.core_uses_pid = 1

# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1

# Controls the maximum size of a message, in bytes
kernel.msgmnb = 65536

# Controls the default maxmimum size of a mesage queue
kernel.msgmax = 65536

# Controls the maximum shared segment size, in bytes
kernel.shmmax = 536870912

# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 268435456

#For Installing Oracle Setting
kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

fs.file-max = 65536

net.ipv4.ip_local_port_range = 1024 65000

net.core.rmem_default=4194304
net.core.wmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_max=262144


커널 매개변수 변경을 위하여 vi /etc/sysctl.conf를 실행하여 위와 같이 편집한다.

변경후 아래와 같이 실행
[root@localhost ~]# /sbin/sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 536870912
kernel.shmall = 268435456
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.wmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_max = 262144



3. /etc/security/limits.conf변경

Linux 계정 별로 실행되는 프로세스와 열린 파일 수를 제한해야 한다.. /etc/security/limits.conf 를 열고 아래의 내용과 같이 추가한다.

#<domain>      <type>  <item>         <value>
#
  oracle        soft    nproc          2047
  oracle        hard    nproc          16384
  oracle        soft    nofile         1024
  oracle        hard    nofile         65536

#*               soft    core            0
#*               hard    rss             10000


4. /etc/pam.d/login변경
[root@localhost ~]# vi /etc/pam.d/login
#%PAM-1.0
auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
auth       include      system-auth
account    required     pam_nologin.so
account    include      system-auth
password   include      system-auth
# pam_selinux.so close should be the first session rule
session    required     pam_selinux.so close
session    required     pam_loginuid.so
session    optional     pam_console.so
# pam_selinux.so open should only be followed by sessions to be executed in the user context
session    required     pam_selinux.so open
session    required     pam_namespace.so
session    optional     pam_keyinit.so force revoke
session    include      system-auth
session    optional     pam_ck_connector.so

session    required    /lib/security/pam_limits.so
황색 마크 부분을 추가한다.

5. /home/oracle/.bash_profile의 변경
[root@localhost ~]# vi /home/oracle/.bash_profile
export ORACLE_BASE=/home/oracle/oracle11
export ORACLE_SID=ORCL
export ORACLE_HOME=$ORACLE_BASE/product/11.1.0/db_1
export PATH=$PATH:$ORACLE_HOME/bin
export DISPLAY=:0.

파란마크 부분을 추가한다.

6. 압축을 푼다.
루트 계정으로 받은 오라클 db를 오라클 계정으로 이동하여 퍼미션을 오라클로 변경하고 압축을 풀어준다.
[root@localhost ~]# cd /root/Desktop/
[root@localhost Desktop]# ls
gnome-terminal.desktop  hadjaha-009b9e425c.desktop  linux_11gR1_database.zip
[root@localhost Desktop]# mv linux_11gR1_database.zip /home/oracle/
[root@localhost Desktop]# ls -la /home/oracle/
합계 1803100
drwx------ 4 oracle dba        4096  7월 14 20:12 .
drwxr-xr-x 4 root   root       4096  7월 14 19:44 ..
-rw-r--r-- 1 oracle dba          33  7월 14 19:44 .bash_logout
-rw-r--r-- 1 oracle dba         346  7월 14 20:10 .bash_profile
-rw-r--r-- 1 oracle dba         124  7월 14 19:44 .bashrc
drwxr-xr-x 4 oracle dba        4096  7월 14 19:44 .mozilla
-rw-r--r-- 1 root   root 1844533232  7월 14 19:26 linux_11gR1_database.zip
drwxrwxr-x 2 root   root       4096  7월 14 19:45 oracle11
[root@localhost Desktop]# chown oracle.dba /home/oracle/linux_11gR1_database.zip
합계 1803100
drwx------ 4 oracle dba        4096  7월 14 20:12 .
drwxr-xr-x 4 root   root       4096  7월 14 19:44 ..
-rw-r--r-- 1 oracle dba          33  7월 14 19:44 .bash_logout
-rw-r--r-- 1 oracle dba         346  7월 14 20:10 .bash_profile
-rw-r--r-- 1 oracle dba         124  7월 14 19:44 .bashrc
drwxr-xr-x 4 oracle dba        4096  7월 14 19:44 .mozilla
-rw-r--r-- 1 oracle dba  1844533232  7월 14 19:26 linux_11gR1_database.zip
drwxrwxr-x 2 root   root       4096  7월 14 19:45 oracle11
[root@localhost Desktop]#


사용자 변경과 압축풀기
[root@localhost Desktop]# su oracle
[oracle@localhost Desktop]$ cd [oracle@localhost ~]$ ls
linux_11gR1_database.zip  oracle11
[oracle@localhost ~]$ unzip linux_11gR1_database.zip/home/oracle/
[oracle@localhost ~]$ ls
database  linux_11gR1_database.zip  oracle11
[oracle@localhost ~]$ cd database

7. 설치시작
Xwindows
로 oracle계정으로  다시 로그인한다.
설치시에 xWindows가 한글세팅이라면, 오라클은 EUC_KR용 설치화면을 뿌리기 때문에 인코딩이 깨져나오는 현상이 발생할것이다.
이럴경우는 당황하지 말고 영문으로 설치하도록 한다.
콘솔상에서 export LANG=C 를 입력하면 인스턴트 영문모드가 된다.
[oracle@localhost database]$cd /home/oracle/database
[oracle@localhost database]$ export LANG=c
[oracle@localhost database]$ ./runInstaller
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 80 MB.   Actual 9276 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 2047 MB    Passed
Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2009-07-14_08-44-33PM. Please wait ...[oracle@localhost database]$
[oracle@localhost database]$


설치화면이 시작된다.


<맨처음 화면 - Gimp에서 편집된 이미지임..김프도 쓸만하군>


Oracle Basic Location : /home/oracle
Oracle Home Location : /home/oracle/prdouct/11.1.0/db_1
UNIX DBA Group : dba
를 입력한다. 입력하지 않아도 기본으로 나올것이다.
여기서 Location에 Oracle의 권한이 없는 디렉토리를 선택하면 아래와 같은 에러메세지가 나오므로, 로케이션은 앞의 .bash_profile에서 설정한대로 해주어야 한다.


Advanced Install버튼을 그리고 넥스트를 선택하자.



Inventory Directory가 /home/oracle/oracle11/oralInventory로 변경하고 Next하자.
만약 퍼미션 에러가 난다면 터미날에서 루트로 접속하여 oracle11디렉토리를 oracle.dba에게 준다.


언어를 추가한다.
Enterprise Edition - product Language

한국어와 쓰일 일본어를 정도를 영어와 함께 추가한다.


Install Location을 변경하는 부분이다. .bash_profile에서 설정해준것이 나올것이다. Next!

check mode- 시스템이 사양이 올바른가에 대한 체크를 한다. 설치에서 Warning 1개와 Not Excute부분이 1개 나왔다.  사설ip를 쓰는것이 문제가 되었다. 이것은 /etc/hosts부분에 사설ip domain명 별칭 등을 넣어서 해결할수 있다.

Create Database항목을 체크한후 Next

Select General Purpose


데이타베이스 이름과 SID값을 위와 같이 입력

메모리와 인코딩과 샘플 스키마등에 대해서 설정하여 준다.
메모리는 테스트 서버이니 디폴트인 403MB으로 잡았다.
인코딩은 UTF-8로 잡아줬다.
나머지는 디폴트로 NEXT

Management Option 별다른 체크없이 Next

file System  - /home/oracle/oracle11/oradata

Do not Enable Automated backups 자동백업 하지 않는다에 체크..

패스워드는 실무에서는 별도로 각기 관리 비번을 준다.
구찮으므로 모두 통일된 패스워드 발급

디폴트된 값으로 Next
이후 오라클에 사용등록하라는 메세지가 나오는데 등록안할것이므로 Next
설치 환경에 대한 설정을 보여준다. Summary- Next Installing



이제 설치모드 돌입.. 꽤 시간이 흘러야 다음 장면을 볼수 있다.

설치가 다 끝나면 다음과 같은 메세지가 출력된다.
터미널을 열어 루트로 로그인하여 위의 sh파일들을 실행하자. 실행후 OK버튼


설치가 끝이 났다. 이제 오라클이 제대로 제대로 설치되어 움직이는지 확인하여 보자.

[oracle@localhost bin]$ ./lsnrctl start

LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 15-JUL-2009 00:08:15

Copyright (c) 1991, 2007, Oracle.  All rights reserved.

TNS-01106: Listener using listener name LISTENER has already been started
[oracle@localhost bin]$ ./lsnrctl status

LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 15-JUL-2009 00:08:58

Copyright (c) 1991, 2007, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.1.0.6.0 - Production
Start Date                14-JUL-2009 22:09:41
Uptime                    0 days 1 hr. 59 min. 46 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /home/oracle/oracle11/product/11.1.0/db_1/network/admin/listener.ora
Listener Log File         /home/oracle/oracle11/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
Services Summary...
Service "ORACLE11" has 1 instance(s).
  Instance "ORCL", status READY, has 1 handler(s) for this service...
Service "ORACLE11_XPT" has 1 instance(s).
  Instance "ORCL", status READY, has 1 handler(s) for this service...
Service "ORCLXDB" has 1 instance(s).
  Instance "ORCL", status READY, has 1 handler(s) for this service...
The command completed successfully

[oracle@localhost bin]$ sqlplus /nolog

SQL*Plus: Release 11.1.0.6.0 - Production on Wed Jul 15 00:13:47 2009

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

SQL> connect orcl as sysdba
Enter password:
Connected.

설치 성공 이제 php에서 오라클을 쓸수있게 하는 포스팅과 연동법에 대해 알아보고, jsp에서도 오라클을 다뤄봐야 겠다.

2009. 7. 7. 14:05

gmail을 이용하여 자기도메인 메일만들기. make my domain mail by Gmail service


KISA정책인지 white domain이니  하는 바람에 개인서버 운영자는 자신의 도메인을 이용하여 sendmail을 운영하는것이 사실 헛수고가 되었다..

고정ip의 경우 KISA에서 수고스럽게 white ip로 변환시켜주지만, 돈없는 유동ip이용자는 절대 변환시켜주지 않는다. 대안은 무엇이냐? 바로 Gmail을 이용해서 imap을 쓰는것이다..

DNS서버를 이용하지 않고 도메인 등록사의 DNS서버를 이용한다면, 도메인 등록사에 gmail이용 부가서비스가 있으면, 다행이나 없다면 아래와 같이 MX항목과 CNAME을 바꿔달라고 요청해야 한다.

@ IN MX 30 ASPMX5.GOOGLEMAIL.COM.
@ IN MX 30 ASPMX4.GOOGLEMAIL.COM.
@ IN MX 30 ASPMX3.GOOGLEMAIL.COM.
@ IN MX 30 ASPMX2.GOOGLEMAIL.COM.
@ IN MX 20 ALT2.ASPMX.L.GOOGLE.COM.
@ IN MX 20 ALT1.ASPMX.L.GOOGLE.COM.
@ IN MX 10 ASPMX.L.GOOGLE.COM.
@ IN MX 10 aspmx.l.google.com.
mail IN CNAME ghs.google.com.
calendar IN CNAME ghs.google.com.
sites IN CNAME ghs.google.com.
docs IN CNAME ghs.google.com.

도레지의 경우 도메인 부가서비스가 매우 맘에 드는 기업이다..
하지만 가비아의 경우 GMAIL보다는 MS의 Live mail을 밀고있다.. Gmail을 쓰기위해서는 운영자에게 따로 메일을 보내거나 고객상담란에서 따로히 요청해야 한다...

MS Live Mail의 경우 POP3는 유료이다..

http://www.google.com/apps/intl/ko/business/index.html로 접속해서 구글메일에 자신의 도메인용 메일을 신청한다. 신청후 이메일을 활성화 시켜야 한다. (가입할때 표준형으로 가입하여야 무료메일을 쓸수있다. 고급형을 쓸경우는 50$을 지불하여야 하고, 무료형은 50개의 계정만 생성할수 있다. 50개의 계정이라면 거의 넉넉한 수준이라고 할수있다..규모가 있는 기업들은 50달러를 지불하면 되니깐..)


활성화되면 위와 같이 운영중이라는 메세지가 뜨면 OK...

Outlook이나 Exchange Mail에서의 세팅은 다음과 같다.
서버유형

pop3가 아닌 imap이다.




로그인정보에는 xxx@mydomain.com 이런식으로 구글에서 해준것으로 해주어야 한다.
outlook에서는 수고스럽게 smtp로그온 정보도 넣어주어야 하고..


보안인증 SPA를 이용하면 안된다...

이제 ~ 지메일을 이용하여 자신의 도메인을 가지고 메일구성을 할수있다..
sendmail이여..~ 아쉽다.. 이제 php용 mail함수를 이용하지 못한다니.. 아쉽기만 하다.. 웬놈의 KISA 정책..그렇다고 스팸이 사라지나.. 머리들 하고는.. 

 

2009. 6. 21. 14:13

CSS 풀다운메뉴...CSS 가로형 메뉴


한 사이트를 만들어 주는데, 아래와 같이 가로형 메뉴를 만들었다. 


플래쉬를 쓰면 좋으나, 플래쉬를 쓰는것을 별로 달가와 하지 않는 나이기에.. 오로지..CSS로만 견뎌보기로 계획을 잡았다.

난관점
영문 메뉴의 메뉴명 길이가 너무 길어서, 포샵에서 디자인한 것이 IE6에서 길이를 맞추는것이 좀 힘들다.
IE6버젼과 표준 웹브라우져들간의 CSS호환이 너무 틀렸다...
IE7에서는 top menu에서 서브메뉴를 선택할시 마우스를 이동하면 서브메뉴가 사라져 버리는 현상이 나타나며, 서브메뉴들이 중구난방이 되어버린다. 
해결 
IE6이하 버젼에서는 긴 메뉴명을 두 줄 표현으로 해결하고..
IE6이하의 버젼을 위하여 따로 ui메뉴를 만들지 않고  div태그보다는 테이블태그를 이용하여 해결했다.
IE7버젼에서는 여전히, CSS가 의도대로 작동하지 않는다..IE7에서만 서브메뉴를 바탕색과 동일한 폰트색으로 정하면, 접속자는 서브메뉴가 있는것을 눈치채지 못한다. (꼼수)

-> 아직 IE6을 쓰는 비율이 전세계적으로 60%에 달하니, IE6을 포기할수는 없다. 그렇다고 IE8이나 파폭,크롬같은 표준웹브라우져를 포기할수도 없어서 테이블 태그라는 꼼수를 부렸다..ㅋ

-> 작동 : IE5.5, IE6에서는 의도한바 대로 두줄 맞춤으로 가로형 메뉴를 쓸수있다.
IE8,크롬,사파리,파폭,오페라,플럭등에서는 완벽히 서브메뉴를 사용할수 있다.
아쉽게도 IE7에서는 서브메뉴를 포기한다.

소스출처:  ul태그에 대한 메뉴형성 소스는 Stu Nicholls  CSSplay  Professional series drop 에서 공개형 소스를 가지고 변형했다.http://www.cssplay.co.uk/menus/pro_drop2

파이어폭스, 크롬, 오페라, 네스케이프

익스플로러 5.5

익스플로러 6.0

익스플로러 7.0 ㅜ.ㅜ

익스플로러 8.0

HTML div

<head>
<link href="style.css" rel="stylesheet" type="text/css" charset="UTF-8" media="all" />
<!--[if IE 7]><link href="ie7.css" rel="stylesheet" type="text/css" charset="UTF-8" media="all" /><![endif]-->
</head>

<body>
<div id="nav_menu">
      <!-- 네비게이션 : IE7의 문제점 -->
      <!-- 네이게이션 시작 -->
      <ul class="menu2">
<li class="top"><a href="" id="about" class="top_link"><span class="down"> About Daon Company</span><!--[if gte IE 7]></a><![endif]-->

        <ul class="sub">
          <table valign=top><tr><td>
<li><a href="../menu/">CEO Message </a></li>
</td><td>
            <li><a href="../boxes/">Overview</a></li>
          </td></tr></table>
</ul>
        <!--[if lte IE 6]></a><![endif]-->
</li>
    
<li class="top"><a href="" id="products" class="top_link"><span class="down">Products & Services  </span><!--[if gte IE 7]></a><![endif]-->

        <ul class="sub">
          <table><tr><td valign="top" width="25%">
<li><a href="../menu/">BLINNO SERIES </a></li>
</td><td valign="top" width="50%" id="pro">
            <li><a href="../boxes/">Production facilities & Engineering Service</a></li>
            </td><td valign="top" width="50%">
            <li><a href="../boxes/">Coating Service</a></li>
          </td></tr></table>
</ul>
        <!--[if lte IE 6]></a><![endif]-->
</li>
    
<li class="top"><a href="" id="custom" class="top_link"><span class="down">Customer Support</span><!--[if gte IE 7]></a><![endif]-->

        <ul class="sub">
          <table valign=top><tr><td width="50%">
<li><a href="../menu/">Online Inquiry</a></li>
</td><td width="50%">
            <li><a href="../boxes/">Contact Us</a></li>
          </td></tr></table>
</ul>
        <!--[if lte IE 6]></a><![endif]-->
</li>

  <li class="top"><a href="" id="community" class="top_link">Community</a></li>
      </ul>
<!-- 네이게이션 끝 -->
</div>
</body>


CSS Style 정의-style.css

 /* 메뉴 네비게이션 관련 스타일 */
#nav_menu { padding-top: 15px; margin-top: 0px; font-family:Arial, Helvetica, sans-serif; font-size: 12px; font-weight:bold;}
.AKASmenubar { font-family:Arial, Helvetica, sans-serif; font-size: 12px; font-weight:bold;}
.menu2 {padding:0 0 0 32px; margin:0; list-style:none; height:40px; position:relative; font-family:arial, verdana, sans-serif; }
.menu2 li.top {display:block; float:left; position:relative;}
.menu2 li a.top_link {display:block; float:left; height:5px; line-height:15px; color:#000; text-decoration:none; font-size:11px; font-weight:bold; padding:0 0 0 12px; cursor:pointer;}
.menu2 li a.top_link span {float:left; display:block; padding:0 24px 0 12px; height:20px; padding-left: 20px; padding-right: 50px;}

.menu2 li a.top_link:hover { color:#FF6600; }


.menu2 li:hover > a.top_link { color:#FF6600; }


.menu2 table {border-collapse:separate;  height:0; position:absolute; top:0; left:0;}


/*  링크와 하버 스타일 정의 브라우져에 따라 달리 표기*/

.menu2 a:hover {visibility:visible;}
.menu2 li:hover {position:relative; z-index:200;}

/* 스크린에 표시되는 서브 메뉴들. */
.menu2 ul, 
.menu2 :hover ul ul, 
.menu2 :hover ul :hover ul ul,
.menu2 :hover ul :hover ul :hover ul ul,
.menu2 :hover ul :hover ul :hover ul :hover ul ul {position:absolute; left:-9999px; top:-9999px; width:0; height:0; margin:0; padding:0; list-style:none;}

.menu2 :hover ul.sub {left:2px; top:20px; padding:3px 0; white-space:nowrap; width:150px; height:auto; font-weight:bold}
.menu2 :hover ul.sub { _width: 400px !important;}
.menu2 :hover ul.sub li {  display:block; height:20px; position:relative; float:left; margin-left: 10px;}
.menu2 :hover ul.sub li {  _width: 124px !important; _padding-top: 0px; _margin-top:0px; _margin-left: 0px !important;} 
.menu2 :hover ul.sub li a {display:block; font-size:11px; height:20px;  line-height:20px; text-indent:5px; color:#000; text-decoration:none;}
.menu2 :hover ul.sub li a.fly {background:#fff url(prodrop2/arrow.gif) 80px 7px no-repeat;}
.menu2 :hover ul.sub li a:hover { color:#4E72D8; }
.menu2 :hover ul.sub li a.fly:hover {}
.menu2 :hover ul li:hover > a.fly {} 

.menu2 :hover ul :hover ul,
.menu2 :hover ul :hover ul :hover ul,
.menu2 :hover ul :hover ul :hover ul :hover ul,
.menu2 :hover ul :hover ul :hover ul :hover ul :hover ul
{left:90px; top:-4px; background: #fff; padding:3px 0; white-space:nowrap; width:93px; z-index:200; height:auto;}
 
ie7.css

 .menu2 :hover ul.sub li a {display:block; font-size:11px; height:20px;  line-height:20px; text-indent:5px; color:#EFF2EB; text-decoration:none;}
.menu2 :hover ul.sub li a:hover { color:#EFF2EB; }

-> 자 이제 작업좀 하자..메뉴만 치근거리지 말고...


스타일 없을때 이정도면 읽는데 지장없겠지..

2009. 6. 18. 13:57

페도라코어에서 putty 한글 사용법


리눅스를 서버로 사용하고, 윈도우즈를 클라이언트로 사용하다 보면 많은 이들이 한글 사용에 대한 불만이 많을 것이다. 웹호스팅을 받는 사람들도, vi를 사용하면 서버의 파일들을 바로 즉시 해결하여, 서버로부터의 결과물을 얻어볼수 있는데, 한글이 정확히 구현되지 않은 서버와 윈도우즈 putty간의 통신에서 한글을 포기하고, 클라이언트에서 한글파일을 작성한후 FTP를 통해, 전송후 결과물을 얻어보는 의도하지 않는 행위를 하는 분들도 있을것이다.

이를 해결하는 가장 쉬운점은, 서버의 한글인코딩과 putty의 한글인코딩을 맞춰서 사용하는것면 바로 해결된다.

리눅스를 한글사용으로 설치하면 시스템 인코딩이 기본으로 UTF8 코드를 사용하므로, putty에서도 UTF8로 세팅하면, 해결되지만, 많은 웹호스팅업체들이 기존의 고객들과의 호환성을 위하여 아직, EUC_KR로 서비스 하는 업체들이 많다.

EUC_KR를 사용하는 웹호스팅은 putty기본 세팅으로 사용하면 되며, 자신이 만든 웹서버를 운영하는 사람은 이와 같이 시스템을 설정하자.

우선 루트로 접속한후...

Last login: Thu Jun 18 13:11:49 2009 from 121.171.252.4
[daon@localhost ~]$ su -
Password:
[root@localhost ~]# cd /etc/sysconfig
[root@localhost sysconfig]# vi i18n
LANG="ko_KR.UTF-8"
SUPPORTED="ko_KR.UTF-8:ko_KR:Ko:en_US.UTF-8:en_US:en"
SYSFONT="latarcyheb-sun16"
SYSFONTACM="8859-15"


위의 사항을 /etc/sysconfig/i18n에 저장한다.(물론 다른 언어셋 설정은 주석처리하거나 삭제한다...)

그후 사용자들의 각각 계정의 .bash_profile에 언어셋을 지정해주면 된다.(/etc/skel/.bash_profile)에 저장하면 새로운 계정을 생성할때마다, 동일하게 세팅되므로, 한가지 팁이 된다.)
[daon@localhost ~]$ vi .bash_profile
export LANG="ko_KR.UTF-8"
export LC_ALL="ko_KR.UTF-8"

위의 내용들을 첨가하거나 수정하자...

그런후에 putty의 세팅법




putty의 설정에서 문자코드를 UTF8로 설정후 아래와 같이 저장해서 항상 같은 설정의 세션을 열어주면 편리하게 사용할수 있다.


이제, putty로 문서작성을 해보자. 사용기능은 매우 막강하나 한글코드때문에 에러점이 많았던 리눅스 대표 유틸 mc로서 문서작성을 해본 그림이다.


이제 서버에서 직접 작업하고 바로 바로, 결과물을 볼수 있다. 서버와 클라이언트간의 작업환경의 Gap을 없애자!!
2009. 6. 17. 03:31

브라우져 전쟁 IE, Opera , Firefox , Safari , Chrome 그리고 W3C


(IE는 IE6으로 테스트해보았다.) 

IE8이 갑자기 맛이 가는 바람에, 6으로 다운그레이드 했다. 다운그레이드 후에, 컴퓨터가 요동치는 혼란이 오더니, 속도감이 극감하기 시작했다. 

그래서 싹 포맷하고 다시 윈도우를 설치하고...

여러 브라우져들을 설치했다.

나는 한마디로 아무 브라우져나 다 쓴다..


http를 쓸때면 닥치는 대로 아무 브라우져나 열고 쓰기때문에.. 나름대로의 특징이 있는듯 하다..

그런데 왜 같은 기능의 여러 브라우져들을 위와 같이 설치하고 쓸까? 그것은 모든 브라우져를 만드는 그룹이나 회사들이 그들 나름대로 인터넷 환경을 주도하려는 욕심에서 기인한다.

가히 20세기 후반부와 21세기는 정보혁명 속에서 살고 있다고 해도 과언이 아니다. 그동안 침묵했던 시민들은 인터넷을 통하여 시민의 정치 참여가 본격화 되어 막강한 정치적 힘을 발휘하고 있으며, 각 문화, 사회, 단체,지식,산업간의 정보는 모두 인터넷으로 총망라되고 있는 실정이다. 집에서 PC만 키고 브라우져만 열면, 세상의 모든 지식,뉴스등을 접할수 있다. 또한 아시아의 사람들이 남미의 사람들과도 실시간으로 추가적 비용없이 대화하거나 정보를 바로 바로 나눌수 있다. 

즉 커뮤니케이션에 있어 시간과 물리적인 제약을 없애준것이, 바로 HTTP로 대변되는 인터넷의 핵심이다. 또한 굳이 강의실에서 강의를 듣지않아도 강의의 내용을 습득할수 있으며, 도서관에 가서 책을 찾지 않아도, 그에 상응하는 정보를 지식의 총망라인 인터넷안에서 얻을수 있다. 은행에 가지 않아도 현금을 이체하거나, 확인할수 있으며,쇼핑센타에 가지 않아도, 쇼핑물을 구입할수 있으며, 구직시장에 나가지 않아도 구직정보를 얻을수 있다.  

이런 혁명의 모든 행위의 첫 관문이 인터넷 브라우져이다. 인터넷 브라우져를 독점하는 자가, 곧 가까운 미래에서의 정보문화의 혁명을 주도할수 있기 때문이다.

그러므로, 관련 브라우져 제작체들은 사활을 걸고, 브라우져 전쟁에 돌입하고 있다. 아마도, 국가간의 전쟁이나 고대 십자군운동만큼의 인간문명의 전환점이 될것은 확신한다.

그런데~ 왜 인터넷 브라우져들을 많이 설치해놓고 사용하느냐?

그것은 바로 W3C라는 단체를 알면 쉽게 이해될수 있다.

W3C는 World Wide Web Consortium의 줄임말로 월드와이드 웹 협회라는 말이다. 이, 단체는 왜 만들어졌고, 왜 있는것인가 하면.. 세계에서 쓰이는 월드와이드웹 즉 http와 관련된 국제 표준을 정하는곳이다.

즉 http와 관련된 제반사항들의 사유화를 막고, 나름대로 국제적으로 협의하여 표준코드를 만들자는 협회이다. 이단체에는 여러 국제기관들과 업체,그룹들이 회원으로 등록되어 있으며, 이곳의 역활은 http와 관련된 컴퓨터언어와 코드등을 표준화하여 공고하여  일개단체나 회사에 의해 독점적으로 진행될수 있는 웹의 사유화를 막고자 만들어 진것이다. (일개단체나 회사라면 어디일까? 딱 떠오르곳이 있기는 하다.)


(W3C홈페이지)
하지만, 여기서 가지는 의문점은 왜? W3C같은 기관이 있는데도, 브라우져들을 왜 여러개 설치하고 사용하느냐? 하는점이다. 바로.. IE때문이다...

IE의 풀잇말은 Internet Explorer이다. IE는 Windows라는 세계 80%이상의 컴퓨터의 운영체제를 만들고 있는 Microsoft라는 회사의 브라우져이다.

IE = 곧 인터넷이라는 등식이 성립될 정도로 세계적으로 그 힘과 권위는 막강하다.. 특히 대한민국에서는 더더욱 그렇다... IE에 대항할수 있는 대항마들의 장점과 역사를 알아보고 단점도 알아본다.. 그리고 IE의 장점과 단점도 같이 알아보자.

1. 파이어폭스 & 네스케이프 (Firefox & Netscape Navigator)

안정성 : 10/10  속도 : 9 /10  한글호환 : 10/10  웹표준 : 10/10  개발자편의 12/10 인터페이스 : 8/10 확장성 10/10 

상당히 오랜 역사를 가진 브라우져이다. 초기 HTTP브라우져 Netscape의 적자이다. 지금과 같은 http가 개발되고 일반인들에게 공개된후 , 최초로 나온 Mozaic브라우져에게 대항한다는 의미의 장난스러운 의미의 Mozaic Killer라는 그룹이 만들어지고 이름이 단축되어 Mozilla가 된다.

Mozilla그룹에서 만든 브라우져가...이름하여 Netscape

(Netscape가 2008년을 기해서 영구적으로 업그레이드 하지않는다고 선언했다. )

두 제품 모두 AOL의 후원아래 만들어진 제품이다. 네스케이프가 Mozilla 본그룹에서 만들어지는 브라우져라면, 파이어폭스는 Mozilla본그룹에서 떨어져 나와 독립적 파이어폭스 프로젝트에 의해 만들어졌던  브라우져이다.

이게 뭔 차이람? 할지도 모르지만....

네스케이프는 모질라 본그룹에서 만드는 상업적 프로젝트이다. 모질라그룹안에서는 네스케이프의 상업적요소가  브라우져의 비대화를 가져와 결국 비효율적인 브라우져로 전락할것이라는 비판이 제기되고 있었다. 그에 따라 별도로 절제된 브라우져의 프로젝트를 시작하는데 그 작품이 파이어폭스이다. ( 우리가 단순히 아는 인터넷기술사회에도 진보와 보수가 나뉘어져 순수함의 가치를 지키고자 하는 이들의 씀씀이에 눈물겹다.) 또한 리눅스 프로젝트와 같이 GPL로 선언되어 모든 소스가 공개되어 있고, 여러 개발자들에 의해 다듬어져, 안정버젼을 배포하게 된다.

운영체제도 유닉스와 리눅스,윈도우즈,맥킨토시등 모든 OS를 같은 기능으로 제공한다.

또한 파이어폭스의 장점은 그대로 다른 브라우져의 기능들로 포함되었는데..
새로열기에서 Tab형식의 열기라던가, 다운로드시에 temp파일을 사용하지 않고 다이렉트 다운로드 기능, 응답시간이 초과하여 생기는 에러에 대한 대응과 브라우져 출력의 속도등은 다른 브라우져들에게는 모범사례가 되기도 하였다. 

또한 파폭의 가장 강력한 기능은 Addon기능이다.
Add on기능은 IE의 Active X와는 약간 거리가 있는 기능으로서...
자유자재로 브라우져의 기능을  붙이고 지울수 있다... 이 기능은 IE의 최근 제품에서 그대로 적용되어 ActiveX나 툴바같은 기능의 폐단점을 잘알고 있는 MS가 모방하여 출시하고 있다.

가장 지금까지 각광을 받고 있는 파이어폭스의 기능은 역시 Developer Expended이다..

웹개발자들은 일일히 소스를 검색하지 않아도, 브라우져 상에서 웹의 구성요소를 확인할수 있다.
이는 정말 강력한 기능으로서 그동안 웹 개발을 업으로 먹고 사는 사람들에게 너무나도 간절한 기능으로 역활을 톡톡히 해왔다..

지금은 크롬이나, 사파리등에서도 이와 비슷한 기능이 제공되고 있다.  하지만, 파폭의 기능에 눈과 손이 익은 개발자들은 아무리 크롬이나 사파리가 빠르다 할지 언정, 파폭을 클릭하게끔 하는 이유이다.


물론 IE8 최근버젼에서도 이기능은 포함되고 있지 않다.. 이와 비슷한 프로그램을 IE에서 쓰기위해서는 Debugbar라는 별도의 프로그램을 설치하여야 한다. http://www.snowrice.com/freepds/1059
 

네스케이프가 상업적 브라우져로 IE에게 신나게 얻어터지고 나서, 자취를 감추고 파이어폭스가 모질라 그룹의 적자 브라우져가 되었다. 네스케이프가 최근에 다시 Flock이라는 후속작으로 긴 침묵을 깨고 나왔지만, 파이어폭스는 프로젝트 설립후에 꾸준히, 리눅스유져,맥유져와 매니아층,웹개발자들 사이에서 사용되다가 지금까지도 굳건히 IE의 대항마로서 자리를 지키고 있다.

특히 파이어폭스가 그동안 보내준 W3C의 표준화 고수는 정말 고마울 따름이다.

속도는 오페라나 크롬에 비해 사이트 로딩시간이 약간 떨어진다. 안정성은 크롬을 제외한 타 브로우져보다 더 높은 느낌이 든다. 특히 한글 입출력에 비교해서는 크롬보다 더 높은 점수를 주고 싶다.

2. 오페라

안정성 : 10/10  속도 : 10 /10  한글호환 : 10/10  웹표준 : 10/10  개발자편의 8/10 인터페이스 : 12/10 확장성 10/10 

IE가 동네 양아치 끼어팔기 장사꾼이라면, 파이어폭스는 동네에서 건실한 일꾼이다..그러면? 오페라는... 동네의 어여쁜 매력투성이 아가씨이다..

첨 들어보는 브라우져 같지만, 최근 사용되는 브라우져들중 가장 오래된 역사를 가지고 있는 브라우져이다. 아직 IE가 동네 꼬마 수준이었을 무렵, 많은 각광을 받았으나, 후에 AOL후원의 네스케이프에게 떡실신되어 사람들의 머리에서 잊혀져, 간간히 리눅스 슈퍼유져들 사이에 사용되고 애용되던 브라우져이지만....

IE가 표준코드 사이와 Active X때문에 골머리 썩고 있는 브라우져 전국시대에 새로히 각인되는 굉장한 브라우져이다.

우선 오페라는 PC외의도 모바일 시장의 브라우져시장을 노린다. 또한 강력한 기능을 내포함으로 독특한 브라우져의 매력을 느낄수 있다.

브라우져안에 자체 웹서버 기능을 이식했다. 그렇게 함으로서 브라우져 안에서 다른 유져들간의 커뮤니케이션의 직접성을 높혔다. 가령, 다른 유져들에게 동영상을 보여주고 싶으면, 유튜브나 웹서버에 동영상을 등록하지 않고도 , 실시간으로 동영상을 보여줄수 있다. 물론 동영상뿐만이 아니고, MP3나 파일등도 다른유져들에게 공급해줄수 있다.

그리고 다양한 위젯기능을 선보인다. 오페라용 위젯은 현재 전 세계적으로 약 13000여종에 이르는것으로 알고 있다. 브라우져의 확장 기능이 단연코 으뜸이다...

또한 모바일 브라우져와 PC, 노트북 브라우져안에서 상호 연결성에 매우 많은 아이디어를 투자했으며,우선 인터페이스가 매우 화려하다.. 개성없는 윈도우 인터페이스에, 내 컴을 꾸미기에 가장 적절한 브라우져이다. 또한 스킨기능이 있어, 자신만의 독특한 브라우져를 꾸밀수도 있다..

그외 기본적인 브라우져의 기능속에 속도가 빠르다. 사이트 로딩시간이 파이어폭스보다도 빠름을 눈으로도 느낄수 있으며 파이어폭스와 마찬가지로 W3C의 표준안을 고수하고 있다.


3. 크롬 Chrome

안정성 : 10/10  속도 : 10 /10  한글호환 : 10/10  웹표준 : 10/10  개발자편의 10/10 인터페이스 : 8/10 확장성 8/10 

리포트를 안쓰고 리포트용지에 금가루를 묻혀 제출하면 리포트를 견실히 제출한 학생보다 어쩔때 점수가 후하게 나올적이 있다. 그것이 우리사회이다.....

크롬을 만든 구글이라는 회사는... 절대 금가루를 사용하지 않고 숙제를 제출한다...
그들의 검색엔진 구글을 보면 너무 단순 무식하다..
달랑 폼검색 하나만 있고 별다른 내용이 없지만... 이것 하나로 세계 검색엔진 시장을 평정한 것이, 구글이다.

그런 구글이 만든 웹브라우져가 크롬이다.

자본력과 검색엔진의 시장점유율을 가지고 있는 구글이 다른 순수 브라우져 제작체들과는 달리, MS의 깡패 IE의 독주에 브레이크를 걸수 있는 유일의 브라우져라는 여론도 있다.

상업적 회사의 상업적 목적의 브라우져인 만큼, IE외의 다른 브라우져들과 약간 틀리다.
우선 IE의 존재를 많이 의식한듯 하다. Active X를 과용할만큼 과용하는 대한민국 사용자를 위해 차기 한글판 크롬에 Active X를 지원하는 크롬의 버젼을 내놓겠다고 약속까지 했다. 만약 이 버젼이 나온다면, 아마도 IE는 더이상 브라우져 시장에서 깽판은 더이상 못칠것이다.

크롬은 출시부터, IE를 기술적 모태로 삼고 이를 보완하고, 개선했다고 밝히고 있다. 이것은 IE사용자들을 별다른 혼란없이 IE로 부터 떨어트리기 위한 코멘트로 나는 생각된다.

우선 크롬은 상당히 안정적이고, 속도도 파폭보다 빠르다. 개발자 메뉴도 충실히 기능이 들어가 있다.


또한 구글의 분위기에서 알수있듯히..맘대로 W3C를 해석하는 행위는 하지 않고 말끔히 W3C표준을 지키고 있다.
오페라가 동네의 멋쟁이 아가씨라면, 크롬은 조용히 신부수업 받는 양반집 규수댁같은 느낌의 브라우져이다.

인터페이스는 검색엔진 구글이 그러하듯이 군더더기 없이 깔끔하다.
구글이 자본력과 시장력을 바탕으로 현재의 시장을 어떤 방식으로 헤쳐나갈지 사뭇 궁금하다. 과연 IE와 타협할것이가? 아님 대결할것인가?  MS의 새로운 검색엔진 BING의 시작으로, 아마도 대결쪽으로 흐를듯 싶은데..

4. 사파리 (safari)
안정성 : 10/10  속도 : 9 /10  한글호환 : 9/10  웹표준 : 10/10  개발자편의 10/10 인터페이스 : 10/10 확장성 8/10
 

애플은 너무 독창적인 기업이다. 그 독창성으로 먹고 사는 기업이다. ipod와 iphone의 사례에서 보듯이 사용자 편의에 핵심을 찌르는 '바로 이거구나'하는 탄식을 쏟아내게 하는 기업이다.

그런 기업이 만든 브라우져, 사파리다...
PC의 양대산맥 애플과 IBM호환기종, 맥킨토시와 윈도우즈 머신, XP와 OS/X등의 대결 신화를 만든 애플사이다. 애플의 매니아층은 전세계적으로 고르게 있고, 멀티미디어와 DTP작업을 하는 대다수의 유져들은 아직도 MS의 그것보다 애플사의 이것들을 더 선호한다.

피날레가 그러하듯이, 포토샵과 일러스트,프리미어가 그러하듯이 애플용 어플리케이션이 윈도우즈로 이식되어 보다 대중화 되었듯이.. 마우스 작업없이는 불가능한 많은 프로그램들이 원래 애플의 품안에서 놀던 자식들이라는것이다..

맥킨토시가 애플사의 주력상품이던 그시절에..네스케이프가 인터넷 브라우져 주도권 싸움에서 IE에게 밀린후... W3C표준안같은건 머리에도 없던, MS사의 IE를 모두가 도입하던 그 시절에...
맥은 개인용 커뮤니케이션 도구라기 보다는 , 그냥 작업용 컴퓨터에 지나지 않았다.
그런 애플이 IE건 Netscape건 필요없으니 우리 브라우져를 우리 컴퓨터에 쓰겠다 하고 만든것이 사파리 브라우져이다..원래 애플용 컴퓨터에서 요긴하게 쓰라고 만든 이 브라우져가... 위의 인터넷 정국(?) 주도권을 확보하고자 야심차게, 윈도우용도 만들어 배포한것이다..

애플기종에서 그 기능과 안정성을 인정받았기 때문에 따로코멘트는 가치없는 일...
즐겨찾기 기능이나 사용자 인터페이스는 오페라의 디자인과 서로 견줄만하다. 와 브라우져가 이정도까지 발전할수 있구나 하는 느낌이 들정도다..

애플사는 자사의 ipod,iphone,safari의 상호 연계성을 강조했는데, 아마도 여기서 큰것이 하나 터질듯도 하다...
속도면이나 안정성에서는 매우 신뢰가 가는 제품...
하지만 단점은 다양한 한글폰트를 쓸경우에는 약간 어색함이 나온다는점...
물론 굴림이나 바탕체를 쓸경우에는 이상없이 나오지만, 기종건너온 제품이라 그런지..아직 윈도우 폰트에 적용을 못한점일까.. 

다운로드나 개발자 환경, 인터페이스를 놓고 비교하자면, 상당히 매력있는 제품이다.. 물론 사파리도 w3c의 규약을 충실히 지키고 있다.


5. Internet Explore (IE)

IE6:안정성 : 7/10  속도 : 8 /10  한글호환 : 10/10  웹표준 : 4/10  개발자편의 4/10 인터페이스 : 5/10 확장성 9/10

IE7:안정성 : 5/10  속도 : 4 /10  한글호환 : 10/10  웹표준 : 5/10  개발자편의 4/10 인터페이스 : 6/10 확장성 9/10

IE8:안정성 : 8/10  속도 : 9 /10  한글호환 : 10/10  웹표준 : 8/10  개발자편의 5/10 인터페이스 : 6/10 확장성 9/10



말이 필요없는 대표적인 브라우져인 IE이다.

MS사는 전세계의 컴퓨터운영체제의 80%이상을 점유하고 있는 공룡 컴퓨터 업체..
우선 운영체제를 설치하면 기본적으로 자사의 브라우져가 기본적으로 설치된다. 그러므로, 보통의 사람들.. 컴퓨터와 무관한 업종에서 일을 하거나 관심이 없는 사람들은, 별다른 이유없이 이 제품을 사용한다..

그러므로 IE는 부모소프트웨어인 Windows의 막강한 후원을 얻고 지금의 자리에 등극할수 있었다. 예로, IE의 끼어넣기식이 없었던, Windows 3.x시절엔 netscape가 점유율 70%이상이었다.
이문제는 독과점방식에 따른 끼워팔기로 인식되어 미국의 연방법원까지 기소되었던 큰 사건이다.

그런 정치적인 문제를 결부하지 않는다고 하더라도.. IE자체의 성능으로만 본다면...
위의 열거한 여러 제품에 비교하여 터무니없이 저하되어 있는 제품이라는것이다.

개인 유져의 상당수가 사용하는 IE6의 경우는 w3c의 표준안이 MS의 자사 마음대로 적용되고 있다. 즉 padding값과 margin값이 혼동되어 지는 사례이며, float의 적용이 표준안과는 많이 틀리다는점..

즉 같은 웹사이트를 개발해도.. 다른 브라우져에서는 무리없이 작동하나..
오직 IE에서만은 비정상적으로 작동하게 된다는 점이다.. 하지만, 브라우져의 업그레이드와 컴퓨터에 비관심의 유져들을 상업적 논리로서 고려해야 하기 때문에, W3C표준안의 훌륭한 표준기능들을 IE속박아래서 사용할수 없다는 괴기한 현상을 가져오게 된다.

더욱, 괴상한 현상은 W3C이 정한 법칙이 표준이 아니라 한 사업체가 마구 해석한 자의적인 코드들이 표준안처럼 되어버렸다는 점이다.

IE에서 잘보이는것 같은 메뉴가 다른 국제 표준 브라우져안에서는 다른 div에 감추어져서 보이지 않는다.
그렇다면? 개발하는 사람은 어디에 맞추어야 할까?  표준안에 맞출려면, IE를 사용하는 유져들을 상업적으로 고려해야 하고, IE에 맞출려면, IE를 사용하지 않는 표준 브라우져를 사용하는 유져들을 고려해야 한다.

참으로 난감한 일이 아닐수 없다. 문제는 MS가 이런 버그 투성이의 비표준 브라우져로 버틴것이 3,4년이 넘는다는 것이다. 그러므로, IE사용자 고려를 위하여 불필요한 소스들을 첨가하여 하고, 마크업에 프로그래밍 요소까지 덛붙여 사용자의 브라우져를 일일히 체크하여, 쓸데없는 소모적인 작업들을 해야 한다.

그것도 아니라면, 위와 같이 표준 브라우져 유져를 무시하고, 그냥 IE용 브라우져 대상자들만 고려해서 사이트를 만들거나 하는것이다...

더구나 한심한것이.. 위의 사이트의 경우에는 웹사이트 개발자에게 사이트 소스를 파는 업체의 사이트라는 점에서 우리 국내의 W3C준수는 한참 멀었다는 생각도 든다.

인식의 전환이 매우 필요하다.. 가령 우리나라의 대표적 포탈들을 한번 보자..

(Active X가 지원하지 않는 브라우져- 즉 IE외에는 쓰지말아라.)

 이 말은 곧, IE의 브라우져는 사용하지 말라는 말과 동일하지 아니한가?

정부가 관리하는 공인인증서등의 모든 형태도 IE용으로만 개발되었고, 다른 브라우져용 개발은 계획조차도 없다. 정보권력의 사유화,독점화를 비판하고 바로 잡아야하는것에 대하여.. 우리들은 논의조차 안하고 있다.

알게 모르게 정부는 IE라는 사유집단의 독점화를 방관하고 협조하고 있으며, 우리는 모르는 사이에 MS의 데이타베이스에 연명되고 있는것이다. 얼마나 위험한 발상인가 이말이다..

또한 저러한 결과물로 우리 나라는 국제의 표준화된 WC3코드를 맘대로 쓸수가 없다. 썼다가는 세상물정 모르는 바보가 되어버린다...표준을 지켰다는 이유로 바보가 된다... 그것이 바로 우리나라 대한민국이다..

IE는 가장 느리고 가장 형편없는 브라우져중의 하나이다.. 하지만 많은 이들이 사용을 강요받고 있기에 무시할수도 없는 브라우져중의 하나이다...

2009. 6. 14. 02:38

Moodle theme작성(무들 테마작성) 게시판목록 꾸미기


무들이 제공하는 여러 테마들중 손이 가는대로 선택한것이 Formal White테마이다.
Formal White테마에서 제공하는 게시물 목록은 다음과 같은 출력을 보여준다.


보기에 매우 답답해보인다. 그나마, fw테마 목록이 제일로 나은듯 하였다.

무려 장장 4시간에 걸쳐 게시판 목록보기를 나름대로 수정하여... 95%이상의 완성을 보는듯 하다.


제로보드를 보는듯한 느낌이 들게, 한국형 심플스타일 게시판 출력파일로 바꾸었다..
다음에는 포스트(에디터)를 손을 봐야할 차례....

포스트다음에는 게시글 보기기능을 바꿔줘야 한다.
강사, 학생,시스템관리자등... 모든 무들의 Output를 바꿔주어야 한국에서 그래도 어필을 할수 있지 않을까...

아 벌써 새벽 2시반이로군... 대략적인 레이아웃은 완료되었으니, 게시판을 손보고 나서..
최근게시물과 갤러리를 만들어야 겠다.. 
이리저리 하다보면 한국형 무들이 냄새가 나겠지..
아 밤은 깊어만 가는구나..

'Learn & Moodle' 카테고리의 다른 글

Moodle... register_globals  (1) 2010.05.12
Moodle 1.9.7버젼  (0) 2010.01.09
무들의 테마작성 - Making Moodle Theme  (0) 2009.06.13
무들의 본격 설치 – Install Moodle for Linux  (2) 2009.06.13
moodle theme 무들 테마 제작  (1) 2009.05.21
2009. 6. 13. 11:56

무들의 테마작성 - Making Moodle Theme

무들의 테마란 무엇인가?

즉 우리가 단순히 생각하는 skin이라는것과 비슷한것이다. 즉 사용자가 보기좋고 쓰기좋게 만든다는 의미이다. LMS시스템이 우리나라에서 고전을 면치못하는 이유중 큰 하나가, 한국식으로 보기좋게 포장이 안되어있다는 의미이다.

즉 LMS Moodle속에 내재된 막강한 여러기능을 무시하고, 오직 보이는것만 선호하는 한국인들의 병폐라 할수 있다. 솔직히, 나도 맨처음 무들을 첨 보았을때 약간 실망감도 들었다.

가령 무들의 경우 게시판이나 각 div들끼리 오와 열을 맞추는걸 싫어한다. 국수주의적 단체전체주의 문화속에 길들여진 우리들에게는 상당히 난잡해 보이고, 우선 거리감이 생기게 된다.

글자체들이 통일성이 없고, 폰트의 색깔이 한국형과는 거리가 멀다..
어린이들을 위해서인지 상당히 많은 이모티콘이 있으나 다수의 이모티콘은 우리눈에게 소위 장난으로 보여질수도 있다.

우리나라 웹디자인의 레이아웃이나 스킨등에 눈이 익은 사용자들은, 금새 대단치 않은 솔루션이라고 여길지도 모른다..

정말로 우리나라 웹디자이너들이나 한국의 웹을 만들어가는 사람들이 반성해야 한다.
충실한 콘텐츠보다 시각적인 면만을 너무 중시하는 우리 웹사이트들에 대해 한번쯤 고찰해봐야 한다. (그넘의 플래쉬도배와 웹표준도 준수하지 않는 마크업, 접속자가 원하지 않는 사운드의 출몰등은 정말 부끄러운 일이다.)

어느정도 눈높이를 맞춰야 우리나라에서도 통하겠구나, 하는 일념으로 테마제작에 들어간다. 우선 DB를 정리한다음, CSS, PHP를 면밀하게 뜯어봐야 겠다.. 시간이 되면 무들의 테마제작기법도 포스팅해야 겠다.

이 포스팅을 올리는 지금 이시각.. 어느정도 무들에 대한 테마제작의 개념 파악이 한국형(?)으로 감이 잡혔다..

우리나라에 무들을 본격적으로 쓰고 있는 학교나 단체는 그다지 많지않다. 아니 외국에 비해 거의 없다고 봐도 된다. 세종대학교,카이스트가 어느정도 본격 운영되고 있다고 보여지며, 배재대정도가 관심이 있는듯 해보인다.

외국의 경우 무들 자체를 설치하고 관리하여 주는 Management회사도 꽤 많을 뿐더러, 영국,미국의 경우 거의 모든 학교가 무들로서 인터넷 교육 파라다임을 잡고있다. 아니 세계의 많은 교육기간이 무들을 이용하여, 교육 데이타의 집성과 검색, 열람, 학습을 무들을 통하여 공유하고 있는것이다..

우리는 인터넷강국이라는 자만심으로 세계인들이 누리는 인터넷 교육 평등을 누리지 못한다. 물론, 국내가 가지는 교육적 불합리성에도 기인을 하는것이지만...

이야기가 밖으로 빠졌다.. 우선 지금까지 작성한 무들 테마이다..
테마명은 Akastheme이다... 3단구성의 레이아웃을 2단구성으로 메인콘텐츠를 잡았다.
테마 CSS뿐만이 아닌 기본 CSS도 수정을 많이 가했다. 그리고 PHP소스부분도 내나름대로 정리 및, 추가, 루틴설정을 많이 바꾸었다...

기본적인 메뉴바를 신설하고... LMS시스템과 일반 교내인터넷 시스템을 접목할 계획이다.
Moodle과 다른 외부 솔루션을 통합하여, 한국에서 보다 쓰기 편하며, 또한 외국의 무들과 상호 통신가능한 완벽한 테마를 작성하며... 한국형 눈높이를 지향한다...

아.. 하지도 못하는 플래쉬와 포샵작업이 마크업보다도 더 오랜 시간이 걸린다..

하여간 나의 첫번째 무들 테마 AKASTHEME이다...(표준테마로 쓸 스킨이다.. 여기에 menu bar와 최신 게시물, 갤러리 같은 한국형 요소를 추가해야겠다.)

2009. 6. 13. 11:17

무들의 본격 설치 – Install Moodle for Linux

MOODLE의 설치전 준비사항을 앞전 포스팅에서 알아보았다. 이제 무들을 설치해보자. 리눅스 시스템관리자라면 무들용 계정을 만들거나, 호스팅을 받는 사람들이라면, 이 단락을 뛰어넘어 실제 설치부터 시작하면 된다.

무들을 설치하기 위한 계정준비 사항이니 참조하기 바랍니다.

무들용 사용자 계정의 추가

 

[bestakas@localhost ~]$ su -

암호:

[root@localhost ~]# useradd testmoodle

[root@localhost ~]# passwd testmoodle

testmoodle 사용자의 비밀 번호 변경 중

새 UNIX 암호:

잘못된 암호: it is based on a dictionary word

새 UNIX 암호 재입력:

passwd: 모든 인증 토큰이 성공적으로 업데이트 되었습니다.

[root@localhost ~]#

 

 

무들용 MySQL DB 계정의 추가

 

[root@localhost ~]# mysql -uroot -p mysql

Enter password:

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 4811

Server version: 5.1.32-log Source distribution

 

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

 

mysql> create database moodletest default character set utf8 collate utf8_unicode_ci;

Query OK, 1 row affected (0.02 sec)

 

mysql> grant all on moodletest.* to moodletest@localhost identified by 'moodle1234';

Query OK, 0 rows affected (0.02 sec)

 

mysql> quit

Bye

[root@localhost ~]# mysqladmin -uroot -p shutdown

Enter password:

[root@localhost ~]# mysqld_safe --user=mysql &

[1] 23920

[root@localhost ~]# 090613 10:06:57 mysqld_safe Logging to '/usr/local/mysql/data/localhost.localdomain.err'.

090613 10:06:57 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data

[root@localhost ~]#

 

<!—항상 MySQL에서 MYSQL DB와 MYSQL 계정을 추가하면 반드시 Mysql을 재시동하여야 한다.

 

무들용 도메인의 버추얼호스팅 등록

[root@localhost ~]# vi /usr/local/httpd/conf/extra/httpd-vhosts.conf

<VirtualHost *:80>

DocumentRoot /home/moodletest/public_html

ErrorLog logs/moodletest.japasop.com_error_log

CustomLog logs/moodletest.japasop.com_access_log common

ServerName moodletest.japasop.com

ServerAlias moodletest.japasop.com

</VirtualHost>

<Directory /home/moodletest/public_html/>

AllowOverride All

</Directory>

[root@localhost ~]# /usr/local/httpd/bin/httpd -k restart

[root@localhost ~]#chmod 707 –R /home/testmoodle

 

도메인은 도메인을 구입한 딜러회사의 네임서버에서 도메인을 등록하던지, 아니면 자신의 네임서버에 등록한다.

웹페이지가 외부에서 볼수 있게끔 707권한을 준다. (moodle은 기본적으로 무들이 설치되는 바로 앞단계의 디렉토리에 moodledata디렉토리인 캐쉬용 저장소를 만든다. 이 캐쉬용 저장소는 http프로토콜로 외부에서 접근할수 없는 디렉토리에 위치시키는것이 좋다. 단, moodle캐쉬용 디렉토리인 moodledata이외의 moodle용 파일들은 설치후 705로 바꿔도 무관하다.

(현재는 도메인이 발급안된 상태이므로, IP/~moodletest 상태로 진행해본다.)

  • 무들의 설치

무들을 인터넷상에서 다운로드한다.

 

셀상에서의 직접다운로드와 압축해제

 

[testmoodle@localhost ~]$ wget http://download.moodle.org/download.php/stable19/moodle-weekly-19.tgz

--2009-06-13 10:24:58-- http://download.moodle.org/download.php/stable19/moodle-weekly-19.tgz

Resolving download.moodle.org... 70.86.136.82

Connecting to download.moodle.org|70.86.136.82|:80... connected.

HTTP request sent, awaiting response... 200 OK

Length: unspecified [text/html]

Saving to: `moodle-weekly-19.tgz'

 

[ <=> ] 14,172 39.2K/s in 0.4s

 

2009-06-13 10:25:00 (39.2 KB/s) - `moodle-weekly-19.tgz' saved [14172]

 

[testmoodle@localhost ~]$ ls -la

합계 52

drwx------ 5 testmoodle testmoodle 4096 2009-06-13 10:24 .

drwx--x--x 14 root root 4096 2009-06-13 10:02 ..

-rw-r--r-- 1 testmoodle testmoodle 18 2008-02-29 23:27 .bash_logout

-rw-r--r-- 1 testmoodle testmoodle 258 2009-06-12 08:43 .bash_profile

-rw-r--r-- 1 testmoodle testmoodle 124 2008-02-29 23:27 .bashrc

drwxr-xr-x 2 testmoodle testmoodle 4096 2008-04-07 05:43 .gnome2

drwxr-xr-x 4 testmoodle testmoodle 4096 2009-06-03 01:26 .mozilla

-rw-rw-r-- 1 testmoodle testmoodle 14172 2009-06-13 10:25 moodle-weekly-19.tgz

drwx---rwx 3 testmoodle testmoodle 4096 2009-06-04 23:05 public_html

[testmoodle@localhost ~]$ tar -xzvf moodle-weekly-19.tgz

중간생략~

moodle/question/move_form.php

moodle/question/upgrade.php

moodle/question/export.php

moodle/question/preview.php

moodle/question/restorelib.php

moodle/index.php

[testmoodle@localhost ~]$ ls

moodle public_html moodle-weekly-19.tgz'

[testmoodle@localhost ~]$ cd moodle/

[testmoodle@localhost moodle]$ ls

[testmoodle@localhost moodle]$ mv * ../public_html/

[testmoodle@localhost moodle]$ cd ..

[testmoodle@localhost ~]$ cd moodle/

[testmoodle@localhost moodle]$ cd ../public_html/

[testmoodle@localhost public_html]$ ls

README.txt blocks course files help.php install.php lib mnet pix sso user

admin blog enrol filter index.html iplookup login mod question tag userpix

auth calendar error grade index.php kongsa.JPG manifest.txt my rss tags version.php

backup config-dist.php file.php group install lang message notes search theme weblog

[testmoodle@localhost public_html]$

압축이 제대로 다운받아지지 않았거나 에러가 생기면 FTP를 통하여 업로드후 압축을 풀면 된다.

압축을 풀면 moodle이라는 디렉토리를 만들므로, 직접 도메인에서 index.html을 호출하기 쉽게, public_html에 압축을 푼 파일을 모두 옮긴다. (moodle디렉토리 아래 있는 파일만 옮긴다.)

클라이언트 브라우져로 이동하여, 압축된 파일을 이동하여, 무들을 본격 설치하자.


설치한 웹서버의 주소창을 입력하면, 무들 설치화면 나온다. 기본 언어팩을 물어보는데, 한글을 선택할경우 한글언어팩이 다운이 안받아지는 경우가 있다. 차후 설치후 언어팩을 변경할수 있으니 영어 언어팩 하나로만 진행해보자.


      PHP라이브러리에 대한 체킹을 실시한다. Pass되지 않으면 무들을 설치할수 없다.



  무들이 설치될 디렉토리와 웹주소, 캐쉬디렉토리, 설치디렉토리를 묻는다. 별다른 입력이 없으면 자동으로 설정된다. (차후에 도메인이 변경될때는 셀에서 변경하여 주면 된다.)


  SQL DB이름과 계정,비밀번호를 입력한다. 단락에서 생성한 SQL DB 사용해보기로 하겠다.



서버에 필요한 프로그램들과 php확장요소들이 설치되었는지 마지막으로 체크한다. 모두 OK 나오면 성공, 만약 모두 OK 나오지 않으면 불안요소가 될수도 있으므로 리눅스의 경우 Apache PHP 재컴파일하거나 윈도우즈의 경우 라이브러리모듈을 추가한다.


 무들의 설치를 진행하겠다는 메세지

  저작권확인등의 작업이다.

  자동으로 설치할것이냐? 아니면 수동으로 설치할것이냐를 묻는다. 자동/수동 아무런 차이가 없다. 수동은 OK Next버튼을 눌러줘야 다음단계가 진행되는것뿐이다.


DB Table 생성과 filed 생성하고 기본적인 항목에 데이타를 기입하며, 웹상으로 설치를 다이나믹하게 보여준다.

 최고관리자의 비번과 정보를 입력한다.

  사이트에 대한 정보를 물어본다. (사이트에 대한 정보입력을 취소하고 진행했다.)

 최종으로 설치된 무들의 초기화면...! 소문과는 틀리게 상당히 심플(?)하고 단순한 레이아웃을 보여준다.

이상으로 무들의 설치과정을 자세히 포스팅했다. 드디어 무들의 테마(Moodle theme)작성에 대한 포스팅을 시작하여야 겠다.