'eaccelerator'에 해당하는 글 2건

미디어위키

Daily/Prog 2009. 12. 15. 09:42
위키 같은 프로그램이 하나 정도는 필요할 거 같고.. 과연 사람들이 문법을 좋아라 할지 의문이고..
그 종류도 너무 많아서 도대체 어떤걸 설치해야 그나마 이 님들이 그나마 활용을 잘 할 수 있을지..
한참을 고민하다가 그냥 미디어위키 엔진을 설치한다...


mediawiki 설치

참고 : http://www.mediawiki.org/wiki/MediaWiki

1. 다운로드 및 압축풀기
# 더블유get http://download.wikimedia.org/mediawiki/1.15/mediawiki-1.15.1.tar.gz
# tar zxvf mediawiki-1.15.1.tar.gz


2. 디렉토리 권한 설정
웹 주소로 접속 후 설정 계속 -> http://wiki.mydomain.com/
wiki 설치 디렉토리 안에 config 디렉토리 쓰기 권한 지정
# chmod a+w config


3. 설치 전 시스템 사양
PHP 5.2.8 installed
Found database drivers for: MySQL SQLite
PHP server API is apache2handler; ok, using pretty URLs (index.php/Page_Title)
Have XML / Latin1-UTF-8 conversion support.
Warning: A value for session.save_path has not been set in PHP.ini. If the default value causes problems with saving session data, set it to a valid path which is read/write/execute for the user your web server is running under.
PHP's memory_limit is 128M.
Couldn't find Turck MMCache, eAccelerator, APC or XCache; cannot use these for object caching.
Found GNU diff3: /usr/bin/diff3.
Found GD graphics library built-in, image thumbnailing will be enabled if you enable uploads.
Installation directory: /home/wiki/www
Script URI path: Installing MediaWiki with php file extensions
Environment checked. You can install MediaWiki.

* 설정이 덜 되거나 추가 설치할 것들이 있다면 하나씩 해결

Warning: A value for session.save_path has not been set in PHP.ini. If the default value causes problems with saving session data, set it to a valid path which is read/write/execute for the user your web server is running under.
# vi /usr/local/Zend/etc/php.ini
session.save_path = "/tmp"
# /etc/init.d/httpd restart

Couldn't find Turck MMCache, eAccelerator, APC or XCache; cannot use these for object caching.
>>> eAccelerator 설치
 - eAccelerator 설치/작동을 확인했음에도 불구하고 저 로그는 계속 나타난다 ㅡㅡ;


4. 사양 체크 후 아래 양식 추가 작성
 - 관리자 계정 / DB 설정 등...


5. 설정이 끝난 후 설치 기록 확인
Please include all of the lines below when reporting installation problems.
PHP 5.3.1 installed
Found database drivers for: MySQL SQLite
PHP server API is apache2handler; ok, using pretty URLs (index.php/Page_Title)
Have XML / Latin1-UTF-8 conversion support.
Session save path (/tmp) appears to be valid.
PHP's memory_limit is 128M.
Couldn't find Turck MMCache, eAccelerator, APC or XCache; cannot use these for object caching.
Found GNU diff3: /usr/bin/diff3.
Found GD graphics library built-in, image thumbnailing will be enabled if you enable uploads.
Installation directory: /home/www/wiki
Script URI path: /wiki
Installing MediaWiki with php file extensions
Environment checked. You can install MediaWiki.
Generating configuration file...

Database type: MySQL
Loading class: DatabaseMysql
Attempting to connect to database server as root...success.
Connected to mysql 5.0.77; enabling MySQL 4.1/5.0 charset mode
Database wiki exists
Creating tables... done.
Initializing statistics...
Granting user permissions to ggamzzak on wiki...success.
Created sysop account WikiSysop.
Creating LocalSettings.php...

--------------------------------------------------------------------------------

Installation successful! Move the config/LocalSettings.php file to the parent directory, then follow this link to your wiki.
You should change file permissions for LocalSettings.php as required to prevent other users on the server reading passwords and altering configuration data.


6. 파일 권한 복구
마지막으로 config/LocalSettings.php 파일 권한을 바꾸고 상위 디렉토리로 이동
# chmod 644 LocalSettings.php
# mv LocalSettings.php ../


7. 위키 접속
http://wiki.mydomain.com/

사용자 삽입 이미지

WRITTEN BY
손가락귀신
정신 못차리면, 벌 받는다.

,

eAccelerator

Server/CentOS 2009. 12. 14. 21:56
eAccelerator는 PHP가속, 최적화, 동적 컨텐츠 캐시입니다.(PHP Op-Code Caching)
  • 공유 메모리에 컴파일된 상태에서 캐싱으로 PHP 스크립트의 성능을 향상시킵니다.
  • 실행 속도를 높여 스크립트를 최적화합니다.
  • 서버의 로드를 줄이고 PHP 코드를 1~10배 빠르게 합니다.

* 요구사항
php4 or php5 / autoconf / automake / libtool / m4


1. eAccelerator 다운로드
# wget http://bart.eaccelerator.net/source/0.9.6/eaccelerator-0.9.6-rc1.tar.bz2


2. 압축풀기
# tar jxvf eaccelerator-0.9.6-rc1.tar.bz2
# cd eaccelerator-0.9.6-rc1


3. eAccelerator 컴파일
eAccelerator 를 컴파일 하려면 PHP 버전의 phpize 스크립트를 사용해야 합니다. (php-devel 패키지에 있음)
php 만 설치했다면 소스 디렉토리에서 다음의 명령을 실행합니다.
# phpize
# ./configure
# make

php 설치나 phpize / php-config 스크립트가 path 설정이 되어 있지 않다면 다음과 같이 해야 합니다. (prefix=php 설치 디렉토리)
# export PHP_PREFIX="/usr/local"
# $PHP_PREFIX/bin/phpize
# ./configure --enable-eaccelerator=shared --with-php-config=$PHP_PREFIX/bin/php-config
# make


4. eAccelerator 설치
# make install
Installing shared extensions:     /usr/local/lib/php/extensions/no-debug-non-zts-20090626/

이 명령으로 이전에 생성된 eAccelerator 바이너리가 php 확장 디렉토리에 복사될 것이고,
명령이 끝나면서 eAccelerator가 설치된 디렉토리를 출력할 것입니다.


5. eAccelerator 설정
eAccelerator 를 Zend나 PHP 확장으로 설치하고, php.ini 파일을 수정합니다.
zend_extension으로 eAccelerator를 설치하면, eaccelerator.so 라이브러리의 전체 경로를 지정합니다.

* Zend 확장 설치시 (zend 설정 위에)
zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20090626/eaccelerator.so"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/var/cache/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"

만약 PHP의 thread safe build를 사용한다면, 'zend_extension' 대신 'zend_extension_ts'를 사용해야 합니다.

* PHP 확장 설치시
extension="eaccelerator.so"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/var/cache/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"


6. 캐쉬 디렉토리 생성
마지막으로 매우 중요한 단계로, 캐쉬 디렉토리를 생성합니다.
기본값은 /tmp/eaccelerator 이지만, 대부분의 시스템에서 이 디렉토리는 재부팅시에 삭제되므로 좋은 방법이 아닙니다.
/var/cache/eaccelerator 정도에 생성하면 좋습니다.
디렉토리를 생성하고 웹서버를 실행하는 사용자가 eAccelerator를 실행 가능하게 해야 합니다.
Apache나 Lighttpd 처럼 PHP를 실행하는 사용자로 디렉토리의 소유권을 바꿔주고, 0644 권한으로 지정하는 것이 좋습니다.
# mkdir -p /var/cache/eaccelerator
# chmod 0644 /var/cache/eaccelerator
# chown daemon:daemon /var/cache/eaccelerator


7. 작동 확인
eAccelerator가 실행될 웹서버를 재시작합니다.
# /etc/init.d/httpd restart



autoconf error

# export PHP_PREFIX="/usr/local"
# $PHP_PREFIX/bin/phpize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.


* autoconf 패키지 설치로 해결
# yum -y install autoconf


WRITTEN BY
손가락귀신
정신 못차리면, 벌 받는다.

,