안개속 숨어든 나의 그림자처럼

Food (3) IPod Touch Apps (1) Life (5) Linux (4) MySQL (3) OSX (2) PrestaShop (2) WebDev (3)

Monday, March 29, 2010

OSX APM Setup

  1. 1. Enable php
        sudo vi /etc/apache2/httpd.conf
        find #LoadModule php5_module libexec/apache2/libphp5.so
        remove #
  1. 2. Enable ssl
        sudo vi /etc/apache2/httpd.conf
        find #Include /private/etc/apache2/extra/httpd-ssl.conf
        remove #
3. SSL
        Create a Folder /etc/apache2/ssl
        openssl genrsa -des3 -out server.key 1024
        cp server.key server-pw.key
        openssl rsa -in server-pw.key -out server.key
        openssl req -new -key server.key -out server.csr
        openssl x509 -req -days 365 -in server.csrsignkey server.key -out server.crt
4. Edit httpd-ssl.conf
        sudo vi /etc/apache2/extra/httpd-ssl.conf
        find key and crt setting and edit them.
5. Virtual Host
        vi /etc/apache2/httpd.conf
                find #Include /private/etc/apache2/extra/httpd-vhosts.conf
                remove #
        vi /etc/apache2/extra/httpd-vhosts.conf
                NameVirtualHost *:80
                NameVirtualHost *:443
                Include /private/etc/apache2/vhosts/*.conf
        mkdir /etc/apache2/vhosts
        vi /etc/apache2/vhosts/ci.conf

<VirtualHost *:80>
ServerAdmin dev@namaksin.net
DocumentRoot "/Volumes/WS/website/CI/"
ServerName local.ci.com
ErrorLog "/private/var/log/apache2/local.ci.com-error_log"
CustomLog "/private/var/log/apache2/local.ci.com-access_log" common

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined


HostNameLookups off

<Directory "/Volumes/WS/website/CI/">
AllowOverride None
Options -Indexes
Deny from all
Allow from localhost
</Directory>

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

</VirtualHost>

<VirtualHost *:443>
ServerAdmin dev@namaksin.net
DocumentRoot "/Volumes/WS/website/CI/"
ServerName local.ci.com
ErrorLog "/private/var/log/apache2/local.ci.com-error_log"
CustomLog "/private/var/log/apache2/local.ci.com-access_log" common

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined

SSLEngine on
SSLCertificateFile /private/etc/apache2/ssl/server.crt
SSLCertificateKeyFile /private/etc/apache2/ssl/server.key

HostNameLookups off

<Directory "/Volumes/WS/website/CI/">
AllowOverride None
Options -Indexes
Deny from all
Allow from localhost
</Directory>

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

</VirtualHost>


6. setup mysql
        install mysql-server
        /usr/local/mysql/bin/mysql -uroot mysql
        update user set Password = password('yourpassword') where user = 'root';
        vi /etc/my.cnf
[client]socket = /var/mysql/mysql.sock
[mysqld]socket = /var/mysql/mysql.sock
        

        sudo mkdir /var/mysql;
        sudo chown _mysql /var/mysql;
        

Tuesday, March 16, 2010

한글 => 영문 표기법

ename1.sQQUwc2KdhBA.jpg      
 ename2.si1sCKo9RqXy.jpg

Tuesday, March 2, 2010

DMG to ISO 변환하기

hdiutil convert origin.dmg -format UDTO -o destination.iso

Friday, February 5, 2010

HTML 특수문자 코드


표현문자
숫자표현
문자표현
설명
-&#00;- -사용하지 않음
space -수평탭
space -줄 삽입
- - -사용하지 않음
space -여백
!!-느낌표
"""따옴표
##-숫자기호
$$-달러
%%-백분율 기호
&&&Ampersand
''-작은 따옴표
((-왼쪽 괄호
))-오른쪽 괄호
**-아스트릭
++-더하기 기호
,,-쉼표
---Hyphen
..-마침표
//-Solidus (slash)
0 - 90-9-0부터 9까지
::-콜론
;;-세미콜론
<<<보다 작은
==-등호
>>>보다 큰
??-물음표
@@-Commercial at
A - ZA-Z-A부터 Z까지
[[-왼쪽 대괄호
\\-역슬래쉬
]]-오른쪽 대괄호
^^-탈자부호
__-수평선
``-Acute accent
a - za-z-a부터 z까지
{{-왼쪽 중괄호
||-수직선
}}-오른쪽 중괄호
~~-꼬리표
--Ÿ-사용하지 않음
Non-breaking space
¡¡¡거꾸로된 느낌표
¢¢센트 기호
££파운드
¤¤¤현재 환율
¥¥
|¦¦끊어진 수직선
§§§섹션 기호
¨¨¨움라우트
©©저작권
ªªªFeminine ordinal
««왼쪽 꺾인 괄호
¬¬부정
­­Soft hyphen
?®®등록상표
&hibar;¯¯Macron accent
°°°Degree sign
±±±Plus or minus
²²²Superscript two
³³³Superscript three
´´´Acute accent
μµµMicro sign (Mu)
문단기호
···Middle dot
¸¸¸Cedilla
¹¹¹Superscript one
ºººMasculine ordinal
»»오른쪽 꺾인 괄호
¼¼¼4분의 1
½½½2분의 1
¾¾¾4분의 3
¿¿¿거꾸로된 물음표
AÀÀCapital A, grave accent
AÁÁCapital A, acute accent
AÂÂCapital A, circumflex accent
AÃÃCapital A, tilde
AÄÄCapital A, dieresis or umlaut mark
AÅÅCapital A, ring (Angstrom)
ÆÆÆCapital AE diphthong (ligature)
CÇÇCapital C, cedilla
EÈÈCapital E, grave accent
EÉÉCapital E, acute accent
EÊÊCapital E, circumflex accent
EËËCapital E, dieresis or umlaut mark
IÌÌCapital I, grave accent
IÍÍCapital I, acute accent
IÎÎCapital I, circumflex accent
IÏÏCapital I, dieresis or umlaut mark
ÐÐÐCapital Eth, Icelandic
NÑÑCapital N, tilde
OÒÒCapital O, grave accent
OÓÓCapital O, acute accent
OÔÔCapital O, circumflex accent
OÕÕCapital O, tilde
OÖÖCapital O, dieresis or umlaut mark
×××Multiply sign
ØØØwidth="130"Capital O, slash
UÙÙCapital U, grave accent
UÚÚCapital U, acute accent
UÛÛCapital U, circumflex accent
UÜÜCapital U, dieresis or umlaut mark
YÝÝCapital Y, acute accent
ÞÞÞCapital Thorn, Icelandic
ßßßSmall sharp s, German (sz ligature)
aààSmall a, grave accent
aááSmall a, acute accent
aââSmall a, circumflex accent
aããSmall a, tilde
aääSmall a, dieresis or umlaut mark
aååSmall a, ring
æææSmall ae diphthong (ligature)
cççSmall c, cedilla
eèèSmall e, grave accent
eééSmall e, acute accent
eêêSmall e, circumflex accent
eëëSmall e, dieresis or umlaut mark
iììSmall i, grave accent
iííSmall i, acute accent
iîîSmall i, circumflex accent
iïïSmall i, dieresis or umlaut mark
ðððSmall eth, Icelandic
nññSmall n, tilde
oòòSmall o, grave accent
oóóSmall o, acute accent
oôôSmall o, circumflex accent
oõõSmall o, tilde
oööSmall o, dieresis or umlaut mark
÷÷÷Division sign
øøøSmall o, slash
uùùSmall u, grave accent
uúúSmall u, acute accent
uûûSmall u, circumflex accent
uüüSmall u, dieresis or umlaut mark
yýýSmall y, acute accent
þþþSmall thorn, Icelandic
yÿÿSmall y, dieresis or umlaut mark

Thursday, February 4, 2010

MySQL csv import

LOAD DATA LOCAL INFILE './postcode.csv' INTO TABLE `postcode` FIELDS
TERMINATED BY ',' ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\r\n'

Monday, January 25, 2010

MAMP로 WEB개발환경 만들기.(with SSL)

1. 서버 인증키 만들기
Create a new folder /Applications/MAMP/conf/apache/ssl
Drop into the terminal an navigate to the new folder
cd /Applications/MAMP/conf/apache/ssl
Create a private key, giving a password
openssl genrsa -des3 -out server.key 1024
Remove the password
cp server.key server-pw.key
openssl rsa -in server-pw.key -out server.key
Create a certificate signing request, pressing return for default values
openssl req -new -key server.key -out server.csr
Create a certificate
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt



2. ssl.conf수정
SSLCertificateKeyFile /Applications/MAMP/conf/apache/ssl/server.key
SSLCertificateKeyFile /Applications/MAMP/conf/apache/ssl/server.crt


로 인증서 파일 경로를 수정


DocumentRoot "/Applications/MAMP/htdocs_ssl"
와 같이 사용되는 웹경로로 바꿔준다.


3. startApache.sh 수정
/Applications/MAMP/bin/startApache.sh 에서
sudo /Applications/MAMP/Library/bin/apachectl startssl 로 수정해준다.


그리고 서버 리스타스 시키면 끝~~