티스토리 툴바

블로그 이미지
fermi+log fermi

카테고리

분류 전체보기 (200)
fermilog-journal (131)
fermilog-Research (0)
fermilog-Conference (29)
fermilog-Photo (3)
fermilog-Monterey (26)
fermilog-Singapore (1)
fermilog-미분류 (10)
Total141,536
Today6
Yesterday12
http://skagns.tistory.com
http://www.ahngun.com
Posted by fermi
참고: http://dev.mysql.com/doc/refman/5.5/en/charset-server.html
http://dev.mysql.com/doc/refman/5.5/en/server-options.html


MySQL Server has a server character set and a server collation. These can be set at server startup on the command line or in an option file and changed at runtime.

Initially, the server character set and collation depend on the options that you use when you start mysqld. You can use --character-set-server for the character set. Along with it, you can add --collation-server for the collation. If you don't specify a character set, that is the same as saying --character-set-server=latin1. If you specify only a character set (for example, latin1) but not a collation, that is the same as saying --character-set-server=latin1 --collation-server=latin1_swedish_ci because latin1_swedish_ci is the default collation for latin1. Therefore, the following three commands all have the same effect:

shell> mysqld
shell> mysqld --character-set-server=latin1
shell> mysqld --character-set-server=latin1 \
--collation-server=latin1_swedish_ci

Here's an example for the [mysqld] section of your my.cnf:

skip-character-set-client-handshake <- 필요한지 확인 필요
collation-server=utf8_unicode_ci
character-set-server=utf8

여러 설정 사례를 찾아보니 character set & collation 과 관련된 변수들은
skip-character-set-client-handshake
default-character-set
default-collation
character-set-server
collation-server
등이 있으나 실제 설정을 통하여 MySQL 5.1.41-3ubuntu12.1 및 mysql-admin 툴을 이용해서 확인해 본 결과 아래와 같이 설정하였을 때 성공함, skip-character-set-client-handshake 설정이 없으면 default-character 가 utf8으로 설정되어 있어도 client가 다른 설정을 사용할 경우 작동하지 않기 때문에, 반드시 skip-character-set-client-handshake 을 추가하여야 작동하였음

#
# * Character Set and Collation
#
skip-character-set-client-handshake
# Set the default character set.
default-character-set=utf8
# Set the default collation.
default-collation=utf8_unicode_ci

Posted by fermi
TAG MySQL
  1. Ubuntu Document 검색
    https://help.ubuntu.com

  2. APM (Apache2, PHP5, MySQL5) 설치
    https://help.ubuntu.com/community/ApacheMySQLPHP
    설치할 패키지 리스트:
    - apache2
    - php5
    - libapache2-mod-php5
    - mysql-server
    - libapache2-mod-auth-mysql
    - php5-mysql
    추가 패키지:
    - php5-gd
    관리를 위해 설치하면 편리한 패키지:
    - mysql-admin (MySQL Administration Tool)
    - mysql-query-browser (MySQL Query Tool)

  3. Apache 의 Mod_Rewrite 모듈 활성화 방법
    https://help.ubuntu.com/community/Apache/EnablingModRewrite

  4. HTML 확장자를 PHP에서 인식하도록 추가
    AddType application/x-httpd-php .html
    https://help.ubuntu.com/community/ServerSideIncludes 를 참고하여 default site의 설정파일 (경로: /etc/apache2/sites-available/default) 을 수정

  5. Zeroboard 4 로그인 문제 - PHP 설정
    /etc/php5/apache2/php.ini 수정
    register_globals = Off
    register_long_arrays = Off
    되어 있는 것을 모두 On으로 변경
    register_globals = On
    register_long_arrays = On

  6. Zeroboard 4 소스
    lib.php 의 IIS 로그인 문제 수정 부분 원상 복구

  7. Zeroboard 게시판 header_url 과 footer_url 수정
    zetyx_admin_table 의 header_url 과 footer_url 을 변경되 경로에 맞게 수정
    IIS 에서는 상대경로 (../../htdocs/head.html) 가 작동하였으나 Ubuntu 에서는 절대경로만 작동함
    MySQL Query Browser 를 이용해서 Update SQL 을 작성하여 한꺼번에 수정 가능함

  8. index_head.html 수정
    - CountDownData() 함수의 return value 가 float 인것을 int 로 변경, intval() 함수 이용
    - 테터 긁어오는 소스의 경로 수정



  9. Tatter 로 변환을 위해서 MySQL의 UTF-8 설정
    /etc/mysql/my.ini
    [mysqld] 섹션에 다음 추가
    skip-character-set-client-handshake
    default-character-set=utf8
    default-collation=utf8_unicode_ci



Posted by fermi
텍스트큐브 공식 정보
http://www.textcube.org/center/entry/migration
http://jblove.net/b12/1183

참고 블로그
http://v.daum.net/link/4708726

Perl 프로그램
http://pat.bingsan.net/249
http://nbfnote.tistory.com/486

텍스트큐브에서 티스토리 데이터 이전 방법
http://liverex.tistory.com/578

대옹량 블로그 백업 파일 XML 분할하기 방법
http://kuna.wo.tc/1085

데이터 유지하면서 마이그레이션 하는 방법
http://cirrus.tistory.com/890

자료
변환툴 zb2tt_2009: http://jblove.net/b12/attachment/5958012850.rar
테터툴 1.0.2: http://www.textcube.org/download/entry/priors

자료 변환시 주의 사항 (zb2tt_2009)
- 제로보드 게시물의 제목이 동일하면 테터 게시물 테이블의 slogan 컬럼에 들어갈 변수에 숫자를 덧붙여 고유의 주소를 갖도록 하는데, 동일한 제목의 게시물을 100개 까지만 처리하도록 되어 있음 -> 소스 수정 (zbConversion.php의 392 line) 으로 변경 가능
- 제목이 동일한 게시물은 실제로 제목을 사용하지 않는 스킨을 사용한 제로보드 게시판에서 발생하는데, 이 경우 소스를 수정하지 않고 제로보드 게시판 테이블의 subject를 수정하여 게시물에 제목을 할당하는 것을 권장함.

테터툴즈 판올림 과정에서 (1.0.2 -> 1.0.6 -> 1.0.6.1 -> 1.1.1 -> 1.1.3 -> TC 1.7.1) 백업
- 테터툴즈 1.0.2 에서 데이터 백업시 서버에 저장할 경우 xml 파일의 저장경로:
tattertools/cache/backup/*.xml


Posted by fermi
CSRF (위키 참조: http://en.wikipedia.org/wiki/Cross-site_request_forgery) 라는 보안 취약점 공격 방법이 있습니다.
이를 이용한 것으로 보이는 SQL 인젝션 공격으로 CSRF 인줄 알았으나, 아스키코드를 던져서 스크립트를 삽입하는 SQL 인젝션 공격으로 서버를 복구 중 입니다. 다행히 SQL 인젝션으로 유실된 데이터는 없습니다.

복구하는 동안 사이트를 이곳으로 포워딩 해 놓았습니다. 사이트 복구 후에는 아무래도 취약점에서 자유로는 서비스로 개편을 해야 할 듯 합니다. ㅜ.ㅜ

복구된 사이트는 임시로 http://old.myhyun.com 으로 접속 가능합니다.

 
Posted by fermi

최근에 달린 댓글

최근에 받은 트랙백

글 보관함