글검색결과 [PHP] : 2

  1. 2007/05/03 처음깔고서부터 pure-ftpd + apache 2.0 + mysql 5.0 + php4 까지 (4)
  2. 2006/09/22 PHP 세팅 변경

처음깔고서부터 pure-ftpd + apache 2.0 + mysql 5.0 + php4 까지

Category :: 운영체제/FreeBSD


 산적님의 요청으로 끄적거려봅니다.

 cvsup을 이용하여 ports tree를 다운로드 받기위해 cvsup-without-gui를 pkg_add로 설치합니다.
# pkg_add -r cvsup-without-gui


 설치된 패키지를 사용하기 위해..
# rehash


 설치된 패키지를 이용하여 ports tree를 check out 합니다.
# cvsup -g -L 2 -h cvsup.oper.or.kr /usr/share/examples/cvsup/ports-supfile


처음으로 pure-ftpd를 설치합니다.
# cd /usr/ports/ftp/pure-ftpd
# make install clean


 이제 apache 2.0 을 설치합니다. (apache 설정을 위한 httpd.conf 파일은 이따가 설정합니다.)
# cd /usr/ports/www/apache20
# make install clean


 mysql 5.0 을 설치합니다.
# cd /usr/ports/databases/mysql50-server
# make install clean WITH_CHARSET=euckr


 이제 PHP4 ! 먼저 apache에서 모듈로 로딩해서 사용하기 위해 mod_php4를 설치하도록 설정합니다.
# cd /usr/ports/lang/php4
# make config
사용자 삽입 이미지

 갖가지 extension들을 설치하기 위해 다음 디렉토리로 이동하여 설치하되 설정값은 기본값으로 두는 것을 권장하며 추가로 필요로 하는 것들을 체크하시면 됩니다. (mysql 등)
# cd /usr/ports/lang/php4-extensions
# make config install clean


  이까지 별다른 문제 없이 따라왔다면 이제 갖가지 설정을 합니다.
  pure-ftpd의 경우 sample 파일을 복사하는 것만으로도 충분합니다. 더 자세한 설명이 필요한 경우 이곳을 참고하세요.
# cd /usr/local/etc
# cp pure-ftpd.conf.sample pure-ftpd.conf


  다음은 php.ini를 설정합니다. php.ini-dist와 php.ini-recommended 두가지 중 편하신 것을 사용하면 됩니다만, 어느 것을 사용하든 열고 수정해주긴 해야되지 않을까 합니다.
# cp php.ini-recommended php.ini


  apache의 경우 httpd.conf를 설정해야되고.. 우선 설정파일에서 ServerAdmin과 ServerName 수정합니다.
# cd /usr/local/etc/apache2


>>> httpd.conf <<<
#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed.  This address appears on some server-generated pages, such
# as error documents.  e.g. admin@your-domain.com
#
ServerAdmin account@email.net

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If this is not set to valid DNS name for your host, server-generated
# redirections will not work.  See also the UseCanonicalName directive.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address anyway, and this will make~
# redirections work in a sensible way.
#
ServerName oper.or.kr:80


그리고 약 900번째 줄 부근에 다음 내용을 추가합니다.
#
# If the AddEncoding directives above are commented-out, then you
# probably should define those extensions to indicate media types:
#
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz

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

#
# AddHandler allows you to map certain file extensions to "handlers":


 이제 시작 스크립트의 동작을 위해 /etc/rc.conf 파일에 다음 내용들을 추가합니다.
linux_enable="YES"

apache2_enable="YES"
mysql_enable="YES"
pureftpd_enable="YES"


 추가했으면 시작 스크립트를 이용하여 서버를 실행합니다. (물론 중지, 재시작할 때는 stop, restart 입니다.)
# /usr/local/etc/rc.d/pure-ftpd start
# /usr/local/etc/rc.d/mysql-server start
# /usr/local/etc/rc.d/apache2.sh start


 이것으로 pure-ftpd , apache2 , php4의 설정이 끝났습니다. 추가로 mysql 설정파일인 my.cnf를 설정하실 분은 /usr/local/share/mysql/my-*.cnf 파일들을 참고하시기 바랍니다.
2007/05/03 09:14 2007/05/03 09:14

PHP 세팅 변경

Category :: 서버들/Oper.or.kr


  테터툴즈에서 파일을 업로드 하려던 중 업로드가 되지 않아 이상하게 생각하고 있었습니다. 그러던 중 갑자기 생각난 것이 전에 재설정한 서버. 확인해보니 php.ini 의 upload_max_filesize 가 기본값으로 되어있습니다. 그래서 이것을 넉넉하게 50M 로 수정했습니다만 문제가 된다 싶으면 10M 로 낮출 계획입니다.

php.ini :
upload_max_filesize = 2M

2006/09/22 10:14 2006/09/22 10:14

 이전  1   다음