Server Admin

본문 바로가기
사이트 내 전체검색


RedHat Linux >> Server Administration for Redhat Linux
[목차]
제4장 웹메일 서버 구축하기

    2. TWIG을 이용한 웹메일 서버 설치하기

 

1. PHP 다시 설치하기

[root@user php-4.0.4pl1]# ./configure --with-apxs=/usr/local/httpd/bin/apxs --with-config-file-path=/usr/local/httpd --with-mysql=/usr/local/mysql --with-imap=../imap-4.7

생략

+--------------------------------------------------------------------+

| License:                                                           |

| This software is subject to the PHP License, available in this     |

| distribution in the file LICENSE.  By continuing this installation |

| process, you are bound by the terms of this license agreement.     |

| If you do not agree with the terms of this license, you must abort |

| the installation process at this point.                            |

+--------------------------------------------------------------------+

 

Thank you for using PHP.

 

[root@user php-4.0.4pl1]# make

[root@user php-4.0.4pl1]# make install

[root@user php-4.0.4pl1]#

 


2. 아파치 설정파일 수정하기

[root@user apache_1.3.14]# cd /usr/local/httpd/conf

[root@user conf]# vi httpd.conf

생략

    # And for PHP 4.x, use:

    #

    AddType application/x-httpd-php .php

    AddType application/x-httpd-php .php3

    AddType application/x-httpd-php .html

    AddType application/x-httpd-php .htm

    AddType application/x-httpd-php-source .phps

생략

[root@user conf]# cd ..

[root@user httpd]# ./bin/apachectl start

Syntax error on line 224 of /usr/local/httpd/conf/httpd.conf:

Cannot load /usr/local/httpd/libexec/libphp4.so into server: libmysqlclient.so.6

: cannot open shared object file: 그런 파일이나 디렉토리가 없음

./bin/apachectl start: httpd could not be started

[root@user httpd]# cd /etc

 [root@www /etc]# vi ld.so.conf

생략 ..

/usr/local/mysql/lib/mysql

끝에 추가한다.

[root@www /etc]# ldconfig

[root@www /etc]#  cd /usr/local/httpd

[root@www httpd]# ./bin/apachectl start

../bin/apachectl start: httpd started

[root@www httpd]#

 


3. 실행하기

[root@user conf]# cd /usr/local/mysql/bin

[root@user bin]# ./safe_mysqld &

Starting mysqld daemon with databases from /usr/local/mysql/var

 

[root@user bin]# cd ../../httpd/bin

[root@user bin]# ./apachectl restart

./apachectl restart: httpd not running, trying to start

./apachectl restart: httpd started

[root@user bin]# cd ../htdocs

[root@user htdocs]# vi phpinfo.php

<?

phpinfo();

?>

인터넷 브라우저에서

http://localhost/phpinfo.php 으로 확인할 수 있습니다.

 


4. 웹메일 서버 환경설정하기

[root@user htdocs]# cd /usr/local/src/twig-2.6.2

[root@user twig-2.6.2]# cd setup

[root@user setup]# ls

Strings/                   twig.table.ibase*  twig.table.oracle*  upgrade/

advanced.acl.population*   twig.table.mssql*  twig.table.pgsql*

sqltable.auth.population*  twig.table.mysql*  twig.table.sybase*

[root@user setup]# vi webmail.db.mysql

INSERT INTO user (host,user,password) VALUES ('localhost','webmail',password('webmail'));

INSERT INTO db VALUES ('localhost','webmail','webmail','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');

create database webmail;

 

flush privileges;

 

[root@user setup]# /usr/local/mysql/bin/mysql -u root -p mysql < webmail.db.mysql

Enter password:

 

[root@user setup]# /usr/local/mysql/bin/mysql -u root -p webmail < twig.table.mysql

Enter password:

 

[root@user setup]# cd /usr/local/httpd/htdocs/

[root@user htdocs]# ln -s /home/mail

[root@user htdocs]# cd mail

[root@user mail]# cd config

[root@user config]# vi dbconfig.inc.php3

[root@user config]# vi config.inc.php3

[root@user config]#

 

인터넷 브라우저에서

http://localhost/test.php3 으로 확인할 수 있습니다.

 

[목차]

개인정보취급방침 서비스이용약관 모바일 버전으로 보기 상단으로

TEL. 063-469-4551 FAX. 063-469-4560 전북 군산시 대학로 558
군산대학교 컴퓨터정보공학과

Copyright © www.leelab.co.kr. All rights reserved.