현재 사용 중인 MySQL Storage Engine 확인 법입니다.
 
root 계정으로 로그인 한 뒤 
 
아래의 명령어를 입력 합니다.
 
show engines\G
 
ex)
 
mysql> show engines\G
*************************** 1. row ***************************
      Engine: MRG_MYISAM
     Support: YES
     Comment: Collection of identical MyISAM tables
Transactions: NO
          XA: NO
  Savepoints: NO
 
※ Support에 YES 인 경우 지원이 되는 경우 이며 No로 표기되는 경우 지원이 되지 않는 경우 입니다.



1. Apache 2.4 에 mod_cband 설치시 발생하는 에러

make 과정에서 아래와 같은 메시지 출력

/usr/local/apache/bin/apxs -Wc,-Wall -Wc,-DDST_CLASS=3 -c src/mod_cband.c
/usr/local/apr/build-1/libtool –silent –mode=compile gcc -std=gnu99 -prefer-pic -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -pthread -I/usr/local/apache/include -I/usr/local/apr/include/apr-1 -I/usr/local/apr-util/include/apr-1 -Wall -DDST_CLASS=3 -c -o src/mod_cband.lo src/mod_cband.c && touch src/mod_cband.slo
src/mod_cband.c: In function ‘mod_cband_create_traffic_size’:
src/mod_cband.c:1054: warning: comparison with string literal results in unspecified behavior
src/mod_cband.c:1054: warning: comparison with string literal results in unspecified behavior
src/mod_cband.c:1058: warning: comparison with string literal results in unspecified behavior
src/mod_cband.c:1058: warning: comparison with string literal results in unspecified behavior
src/mod_cband.c: In function ‘mod_cband_get_dst’:
src/mod_cband.c:1333: error: ‘conn_rec’ has no member named ‘remote_ip’
src/mod_cband.c: In function ‘mod_cband_get_remote_host’:
src/mod_cband.c:1362: error: ‘struct conn_rec’ has no member named ‘remote_ip’
src/mod_cband.c:1363: error: ‘struct conn_rec’ has no member named ‘remote_ip’
src/mod_cband.c:1365: error: ‘struct conn_rec’ has no member named ‘remote_addr’
apxs:Error: Command failed with rc=65536
.
make: *** [src/.libs/mod_cband.so] 오류 1


mod_cband.c 파일을 편집합니다.

vi /usr/local/src/mod-cband-0.9.7.5/src/mod_cband.c

이때, src/.libs/mod_cband.c 라는 파일이 존재 않은 상태에서 작업해야 합니다.

빨간색은 수정 이전 라인, 파란색은 수정 이후 라인입니다.

1333번 라인
p.add.sin.s_addr = inet_addr(r->connection->remote_ip);
p.add.sin.s_addr = inet_addr(r->connection->client_ip);

1342번 라인
   fprintf(stderr,”%s leaf %s\n”,r->connection->remote_ip,leaf);
   fprintf(stderr,”%s leaf %s\n”,r->connection->client_ip,leaf);

1362~1365번 라인
if (c->remote_ip != NULL)
addr = inet_addr(c->client_ip);
else
addr = c->remote_addr->sa.sin.sin_addr.s_addr;

if (c->client_ip != NULL)
addr = inet_addr(c->client_ip);
else
addr = c->client_addr->sa.sin.sin_addr.s_addr;

위와 같이 수정한 다음 make 명령을 내리면 정상적으로 컴파일이 진행됩니다.

/usr/local/apache/bin/apxs -Wc,-Wall -Wc,-DDST_CLASS=3 -c src/mod_cband.c
/usr/local/apr/build-1/libtool –silent –mode=compile gcc -std=gnu99 -prefer-pic -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -pthread -I/usr/local/apache/include -I/usr/local/apr/include/apr-1 -I/usr/local/apr-util/include/apr-1 -Wall -DDST_CLASS=3 -c -o src/mod_cband.lo src/mod_cband.c && touch src/mod_cband.slo
src/mod_cband.c: In function ‘mod_cband_create_traffic_size’:
src/mod_cband.c:1054: warning: comparison with string literal results in unspecified behavior
src/mod_cband.c:1054: warning: comparison with string literal results in unspecified behavior
src/mod_cband.c:1058: warning: comparison with string literal results in unspecified behavior
src/mod_cband.c:1058: warning: comparison with string literal results in unspecified behavior
/usr/local/apr/build-1/libtool –silent –mode=link gcc -std=gnu99 -o src/mod_cband.la -rpath /usr/local/apache/modules -module -avoid-version src/mod_cband.lo

write “make install” to install module

 

make install

/usr/local/apache/bin/apxs -Wc,-Wall -Wc,-DDST_CLASS=3 -i -a -n cband src/mod_cband.la
/usr/local/apache/build/instdso.sh SH_LIBTOOL=’/usr/local/apr/build-1/libtool’ src/mod_cband.la /usr/local/apache/modules
/usr/local/apr/build-1/libtool –mode=install install src/mod_cband.la /usr/local/apache/modules/
libtool: install: install src/.libs/mod_cband.so /usr/local/apache/modules/mod_cband.so
libtool: install: install src/.libs/mod_cband.lai /usr/local/apache/modules/mod_cband.la
libtool: install: install src/.libs/mod_cband.a /usr/local/apache/modules/mod_cband.a
libtool: install: chmod 644 /usr/local/apache/modules/mod_cband.a
libtool: install: ranlib /usr/local/apache/modules/mod_cband.a
libtool: finish: PATH=”/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/java/bin:/root/bin:/sbin” ldconfig -n /usr/local/apache/modules
———————————————————————-
Libraries have been installed in:
/usr/local/apache/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR’
flag during linking and do at least one of the following:
– add LIBDIR to the `LD_LIBRARY_PATH’ environment variable
during execution
– add LIBDIR to the `LD_RUN_PATH’ environment variable
during linking
– use the `-Wl,-rpath -Wl,LIBDIR’ linker flag
– have your system administrator add LIBDIR to `/etc/ld.so.conf’

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
———————————————————————-
chmod 755 /usr/local/apache/modules/mod_cband.so
[activating module `cband’ in /usr/local/apache/conf/httpd.conf]
You have new mail in /var/spool/mail/root



[출처] http://idchowto.com/?p=17012


### mysql 4.0.27 thread에러 해결 방법  ###

에러메시지
: checking "LinuxThreads"... "Not found"
: configure: error: This is a linux system and Linuxthreads was not
: found. On linux Linuxthreads should be used.  Please install Linuxthreads
: (or a new glibc) and try again.  See the Installation chapter in the
: Reference Manual for more information.

 
이문제는 mysql-4.0의 NPTL 의 안정성을 너무 고려한 나머지 발생한 버그로
다음과 같이 변경해서 컴파일 하면 해결할수 있습니다
 
우선 echo '/* Linuxthreads */' >> /usr/include/pthread.h
를 통해서 헤더파일을 수정하고, 또는 vi /usr/include/pthread.h파일을 열어 맨 하단에
/* Linuxthreads */ 이것만 추가하면된다
 
두번째로 컴파일 시 아래와 같이 옵션을 추가해서 컴파일 하면 오류없이 mysql을
설치하실수 있습니다.



출처: http://kensei.co.kr/303 [KENSEI IT BLOG]


configure 후  make&make install 시 오류 발생

 

mysql.cc: In function 'void print_table_data(MYSQL_RES*)':

mysql.cc:1650: error: expected primary-expression before '?' token

mysql.cc:1650: error: expected ':' before ')' token

mysql.cc:1650: error: expected primary-expression before ')' token

mysql.cc:1652: error: expected primary-expression before '?' token

mysql.cc:1652: error: expected ':' before ')' token

mysql.cc:1652: error: expected primary-expression before ')' token

mysql.cc:1666: error: expected primary-expression before '?' token

mysql.cc:1666: error: expected ':' before ')' token

mysql.cc:1666: error: expected primary-expression before ')' token

make[1]: *** [mysql.o] Error 1

make[1]: Leaving directory `/usr/local/src/APM_Setup/mysql-4.0.27/client'

make: *** [install-recursive] Error 1

 

이런식으로 뜨면 gcc버전 문제로 설치가 안 된다고 함.

 보통의 경우 gcc 및 g++ 버전이 높아 설치시 에러가 뜨는 것인데

 대처 방법은 우선 호환성 라이브러리 패키지를 설치해주고


[해결방법]

# yum install compat-*

 

gcc와 g++의 이름변경으로 백업후 gcc34, g++34 심볼릭 링크로 gcc,gcc++를 생성해주면된다

# cd /usr/bin

# mv gcc gcc-backup

# mv g++ g++-backup

# ln -s gcc34 gcc

# ln -s g++34 g++

 

설치 후에는 make & make install로 설치 진행


참고 sosnote.com


출처: http://narusika.tistory.com/entry/mysql-make시에-에러-발생-error-expected-primaryexpression-before-token [냐호냐호]


 Zend Guard Loader 설치

================================================================
PHP 가속 모듈인 Zend Optimizer는 PHP-5.2.x 버전까지만 지원되며,
 PHP-5.3.x 버전부터는 Zend Guard Loader를 설치해야 합니다.

Zend Guard Loader의 설치 방법을 알아 보겠습니다.

1. 소스 다운로드 및 압축 해제
 아래의 링크에서 소스 다운 (Zend 사이트 로그인 필요)
 http://www.zend.com/en/products/guard/downloads

 # tar zxvf ZendGuardLoader-php-5.3-linux-glibc23-i386.tar.gz


2. php 버전 확인 후 소스 폴더에서 버전에 맞는 모듈 파일을 복사
 # /usr/local/php/bin/php -v
 # cp ZendGuardLoader-php-5.3-linux-glibc23-i386/php-5.3.x/ZendOptimizer.so /usr/local/php/lib/


3. php.ini 파일에 다음 줄을 추가
 # vi /usr/local/php/lib/php.ini
 [Zend]
 zend_extension=/usr/local/php/lib/ZendGuardLoader.so


4. apache restart 후 php –v 및 phpinfo에서 설치 확인

 # /usr/local/apache/bin/apachectl restart
 # /usr/local/php/bin/php –v
 . 
 with Zend Guard Loader v3.3, Copyright (c) 1998-2010, by Zend Technologies

'Works > 확장모듈설치매뉴얼' 카테고리의 다른 글

apache mod_unique_id module 추가  (0) 2023.04.20
[PHP] GeoIP 확장(Extension) 모듈 설치  (0) 2017.08.11
APC 확장모듈 설치  (0) 2017.04.26
freetds 확장모듈 설치  (0) 2016.09.27
mod_mime_magic 설치  (0) 2016.08.01


APC 추가 하기 (php 5.2.6 이랑 apache 2.2.9 입니다.)

1. /home/php/bin/pecl download apc
2. tar -xvzf APC-3.0.19.tgz
3. cd APC-3.0.19
4. /home/php/bin/phpize
4. ./configure --enable-apc-mmap --with-apxs=/home/apache/bin/apxs --with-php-config=/home/php/bin/php-config
5. make
6. make install
    이렇게 하시면 기본적으로 php 의 extension 모듈 위치로 복사 됩니다.
7. 또는 이렇게 하셔도 됩니다. cp ././libs/apc.so /usr/local/lib
    이 부분도 역시 php extension 위치로 복사해서 넣으시면 됩니다.
8. php.ini 수정하기
    extension_dir=설정한위치로적용하세요.
       예) /home/php/lib/php/extensions/no-debug-zts-20060613/apc.so 가 있습니다.
          extension_dir=/home/php/lib/php/extensions
          extension="no-debug-zts-20060613/apc.so" 이렇게 넣으시면 됩니다.
          dir 은..적절히 조절 하시면 됩니다.
    enble_dl=on


    extension="apc.so"
    apc.enabled=1
    apc.shm_segments=1
    apc.shm_size=256
    apc.ttl=7200
    apc.user_ttl=7200
    apc.num_files_hint=1024
    apc.mmap_file_mask=/tmp/apc.XXXXXX
    apc.enable_cli=1
    apc.include_once_override=1

[출처] https://www.leaderstudy.co.kr/bbs/board.php?bo_table=tip&wr_id=122&page=2&page=2

'Works > 확장모듈설치매뉴얼' 카테고리의 다른 글

[PHP] GeoIP 확장(Extension) 모듈 설치  (0) 2017.08.11
Zend Guard Loader 설치  (0) 2017.05.17
freetds 확장모듈 설치  (0) 2016.09.27
mod_mime_magic 설치  (0) 2016.08.01
oAuth 확장모듈 설치  (0) 2016.03.29


국내에서 서비스 되고 있는 CentOS 미러 사이트의 URL을 정리한다.

1. 네이버

http://mirror.navercorp.com/centos/

2. 다음카카오

http://ftp.daumkakao.com/centos/

3. 네오위즈

http://ftp.neowiz.com/centos/


--------------------------------------------------------
ISP,초고속인터넷

한국통신 (코넷,메가패스) : kornet.net, megapass.co.kr
168.126.63.1 [kns.kornet.net]
168.126.63.2 [kns2.kornet.net]
210.104.1.3 [ns.pubnet.ne.kr]
210.204.251.22 [atm2.pubnet.ne.kr]
211.216.50.150 [ns.kornet.net] **
211.216.50.160 [ns2.kornet.net] **


데이콤 (보라넷,천리안,엑스피드) : dacom.co.kr, bora.net, chollian.net, chol.com, xpeed
164.124.101.2 [ns.dacom.co.kr,ns.bora.net]
164.124.101.31 [nis.dacom.co.kr] **
203.248.240.31 [ns2.bora.net] **


파워콤 (엑스피드) : xpeed
164.124.107.9 [cns2.bora.net]
203.248.252.2 [cns3.bora.net]


하나로텔레콤 : hananet.net
210.220.163.82 [qns1.hananet.net]
219.250.36.130 [qns2.hananet.net]
210.94.6.67 [qns3.hananet.net] ***
210.94.0.73 [cns1.hananet.net]
221.139.13.130 [cns2.hananet.net]
210.180.98.74 [cns3.hananet.net]
210.94.0.7 [fns1.hananet.net] ***
210.180.98.69 [fns2.hananet.net] ***


신비로샤크 :sshark.co.kr
202.30.143.11 [ns.shinbiro.com]
203.240.193.11 [ns2.shinbiro.com]
203.251.201.1 [ns3.shinbiro.com]
208.38.61.228 [qns.shibiro.com] **
208.38.61.228 [cns.shibiro.com] **


드림라인 : dreamline.co.kr
210.181.1.24 [ns.cjdream.net]
210.181.4.25 [ns2.cjdream.net]


엘림넷 : elim.net
203.239.130.1 [ns.elim.net]
203.239.131.1 [ns2.elim.net]


엔터프라이즈네트웍스 : epidc.co.kr
211.115.194.6 [ns.epidc.co.kr] **
211.115.194.2 [ns2.epidc.co.kr] **
211.115.194.3 [ns3.epidc.co.kr] **


삼성네트웍스 : samsungnetworks.co.kr

KRLINE : krline.net
211.47.128.1 [ns1.krline.net]
211.47.128.2 [ns2.krline.net]
211.47.128.146 [ns3.krline.net] ****

--------------------------------------------------------
IDC

KT IDC (한국통신 데이터센터) : kt-icc.com
211.63.213.176 [ns.kt-idc.com] **
61.78.38.120 [ns2.kt-idc.com] **


한국인터넷데이터센터 (LG데이콤) : kidc.net
203.248.250.24 [ns1.kidc.net] **
203.248.250.25 [ns2.kidc.net] **
164.124.101.31 [ns1.lgdacom.net] **
203.248.240.31 [ns2.lgdacom.net] **
211.234.98.50 [cns.kidc.net]


하나로통신 인터넷데이터센터 : ngene.net
211.58.252.62 [ns.ngene.net] **
211.58.252.94 [ns2.ngene.net] **
58.227.193.227 [qns1.ngene.net]
221.143.20.131 [qns2.ngene.net]
218.232.110.35 [cns1.ngene.net]
218.232.110.36 [cns2.ngene.net]
218.232.110.37 [cns3.ngene.net]
221.143.20.133 [cns4.ngene.net]
221.143.20.134 [cns5.ngene.net] ****
221.143.20.135 [cns6.ngene.net]



--------------------------------------------------------
호스팅

하나로 호스팅 : hhosting.co.kr
218.237.66.130 [ns1.hhosting.co.kr]
218.237.66.140 [ns2.hhosting.co.kr]


인터넷제국 : inempire.com
210.124.122.35 [ren1.inempire.com]
211.53.209.135 [ren2.inempire.com]


--------------------------------------------------------
** : Local Query 불가 (일반 PC 에서 DNS 서버로 사용불가)
*** : 해당라인 사용시만 Local Query 가능 (타사 라인 사용시 사용불가)



# wget ftp://ftp.proftpd.org/distrib/source/proftpd-1.3.0.tar.gz
# tar -xzvf proftpd-1.3.0.tar.gz
# cd proftpd-1.3.0
# ./configure --prefix=/usr/local/proftpd
# make
# make install
# cd /usr/local/proftpd/sbin/proftpd

만약 여기서 다음과 같은 에러가 나면...

- warning: unable to determine IP address of 'localhost.localdomain'
 - error: no valid servers configured
 - Fatal: error processing configuration file '/usr/local/proftpd/etc/proftpd.conf'

- warning: unable to determine IP address of 'test01'
 - error: no valid servers configured
 - Fatal: error processing configuration file '/usr/local/proftpd/etc/proftpd.conf'

# vi /etc/hosts
127.0.0.1       localhost.localdomain   localhost
127.0.0.1       test01 localhost

추가 해주면 됩니다.
그러면 에러가 안나요.

그리고 나서 다음과 같이 포트가 열려있는지 확인하면 됩니다.

# netstat -an | grep LISTEN | grep 21


출처: http://ibabo.tistory.com/115 [Hello, World ♡.♡]


1. 특정 pattern이 들어가는 line 지우기

:g/pattern/d

위의 방법을 사용하면 pattern으로 정의된 regular expression에 해당하는 모든 line이 지위지게 된다.
예) "profile"이 들어가 있는 모든 line 지우기
:g/profile/d

2. 특정 pattern이 들어가 있는 line을 제외한 모든 line 지우기

:g!/pattern/d
:v/pattern/d


위의 방법을 사용하면 pattern으로 정의된 regular expression에 해당하는 모든 line을 제외한 모든 line이 지워진다.

예) error, warning, fail이 포함되지 않은 모든 line 지우기
:v/error\|warning\|fail/d

출처: http://sunshowers.tistory.com/77 [Sunshowers]