티스토리 뷰
APM 최신으로 할시 딴건 문제 없는데 PHP 5.3.0 를 위한 ZendOptimizer 는 올해 말에나 나온다고 함.
현재 Zendoptimizer 3.3.9 는 5.2.X 까지 지원한다던데 Cent Os 5.4, php 5.2.8 에 Zendoptimier 3.3.9 설치 안됨 ㅋ
왜 안되는지는 모르겠음 ㅋ
APM 관련 패키지 지우기
기존 configure 옵션들 히스토리
Apache : config.nice or config.log
Mysql : config.status : 306 or config.log
PHP : config.status 위 주석처리된 부분
[Mysql-5.1.34]
./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --with-charset=euckr --with-mysql-user=mysql --with-extra-charsets=all --enable-thread-safe-client --with-plugins=max
- with-charset=euckr
make
make install
groupadd -g 400 mysql
useradd -u400 -g400 -M mysql
chown -R mysql:mysql /usr/local/mysql
cp /usr/local/mysql/share/mysql/my-large.cnf /etc/my.cnf
/usr/local/mysql/bin/mysql_install_db
chown -R mysql.mysql /usr/local/mysql/data
cp /usr/local/mysql/share/mysql/mysql.server /etc/init.d/mysqld
chmod 700 /etc/init.d/mysqld
chown root.root /etc/init.d/mysqld
chkconfig --add mysqld
chmod 711 /usr/local/mysql
chmod 700 /usr/local/mysql/data
chmod 751 /usr/local/mysql/bin
chmod 750 /usr/local/mysql/bin/*
chmod 755 /usr/local/mysql/bin/mysql
chmod 755 /usr/local/mysql/bin/mysqldump
echo "alias mysqladmin='/usr/local/mysql/bin/mysqladmin'" >> /root/.bashrc
echo "alias mysqldump='/usr/local/mysql/bin/mysqldump'" >> /etc/bashrc
echo "alias mysql='/usr/local/mysql/bin/mysql'" >> /etc/bashrc
/usr/local/mysql/bin/mysqld_safe &
/usr/local/mysql/bin/mysqladmin -u root password PASSWORD
mysql관련 기본 라이브러리 추가
vim /etc/ld.so.conf
- /usr/local/mysql/include/mysql or /usr/local/mysql/lib/mysql 가 있는지 둘중 하나를 적어주고
- ldconfig 실행하여 적용시키는듯 한데? ㅋ
에러메세지)
checking for termcap functions library... configure: error: No curses/termcap li
- yum -y install ncurses-devel
../depcomp: line 571: exec: g++: not found
- yum install gcc
no SSL-C headers found
configure: error: ...No recognized SSL/TLS toolkit detected
- yum install openssl-devel
Configure: error: Please reinstall the BZip2 distribution
해결책 : # yum install bzip2-devel
해결책: --with-bz2 → --with-bz2-dir=/usr/bin 고쳐주니깐 넘어가긴 함
checking for U8T_CANONICAL... no
configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.
- yum -y install libc*
- yum install uw-imap-devel
- --with-imap → --with-imap-dir=/usr/lib/c-client.a
configure: error: Please reinstall libmhash - I cannot find mhash.h
- yum install libmcrypt libmcrypt-devel libmhash libmhash-devel
- mhash 패키지를 구해다가 깔아준다
[root@localhost ~]# /etc/init.d/mysqld start
Starting MySQL.Manager of pid-file quit without updating fi[FAILED]
전에 mysql 버젼의 /etc/my.cnf 가 존재하는듯함. 그걸 지우고
cp /usr/local/mysql/share/mysql/my-large.cnf /etc/my.cnf
요거 해주고 다시 해보면 실행된다
[mysql 5.5.16 설치]
컴파일러 설치
[root@localhost mysql-5.5.16]# yum install gcc cpp gcc-c++ compat-gcc-34-g77 flex make cmake
cmake 소스설치
wget http://www.cmake.org/files/v2.8/cmake-2.8.5.tar.gz
tar xvzf cmake-2.8.5.tar.gz
cd cmake-2.8.5
./bootstrap
make
make install
라이브러리 설치
[root@localhost mysql-5.5.16]# yum install libjpeg-devel libpng-devel freetype-devel gd-devel ncurses-devel
[선행작업]
groupadd -g 400 mysql
useradd -u400 -g400 -d /usr/local/mysql -s /bin/false mysql
소스설치
[root@localhost mysql-5.5.16]# cd /usr/local/src/mysql/
[root@localhost mysql-5.5.16]# cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DWITH_EXTRA_CHARSETS=all -DMYSQL_DATADIR=/data -DENABLED_LOCAL_INFILE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DMYSQL_UNIX_ADDR=/tmp/mysql.sock -DSYSCONFDIR=/etc -DEFAULT_CHARSET=utf8 -DWITH_EXTRA_CHARSETS=all -DMYSQL_TCP_PORT=3306 (내꺼)
[root@localhost mysql-5.5.16]# cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/usr/local/mysql/data -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_EXTRA_CHARSETS=all -DENABLED_LOCAL_INFILE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DMYSQL_UNIX_ADDR=/tmp/mysql.sock -DSYSCONFDIR=/etc -DMYSQL_TCP_PORT=3306 (동훈시 자료)
[root@localhost mysql-5.5.16]# make && make install
mysql 기타 설정
[root@localhost scripts]# groupadd -g 400 mysql
[root@localhost scripts]# useradd -u400 -g400 -M mysql
[root@localhost scripts]# cd /usr/local/mysql/
[root@localhost scripts]# chown -R mysql .
[root@localhost scripts]# chgrp -R mysql .
[root@localhost scripts]# scripts/mysql_install_db --user=mysql
[root@localhost scripts]# chown -R root .
[root@localhost scripts]# chown -R mysql data/
[root@localhost scripts]# chown -R mysql:mysql /usr/local/mysql
cp -arp scripts/mysql_install_db /usr/local/mysql
sh /usr/local/mysql/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
rm -f /usr/local/mysql/mysql_install_db
chown -R mysql.mysql /usr/local/mysql/data
cp support-files/my-huge.cnf /etc/my.cnf
cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld
chmod 700 /etc/init.d/mysqld
chown root.root /etc/init.d/mysqld
chkconfig --add mysqld
chmod 711 /usr/local/mysql
chmod 700 /usr/local/mysql/data
chmod 751 /usr/local/mysql/bin
chmod 750 /usr/local/mysql/bin/*
chmod 755 /usr/local/mysql/bin/mysql
chmod 755 /usr/local/mysql/bin/mysqldump
mysql 설정파일 /etc에 복사 mysql/support-files 에 디폴트 설정파일 존재 (수정해서 사용하면 될듯?)
my-huge.cnf : 메모리가 1G - 2G 사이일때 사용
my-large.cnf : 메모리가 512M 일때 사용
my-medium.cnf : 메모리가 64 - 256M 사이일때 사용
my-small.cnf : 메모리가 64M 보다 작을때 사용
내 메모리는 2기가 이므로 해당 파일 복사
[root@localhost mysql]# cp /usr/local/mysql/support-files/my-huge.cnf /etc/my.cnf
스크립트 복사
[root@localhost mysql]# cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql
[root@localhost mysql]# chkconfig --add mysql
mysql 실행 및 root password 설정
[root@localhost mysql]# /usr/local/mysql/bin/mysqld_safe &
혹은
[root@localhost ~]# /etc/init.d/mysqld start
[root@localhost mysql]# mysqladmin -u root password [암호]
mysql 실행시 에러시 해결방법
[root@localhost ~]# /etc/init.d/mysqld start
Starting MySQL. ERROR! The server quit without updating PID file (/data/localhost.localdomain.pid).
권한문제이거나
chown -R mysql /usr/local/mysql/data
혹은 스크립트 문제일듯 함
vim /etc/init.d/mysql 열어서 아래 2라인 수정해주면 정상실행되었다.
basedir=/usr/local/mysql
datadir=/usr/local/mysql/data
환경변수 등록
[root@localhost scripts]# vi ~/.bash_profile
PATH=$PATH:$HOME/bin → PATH=$PATH:$HOME/bin:/usr/local/mysql/bin 수정
수정한 내용 바로 적용시키기 (보통 다시 로그인 하면 적용됨)
[root@localhost scripts]# source ~/.bash_profile
mysql 소스설치 옵션 : http://dev.mysql.com/doc/mysql-sourcebuild-excerpt/5.5/en/source-configuration-options.html#cmake-compiler-flags
설치참조 : http://batsu05.tistory.com
설치참조 : http://www.lovelgw.com/Blog/291
설치참조 : mysql 설치|작성자 괄목상대 : http://blog.naver.com/PostView.nhn?blogId=jingyoohan&logNo=40076612266
[httpd 2.2.9]
----------------------------------------------------------------------------------------------------------------------------
php 스쿨 보니깐 아래 명령 날리고 하라는데 기본 httpd 데몬이 256인데 20000까지 뜨게 한다나?
export CFLAGS="${CFLAGS} -DHARD_SERVER_LIMIT=1024 -DDEFAULT_SERVER_LIMIT=1024"
vim apache소스폴더/server/mpm/prefork/prefork.c
#defined DEFAULT_SERVER_LIMIT 256 (256 - 1024)
vim apache소스폴더/server/mpm/worker/worker.c
#defined DEFAULT_SERVER_LIMIT 16 (16 - 64)
----------------------------------------------------------------------------------------------------------------------------
./configure --prefix=/usr/local/apache --enable-modules=so --enable-ssl --with-mpm=worker --enable-rewrite
- prefix= 설치될 디렉토리를 지정 (/usr/local/apache 에 설치하겠다란 뜻 위에선)
- rewrite 모듈 (--enable-rewrite) : 테테툴즈, 텍스트 큐브에서 URL 재작성(간단한주소?)해줄때 필요함
- enable-module=so , enable-mods-shared=all , enable-so : 동적모듈 DSO 관련인거 같은데 그냥 해줌
- enable-mods-shared=all 모든 모듈을 DSO 모듈로 공유한다?
- with-mpm=worker
- enable-ssl=shared ssl 443을 이용해서 보안접속을 할때 쓰는거? (openssl 라이브러리를 공유하겠다?)
- with ssl SSL 모듈과 함께? 사용하겠다는 의미
make
make install
echo "--- /etc/rc.d/init.d/apachectl ---" >> /usr/local/apache/bin/apachectl
echo "# chkconfig: - 92 92 " >> /usr/local/apache/bin/apachectl
echo "# description: Apache Web Server Version : 2.0.55 " >> /usr/local/apache/bin/apachectl
cp /usr/local/apache/bin/apachectl /etc/rc.d/init.d/
chkconfig --add apachectl
chkconfig --level 345 apachectl on
아파치 시작시 아래와 같은 에러 초기 셋팅후 바로 시작시에
httpd: Syntax error on line 53 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/modules/libphp5.so into server: /usr/local/apache/modules/libphp5.so: cannot restore segment prot after reloc: Permission denied
- selinux 해제
- chcon -t texrel_shlib_t /usr/local/apache/modules/libphp5.so 이 명령어 날리니깐 바로 되네 ㅋ
[httpd 2.3.8]
wget http://archive.apache.org/dist/apr/apr-1.4.2.tar.gz
tar xvzf apr-1.4.2.tar.gz
cd apr-1.4.2
cp -arp libtool libtoolT <- (두번째 시도) libtoolT 지우지 못한다는 에러메세지 나타났지만 생략해주어도 되었음
./configure
ln -s /usr/bin/libtool / <- (두번째 시도) 생략해주어도 되었음
make
make install
wget http://archive.apache.org/dist/apr/apr-util-1.3.9.tar.gz
tar xvzf apr-util-1.3.9.tar.gz
cd apr-util-1.3.9
./configure --with-apr=/usr/local/apr
make
make install
apache 설치
./configure --prefix=/usr/local/apache --enable-modules=so --enable-mods-shared=all --enable-modules=shared --enable-ssl --enable-rewrite --with-mpm=worker --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr
make
make install
[php 5.2.9]
yum -y install openssl openssl-devel mhash mhash-devel libtool libtool-ltdl libtool-ltdl-devel imap-devel imap zlib-devel zlib freetype-devel freetype libpng-devel libpng libjpeg-devel libjpeg libtiff-devel libtiff gd-devel gd pcre-devel pcre libxml-devel libxml libxml2-devel libxml2 gdbm-devel gdbm ncurses-devel ncurses curl-devel curl expat-devel expat bzip2-devel bzip2-libs bzip2 uw-imap-devel libc-client libc-client-devel libmcrypt libmcrypt-devel
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --enable-mod-charset --with-config-file-path=/usr/local/apache/conf --enable-safe-mode --enable-sigchild --enable-magic-quotes --with-libxml-dir --with-openssl --with-zlib --with-zlib-dir --with-bz2 --enable-calendar --with-curl --enable-dba --with-gdbm --enable-exif --enable-ftp --with-gd --with-jpeg-dir --with-png-dir --with-ttf --with-freetype-dir --enable-gd-native-ttf --with-gettext --with-imap --with-imap-ssl --with-kerberos --enable-mbstring --with-mhash --with-mcrypt --with-mysql=/usr/local/mysql --enable-sockets --with-regex=php --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --enable-zend-multibyte
php 5.3.0 에서는 --with ttf 가 안먹는다?? 대신 --with-freetype-dir 이 옵션을 주면 되는듯 한데 ㅋㅋ
./configure --h | grep ttf 도움말을 보면
--with ttf (freetype 1.0)
--with-freetype-dir (freetype 2.0)
php.5.3.0 에는 php.ini-dist 파일이 없다 그냥 5.2.9 꺼 가지고 와서 복사하니 되긴 한데 찝찝함
make
make install
cp php.ini-dist /usr/local/lib/php.ini
ln -s /usr/local/lib/php.ini /usr/local/php/lib/php.ini
vim /usr/local/apache/conf/httpd.conf
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
UseCanonicalName On
↓↓↓↓↓↓↓↓↓↓↓↓ 수정
AddType application/x-compress .Z
AddType application/x-httpd-php .htm .html .php .ph php3 .php4 .phtml .inc
AddType application/x-httpd-php-source .phps
AddType application/x-gzip .gz .tgz
UseCanonicalName Off
----------------------------------------------------------------------------------------------------------------------------
밑에껀 안해봤음 (안해도 잘되는듯함)
cp php.ini-dist /usr/local/apache/conf/php.ini
php 보안관련 기본값 수정
sed -i 's/register_globals = Off/register_globals = On/g' /usr/local/apache/conf/php.ini
sed -i 's/;upload_tmp_dir =/upload_tmp_dir = \/tmp/g' /usr/local/apache/conf/php.ini
sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 10M/g' /usr/local/apache/conf/php.ini
sed -i 's/post_max_size = 8M/post_max_size = 10M/g' /usr/local/apache/conf/php.ini
sed -i 's/memory_limit = 8M/memory_limit = 10M/g' /usr/local/apache/conf/php.ini
sed -i 's/allow_url_fopen = On/allow_url_fopen = Off/g' /usr/local/apache/conf/php.ini
sed -i 's/log_errors = Off/log_errors = On/g' /usr/local/apache/conf/php.ini
sed -i 's/;error_log = syslog/error_log = syslog/g' /usr/local/apache/conf/php.ini
----------------------------------------------------------------------------------------------------------------------------
error)
configure: error: Cannot find libmysqlclient_r under /usr/local/mysql.
[php] .configure 시 error configure: error: Cannot find libmysqlclient_r under /usr/local/mysql. Note that the MySQL client library is not bundled anymore! Apache 가 Thread 모드로 설치되어있으나, MySQL 은 Thread Safe 옵션을 주지 않았기 때문이다. MySQL 을 컴파일할 때 다음 옵션 추가하여 해결할 수 있다 --enable-thread-safe-client
[php 5.3.8 설치]
centos 6.0 최소 설치의 경우 아래 패키지 미리 설치해주자 (안깔리는 패키지가 많은듯 함)
yum -y install openssl openssl-devel mhash mhash-devel libtool libtool-ltdl libtool-ltdl-devel imap-devel imap zlib-devel zlib freetype-devel freetype libpng-devel libpng libjpeg-devel libjpeg libtiff-devel libtiff gd-devel gd pcre-devel pcre libxml-devel libxml libxml2-devel libxml2 gdbm-devel gdbm ncurses-devel ncurses curl-devel curl expat-devel expat bzip2-devel bzip2-libs bzip2 libc libc-devel libc-client-devel gcc*
cd /usr/local/src/php-5.3.6
(make test 에서 오류 발생하여 --safe-mode 옵션 제거 했음)
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --enable-mod-charset --with-config-file-path=/usr/local/apache/conf --enable-sigchild --enable-magic-quotes --with-libxml-dir --with-openssl --with-zlib --with-zlib-dir --with-bz2 --enable-calendar --with-curl --enable-dba --with-gdbm --enable-exif --enable-ftp --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --enable-gd-native-ttf --with-gettext --with-imap --with-imap-ssl --with-kerberos --enable-mbstring --with-mhash --with-mcrypt --with-mysql=/usr/local/mysql --enable-sockets --with-regex=php --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --enable-zend-multibyte
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --enable-mod-charset --with-config-file-path=/usr/local/apache/conf --enable-safe-mode --enable-sigchild --enable-magic-quotes --with-libxml-dir --with-openssl --with-zlib --with-zlib-dir --with-bz2 --enable-calendar --with-curl --enable-dba --with-gdbm --enable-exif --enable-ftp --with-gd --with-jpeg-dir --with-png-dir --with-ttf --with-freetype-dir --enable-gd-native-ttf --with-gettext --with-imap-dir=/usr/local/src/imap-2007f --with-imap-ssl --with-kerberos --enable-mbstring --with-mhash --with-mcrypt --with-mysql=/usr/local/mysql --enable-sockets --with-regex=php --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --enable-zend-multibyte
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --enable-mod-charset --with-config-file-path=/usr/local/apache/conf --enable-safe-mode --enable-sigchild --enable-magic-quotes --with-libxml-dir --with-openssl --with-zlib --with-zlib-dir --with-bz2 --enable-calendar --with-curl --enable-dba --with-gdbm --enable-exif --enable-ftp --with-gd --with-jpeg-dir --with-png-dir --with-ttf --with-freetype-dir --enable-gd-native-ttf --with-gettext --with-imap-dir=/usr/lib/c-client.a --with-imap-ssl --with-kerberos --enable-mbstring --with-mhash --with-mcrypt --with-mysql=/usr/local/mysql --enable-sockets --with-regex=php --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --enable-zend-multibyte
./configure --enable-shared --enable-static ( 동훈씨꺼)
make
make install
cp php.ini-development /usr/local/apache/conf/php.ini
vi /usr/local/apache/conf/httpd.conf (적절한곳에 아래내용 입력)
DirectoryIndex index.html index.htm index.php index.php3 index.php4 index.php5 index.phtml index.cgi index.jsp
# PHP Enable
AddType application/x-httpd-php .html .htm .php .php3 .php4 .php5 .phtml .cgi .inc
AddType application/x-httpd-php-source .phps
<Directory /home/*>
AllowOverride All
Options +ExecCGI
Order allow,deny
Allow from all
</Directory>
(64비트 운영체제에서는 아래 심볼릭 링크 진행 해주어야 함)
ln -sf /usr/lib64/libpng12.so.0 /usr/lib/libpng12.so.0 // 이부분은 CentOS 6, fedora 15 이상에서 해당되는 내용. If문 사용 : 64bit이고 파일이 없을때 복사
ln -sf /usr/lib64/libpng12.a /usr/lib/libpng12.a
ln -sf /usr/lib64/libpng.so.3 /usr/lib/libpng.so.3
ln -sf /usr/lib64/libpng.so /usr/lib/libpng.so
ln -sf /usr/lib64/libpng12.so /usr/lib/libpng12.so
ln -sf /usr/lib64/libc-client.so /usr/lib/libc-client.so
ln -sf /usr/lib64/libgssapi_krb5.so /usr/lib/libgssapi_krb5.so
ln -sf /usr/lib64/libkrb5.so /usr/lib/libkrb5.so
ln -sf /usr/lib64/libkrb5support.so /usr/lib/libkrb5support.so
error)
configure: error: mcrypt.h not found. Please reinstall libmcrypt.
요거 구해다가 mcrypt-2.6.8.tar.gz 압축풀고
./configure && make && make install
error)
checking for libmcrypt - version >= 2.5.0... no
*** Could not run libmcrypt test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means LIBMCRYPT was incorrectly installed
*** or that you have moved LIBMCRYPT since it was installed. In the latter case, you
*** may want to edit the libmcrypt-config script: no
configure: error: *** libmcrypt was not found
위에러는 libmcrypt-2.5.7 다운받아서
./configure && make && make install
error)
checking for mhash_keygen in -lmhash... no
configure: error: "You need at least libmhash 0.8.15 to compile this program. http://mhash.sf.net/"
위 에러는 mhash-0.9.9.9.tar.bz2 가 깔려 있어야 함 같은 방법으로 다운 받아서 컴파일
error)
configure: error: Cannot find imap library (libc-client.a). Please check your c-client installation.
위에러를 잡기 위한 패키지 RPM 설치해보자. (이정도만 있음 될 듯)
libc-client-2007e-11.el6.i686.rpm
libc-client-2007e-11.el6.x86_64.rpm
libc-client-devel-2007e-11.el6.i686.rpm
uw-imap-2007e-14.el6.src.rpm
uw-imap-devel-2007e-8.el6.x86_64.rpm
uw-imap-utils-2007e-14.el6.x86_64.rpm
error)
configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.
위 에러는 아래 패키지 설치
[root@localhost php-5.3.8]# yum -y install libc-client-devel
error)
configure: error: Kerberos libraries not found.
Check the path given to --with-kerberos (if no path is given, searches in
위 에러는 yum install krb5-devel* 이거나 yum install krb5*
64비트의 경우 ln -s /usr/lib64 /usr/kerberos/lib 로 해결가능
error)
// /usr/bin/install: cannot create regular file `/usr/local/man/man1/cjpeg.1': 그런 파일이나 디렉토리가 없음이라는 오류가 나타날 경우 아래 처럼 처리할것
// makedir /usr/local/man/man1
// make install
// make
cd /usr/local/src
wget system.neulwon.com/pub/jpegsrc.v6b.tar.gz
tar xvzf jpegsrc.v6b.tar.gz
cd jpeg-6b
cp -f /usr/share/libtool/config/config.guess . <- 참고 http://www.noah.org/wiki/Jpegsrc_64 <- centos 5.6 이하 일때는 /usr/share/libtool/config.guess 에 있음
cp -f /usr/share/libtool/config/config.sub .
[ZendOptimizer-3.3.3]
./install.sh
제대로 깔린거 확인할려면 아래 파일 만들어서 열어보면 셋팅된게 보이네..ㅋ
vim phpinfo.php
- <? phpinfo() ?>
아니면 /usr/local/php/bin/php -v 로 확인해보면 Zend 3.3.3 이라는 글귀 떠야 함
[ZendOptimizer-3.3.9]
PHP 버젼 확인
PHP 5.2.8 (cli) (built: Apr 18 2010 02:59:08)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
아래 경로에 5.X.X 에서 맞는 디엑토리 골라서 난 PHP 5.2.8이니 아래 경로에 가서
cd /usr/local/src/APM/ZendOptimizer-3.3.9-linux-glibc23-i386/data/5_2_x_comp
아래 .so 파일 복사해준다 구글링이나 네이버링 해보니깐 다 다른데 아래쪽 디렉토리다가 복사 별 상관없는듯함
- /usr/local/apache/conf
- /usr/local/php/lib/
- /usr/local/lib
복사하고 일단
cp ZendOptimizer.so /usr/local/php/lib
php.ini 파일 찾아서 라인추가해준다. 아무리 추가해줘도 안된다. PHP 5.2.8 과 Zendoptimizer 3.3.9는 뭔가 안 맞나?
zend_optimizer.version=3.3.9
zend_extension=/usr/local/php/lib/ZendOptimizer.so
cent os 5.4
php 5.2.8 Zendoptimizer 3.3.9 왜 이렇게 안되냐? ㅋ
디지문 2011/06/21 15:37
젠드옵티마이저 3.3.9는 아파치를 worker가 아닌 prefork로 설치해 놨을 때만 적용 가능~
비러먹을 젠드에서 prefork 용으로만 so파일을 빌드해서 배포하고 있음...
[ZendGuardLoader]
cd ../ZendGuardLoader-php-5.3-linux-glibc23-x86_64/php-5.3.x
cp -arp ZendGuardLoader.so /usr/local/php/lib/
vi /usr/local/apache/conf/php.ini
(맨하단에 아래내용 입력)
[Zend]
zend_extension=/usr/local/php/lib/ZendGuardLoader.so
short_open_tag = On // phpinfo(); 를 보기위해
date.timezone = Asia/Seoul 도 입력
register_globals = On
참고
http://www.atomicorp.com/forums/viewtopic.php?f=12&t=4984
http://forums.zend.com/viewtopic.php?f=57&t=1365&start=80
APM 완전삭제
rm -rf /usr/local/apache
rm -rf /usr/local/mysql
rm -rf /usr/local/php
rm -rf /usr/localZend
rm -rf /etc/rc.d/init.d/apachectl
rm -rf /etc/rc.d/init.d/mysqld
아파치 로그정리
cd /usr/local/apache/logs
mkdir /home/apachelogs
mv *log* /home/apachelogs
/usr/local/apache/bin/apachectl restart
APM 환경에서 conf 파일들 백업
/usr/local/apache/conf 폴더 몽땅다
/etc/my.cnf
/usr/local/Zend/etc/php.ini (원본)
- /usr/local/apache/conf/php.ini
- /usr/local/php/lib
기타 백업할 파일들
/usr/local/mysql/data ; mysql DB들
참고블로그 : http://www.digimoon.net/blog/257
참고블로그 : http://www.lovelgw.com/Blog/31?category=12
관련사이트
'Linux' 카테고리의 다른 글
리눅스 커널 컴파일 정의 및 옵션 (0) | 2015.06.04 |
---|---|
ip_conntrack: table full, dropping packet (0) | 2015.06.04 |
getaddrinfo: localhost Name or service not known (telnet 서비스 관련) (0) | 2015.06.04 |
kernel: Buffer I/O error on device sde1, logical block 184 (0) | 2015.06.04 |
리눅스 초기 화면 메세지 띄우기 (0) | 2015.06.04 |
- Total
- Today
- Yesterday
- pptp
- 인증서
- mod_security
- IPSEC
- 리눅스
- php
- softether
- iptables
- NGINX
- centOS7
- cURL
- OpenVPN
- gitlab
- L2TP
- mariadb
- MySQL
- HAProxy
- GeoIP
- kvm
- galera
- yum
- WAF
- SSL
- ntp
- centos8
- virtualbox
- Apache
- glusterfs
- 베이어다이나믹
- ssh
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |