티스토리 툴바

블로그 이미지
toriworks

카테고리

분류 전체보기 (236)
Spring framework (73)
iBATIS (8)
프로젝트 (4)
기타 (80)
Apache Projects (13)
자바 아티클 (11)
Database (5)
유지보수 기록 (1)
PHP (10)
ANDROID 스터디 (18)
Project Management (3)
RIA(Flash, Silverlig.. (8)
생명의 삶 QT (0)
Total138,765
Today0
Yesterday55

In-App Purchase로 며칠을 고생하고 나서 작성한 문서입니다.

첨부한 파일을 참고해 주세요. 작으나마 도움이 될지 모르겠네요. 

 
저작자 표시
크리에이티브 커먼즈 라이선스
Creative Commons License

'기타' 카테고리의 다른 글

In-App Purchase 가이드 문서  (4) 2012/01/15
Nginx HTTP Server  (0) 2011/12/15
머큐리얼에 대하여...  (0) 2011/12/13
SVN for mac  (0) 2011/12/12
일본이 보는 한국의 FTA  (2) 2011/12/02
#1. SQLCipher는 진정 어려워.  (0) 2011/12/02
Posted by toriworks

Nginx HTTP Server

기타 / 2011/12/15 11:01

Nginx(엔진X)
   - HTTP Server
   - 이벤트 기반 구조 (Apache webserver based on Thread/Process model)

공식 사이트
    - http://www.nginx.org/ 
위키 사이트
    - http://wiki.nginx.org/Main 

참고 도서 (이미지 클릭시 이동)

 

Table of Contents

Preface 1

Chapter 1: Preparing your Work Environment 7 Setting up a terminal emulator 7 Finding and downloading PuTTY 8 Creating a session 8 Working with PuTTY and the shell 10 Basic shell commands 11 File and directory management 11

User and group management 15 Superuser account 15 User accounts 15 Group management 17

Programs and processes 18 Starting an application 18 System services 19 Process management 20

Discovering the Linux filesystem 22

Directory structure 22

Special files and devices 25 Device types 25 Pseudo devices 26 Mounting a storage device 27

Files and inodes 28 EXT3 filesystem specifications 29 Filenames 29 Inodes 29 Atime, ctime, and mtime 30 Symbolic and hard links 31

File manipulation 32 Reading a file 33

Table of Contents

Editing a file 34 Compression and archiving 35

System administration tools 37

Running a command as Superuser 37 Su command 37 Sudo command 38

System verification and maintenance 39 Disk Free 39 Disk Usage 39 Free memory 40

Software packages 40 Package managers 40 Downloading and installing packages manually 41 Building from source 42

Files and permissions 43 Understanding file permissions 43 Directory permissions 43 Octal representation 44 Changing permissions 44 Changing ownership and group 45

Summary 46 Chapter 2: Downloading and Installing Nginx 47

Setting up the prerequisites

GCC — GNU Compiler Collection PCRE library
zlib library
OpenSSL

Downloading Nginx

Websites and resources Version branches
Features
Downloading and extracting

Configure options

The easy way
Path options Prerequisites options

Module options
Modules enabled by default Modules disabled by default

Miscellaneous options

Configuration examples
About the prefix switch
Regular HTTP and HTTPS servers All modules enabled

47

48 49 50 50 51 51 52 53 54 55 55 56 58

59 59 60

61

62 63 63 64

[ ii ]

Table of Contents

Mail server proxy 64

Build configuration issues 65 Make sure you installed the prerequisites 65 Directories exist and are writable 65

Compiling and installing 66

Controlling the Nginx service 67

Daemons and services 67 User and group 68 Nginx command-line switches 68 Starting and stopping the daemon 69 Testing the configuration 69 Other switches 70

Adding Nginx as a system service 71

System V scripts 71 What is an init script? 73 Creating an init script for Nginx 73

Installing the script 75 Debian-based distributions 76 Red Hat-based distributions 76

Summary 77 Chapter 3: Basic Nginx Configuration 79 Configuration file syntax 79 Configuration Directives 80 Organization and inclusions 81 Directive blocks 83

Advanced language rules 84 Directives accept specific syntaxes 84 Diminutives in directive values 85 Variables 86 String values 86

Base module directives 86

What are base modules? 87 Nginx process architecture 87 Core module directives 88 Events module 93 Configuration module 95

A configuration for your profile 95

Understanding the default configuration 95

Necessary adjustments

Adapting to your hardware

Testing your server

Creating a test server

96 97 99 99

[ iii ]

Table of Contents

Performance tests Httperf

Autobench OpenWebLoad

Upgrading Nginx gracefully

Summary
Chapter 4: HTTP Configuration

HTTP Core module

Structure blocks

Module directives

Socket and host configuration Paths and documents
Client requests
MIME Types

Limits and restrictions
File processing and caching Other directives

Module variables

Request headers Response headers Nginx generated

The Location block

Location modifier

Search order and priority Case 1:
Case 2:
Case 3:

Summary
Chapter 5: Module Configuration

Rewrite module

Reminder on regular expressions Purpose
PCRE syntax
Quantifiers

Captures

Internal requests error_page
Rewrite
Infinite loops
Server Side Includes (SSI)

Conditional structure Directives
Common rewrite rules

100 101 102 103

105

106 107 107 108 109 110 114 117 121 123 125 127 130 130 131 132 133 133

136 137 138 138

139 141 141

142 142 142 144 145

146 147 148 149 150

151 153 156

[ iv ]

Performing a search User profile page Multiple parameters Wikipedia-like

News website article Discussion board

SSI module

Module directives and variables

SSI Commands
File includes
Working with variables Conditional structure Configuration

Additional modules

Website access and logging Index

Autoindex Random index Log

Limits and restrictions Auth_basic module Access
Limit zone

Limit request

Content and encoding Empty GIF
FLV
HTTP headers

Addition Substitution Gzip filter Gzip static Charset filter Memcached Image filter XSLT

About your visitors Browser
Map
Geo

GeoIP UserID filter Referer Real IP

SSL and security SSL

Setting up an SSL certificate Secure link

Table of Contents

          156
          156
          156
          157
          157
          157

157

158

160 160 162 163 163

164

164 164 165 166 166

168 168 168 169 169

170 170 171 171 172 172 173 175 175 176 178 179

179 179 180 180 181 181 182 183

183 183 185 186

[v]

Table of Contents

Other miscellaneous modules 187 Stub status 187 Google-perftools 187 WebDAV 188

Third-party modules 189

Summary 190 Chapter 6: PHP and Python with Nginx 191 Introduction to FastCGI 192 Understanding the mechanism 192 Common Gateway Interface (CGI) 193 Fast Common Gateway Interface (FastCGI) 194 Main directives 195 FastCGI caching 201

Upstream blocks 204 Module syntax 205 Server directive 206

PHP with Nginx 207

Architecture 207

PHP-FPM 208

Setting up PHP and PHP-FPM 208 Downloading and extracting 208 Patching 209 Requirements 209 Building PHP 209 Post-install configuration 210 Running and controlling 210

Nginx configuration 211

Python and Nginx 212

Django 212

Setting up Python and Django 213 Python 213 Django 213 Starting the FastCGI process manager 214

Nginx configuration 215

Summary 215 Chapter 7: Apache and Nginx Together 217

Nginx as reverse proxy

Understanding the issue
The reverse proxy mechanism Advantages and disadvantages

Nginx Proxy module

Main directives

217

218 219 220 221 222

[ vi ]

Table of Contents

Caching, buffering, and temporary files 225 Limits, timeouts, and errors 228 Other directives 229 Variables 230

Configuring Apache and Nginx 230

Reconfiguring Apache 231 Configuration overview 231 Resetting the port number 231 Accepting local requests only 232

Configuring Nginx 233 Enabling proxy options 233 Separating content 235

Advanced configuration 237

Additional steps 238

Forwarding the correct IP address 238 SSL issues and solutions 239 Server control panel issues 239

Summary 240 Chapter 8: From Apache to Nginx 241 Nginx versus Apache 241

Features 242 Core and functioning 242 General functionality 243

Flexibility and community 244 Performance 244 Usage 245 Conclusion 246

Porting your Apache configuration 246

Directives 246 Modules 249 Virtual hosts and configuration sections 250

Configuration sections Creating a virtual host

htaccess files
Reminder on Apache .htaccess files Nginx equivalence

Rewrite rules

General remarks On the location On the syntax RewriteRule

250 251

254 254 255

257

257 257 258 259

[ vii ]

Table of Contents

WordPress MediaWiki vBulletin

Summary

Appendix A: Directive Index

Appendix B: Module Reference Access

Addition* Auth_basic module Autoindex
Browser
Charset
Core
DAV*
Empty GIF
Events
FastCGI
FLV*
Geo
Geo IP* Google-perftools* Gzip
Gzip Static* Headers
HTTP Core
Image Filter*
Index
Limit Requests Limit Zone
Log
Map
Memcached
Proxy
Random index* Real IP*
Referer
Rewrite
Secure Link*
SSI
SSL*

259 261 262 263

265

287 287

287
288
288
288
288
289
289
289
289
290
290
290
290
291
291
291
291
292
292
292
292
293
293
293
293
294
294
294
294
295
295
295
295

[ viii ]

Stub status* Substitution* Upstream User ID XSLT*

Appendix C: Troubleshooting General tips on troubleshooting

Checking access permissions Testing your configuration Have you reloaded the service? Checking logs

Install issues
403 Forbidden custom error page Location block priorities

If block issues Inefficient statements Unexpected behavior

Index

Table of Contents

       296
       296
       296
       296
       297

299 299 299 300 300 300 301 301 302

303 303 304

305 
저작자 표시
크리에이티브 커먼즈 라이선스
Creative Commons License

'기타' 카테고리의 다른 글

In-App Purchase 가이드 문서  (4) 2012/01/15
Nginx HTTP Server  (0) 2011/12/15
머큐리얼에 대하여...  (0) 2011/12/13
SVN for mac  (0) 2011/12/12
일본이 보는 한국의 FTA  (2) 2011/12/02
#1. SQLCipher는 진정 어려워.  (0) 2011/12/02
Posted by toriworks
TAG nginx

Mercurial source control management


머큐리얼은 무료이고 분산환경을 위한 소스 콘트롤 툴입니다. 직관적인 인터페이스를 통해서 효율적으로 프로젝트를 다룰 수 있도록 해줍니다.
사용하기 편하며 견고한 누구나 이상적인 버전관리 파일을 만들 수 있습니다.


분산 아키텍쳐

전통적인 버전 콘트롤 시스템(서브버전 같은)들은 중앙에 클라이언트-서버 아키텍쳐 형태로 프로젝트 리비전을 등록하는 형태입니다. 반대로 머큐리얼은 순수하게 분산환경이고 각 개발자들에게 전체적인 개발 히스토리의 로컬 복사본을 제공합니다.
이러한 방법은 네트워크 접근이나 중앙 서버에 독립적입니다.
간편하고 빠르게 Committing, branching, merging이 됩니다.


빠른

머큐리얼 구현과 데이터 구조는 속도를 위해 디자인되었습니다. 리비젼간의 차이(diff)를 만들어내거나 또는 몇 초전으로 되돌릴 수 있습니다. 결국 머큐리얼은 OpenJDK나 NetBeans 같은 큰 프로젝트에서도 완벽하게 적합합니다.


플랫폼을 떠나서

머큐리얼은 플랫폼 독립적으로 작성되었습니다. 대부분의 머큐리얼을 파이썬과 퍼포먼스를 위해서 포터블 C로 작성되었습니다. 메이저 플랫폼 모두에 바이너리 릴리즈가 있습니다.


확장성으로

머큐리얼의 기능은 익스텐션을 통해서 늘릴 수 있고, 공식적인 위키나 자신만의 것으로 만들 수 있습니다. 
익스텐션은 파이썬으로 만들어 지고 기본 command를 변경할 수도, 머큐리얼의 코어한 부분에 접근하근 명령어를 만들 수 있습니다. 


편한 사용

머큐리얼은 대부분의 서브버전 사용자들이 편하게 느낄 수 있게 구성되어 있습니다. 잠재적으로 위험한 액션들은 필요에 따라서 익스텐션을 통해 가능하지만 기본적인 인터페이스는 매우 편하고, 배우기 쉬우며 견고합니다.
Quick Start 을 통해서 몇분안에 얻을 수 있습니다.


오픈소스

머큐리얼은 GNU(General Public Licence Version 2) 또는 그 이상의 버전을 따릅니다.


유사 프로젝트

머큐리얼은 파일의 버전을 콘트롤하는데 사용됩니다. 유사한 프로젝트는 Git, Bazaar가 있습니다. 분산환경을 지원하지 않는 Subversion과 CVS도 있습니다.


웹사이트

머큐리얼 커뮤니티 웹사이트입니다. 소스는 GPLv2와 이상의 버전을 따릅니다. 자유롭게 패치를 보내주세요.
저작자 표시
크리에이티브 커먼즈 라이선스
Creative Commons License

'기타' 카테고리의 다른 글

In-App Purchase 가이드 문서  (4) 2012/01/15
Nginx HTTP Server  (0) 2011/12/15
머큐리얼에 대하여...  (0) 2011/12/13
SVN for mac  (0) 2011/12/12
일본이 보는 한국의 FTA  (2) 2011/12/02
#1. SQLCipher는 진정 어려워.  (0) 2011/12/02
Posted by toriworks

SVN for mac

기타 / 2011/12/12 22:24

소스 형상관리를 위해서 SVN을 많이들 사용하고 있지만, 맥에서 무료 SVN 툴을 구하기가 쉽지 않았다.
Versions, Cornerstone 등등을 사용해 봤지만, 유료에다가 복잡하기도 하고 그래서 무료 기간만 사용하고 말았다.

맥에서 물론 XCode의 SVN을 이용할 수도 있겠지만, 왠지 외부 프로그램이 더 맘에 들어서 XCode가 아닌 외부 툴 중에서 하나 골라봤다.

svnX - http://code.google.com/p/svnx/
저작자 표시
크리에이티브 커먼즈 라이선스
Creative Commons License

'기타' 카테고리의 다른 글

Nginx HTTP Server  (0) 2011/12/15
머큐리얼에 대하여...  (0) 2011/12/13
SVN for mac  (0) 2011/12/12
일본이 보는 한국의 FTA  (2) 2011/12/02
#1. SQLCipher는 진정 어려워.  (0) 2011/12/02
갤럭스 넥서스, 볼륨 버그가 있다는...  (0) 2011/11/23
Posted by toriworks

난 참 바보처럼 살았군요~~ 난 참 바보처럼 살았군~~~요오오.

저작자 표시
크리에이티브 커먼즈 라이선스
Creative Commons License

'기타' 카테고리의 다른 글

머큐리얼에 대하여...  (0) 2011/12/13
SVN for mac  (0) 2011/12/12
일본이 보는 한국의 FTA  (2) 2011/12/02
#1. SQLCipher는 진정 어려워.  (0) 2011/12/02
갤럭스 넥서스, 볼륨 버그가 있다는...  (0) 2011/11/23
브라질 룰라 대통령  (0) 2011/11/23
Posted by toriworks
TAG FTA

SQLCipher 가 있다는 걸 처음 들었을 때, 뭐 그리 어렵겠는가 무시했다.

하지만 곧 악몽이 되었고, 어찌할 바를 모르는 똥 마려운 강아지 마냥 안절부절 못하게 되었다.

 

SQLCipher 는 SQLite 를 위한 암호화 모듈이다. (맞지 않다. 아래에서 다시 설명하겠지만 복호화 모듈이라고 할 수 있다) SQLite 에 이미 암호화 기능이 있는데 왠 써드파티 암호화인가 하겠지만 SQLite  암호화는 엄연히 유료다. SQLite  가 원망스러운 부분으로 느껴지기도 하는 부분인데, 도대체 왜 암호화를 유료로 정책을 세운건지 이해할 수가 없다. 

그래서 부득불 오픈 소스를 사용해야하는데, 대표적으로  SQLCipher 가 있다. 이외에 상용으로 나온 툴들이 있긴한데, 대부분 윈도우용의 DLL 파일만 팔거나, DLL 에 직접 DB 에 접속하게 하는 모듈이 포함된 제품이다. 

 

사실  SQLCipher 는 암호화 모듈이 아니라, 복호화 모듈이라고 해야겠다. 왜냐하면 암호화는 SQLite  에서 ATTACH, DETTACH 로 작업을 하고 암호화 된 데이터 파일을 읽을 수 있게 하는게, SQLCipher 다.

처음에는 암호화를  SQLCipher  가 해주는 줄 알고 방향을 잘못 잡아서 한참을 헤맸다. 틀린 방향으로 한참을 가다보니 이 산이 아닌게로구나를 알게 되었을 때의 창피함이란... 역시 영어가 부족한 탓으로 스스로 애써 위안을 삼았다.

 

 

SQLCipher 에 대해서 몇 차례 계속 글을 올릴 예정인데, 가능하다면 스크린캐스트로 올려보도록 해야겠다.결론을 먼저 이야기하자면  SQLCipher  덕분에 암호화 뿐만이 아니라 만들어둔 데이터 조회가 더 빨라졌다.

저작자 표시
크리에이티브 커먼즈 라이선스
Creative Commons License

'기타' 카테고리의 다른 글

SVN for mac  (0) 2011/12/12
일본이 보는 한국의 FTA  (2) 2011/12/02
#1. SQLCipher는 진정 어려워.  (0) 2011/12/02
갤럭스 넥서스, 볼륨 버그가 있다는...  (0) 2011/11/23
브라질 룰라 대통령  (0) 2011/11/23
삼성 갤럭시탭 7.0 플러스  (7) 2011/11/23
Posted by toriworks

갤럭시 넥서스에 볼륨 조절 버그가...

구글은 넥서스라는 이름으로 구글만의 기술을 뽐내고 있습니다.
사실 기계는 남의 것이지만, 마치 애플이 아이폰을 생산하듯 구글은 넥서스를 만들어 내고 있죠.

이번에는 삼성하고 넥서스를 만들어 냈습니다. 여유가 된다면 갖고 싶은 폰 중의 하나입니다만, 버그가 있다는 보고가 있습니다.


'As soon as possible'이라는 단서를 붙인채 수정 중이라는 말만 있다고 하네요.
YouTube에 동영상이 있으니, 참고해서 보시길 바라구요. UI 정말 잘 뽑았네요. 아이스크림... 쩝쩝 

저작자 표시
크리에이티브 커먼즈 라이선스
Creative Commons License
Posted by toriworks

브라질 룰라 대통령

기타 / 2011/11/23 00:49


우리에게 진정 필요한 건 뭘까?

저작자 표시
크리에이티브 커먼즈 라이선스
Creative Commons License
Posted by toriworks

두번째는 늘 좋았다.

삼성이 들으면 기분 나쁘겠지만, 삼성 제품의 특징은 늘 2번째 버전이 좋아보인다는 것이다.

갤럭시A도 약간 기대에 밑도는 품질로 인해서 갤럭시S에 밀려 잊혀혀 간 것처럼, 이번 갤럭시탭 7.0 플러스도 이전의 갤럭시탭 이미지를 싹 지워줄지도 모르겠다.

마치 옛날 양은 도시락통을 연상하게 하는 투박함의 갤럭시탭은 잊어라.
[이미지 출처 : Engadget]

제일 꼴불견은 지하철에서 갤럭시탭에 자동차 게임을 하는 사람이었다. 왠지 모르는 싼티가 줄줄...
하지만, 이번 제품은 적어도 겉모습을 통해서만 본다면 헐렁한 기성복을 벗고, 매끈한 맞춤 양복을 입은 듯하다. (하지만 알마니는 아니다.)

기왕 입은 맞춤 양복인데, 안감도 신경을 썼나보다. 만약에 이번 플러스 버전에서도 이전의 OS를 사용했다면 리뷰의 가치를 찾을 수 없었을 것이다. 근데, OS가 진저브레드에서 허니컴으로 교체되었다.

아직은 태블릭 전용 OS인 허니컴의 존재는 그리 크지 않지만, 이제 대중화를 맞이하지 않을까 생각된다.


갤럭시 8.9와 갤럭시 노트와 등장과 더불어 7인치 시장의 선두에 설 수 있을지 과연 지켜볼만 하지 않을까?

한가지 걱정아닌 걱정이라면 삼성의 특성상 한가지 디자인이 히트치면 계속 우려먹는다는 거...
괜한 걱정이겠죠... 

저작자 표시
크리에이티브 커먼즈 라이선스
Creative Commons License
Posted by toriworks

브라질의 그분은 누구?

 오랜만에 구글 어낼리틱스에 들어가서 보니 내 블로그를 찾아주신 분들을 국가별로
보여주는 그래프가 있어서 보니, 왠걸 브라질에서 친히 찾아주신 분이십니다.

아니 브라질에서 어인일로 제 블로그를...

어떻게 감사해야할지...









포르투칼어로 감사함을 전해 드립니다. 번역에 도움 주신 분은 구글 트랜스레이트님 이십니다.

Muito obrigado pela sua visita meu blog. :) 
저작자 표시
크리에이티브 커먼즈 라이선스
Creative Commons License
Posted by toriworks

최근에 달린 댓글

최근에 받은 트랙백

글 보관함