Embian efolder 설치가이드 efolder 시스템구성 efolder 설치순서 Installation commands
1. efolder 시스템구성 A. DB B. apache - mod-perl - PHP C. SphinxSearch ( 검색서비스 ) D. File Storage 2. efolder 설치순서 A. DB (MySQL) B. efolder Service - efolder Server Program - apache - mod-perl - PHP - DB Schema - File Home Directory C. Sphinx Service D. Account Manager Web Program
3. Installation commands ## Pre-operation ######################## 1. OS 설치 - 권장 OS : Ubuntu 10.04 LTS or Ubuntu 10.10 2. update []# apt-get update ## A. DB (MySQL) ############################# 다.) 1. mysql 설치 (mysql 설치시입력한비밀번호는아래에 MYSQLDBPASSWORD 로되어있는부분에입력한 []# apt-get install mysql-server 2. my.cnf 수정 (/etc/mysql/my.cnf) ( 섹션별로다음설정을추가 ) [client] default-character-set = utf8 [mysqld_safe] default-character-set = utf8 [mysqld] default-character-set = utf8 [mysql] default-character-set = utf8 3. mysql 데몬 restart []# /etc/init.d/mysql restart ## B. efolder Service ################### 1. svn 설치 []# apt-get install subversion 2. efolder 프로그램가져오기 []# cd /opt []# svn co svn://repo.embian.com/efolder/ efolder 3. apache 설치 []# apt-get install apache2-mpm-prefork
4. mod-perl2 설치 []# apt-get install libncurses5-dev libdbi-perl libtext-iconv-perl libtimedate-perl libdate-calc-perl l ibdbd-mysql-perl libapache2-mod-perl2 libnet-dns-perl libmime-lite-perl libossp-uuid-perl libemail-address-perl li bmailtools-perl libsoap-lite-perl libsphinx-search-perl 5. php 설치 []# apt-get install libapache2-mod-php5 php5-mysql 6. apache 설정 []# vi /etc/apache2/sites-available/default ------------------------------------------------------- <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /opt/efolder/www/ <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /opt/efolder/www/> Options FollowSymLinks AllowOverride None Order allow,deny allow from all </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ErrorLog /var/log/apache2/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/log/apache2/access.log combined <Perl> use lib qw(/opt/efolder/lib/perl);
</Perl> Alias /IO /opt/efolder/lib/perl/efolder <Location /IO> SetHandler perl-script PerlResponseHandler ModPerl::PerlRun Options +ExecCGI PerlSendHeader On </Location> <Location /FTPService> SetHandler perl-script PerlHandler EmbianSoapHandler </Location> </VirtualHost> ------------------------------------------------------- 7. apache 데몬 restart []# /etc/init.d/apache2 restart 8. 확인 http:// 서버주소 /IO/test_page.cgi 9. 스키마적용 0. 프로그램위치 []# cd /opt/efolder/doc/db 1. 스키마적용 []# mysqladmin -uroot -pmysqldbpassword create eaccountmanager []# mysqladmin -uroot -pmysqldbpassword create efolder []# mysqladmin -uroot -pmysqldbpassword create rss []# mysql -uroot -pmysqldbpassword eaccountmanager < eaccountmanager.sql []# mysql -uroot -pmysqldbpassword efolder < efolder.sql []# mysql -uroot -pmysqldbpassword rss < rss.sql []# mysql -uroot -pmysqldbpassword < uas.sql 10. home 폴더생성 []# mkdir -p /efolder []# chown -R www-data:www-data /efolder 11. efolder 설정파일 ( /opt/efolder/etc/00.config ) 수정 - CDatabasePassword=MYSQLDBPASSWORD
12. DDNS 설정 1. /opt/efolder/tmp/server.dat 수정 : 서버의 IP 또는 DNS 정보로변경 - A001FOLDER - A001DOWN - A001UP - A002FOLDER - A002DOWN - A002UP - A003FOLDER - A003DOWN - A003UP 2. /tmp 에설정파일복사 []# cp -a /opt/efolder/tmp/server.dat /tmp/server.dat 3. /etc/rc.local 에다음내용추가 (exit 0 위에아래내용추가 ) cp -f /opt/efolder/tmp/* /tmp/ 13. apache 데몬 restart []# /etc/init.d/apache2 restart ## C. Sphinx Service #################################### 1. sphinx 설치 ( 소스로설치하는경우 : Ubuntu 10.04 LTS ) 0. 프로그램위치 []# cd /opt/efolder/doc/linux []# apt-get install build-essential libmysqlclient-dev 1. 설치 []# tar xzvf sphinx-0.9.9.tar.gz []# cd sphinx-0.9.9 []#./configure --prefix=/opt/sphinx []# make []# make install []# cd.. []# cp -a init.d /etc/init.d/sphinxsearch []# chmod 755 /etc/init.d/sphinxsearch []# update-rc.d sphinxsearch defaults 2. 설정파일수정 1. []# cp /opt/efolder/etc/sphinx.conf /opt/sphinx/etc/sphinx.conf 2. /opt/sphinx/etc/sphinx.conf 파일수정 - sql_pass
3. 실행파일수정 1. /opt/efolder/etc/file_crawl.pl 파일수정 - $CDBPWD 4. 초기검색 indexing 만들기 []# cd /opt/efolder/etc []# bash makesphinxindex.sh all 5. 검색서버실행 []# /etc/init.d/sphinxsearch stop ; /etc/init.d/sphinxsearch start 6. Crontab 에스크립트등록 (full indexing, delta indexing 설정 ) 1. /etc/crontab 에추가 ----------------------------------------------- 36 4 * * * root ( cd /opt/efolder/etc ; bash makesphinxindex.sh all 2> /de v/null > /dev/null ) * * * * * root ( cd /opt/efolder/etc ; bash makesphinxindex.sh delta 2> /d ev/null > /dev/null ) ----------------------------------------------- 2. cron restart []# /etc/init.d/cron restart 2. sphinx 설치 ( 패키지로설치하는경우 : Ubuntu 10.10 ) 0. 설치 []# apt-get install sphinxsearch 1. 설정파일수정 1. []# cp /opt/efolder/etc/sphinx.conf-ubuntu10.10 /etc/sphinxsearch/sphinx.conf 2. /etc/sphinxsearch/sphinx.conf 파일수정 - sql_pass 2. 실행파일수정 1. /opt/efolder/etc/file_crawl.pl 파일수정 - $CDBPWD - $SPHINXINDEXER="/usr/bin/indexer" - $SPHINXCONFIGFILE="/etc/sphinxsearch/sphinx.conf" 2. /opt/efolder/etc/makesphinxindex.sh 파일수정 - SPHINX_INDEXER="/usr/bin/indexer" - SPHINX_CONF="/etc/sphinxsearch/sphinx.conf" 3. /etc/default/sphinxsearch 파일수정 - START=yes
3. 초기검색 indexing 만들기 []# cd /opt/efolder/etc []# bash makesphinxindex.sh all 4. 검색서버실행 []# /etc/init.d/sphinxsearch stop ; /etc/init.d/sphinxsearch start 5. Crontab 에스크립트등록 (full indexing, delta indexing 설정 ) 1. /etc/crontab 에추가 ----------------------------------------------- 36 4 * * * root ( cd /opt/efolder/etc ; bash makesphinxindex.sh all 2> /de v/null > /dev/null ) * * * * * root ( cd /opt/efolder/etc ; bash makesphinxindex.sh delta 2> /d ev/null > /dev/null ) ----------------------------------------------- 2. cron restart []# /etc/init.d/cron restart ## D. Account Manager Web Programe #################################### 1. 계정관리프로그램설치 0. 프로그램위치 []# cd /opt/efolder/www/efolderadmin 1. 설정파일수정 []# vi Config/setup.php - $cfg->dbuser : DB 계정 - $cfg->dbpass : DB 비밀번호 - $cfg->adminuser : 관리자계정 - $cfg->adminpass : 관리자비밀번호 - $cfg->cookiedomain : 사이트도메인또는 IP 5. 웹브라우저로확인 http:// 서버주소 /efolderadmin/