어제 저녁 부터 시작된 설치작업이 이제 마무리 되어 가는듯하다.
나중을 위해서 이곳에 기록을 해두어야겠다.^_^;
현재 UTF-8 로 개발할 수 있는 환경을 만드게 목적이다.
[ports upgrade]
ftp ftp.freebsd.org
anonymouse / xxx@gmail.com
bin
cd /pub/FreeBSD/ports/...
get ports.tar.gz
----------------------------------------------------------------------------------------
cvsup -g -L 2 -h cvsup.freebsdcity.org /usr/share/examples/cvsup/ports-supfile
man cvsup
내가 작업한건 그냥 이렇게 해버렸다..
그런데 나중에 찾아보니..
포트시스템 또는 패키지를 이용하기위해 cvsup을 설치합니다.
cvsup은 포트시스템과 패키지에서 이용되는 라이브러리를 최신으로 업데이트를 해 줍니다.
cvsup 패키지추가
# pkg_add -r cvsup 또는
# pkg_add -r cvsup-without-gui
cvsup 설정파일 복사
/root나 홈디렉토리에 복사합니다.
여기서는 /root 디렉토리에 복사합니다.
# cp /usr/share/examples/cvsup/ports-supfile /root
ports_supfile 수정
default host 부분의 CHANGE_THIS.FreeBSD.org 부분의 서버명을cvsup.kr.FreeBSD.org로 변경합니다.
# vi /root/ports-supfile
vi Editor 사용법은 생략합니다.
cvsup 실행
cvsup을 실행하여 라이브러리를 업데이트합니다.
# /usr/local/bin/cvsup -g -L 2 /root/ports-supfile
출처 : http://www.lifefeel.com/110
요게 정석인듯하다.... 나중에 다시 해봐야지.... 바쁘니 그냥 패스~ -_-;
[MySQL 5.0.37]
adduser mysql and group mysql.......
cd /usr/ports/databases/mysql50-server
vi Makefile (edit)
>>>> --localstatedir=/var/db/mysql ------> --localstatedir=/data/mysqldb
make reinstall clean PREFIX=/usr/local/mysql WITH_CHARSET=utf8 WITH_COLLATION=utf8_general_ci ARCH=i386 BUILD_STATIC=yes
make deinstall
make reinstall PREFIX=/usr/local/mysql WITH_CHARSET=utf8 WITH_COLLATION=utf8_general_ci ARCH=i386 BUILD_STATIC=yes WITH_XCHARSET=all (다시 설치했다.) FORCE_PKG_REGISTER=1(또 추가 옵션, 기존설치파일 덮어쓰기..-_-;)
[ configure log msg ]
configure: running /bin/sh './configure' --prefix=/usr/local/mysql '--localstatedir=/data/db' '--without-debug'
'--without-readline' '--without-libedit' '--without-bench' '--without-extra-tools' '--with-libwrap' '--with-mysqlfs'
'--with-low-memory' '--with-comment=FreeBSD port: mysql-server-5.0.37' '--enable-thread-safe-client'
'--with-charset=utf8' '--with-mysqld-ldflags=-all-static' '--with-collation=utf8_general_ci' '--enable-assembler'
'--with-berkeley-db' '--with-named-thread-libs=-pthread' '--prefix=/usr/local/mysql' '--build=i386-portbld-freebsd6.2'
'CC=cc' 'CFLAGS=-O2 -fno-strict-aliasing -pipe '
'CXXFLAGS=-O2 -fno-strict-aliasing -pipe -O2 -fno-strict-aliasing -pipe -felide-constructors -fno-rtti -fno-exceptions'
'CXX=c++' 'build_alias=i386-portbld-freebsd6.2'
CFLAGS=' -DDBUG_OFF -O2 -fno-strict-aliasing -pipe '
CXXFLAGS=' -DDBUG_OFF -O2 -fno-strict-aliasing -pipe -O2 -fno-strict-aliasing -pipe -felide-constructors -fno-rtti -fno-exceptions -fno-implicit-templates -fno-exceptions -fno-rtti -DMYSQLD_NET_RETRY_COUNT=1000000'
--cache-file=/dev/null --srcdir=.
chown -R mysql:mysql /data/mysqldb
/usr/local/mysql/bin/mysql_install_db --user=mysql
cp /usr/local/mysql/etc/rc.d/mysql-server /usr/local/etc/rc.d/mysqld.sh
vi /usr/local/etc/rc.d/mysqld.sh (edit)
mysql_enable="NO" ------> mysql_enable="YES"
cp /usr/ports/databases/mysql50-server/work/mysql-5.0.37/support-files/my-medium.cnf /etc/my.cnf
vi /etc/my.cnf (edit)
[Client]
default-character-set = euckr (실제 적용 못했다.)
/usr/local/etc/rc.d/mysqld.sh start
/usr/local/bin/mysqladmin -u root password 1111
mysql -u root -p mysql
update db set db='test_db' where db='test';
insert into user values('localhost','mysql_user',password('1111'),'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','N','','','','',0,0,0,0);
insert into user values('192.168.10.133','mysql_user',password('1111'),'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','N','','','','',0,0,0,0);
이거 넣다가 몇번 틀렸다.컬럼수가 안 맞는다나? -_-;;
flush privileges;
make install 할때 WITH_XCHARSET=all 을 빼먹었더니만 my.cnf 옵션으로 default-character-set = euckr 을 줄수가 없다. 재컴파일하기 힘들어서 그냥 두었다.
서버는 utf-8 상태이고 클라이언트의 문자셋 설정이 latin1 인데 우선 한글 입력하는데는 지장이 없는걸 확인했다.
[ProFTP]
cd /usr/ports/ftp/proftp
make install clean
adduser ftp & addgroup ftp
vi /usr/local/etc/proftpd.conf (edit)
# disable reverse lookup
UseReverseDNS off
IdentLookups off
User ftp
Group ftp
vi /etc/rc.conf (edit)
proftpd_enable="YES"
/usr/local/etc/rc.d/proftpd start
[Apache 2.2]
make install clean
PREFIX_RELDEST=/usr/local/apache22 옵션을 잘못 준 듯하다.
그냥 /usr/local 로 잡혀서 설치되버렸다. -_-;
vi /usr/local/etc/apache22/httpd.conf (edit)
ServerName, DocumentRoot...
vi /etc/rc.conf (edit)
apache22_enable="YES"
/usr/local/etc/rc.d/apache22 start
서비스를 시작하니 데몬이 시작되긴 했는데,아래의 에러가 튀어 나왔다.
[warn] (2)No such file or directory: Failed to enable the ‘httpready’ Accept Filter
해결방법을 찾아보니..
FreeBSD Apache HTTP Accept Filter Error
When Apache web server is starting up in FreeBSD system,
Apache loads succcessfully and web server functioning properly,
but the following warning error occurs:
[warn] (2)No such file or directory: Failed to enable the ‘httpready’ Accept Filter
The resolution to the above problem is to a accf_http module,
which function is to buffer incoming connections until a certain complete HTTP requests arrive,
into FreeBSD kernel by using kernel linker:
kldload accf_http
To permanently load enable HTTP Accept Filter FreeBSD kernel module (accf_http),
add the following line into /boot/loader.conf:
accf_http_load=”YES”
Note: The default settings is located in /boot/defaults/loader.cnf. To see the related settings about accf, use:
grep accf /boot/defaults/loader.conf
which will returns:
accf_data_load=”NO” # Wait for data accept filter
accf_http_load=”NO” # Wait for full HTTP request accept filter
출처 : http://www.mydigitallife.info/2006/04/23/freebsd-apache-http-accept-filter-error/
loader.conf 세팅 수정하고 reboot 한방 먹였더니 이상 없이 실행된다..^^
[PHP 5]
cd /usr/ports/lang/php5/
make config(Check -> Apache module)
make install clean
cd /usr/ports/lang/php5-extentions/
make config(필요한 기능 선택)
make install clean
cp /usr/local/etc/php.ini-dist /usr/local/etc/php.ini
vi /usr/local/etc/php.ini(edit)
vi /usr/local/etc/apache22/httpd.conf(edit)
<IfModule php5_module>
AddType application/x-httpd-php .php .html .html
AddType application/x-httpd-php-source .phps
</IfModule>
/usr/local/etc/rc.d/apache22 stop
/usr/local/etc/rc.d/apache22 start
설치 옵션을 너무 많이 줬다보다.. 아직도 다운받아가며 컴파일 중이다. 암튼 이거 설치 끝내면 세팅이 완료된다. 이제 테스트만 열씸히 하면 되겠지? ......... ^________^;