'전체 글'에 해당되는 글 89건

  1. 2011.05.26 ubuntu에서 subversion 및 trac 설치
  2. 2011.05.03 jeus6 + webtob 연동... 가상호스트
  3. 2010.11.17 [Mysql] 쿼리문 내에서 encoding 변경...
  4. 2010.05.14 이클립스 설치 참고.

ubuntu에서 subversion 및 trac 설치

|


1. subversion 설치 (svn+ssh 로 접속)
    1) apt-get install subversion libapache2-svn
    2) groupadd svn
    3) usermod -G svn 계정사용자ID  =>svn그룹에 subversion으로 로그인 권한을 가진 사용자를 추가
    4) cd 리포지터리로 이용할 디렉토리
    5) svnadmin create 리포지터리명  #DB종류는 알아서....
    6) chgrp -R svn 리포지터리명 
    7) chmod -R g+w 리포지터리명
    8) 접속테스트 => svn+ssh://계정아이디@도메인/path/to/리포지터리명  (/path/to 는 리포지터리 절대경로)

2. trac 설치
    1) apt-get install trac trac--* libapache2-mod-python pythone-setuptools
    2) cd 설치할홈디렉토리로 이동
    3) trac-admin 프로젝트디렉토리명 initenv
        실제프로젝트명->DB종류->레포지터리종류->레포지터리경로
    4) trac-admin 프로젝트디렉토리명 permission add 관리자ID TRAC_ADMIN
    5) cd 프로젝트디렉토리 -> db 디렉토리 읽기/쓰기권한 부여
    6) trac.ini 수정
        -타문서참조-
    7) apache2 환경설정
        <VirtualHost *:80>
            ServerAdmin aaa@aaaa.com
            DocumentRoot /path/to/trac #Trac의 프로젝트 상위 경로
            ServerName 도메인주소
            <Location />
                SetHandler mod_python
                PythonHandler trac.web.modpython_frontend
                PythonOption TracEnvParentDir /path/to/trac
                PythonOption TracUriRoot /
            </Location>

            <LocationMatch "[^/]+/login">
                AuthType Basic
                AuthName "Trac Authentication"
                AuthUserFile /path/to/tracpasswd/.htpasswd  #암호파일저장위치
                Require valid-user
            </LocationMatch>
        </VirtualHost>
    8) 암호저장
        htpasswd -c /path/to/tracpasswd/.htpasswd admin 
       
3. 테스트
     1) 아파치 재시작
     2) 도메인주소로 접속 테스트

-끝-

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

vim/ls 색상변경  (0) 2011.08.26
우분투11(Ubuntu 11) 에서 아파치 환경변수(ENV)  (0) 2011.06.02
이클립스 설치 참고.  (0) 2010.05.14
Zend Optimizer 3.0.2  (0) 2010.04.08
리눅스 ssh 접속 빠르게 하기..  (0) 2010.03.16
And

jeus6 + webtob 연동... 가상호스트

|
1. webtob 설치 와 jues 설치는 되어 있고, 인증키가 적용되어 있는것으로 간주한다.
    - 어렵지않게 설치할수 있다.
    - 단 jeus 설치시 libstdc..... 에러가 날경우. jdk가 설치되어 있는지 확인한후
    - 설치가 되어 있다면,
    - #jeus설치화일 LAX_VM jdk경로/bin/java
    - 위의 옵션을 적용해 설치한다.

2. 환경변수 설정
    - webtob 환경변수

WEBTOBDIR=/AAA/webtob #webtob 설치경로
export WEBTOBDIR

PATH="${WEBTOBDIR}/bin:${PATH}"
export PATH

LIBPATH="${WEBTOBDIR}/lib:${LIBPATH}"
export LIBPATH

    - jues 환경변수
 JEUS_HOME=/AAA/jeus #jeus 설치경로
export JEUS_HOME

PATH="${JEUS_HOME}/bin:${JEUS_HOME}/webserver/bin:${JEUS_HOME}/lib/system:${PATH}:/#JDK설치경로"
export PATH

JEUS_BASEPORT=9736
export JEUS_BASEPORT

JEUS_LIBPATH="${JEUS_HOME}/lib/system"
export JEUS_LIBPATH

3. webtob 환경설정
config 디렉토리내 http.m 혹은 XXXX.m 화일. 그룹명을 Vgroup으로 하였다.
*DOMAIN
jeuservice

*NODE
localhost   
  WEBTOBDIR = "/XXX/XXX/webtob", #webtob 설치경로
  SHMKEY    = 54000,
  DOCROOT   = "/XXX/XXX/webtob/docs", #기본 경로...
  PORT      = "8090",
  LOGGING   = "log1",
  ERRORLOG  = "log2",
  JSVPORT   = 9900,
  HTH       = 1
 

*SVRGROUP
htmlg       NODENAME = "localhost", SVRTYPE = HTML
cgig        NODENAME = "localhost", SVRTYPE = CGI
ssig        NODENAME = "localhost", SVRTYPE = SSI
jsvg        NODENAME = "localhost", SVRTYPE = JSV
vjsvg        NODENAME = "localhost", SVRTYPE = JSV, VHOSTNAME = vhost1

*SERVER
html        SVGNAME  = htmlg, MinProc = 1,  MaxProc = 2, ASQCount = 1
cgi         SVGNAME  = cgig,  MinProc = 1,  MaxProc = 2
ssi         SVGNAME  = ssig,  MinProc = 1,  MaxProc = 2
MyGroup     SVGNAME  = jsvg,  MinProc = 1,  MaxProc = 5
Vgroup     SVGNAME  = vjsvg,  MinProc = 1,  MaxProc = 5

*URI
uri1        Uri      = "/cgi-bin/",  Svrtype = CGI
uri2        Uri      = "/examples", Svrtype = JSV
uri3        Uri      = "/exploded", Svrtype = JSV
uri4        Uri      = "/", Svrtype = JSV

*ALIAS
alias1      URI      = "/cgi-bin/", RealPath = "/XXX/XXX/webtob/cgi-bin/"

*LOGGING
log1        Format   = "DEFAULT",   FileName = "/XXX/XXX/webtob/log/access.log", Option = "sync"
log2        Format   = "ERROR",     FileName = "/XXX/XXX/webtob/log/error.log",  Option = "sync"

*EXT
htm         MimeType = "text/html",  SvrType = HTML
jsp         Mimetype ="application/jsp",  Svrtype=JSV

*VHOST
vhost1      DOCROOT = "/AAA/BBB", #홈페이지 저장경로
            NODENAME = "localhost",
            HOSTNAME = "도메인명",  #도메인명
            PORT = "8090"

4. jues 환경설정

   1). config/localhost 디렉토리에서
       localhost_servlet_engine2 디렉토리 내에 JEUSMain.xml 파일을 수정한다. 빨간색이 추가된부분이다.
<?xml version="1.0" encoding="utf-8"?>
<jeus-system xmlns="http://www.tmaxsoft.com/xml/ns/jeus" version="6.0">
    <node>
        <name>frody-ubuntu</name>
        <class-ftp>true</class-ftp>
        <sequential-start>true</sequential-start>
        <enable-webadmin>true</enable-webadmin>
        <engine-container>
            <name>container1</name>
        <command-option>-Xms256m -Xmx512m -XX:MaxPermSize=128m</command-option>
            <sequential-start>true</sequential-start>
            <engine-command>
                <type>ws</type>
                <name>engine1</name>
            </engine-command>
            <engine-command>
                <type>jms</type>
                <name>engine1</name>
            </engine-command>
            <engine-command>
                <type>ejb</type>
                <name>engine1</name>
            </engine-command>
            <engine-command>
                <type>servlet</type>
                <name>engine1</name>
            </engine-command>
        </engine-container>
        <engine-container>
            <name>container2</name>
        <command-option>-Xms256m -Xmx512m -XX:MaxPermSize=128m</command-option>
            <sequential-start>true</sequential-start>
            <engine-command>
                <type>servlet</type>
                <name>engine2</name>
            </engine-command>
        </engine-container>
    </node>
    <application>
        <name>examples</name>
        <path>examples.ear</path>
        <deployment-target>
               <target>
                <engine-container-name>frody-ubuntu_container1</engine-container-name>
                <web-context-group>
                    <name>MyGroup</name>
                </web-context-group>
            </target>
        </deployment-target>
        <deployment-type>EAR</deployment-type>
    </application>
    <application>
        <name>exploded</name>
        <path>exploded</path>
        <deployment-type>COMPONENT</deployment-type>
        <web-component/>
        <deployment-target>
            <target>
                <engine-container-name>frody-ubuntu_container1</engine-container-name>
            </target>
        </deployment-target>
    </application>
    <application>
        <name>/</name>
        <path>/AAA/BBB</path> <!-- 홈페이지 저장 경로 -->
        <deployment-type>COMPONENT</deployment-type>
        <deployment-target>
            <target>
                <engine-container-name>frody-ubuntu_container2</engine-container-name>
                <web-context-group>
                    <name>Vgroup</name>
                </web-context-group>
            </target>
        </deployment-target>
        <web-component/>
    </application>
</jeus-system>

   2). localhost_servlet_engine1 디렉토리를 통째로 localhost_servlet_engine2 로 복사한다
       - WEBMain.xml 을 수정한다.
<?xml version="1.0"?>
<web-container xmlns="http://www.tmaxsoft.com/xml/ns/jeus" version="6.0">
    <context-group>
        <group-name>Vgroup</group-name>
        <webserver-connection>
            <!-- 제거
            <http-listener>
                <listener-id>http1</listener-id>
                <port>8098</port>
                <thread-pool>
                    <min>10</min>
                    <max>20</max>
                    <step>1</step>
                </thread-pool>
            </http-listener>
        -->
            <webtob-listener>
                <listener-id>webtob1</listener-id>
                <port>9900</port>
                <output-buffer-size>8192</output-buffer-size>
                <thread-pool>
                   <min>1</min>
                   <max>5</max>
                   <step>1</step>
                   <max-idle-time>30000</max-idle-time>
                </thread-pool>
                <webtob-address>localhost</webtob-address> <!-- socket으로 연결할경우 경로를 입력한다.  -->
                <registration-id>Vgroup</registration-id>
            </webtob-listener>
        </webserver-connection>
        <logging>
            <access-log>
                <handler>
                    <file-handler>
                        <name>handler1</name>
                        <valid-day>1</valid-day>
                    </file-handler>
                </handler>
            </access-log>
        </logging>
    </context-group>
</web-container>

5. webtob, jeus의 기동/종료

    - webtob
       bin 디렉토리에서 wsboot/wsdown 명령으로 동작시킨다.
    - jeus
       bin 디렉토리에서
       기동 : ./jeus -xml -Uadministrator -P암호
       종료 : ./jeusadmin localhost -Uadministrator -P암호   입력후
                down/boot, jeusexit -> 완전종료

6. 추가
    - 오라클 연동시 제우스홈디렉토리/lib/datasource 디렉토리내에 ojdbc1X.jar 파일을 넣어둔다.
    -
    - 오라클 접속이 자주끊기며 ORA-12519 오류가 발생하면
       SQL> SHOW PRARAMETER PROCESSES ->로 확인후
       SQL> ALTER system SET processes=100 scope=spfile;
       해준다.

'Computing > java/jsp' 카테고리의 다른 글

톰캣 환경설정  (0) 2008.05.24
웹용 Chart 여러가지  (0) 2008.03.25
Tomcat 설치  (1) 2007.10.16
And

[Mysql] 쿼리문 내에서 encoding 변경...

|
2가지 방법... 1. convert 또는 case 함수 이용... ??  2. 이노성(lnsium) 님의 모듈이용.

1.

출처 : http://dev.mysql.com/doc/refman/5.1/en/charset-convert.html

9.1.9.2. CONVERT() and CAST()

CONVERT() provides a way to convert data between different character sets. The syntax is:

CONVERT(expr USING transcoding_name)

In MySQL, transcoding names are the same as the corresponding character set names.

Examples:

SELECT CONVERT(_latin1'Müller' USING utf8);
INSERT INTO utf8table (utf8column)
SELECT CONVERT(latin1field USING utf8) FROM latin1table;

CONVERT(... USING ...) is implemented according to the standard SQL specification.

You may also use CAST() to convert a string to a different character set. The syntax is:

CAST(character_string AS character_data_type CHARACTER SET charset_name)

Example:

SELECT CAST(_latin1'test' AS CHAR CHARACTER SET utf8);

If you use CAST() without specifying CHARACTER SET, the resulting character set and collation are defined by the character_set_connection and collation_connection system variables. If you use CAST() with CHARACTER SET X, the resulting character set and collation are X and the default collation of X.

You may not use a COLLATE clause inside a CONVERT() or CAST() call, but you may use it outside. For example, CAST(... COLLATE ...) is illegal, but CAST(...) COLLATE ... is legal:

SELECT CAST(_latin1'test' AS CHAR CHARACTER SET utf8) COLLATE utf8_bin;


2.
출처 : http://database.sarang.net/?inc=read&aid=25074&criteria=mysql&subcrit=&id=&limit=&keyword=&page=

안녕하세요. fedora core 2가 나온 기념으로 udf 하나 만들어 봤습니다.

예전에 문자셋 인코딩 어떻게 하는건지 몰라 헤맸는데 iconv이라는 라이브러리가 있다는 것을 최근에 알았답니다..-.-;;

 

글구 fedor core 2가 문자셋을 utf-8로 전환함에 따라 mysql client에서 udf-8로 저장된 데이타는 깨져서 나오더군요. 그래서 iconv UDF가 필요하게 됐답니다. phpMyAdmin는 알아서 iconv를 적용하더군요. 정말 phpMyAdmiin은 짱입니다..-.-;;

 

g++ -shared -o mysql_udf_iconv iconv.so iconv.cpp -I/usr/include/mysql -liconv (컴파일)

 

mysql_udf_iconv.so를 /usr/lib/에 옮겨둡니다.

 

create function ICONV returns string soname "mysql_udf_iconv.so" (함수등록)

 

select iconv(data_field, "udf-8", "euckr") from table; (함수사용)

 

테스트는 알아서...-.-;;

소스입니다.

 

#include <stdio.h>

#include <string.h>

#include <iconv.h>

#include <mysql.h>

 

extern "C" my_bool ICONV_init(UDF_INIT* initid, UDF_ARGS* args, char* message);

extern "C" void ICONV_deinit(UDF_INIT* initid);

extern "C" char* ICONV(UDF_INIT* initid, UDF_ARGS* args, char* result,

unsigned long* length, char* is_null, char* /*error*/);

 

const int BufSize = 65536; //65535(64KB)+1

static iconv_t cd;

 

my_bool ICONV_init(UDF_INIT* initid, UDF_ARGS* args, char* message)

{

enum Item_result* type = args->arg_type;

 

if(args->arg_count != 3 || type[0] != STRING_RESULT || type[1] != STRING_RESULT || type[2] != STRING_RESULT)

{

strcpy(message,"Wrong arguments to iconv");

return 1;

}

 

cd = iconv_open((const char *)args->args[1], (const char *)args->args[2]);

if(cd == (iconv_t)-1)

{

strcpy(message, "iconv_open() failed");

return 1;

}

 

initid->ptr = new char[BufSize];

if(!initid->ptr)

{

strcpy(message, "Memory alloc failed");

return 1;

}

initid->max_length = BufSize;

return 0;

}

 

void ICONV_deinit(UDF_INIT* initid)

{

iconv_close(cd);

if(initid->ptr)

delete[] initid->ptr;

}

 

char* ICONV(UDF_INIT* initid, UDF_ARGS* args, char* result,

unsigned long* length, char* is_null, char* /*error*/)

{

const char* inBuf = args->args[0];

size_t inByteLeft = args->lengths[0];

char* outBuf = initid->ptr;

size_t outByteLeft = BufSize;

size_t ret;

 

while(1)

{

ret = iconv(cd, &inBuf, &inByteLeft, &outBuf, &outByteLeft);

if(!inByteLeft)

break;

if(ret == (size_t)-1)

break;

}

 

*length = BufSize - outByteLeft;

return initid->ptr;

}

 

짧죠?

버그 나오면 알아서 고쳐주시고 저한텐 알려주지 마세요..ㅠ.ㅠ


'Computing > MySQL' 카테고리의 다른 글

mysql 복구  (0) 2011.11.04
[펌]MySql 복구 방법  (0) 2007.07.25
[펌]MySQL Cluster  (0) 2007.07.25
[펌]MySQL Replication 설치  (3) 2007.07.25
And

이클립스 설치 참고.

|
우분투에서 플러그인 설치시 The artifact file for osgi.bundle,org.eclipse.cvs,1.0.400.v201002111343 was not found. 라는 오류가 나올때는
eclipse-pde 를 설치하지 않았기 때문이다. 시냅틱관리자를 이용해 설치를 해주자.

- 여러 Software site 를 사용함(enable)으로 바꿔준다.

- 언어팩 관련 Software site를 추가해 준다.
Europa : http://download.eclipse.org/technology/babel/update-site/europa
Ganymede : http://download.eclipse.org/technology/babel/update-site/ganymede
Galileo : http://download.eclipse.org/technology/babel/update-site/galileo

- ftp 기능
remote system explorer
target management terminal
을 설치한다.

And
prev | 1 | ··· | 4 | 5 | 6 | 7 | 8 | 9 | 10 | ··· | 23 | next