1. UTF-8 서버 설정
출처 : http://www.cyworld.com/gon0121/2698385

1) /etc/environment
LANG="ko_KR.UTF-8"
LANGUAGE="ko_KR:ko:en_GB:en"
PATH 앞에 추가

2) /etc/default/locale

LANGUAGE="ko_KR.UTF-8"
LANG_ALL="ko_KR.UTF-8"

LANG="ko_KR.UTF-8" 뒤에 추가

2. euc_kr Locale 추가
출처 : http://leoric99.tistory.com/entry/Ubuntueuckr-%EB%A1%9C%EC%BC%80%EC%9D%BC-%EC%B6%94%EA%B0%80

1) sudo locale-gen ko_KR.EUC-KR

2) /etc/environment에 바로 추가하는 방법


PATH="/usr/local/sbin;/usr/local/bin;/usr/bin;/....."
LANG="ko_KR.UTF-8"
LANGUAGE="ko_KR:ko:en_GB:en"

이런것에 아래 한줄 추가

PATH="/usr/local/sbin;/usr/local/bin;/usr/bin;/....."
LANG="ko_KR.UTF-8"
LANG="ko_KR.EUC-KR"
LANGUAGE="ko_KR:ko:en_GB:en"

3. Locale 확인하기


root@buy-0431:~# locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=ko_KR.eucKR
LANGUAGE=ko_KR.UTF-8
LC_CTYPE="ko_KR.eucKR"
LC_NUMERIC="ko_KR.eucKR"
LC_TIME="ko_KR.eucKR"
LC_COLLATE="ko_KR.eucKR"
LC_MONETARY="ko_KR.eucKR"
LC_MESSAGES="ko_KR.eucKR"
LC_PAPER="ko_KR.eucKR"
LC_NAME="ko_KR.eucKR"
LC_ADDRESS="ko_KR.eucKR"
LC_TELEPHONE="ko_KR.eucKR"
LC_MEASUREMENT="ko_KR.eucKR"
LC_IDENTIFICATION="ko_KR.eucKR"
LC_ALL=
root@buy-0431:~#

 

출처 : http://blog.daum.net/linuxvoyager/

'OS > LINUX' 카테고리의 다른 글

Ethernet Bandwidth Limit 걸기 (속도 제한/QOS)  (0) 2013.01.02
Traffic Control with Linux Command Line tool, "tc"  (0) 2013.01.02
apt & dpkg 사용법  (0) 2012.07.10
vmstat 과 sar 명령  (0) 2012.06.01
iostat  (0) 2012.06.01

<< apt >>

패키지 설치 : apt-get install <package name>
패키지 제거 : apt-get --purge remove <package name
패키지 검색 : apt-cache search <package name>
패키지 정보보기 : apt-cache show <package name>
소스리스트 업데이트 : apt-get update
설치된 패키지 업데이트 : apt-get upgrade

<< dpkg >>

deb 파일 설치 : dpkg -i <file name.deb>
패키지 제거 : dpkg -P <package name>
설치된 패키지 리스트 : dpkg -l
설치된 패키지에 포함된 파일 보기 : dpkg -L <package name>
deb파일 포함된 파일들 보기 : dpkg -c <file name.deb>
deb파일의 정보보기 : dpkg -I <file name.deb>
파일의 패키지명 알아내기 : dpkg -S <file name>

'OS > LINUX' 카테고리의 다른 글

Traffic Control with Linux Command Line tool, "tc"  (0) 2013.01.02
우분투 서버 한글 설정  (0) 2012.07.10
vmstat 과 sar 명령  (0) 2012.06.01
iostat  (0) 2012.06.01
리눅스 사양 확인  (0) 2012.05.29

출처 : http://catntuna.tistory.com/107

 

사실, 맥에서는 따로 트루타입 웹 폰트 솔루션이 필요하지 않습니다.

맥에서 주로 쓰는 사파리, 크롬, 파폭은 모두 자동 업데이트가 되기 때문에 항상 최신버전이 유지되고,

최신버전 브라우저들은 기본적으로 TTF를 이용한 웹 폰트 명령어 를 지원하기 때문이지요.

더군다나 Lion에서부터는 나눔폰트가 기본으로 들어있는데다 폰트 출력이 굉장히 미려하기 때문에,

마치 그림으로 만든 것 처럼 깔끔하게 나옵니다. 윈도우에서는 상상도 할 수 없는 일이지요.

진짜로 웹브라우저에서 이렇게 나옴 ㅎ

http://catntuna.tistory.com/43

이 그림을 캡쳐한 포스팅의 주소입니다. 한 번 씩 가셔서 그림처럼 나오는지 확인해 보세요.

윈도우에서 사파리가 아닌 브라우저를 쓰시는 분이라면, 컴퓨터를 부수고싶어지실 거에요.

어쨌든, 대다수의 웹 사용자들은 윈도우를 사용하고, IE도 상당히 구버전을 사용합니다.

윈도우+IE환경에서 한글폰트는 특별히 못생기게 나옵니다. 이때문에 많은 웹 관련 종사자들이 골머리를 앓고 있습니다.

외국에서도 브라우저에서 트루타입 폰트가 제대로 표시되지 않는 문제 때문에, 많은 웹폰트 솔루션이 등장했었습니다.

설치형 블로그를 쓰는 사람은 php+GD조합으로 폰트를 그림으로 사용하는 편리한 방법을 쓰기도 했지만,

티스토리에서는 GD라이브러리도 없고, php업로드도 불가하기 때문에 전혀 불가능합니다.

어쨌든, 웹폰트 솔루션 중에서 가장 많이 알려지고, 편리하게 사용할 수 있는 Cufon을 소개합니다.

한 단계 한 단계 거치면서 내 블로그에 제목으로 쓸 수 있는 웹폰트를 만들고 적용하는데까지 진행해 보겠습니다. (safari에서 진행하겠습니다.)

일단 이 링크를 클릭하세요

http://cufon.shoqolate.com/generate/

이런 페이지가 뜹니다.

먼저 자신이 쓸 폰트 파일을 올려야겠지요.

이 부분을 봅니다.

외국 폰트들은 변환할 문자가 몇 개 되지 않기 때문에 (숫자,기호, 알파벳) 용량이 상당히 작아서 이탤릭이나 볼드도 쉽게 추가 가능하지만,

한글 폰트는 기본만 올려도 1메가에 육박하는 용량을 가집니다. 따라서 Regular typeface에만 폰트를 올리는 것을 추천합니다.

아시다시피 모든 폰트에는 저작권이 있습니다.

cufon을 통한 폰트 변환은 뭐 저작권 문제가 상당히 복잡한데요, 어쨌든 모든 상용폰트는 불가하고, 무료 폰트 중에서도 사용할 수 있는 폰트가 한정되어 있습니다.

나눔 폰트는 변환이 가능한 라이센스라 알려져 있기 때문에, 나눔 폰트로 진행을 해 보겠습니다. 다음폰트는 불가하다 알려져 있습니다.

(나눔폰트, 서울체, 기타 자유로이 배포가 가능하고 기업사용자들에게도 자유로운 라이센스를 가진 폰트들을 검색해 보세요.)

1. 나눔폰트중에 변환하고 싶은 폰트의 ttf파일을 Regular typeface에 올립니다.

2. 그다음, 라이센스란에 체크합니다.

3. 사용할 문자셋을 정해줘야합니다. 이 부분이 어렵습니다.

웹페이지의 폼을 개조하여 사용해야 하기 때문입니다.

그 이유는 cufon사이트에서 기본으로 제공하는 input은 256글자의 한계가 있으며, 이만큼으로는 변환할 문자셋의 ㄱ도 끝내는 것이 불가능하기 때문입니다.

Firefox의 경우 Firebug를 이용하십시오. (확장 프로그램입니다.) 사파리나 IE9의 경우 내장되어 있습니다.
제가 윈도우 컴퓨터가 없기 때문에 IE에서 수정하는 법을 모르겠으니 사파리를 이용하는 것을 추천드립니다.

1) 사파리의 설정->고급 탭에서 '메뉴 막대에서 개발자용 메뉴 보기' 를 선택합니다.

2) 개발자용 메뉴에서, 웹 속성 보기를 선택합니다.

3) 요소 -> 돋보기 -> .. and also these single characters 밑의 input form을 찾습니다.

4) input 부분이 자동으로 하이라이트 되면, input을 더블클릭하여 편집합니다.

5) input -> textarea로 바꿉니다.

6) input폼이 textarea폼으로 바뀝니다.

7) maxlength 를 적당한 값으로 바꿔줍니다.

8) 바뀐 폼에 과거 웹폰트용으로 사용되었던 subset을 넣습니다. 첨부파일된 텍스트 파일의 내용을 복사해서 붙여넣기 하시면 됩니다.

4. 나머지 옵션은 건드실 필요 없고, 라이센스에 체크하신 후 Let's do this 합니다.

5. 다운로드에 파일이 받아집니다.

Apache 2.4.1 is the latest stable version available on Apache.org download section. Since it is the latest version so it may have plenty of dependencies issues. In my case, i am installing it from source(httpd-2.4.1.tar.bz2).

Currently i am logged in using SSH on Plain CentOS 6.2 server and it has very basic packages installed.

Downloading and compiling Apache 2.4.1

cd /usr/local/src/
wget http://apache.mirrors.pair.com//httpd/httpd-2.4.1.tar.bz2
tar -jxf httpd-2.4.1.tar.bz2
cd httpd-2.4.1
./configure --prefix=/usr/local/apache --enable-so --enable-deflate --enable-expires --enable-headers --enable-rewrite

Note : Here i required deflate,expires,headers and other modules so i included that.

Ops, failed to dependencies.. because we don’t have gcc compiler and other devel packages for apr, apr-utils, openssl and so on.
yum install apr-devel apr-util-devel gcc pcre-devel.x86_64 zlib-devel openssl-devel

Great. Here we go;
make
again ERROR :

rotatelogs.c:298: warning: implicit declaration of function ‘apr_file_link’
/usr/lib64/apr-1/build/libtool --silent --mode=link gcc -std=gnu99 -pthread
-o rotatelogs  rotatelogs.lo      /usr/lib64/libaprutil-1.la -ldb-4.7 -lexpat
-ldb-4.7 /usr/lib64/libapr-1.la -lpthread
rotatelogs.o: In function `post_rotate':
rotatelogs.c:(.text+0x5ed): undefined reference to `apr_file_link'
collect2: ld returned 1 exit status
make[2]: *** [rotatelogs] Error 1
make[2]: Leaving directory `/usr/local/src/httpd-2.4.1/support'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/httpd-2.4.1/support'
make: *** [all-recursive] Error 1

Current apr and apr-util version is older while Apache 2.4.1 requires latest APR and APR-utils e.g 1.4.x is the latest available version.
Lets include the latest apr and apr-util into apache srlib/ so it can also be compiled along with Apache.
cd /usr/local/src/httpd-2.4.1/srclib/

Installing APR & APR-Utils dependencies :

wget http://mirror-cybernet.lums.edu.pk/pub/apache//apr/apr-util-1.4.1.tar.bz2
wget http://mirror-cybernet.lums.edu.pk/pub/apache//apr/apr-1.4.6.tar.bz2

Note : If this mirror doesn’t work, chose other mirrors

tar -jxf apr-1.4.6.tar.bz2
tar -jxf apr-util-1.4.1.tar.bz2
mv apr-1.4.6 apr
mv apr-util-1.4.1 apr-util

Lets configure it now :
./configure --prefix=/usr/local/apache --enable-so --enable-deflate --enable-expires --enable-headers --enable-rewrite --with-included-apr --with-included-apr-util
make
make install

Following this tutorial i was able to install Apache 2.4.1 successfully on CentOS 6.2. If you are unable to install or having difficulty you can leave a comment and i will try to respond you quickly as much possible.

 

출처 : http://www.hackersgarage.com/installing-apache-2-4-1-from-source-on-centos-6-2-linux.html

'apache' 카테고리의 다른 글

APM(apache 2.4.1) 설치시 문제 해결  (0) 2012.07.10
[Ubuntu] Apache2.4.x 설치  (0) 2012.07.10
mod_deflate 설치 / 사용  (0) 2012.02.16
아파치 mod_deflate로 압축 전송하기  (0) 2012.02.16
[Apache] MPM(Prefork VS Worker)  (0) 2011.04.19

설치 환경
OS : CentOS release 6.2 (Final)
Mysql : 5.1.60
Apache : 2.4.1
Php : 5.3.10

[Mysql]
# groupadd mysql
# useradd -g mysql mysql
./configure --prefix=/data/mysql --localstatedir=/data/mysql/data --with-charset=euckr --with-extra-charsets=all
make && make install

/data/mysql/bin/mysql_install_db --datadir=/data/mysql/var --force
chown -R mysql:mysql /data/mysql

*오류*
mysql checking for termcap functions library... configure: error: No curses/termcap library found
*해결 방법*
yum install libtermcap-devel

*오류*
my_global.h:1110: error: redeclaration of C++ built-in
*해결 방법*
1.yum install gcc-c++설치
2.make clean
3. 재 컴파일

[Apache]
./configure --prefix=/data/apache --enable-so --enable-rewrite --enable-proxy --enable-ssl --enable-unique-id

make && make install

Apache 컴파일 시 오류 처리 사항

*오류*
checking for OpenSSL version >= 0.9.7... FAILED
configure: WARNING: OpenSSL version is too old
no
checking whether to enable mod_ssl... configure: error: mod_ssl has been requested but can not be built due to prerequisite failures
*해결 방법*
yum install openssl-devel
yum update openssl

*오류*
rotatelogs.o: In function `post_rotate':
rotatelogs.c:(.text+0x5ed): undefined reference to `apr_file_link'
collect2: ld returned 1 exit status
make[2]: *** [rotatelogs] Error 1
make[2]: Leaving directory `/root/src/httpd-2.4.1/support'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/src/httpd-2.4.1/support'
make: *** [all-recursive] Error 1
*해결 방법*
Apache 2.4.에서는 apr 1.4이상이 필요하다 따라서 rpm apr 패키지 버전이 1.4이하라면 소스컴파일을 해야 한다.
1. yum remove "apr*"
2.APR 소스 설치
wget http://ftp.jaist.ac.jp/pub/apache//apr/apr-1.4.6.tar.gz
tar xzf apr-1.4.6.tar.gz
cd apr-1.4.6
./configure ; make ; make install
wget http://ftp.jaist.ac.jp/pub/apache//apr/apr-util-1.4.1.tar.gz
tar zxvf apr-util-1.4.1.tar.gz
cd apr-util-1.4.1
./configure --with-apr=/usr/local/apr
yum install -y pcre-devel lua-devel libxml2-devel

[php]
./configure --prefix=/data/php --with-mysql=/data/mysql --with-apxs2=/data/apache/bin/apxs --enable-sysvshm=yes --enable-sysvsem --enable-debug=no --with-ttf --with-png-dir=/usr --with-zlib-dir --with-jpeg-
dir=/usr --with-gdbm=/usr --enable-ftp --enable-mbstring --enable-sockets --enable-wddx --with-freetype-dir=/usr --enable-bcmath --with-curl --with-mcrypt --enable-mbregex --enable-exif --with-gd --enable-gd-
native-ttf --enable-calendar --with-openssl --with-mysqli=/data/mysql/bin/mysql_config

make && make install

출처 : http://absorbed.tistory.com/
Apache2.4.x 버전부터는 APR 과 APR-util을 별로도 설치하여야 한다. 하위버전에서는 설치파일에 포함되어 있었으나 버전 업이 되면서 삭제되어 configure를 실행하면 아래와 같은 에러메시지를 발생하면서 종료된다.

Configuring Apache Portable Runtime library ...

Checking for APR... no
Confgirue: error: APR not found. Please read the documentation

http://apr.apache.org/ 에서 다운받아 설치함



*APR(Apache Portable Runtime) 설치

$ wget http://mirror.sdunix.com/apache//apr/apr-1.4.6.tar.gz
$ tar xvf apr-1.4.6.tar.gz
~/apr-1.4.6$ ./configure
~/apr-1.4.6$ ./make
~/apr-1.4.6$ ./sudo make install




*ARP-Util 설치

$ wget http://apache.tt.co.kr//apr/apr-util-1.4.1.tar.gz
$ tar xvf apr-util-1.4.1.tar.gz
~/apr-util-1.4.1$ ./configure --with-apr=/usr/local/apr
~/apr-util-1.4.1$ make
~/apr-util-1.4.1$ sudo make install


Apache 재설치시 Error 발생.
configure: error: pcre-config for libpcre not found.PCRE is required and available from http://pcre.org/




*PCRE(Perl Compatible Regular Expressions) 설치

$ wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.30.tar.gz
$ tar xvf pcre-8.30.tar.gz
~/pcre-8.30$ ./configure
~/pcre-8.30$ make
~/pcre-8.30$ sudo make install

*Apache 2.4.x 설치
$ wget http://apache.cs.utah.edu//httpd/httpd-2.4.2.tar.gz
$ tar xvf httpd-2.4.2.tar.gz
~/httpd-2.4.2$ ./configure --prefix=/home/www/apache2 --enable-module=so --enable-mods-shared-all --enable-so --enable-rewrite --enable-sll

~/httpd-2.4.2$ make
~/httpd-2.4.2$ sudo make install



~/apache2/bin$ ldd httpd
linux-gate.so.1 => (0xb779b000)
libpcre.so.1 => not found ------------------------------------> problem
libaprutil-1.so.0 => /usr/local/apr/lib/libaprutil-1.so.0 (0xb775a000)
libapr-1.so.0 => /usr/local/apr/lib/libapr-1.so.0 (0xb7728000)
libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb76f8000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb7553000)
libexpat.so.0 => /usr/local/apr/lib/libexpat.so.0 (0xb752a000)
libcrypt.so.1 => /lib/i386-linux-gnu/libcrypt.so.1 (0xb74f9000)
libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb74f3000)
/lib/ld-linux.so.2 (0xb779c000)




~/.profile 에 export LD_LIBRARY_PATH=/usr/local/lib 를 추가

~/apache2/bin$ ldd httpd
linux-gate.so.1 => (0xb779b000)
libpcre.so.1 => /usr/local/lib/libpcre.so.1 (0xb777c000) ---------- 라이브러리를 찾아옴
libaprutil-1.so.0 => /usr/local/apr/lib/libaprutil-1.so.0 (0xb775a000)
libapr-1.so.0 => /usr/local/apr/lib/libapr-1.so.0 (0xb7728000)
libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb76f8000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb7553000)
libexpat.so.0 => /usr/local/apr/lib/libexpat.so.0 (0xb752a000)
libcrypt.so.1 => /lib/i386-linux-gnu/libcrypt.so.1 (0xb74f9000)
libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb74f3000)
/lib/ld-linux.so.2 (0xb779c000)



/etc/sudoers 파일을 수정하여 root 계정이 아닌 다른 계정으로 Apache 실행하기

# User privilege specification
root ALL=(ALL:ALL) ALL
www ALL=/home/www/apache2/httpd ------ www 계정만이 httpd 를 sudo 를 통한 실행 권한을 가짐



*sudo 실행시에 LD_LIBRARY_PATH 를 적용시키기

/etc/ld.so.conf.d$ ls -alrt
합계 24
-rw-r--r-- 1 root root 44 9월 11 2010 libc.conf
-rw-r--r-- 1 root root 108 3월 7 06:50 i686-linux-gnu.conf
lrwxrwxrwx 1 root root 40 5월 29 01:10 i386-linux-gnu_GL.conf -> /etc/alternatives/i386-linux-gnu_gl_conf

/etc/ld.so.conf.d$ cat i386-linux-gnu_GL.conf
/usr/lib/i386-linux-gnu/mesa


i386-linux-gnu_GL.conf 파일에 라이브러리 패스를 추가

/etc/ld.so.conf.d$ cat i386-linux-gnu_GL.conf
/usr/lib/i386-linux-gnu/mesa
/usr/local/lib

 

출처 :  http://it-korea-well.tistory.com/

 

버젼이 0.9.7 릴되고 사용한건데
운영하고 있는 서버에서 테스트해보면 여전히 속도는 최상이네요.

이번에 새로운 서버 만들어서 2.0.3 RPM버젼 설치했는데..
아래 설정으로 한글 검색 되고요..
근데 결과가 과거버젼하고는 많이 다른 느낌이네요.

"학교"를 검색해보니... "학" 와 "교"를 가져오네요.
공부좀 더 해봐야겠어요.
일단 rt 기능이 좋더군요. dump파일을 mysql h 0 P 포트 < dump.sql 로 입력해버리고
실시간 검색이 가능하더군요. 리부팅 시켜도 자료가 사라지는 것이 아니라 유지되고
일단 테스트해 볼 가치는 있는 것 같아요.

centos 에서 rpm으로 sphinx설치하게되면 php에서 모듈로 바로 사용되네요..

raid 각장치에 test파일을 저장해 둔다.

여기선 install.log 를 복사해서 test로 저장해뒀다

 

 

 

일단 하드 한개를 지워도 저장한데이터가 안전한 raid1,5를 먼저하겠다.

edit virtual machine settings 을 클릭해서 raid1에 연결한 하드5번과 raid5에 연결한 하드7번을 지우겠다



하드5,7번을 지웠지만 표시된다고 걱정마시길..vmware가 자동으로 하드 순번을 표시한 것이다.

다시 파워온 ~~ 하드디크스 몇개가 고장났지만 리눅스는 정상적으로 부팅된다.

RAID1 상태확인.. 2개중 1개 /dev/sdd1만 작동중


Raid5 하드4개중 3개만 작동중

@raid1,5 원상복구

일단 하드2개를 장착 , 파티션하고

mdadm /dev/md1 --add /dev/sde1

mdadm /dev/md5 --add /dev/sdg1



raid1 2개하드가 다시 작동, raid5 4개하드가 다시 작동

@RAID0 문제 발생시 복구

raid0에 연결된 하드3번을 지운다

그리고 부팅해본다.

부팅이 안된다.

응급복구 처럼 리눅스설치 시디를 넣고 f2로 바이오스 들어가서 cd_rom을 +키로 맨위에 올린뒤 저장한다.


f5키로 들어가서 미테 fstab 파일을 열어 md0장치 앞에 #키로 주석처리한다.


그리고 halt로 저장 뒤 빠져나와 부팅한다.

확인 해본 결과 md0 장치가 없다. 파일 또한 사라졌다

하드 추가 후 ~ 처음부터 다시 RAID0을 구성 한다.

 

출처 : http://blog.naver.com/rasid33?Redirect=Log&logNo=80129288529

+ Recent posts