로그인
Sign in
*********************************************************
<<< SPARC Solaris10 64Bit SPARC  -  APM Install Guide >>>
*********************************************************


##############################
###### Admin Infomation ######
##############################
##############################
Compiled Date : 2005-01-18
System Admin : Cho Seong Hwan
Hand Phone : 010-7212-0083
Home Page : www.wowunix.com
Email : sysop@wowunix.com
##############################


####################################
### APM Version (src) Infomation ###
####################################
####################################
apache : apache_1.3.33.tar.gz
php    : php-5.0.3.tar.gz
mysql  : mysql-4.0.22.tar.gz
zeroboard : zb41pl5.tar
####################################

참고로 Perl Package는 http://www.wowunix.com/down/set/perl/ 에서 pkg로 다운받아 설치하세요......
(없을수 있으니 먼저 확인후 설치하세요!!!)



Source Dowon Load Site
**********************

ALL : http://www.wowunix.com/down/APM_src/

APACHE & jakarta-tomcat : http://mirror.apache.org
PHP : http://www.php.net/downloads.php
MYSQL : http://www.mysql.com






*******************************************************************
APM test 장비  :  Sun Ultra-60 SPARC Workstation (64Bit Kernel Run)
*******************************************************************


#   uname -a
SunOS sol10 5.10 s10_72 sun4u sparc SUNW,Ultra-60



#   isainfo -kv
64-bit sparcv9 kernel modules



컴파일 Error시 참조 사이트 : http://phpschool.com

*****************************************************************************
*****************************************************************************




기존에 아파치가 깔려 있다면 아파치 데몬을 Stop & Directory Rename 시키기 바랍니다.


그리고 기존의 아파치는 디렉토리명를 변경하시거나 삭제하신후 새로운 아파치 소스를 다운 받으셔서
다음과 같이 APM 설치 순서에 맞게 설치를 하셔야 합니다..

(설치시 아래 순서를 반드시 지켜 주세요.......!!!)







***********************
gcc & make Version 확인
***********************



#   gcc -v

Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.10/3.3.2/specs
Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --disable-nls
Thread model: posix
gcc version 3.3.2




#   make -v

GNU Make 3.80
Copyright (C) 2002  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.





#   perl -v

This is perl, v5.8.4 built for sun4-solaris-64int
(with 21 registered patches, see perl -V for more detail)

Copyright 1987-2004, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'.  If you have access to the
Internet, point your browser at http://www.perl.com/, the Perl Home Page.








###################
1.  MYSQL DBMS 설치
###################


다음과 같이 ./configure를 실행합니다.........


#  ./configure --prefix=/usr/local/mysql --with-charset=euc_kr

(참고로 4.1.x 버젼은 --with-charset 옵션이 euc_kr 이 아니라 euckr 입니다.)



configure 환경 설정이 끝난후에 make 와 make install 을 차례대로 실행합니다..



#  make      
    
(make 시 에러가 날 경우가 있습니다.
반드시 make distclean 하셔서 작업전 초기 상태로 되돌리시고 다시 ./configure 하셔야 합니다.........)





In file included from /usr/include/sys/signal.h:34,
                 from /usr/include/signal.h:26,
                 from readline.c:50:
/usr/include/sys/siginfo.h:259: error: parse error before "ctid_t"
/usr/include/sys/siginfo.h:292: error: parse error before '}' token
/usr/include/sys/siginfo.h:294: error: parse error before '}' token
/usr/include/sys/siginfo.h:390: error: parse error before "ctid_t"
/usr/include/sys/siginfo.h:392: error: conflicting types for `__proc'
/usr/include/sys/siginfo.h:261: error: previous declaration of `__proc'
/usr/include/sys/siginfo.h:398: error: conflicting types for `__fault'
/usr/include/sys/siginfo.h:267: error: previous declaration of `__fault'
/usr/include/sys/siginfo.h:404: error: conflicting types for `__file'
/usr/include/sys/siginfo.h:273: error: previous declaration of `__file'
/usr/include/sys/siginfo.h:420: error: conflicting types for `__prof'
/usr/include/sys/siginfo.h:287: error: previous declaration of `__prof'
/usr/include/sys/siginfo.h:424: error: conflicting types for `__rctl'
/usr/include/sys/siginfo.h:291: error: previous declaration of `__rctl'
/usr/include/sys/siginfo.h:426: error: parse error before '}' token
/usr/include/sys/siginfo.h:428: error: parse error before '}' token
/usr/include/sys/siginfo.h:432: error: parse error before "k_siginfo_t"
/usr/include/sys/siginfo.h:437: error: parse error before '}' token
In file included from /usr/include/signal.h:26,
                 from readline.c:50:
/usr/include/sys/signal.h:85: error: parse error before "siginfo_t"
In file included from readline.c:50:
/usr/include/signal.h:111: error: parse error before "siginfo_t"
/usr/include/signal.h:113: error: parse error before "siginfo_t"
make[2]: *** [readline.o] Error 1
make[2]: Leaving directory `/src/mysql-4.0.22/readline'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/src/mysql-4.0.22'
make: *** [all] Error 2




< make 실행시 위 에러가 계속나서 썬 사이트에서 문서를 찾아봤습니다.  반드시 이 문서 잘 읽어보시고 적용해주세요...... >

************************************
** gcc-3.3.2-sol10-sparc-local.gz **
************************************

The GNU C compiler and related programs - installs in /usr/local.
This package includes the GNU C, C++, g77, Java, and OBJC compiler suites and support files.
The Gnat ada programs are not included yet.
When needed and the source code supports it, this C compiler can create 64-bit executables via the -m64 flag as well as the usual 32-bit ones.
It was compiled to use the SUN assembler and loader usually in /usr/ccs/bin if the SUNW developer packages are installed.
This gcc package requires the installation of libiconv.

Note that this version of gcc was created on build 60 of Solaris 10.
If you are using a higher version, you will need to redo some of the header files. This is done by doing the following steps:


cd /usr/local/lib/gcc-lib/sparc-sun-solaris2.10/3.3.2/install-tools/

Put the line SHELL=/bin/sh on the first line of the mkheaders.conf
file.  Then run

./mkheaders

This will correct some files and make the build 60 gcc usable on
higher builds.  I have tested this on build 72 and it works fine.





(이렇게 하고 다시 make 돌리니까 에러없이 잘 넘어갔습니다.)






#  make install    




컴파일중 많은 에러가 있을수 있습니다..........

제가 해결했던 방법중 하나는 gcc (컴파일러)를 다른 버젼 (구버젼) 으로 재설치 해서 컴파일에 성공했답니다...........


이것도 하나의 팁이 되겠죠........





간혹 ./configure 하다 크로스 컴파일링 에러가 떨어지는경우 다음과 같이 해보세요..

configure 작업시 cross compiling error가 발생하는 경우는 거의 90%가 환경변수인
LD_LIBRARY_PATH에 라이브러리 경로가 추가되지 않아서 생기는 현상이라고 보시면 될것 같습니다.

자신이 로긴하여 쓰고 있는 쉘이 무엇인지 확인하시고   (#  echo $SHELL)

/bin/sh 이거나 /bin/ksh이면  ~/.profile 에
/bin/csh 또는 /bin/tcsh 이면 ~/.cshrc  파일을 열어서 아래의 줄을 추가하세요.




* 다음은 sh 과 ksh을 기준으로 한것입니다. *

##############################################################
##############################################################
LD_LIBRARY_PATH=/usr/local/lib
export LD_LIBRARY_PATH
##############################################################
##############################################################



* 다음은 csh을 기준으로 한것입니다. *

##############################################################
##############################################################
setenv LD_INCLUDE_PATH /usr/local/include:/usr/dt/include:/usr/include:/usr/openwin/include
setenv LD_LIBRARY_PATH /usr/lib:/usr/local/lib:/usr/local/X11/lib:/usr/dt/lib:/usr/openwin/lib

export path MANPATH LD_INCLUDE_PATH LD_LIBRARY_PATH
##############################################################
##############################################################





make 와 make install 을 실행한 후에 데이터베이스 디렉토리가 생성되지 않으므로,
다음과 같은 명령을 실행하여 db 디렉토리를 생성해 주어야 합니다.

(데이타베이스 설치가 끝난후 mysql_install_db 명령을 다음과 같이 한번만 실행한다.)


#  /usr/local/mysql/bin/mysql_install_db

이 명령은 설치후 단 한번만 하는 명령으로 기초테이블 6개가 설치된다.
(`user', `db', `host', `tables_priv', `columns_priv' and `func')







User & Group & 퍼미션 설정



#  vi /etc/passwd <-- mysql User (예, uid=1001)를 생성해 주어야 합니다.....

mysql:x:1001:1001:Mysql_User:/usr/local/mysql:/bin/csh



#  vi /etc/group <-- mysql Group (예, gid=1001)을 생성해 주어야 합니다.....

mysql::1001:mysql



#  chown -R mysql:mysql /usr/local/mysql ;  chmod -R 755 /usr/local/mysql/var





마지막으로 safe_mysqld 명령으로 mysql 데몬을 가동시켜 주고,

데이터베이스를 종료하고자 할때는 mysqladmin 명령을 이용하여 셧다운 하시면 됩니다..............


#  /usr/local/mysql/bin/mysqld_safe &        ;   start Command   (mysql 4.X  Version)




참고,

mysql 3.X  Version 은 다음과 같이 실행한다.

#  /usr/local/mysql/bin/safe_mysqld &        ;   start Command   (mysql 3.X  Version)






(mysql 프로세서 확인)


#   ps -ef |grep mysql

    root 17141   338   0 12:36:07 pts/3       0:00 /bin/sh /usr/local/mysql/bin/mysqld_safe
   mysql 17156 17141   1 12:36:08 pts/3       0:01 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/usr/local
    root 17165   338   0 12:36:27 pts/3       0:00 grep mysql







참고 ,  Mysql Server Version 보는 명령...  



(mysql 데몬이 실행되고 있는 상태에서 버젼확인)


#   /usr/local/mysql/bin/mysqladmin version

/usr/local/mysql/bin/mysqladmin  Ver 8.40 Distrib 4.0.22, for sun-solaris2.10 on sparc
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version          4.0.22
Protocol version        10
Connection              Localhost via UNIX socket
UNIX socket             /tmp/mysql.sock
Uptime:                 35 sec



OR



(mysql 데몬이 실행되거나 실행되지 않은 상태에서 버젼확인)


#   /usr/local/mysql/bin/mysqladmin -V

/usr/local/mysql/bin/mysqladmin  Ver 8.40 Distrib 4.0.22, for sun-solaris2.10 on sparc








(mysql 데몬 종료)

#  /usr/local/mysql/bin/mysqladmin -u root shutdown        ; stop Command







###################
스크립트 만들기 !!!
###################



#   vi /usr/local/mysql/bin/start.sh

echo
/usr/local/mysql/bin/mysqld_safe &
echo
sleep 3
echo
echo
echo
echo "    ********************** "
echo "    현재 Mysql Daemon 확인 "
echo "    ********************** "
echo
ps -ef |grep mysql |grep -v grep
echo
echo
echo


:wq!





#   vi /usr/local/mysql/bin/stop.sh

echo
/usr/local/mysql/bin/mysqladmin -u root shutdown
echo
sleep 3
echo
echo
echo
echo "    ********************** "
echo "    현재 Mysql Daemon 확인 "
echo "    ********************** "
echo
ps -ef |grep mysql |grep -v grep
echo
echo
echo


:wq!





#   chmod 744 /usr/local/mysql/bin/*.sh









##############################
2.  Apache Web_Server 설치 - 1
##############################


다음과 같이 ./configure를 실행합니다..


#  ./configure --prefix=/usr/local/apache








############
3.  php 설치
############


다음과 같이 ./configure 를 실행합니다..


#  ./configure --prefix=/usr/local/php \
--with-mysql=/usr/local/mysql \
--with-apache=/usr/local/src/apache_1.3.33 \
--with-config-file-path=/usr/local/apache/conf \
--with-exec-dir=/usr/local/apache/bin \
--enable-modules=so \
--with-language=korean \
--with-charset=euc_kr \
--without-pear \
--enable-track-vars=yes \
--enable-mbstring




: --enable-mbstring 옵션은 한글 멀티바이트 처리를 위해서 추가했습니다.



참고로 make install 시에 다음과 같이 pear 관련 오류가 나면 --without-pear 를 추가해서 재컴파일 한다.



#   make install

Installing PHP SAPI module:       apache
Installing PHP CLI binary:        /usr/local/php/bin/
Installing PHP CLI man page:      /usr/local/php/man/man1/
Installing PEAR environment:      /usr/local/php/lib/php/
[PEAR] Archive_Tar: Invalid Package File, no <package> tag
[PEAR] Console_Getopt: Invalid Package File, no <package> tag
[PEAR] PEAR: Invalid Package File, no <package> tag
ld.so.1: /src/php-4.3.9/sapi/cli/php: 치명적: 재할당 오류: 파일 /src/php-4.3.9/sapi/cli/php: 기호 xmlRelaxNGCleanupTypes: 참조 기호가 없습니다.
중단됨(Killed)
make[1]: *** [install-pear-installer] Error 137
make: *** [install-pear] Error 2









****
참고
****


configure 할때 (소스 컴파일시 필요한 패키지들의) 의존성에 걸려서 error 가 떨어질때가 있다.


gd

libgcc

libiconv

libpng

libxml

libxml2

zlib

위의 패키지들을 (추가) 설치하여 configure error 없이 넘어갈수 있었다.




다음은 썬프리웨어 사이트에서 발췌함.

두번째줄 참고하여 의존성에 걸리는 패키지들을 설치해 준다.


Libxml2 is the XML C library developed for the Gnome project - installs in /usr/local.

libxml2 requires that the zlib, libiconv, and either libgcc or gcc packages be installed.




* 의존성에 걸리는 error 들이 많으니 컴파일시 위 패키지를 모두 미리 설치해 놓는것도 좋고

error 가 날때 로그를 분석해서 해당 패키지를 설치해도 된다.







그 다음은


#  make

#  make install  을 실행하면 컴파일이 완료됩니다.









##############################
4.  Apache Web_Server 설치 - 2
##############################


아파치 소스가 있는 디렉토리로 이동한 후에 다음과 같이 실행하여 컴파일 합니다.

#  ./configure \
--prefix=/usr/local/apache \
--with-perl=/usr/local/bin/perl \
--enable-module=most \
--enable-shared=max \
--activate-module=src/modules/php5/libphp5.a






그리고



#  make

#  make install  을 차례로 수행하시면 됩니다.











아파치 컴파일이 끝난 후에 마지막으로 php source 디렉토리에 있는 php.ini-dist 파일을

앞서 configure에서 지정해준 디렉토리로 php5.ini (php.ini) 파일로 복사하여야 합니다.



#  cp /usr/local/src/php-5.0.3/php.ini-dist /usr/local/apache/conf/php5.ini


#  chmod 744 /usr/local/apache/conf/php5.ini


#  ln -s /usr/local/apache/conf/php5.ini /usr/local/apache/conf/php.ini




#  vi /usr/local/apache/conf/php.ini

(이파일을 열어서 아래 세팅값을 참고하여 수정 및 추가합니다.)



register_globals = On      --> 수정

default_charset = "euc_kr"      ---> 추가

upload_max_filesize = 32M       ---> 수정   (이부분을 원하는 파일 업로드 용량으로 수정)



:wq!





참고로 PHP 는 기본적 (Default)으로 업로드 용량이 2M로 제한되어 있습니다.

( upload_max_filesize = 2M   ==>  upload_max_filesize = 32M 으로 변경함)










이렇게 하신후 제대로 셋팅이 되었나 확인하기 위해 test.php를 만듭니다.


#  vi /usr/local/apache/htdocs/test.php

<?
phpinfo();
?>


:wq!







그런 다음 httpd.conf 파일에서 몇가지 설정파일을 수정하신후 아파치 데몬을 stop & start 합니다.......


#  vi /usr/local/apache/conf/httpd.conf


    ServerType standalone   <--- Default Web Service Mode (Type)

    ServerRoot "/usr/local/apache"

    StartServers 25   <--- 원하는 Default 아파치 웝 데몬의 개수

    Port 80   <--- 원하는 웹서비스 포트

    User nobody    <--- Default User
    Group nobody    <--- 확인해서 변경해줄것

    ServerAdmin sysop@wowunix.com   <--- 관리자 이메일 주소

    ServerName www.wowunix.com   <--- 서버 이름 (Domain 또는 Server-IP)
    (OR)
    ServerName 192.168.10.9
    (OR)
    ServerName 192.168.10.9/servlet/MiddleServlet/default.htm    <--- 톰캣이 설치 되었을때 /servlet/~ 이라고 많이 사용함


    DocumentRoot "/usr/local/apache/htdocs"    <--- Main index (html) 가 위치할 디렉토리




    #
    # Each directory to which Apache has access, can be configured with respect
    # to which services and features are allowed and/or disabled in that
    # directory (and its subdirectories).
    #
    # First, we configure the "default" to be a very restrictive set of
    # permissions.
    #
    <Directory />                                       <--- 아파치 웹서버에서 perl (cgi) 를 사용하기 위한 설정1
        Options FollowSymLinks Includes ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>                



>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>



    #
    # DirectoryIndex: Name of the file or files to use as a pre-written HTML
    # directory index.  Separate multiple entries with spaces.
    #

    DirectoryIndex index.htm index.html index.cgi index.php index.php3 index.php4 index.php5 index.jsp
    (사용자가 정의하는 Default 확장자 설정)



    AddType application/x-tar .tgz
    AddType image/x-icon .ico
    AddType application/x-httpd-php .php .php3 .php4 .php5 .htm .html .phtml .ph
    AddType application/x-httpd-php-source .phps
  



    # AddHandler allows you to map certain file extensions to "handlers",
    # actions unrelated to filetype. These can be either built into the server
    # or added with the Action command (see below)
    #
    # If you want to use server side includes, or CGI outside
    # ScriptAliased directories, uncomment the following lines.
    #
    # To use CGI scripts:
    #
    AddHandler cgi-script .cgi            <--- 아파치 웹서버에서 perl (cgi) 를 사용하기 위한 설정2 (주석을 풀어줍니다.)






:wq!









아파치 Config 문법검사


#   /usr/local/apache/bin/apachectl configtest

Syntax OK








********************
[[ Apache Restart ]]
********************


#  /usr/local/apache/bin/apachectl stop

#  /usr/local/apache/bin/apachectl start



OR



다음과 같이 스크립트를 만들어서 편하게 사용하면 된다............



#   vi /usr/local/apache/bin/start.sh

echo
echo
echo

/usr/local/apache/bin/apachectl start

sleep 3

echo
echo
echo "  ************************************************************************"
echo "  ************************************************************************"
ps -ef |grep httpd |grep -v grep
echo "  ************************************************************************"
echo "  ************************************************************************"
sleep 3

echo
echo "  모두 `pgrep httpd |grep -v grep |wc -l` 개의 Apache Processor 가 Running 중입니다.............!!!! "
echo
echo
echo



:wq!







#   vi /usr/local/apache/bin/stop.sh

echo
echo
echo

/usr/local/apache/bin/apachectl stop
sleep 3

echo
echo
echo "  ************************************************************************"
echo "  ************************************************************************"
ps -ef |grep httpd |grep -v grep
echo "  ************************************************************************"
echo "  ************************************************************************"
sleep 3

echo
echo "  모두 `pgrep httpd |grep -v grep |wc -l` 개의 Apache Processor 가 Running 중입니다.............!!!! "
echo
echo
echo



:wq!







#   chmod 744 /usr/local/apache/bin/*.sh


#   /usr/local/apache/bin/start.sh







아파치 데몬이 정상으로 올라온다면 (마지막으로) 웹브라우저를 통해 확인해보시기 바랍니다..


주소란에

http://web-server-ip(Full-domain-name)

AND

http://web-server-ip(Full-domain-name)/test.php      [enter]  







참고로 zeroboard 는 최신버젼으로 설치가 되어 있습니다.

설치버젼은 이 메뉴얼 제일 위 "APM Version (src) Infomation" 에 있습니다.


주소란에

http://web-server-ip(Full-domain-name)/bbs/admin.php 하셔서 admin / admin 으로 로그인 하셔서 게시판 생성후 사용하시면 됩니다.

로그인후 반드시 admin 패스워드를 변경해서 사용하시기 바랍니다.




제로보드 설치 정보는 다음과 같습니다.

*********************************
hostname = localhost
SQL User ID = root
password = 없음 (공백으로 비워둠)
DB Name = mysql
*********************************
조회 수 :
4927
추천 수 :
51 / 0
등록일 :
2007.12.18
15:26:00 (*.236.3.225)
엮인글 :
http://bestceok.com/xe/index.php?mid=sun_faq&document_srl=3031&act=trackback&key=956
게시글 주소 :
http://bestceok.com/xe/index.php?mid=sun_faq&document_srl=3031
List of Articles
번호 제목 글쓴이 날짜 조회 수
» 솔라리스 10 컴파일 에러 문제 하록 2007-12-18 4927
150 기본 network setup 하록 2007-12-18 694
149 Volume Manager에서 Root Disk Mirroring 하록 2007-12-18 1349
148 ce 인터페이스 속도 설정 하록 2007-12-18 610
147 UNIX System Crash Dump 분석스크립트 (analysis.sh) 하록 2007-12-18 988
146 Process Name별로 Kill하는 Script 하록 2007-11-13 616
145 Solaris 10 보안 적용 스크립트 하록 2007-11-02 1812
144 ps 명령어 Full List 하록 2007-06-20 601
143 솔라리스 부트 매니저를 이용한 부트 디스크 미러링 방법 하록 2007-03-20 948
142 Sun One Webserver 설치 하록 2007-03-19 487
141 새로운 장치를 달고 device file을 만들려면? 하록 2007-03-06 546
140 ufsdump & ufsrestore Manual 하록 2007-01-31 1045
139 [SUN Disksuite] Metadb & Metadevice 구성 매뉴얼 하록 2007-01-22 810
138 SOLARIS한글 사용하기 하록 2006-11-30 524
137 솔라리스10 x86 에서의 POP3 서버 구축!! 하록 2006-11-23 779
136 IP Filter 사용법 하록 2006-11-23 974
135 Solaris Security tools 50종 하록 2006-11-23 710
134 fsck에 관한 내용, 갑자기 다운 되었을 경우 하록 2006-11-23 784
133 OBP(Open boot PROM) command 정리 하록 2006-11-23 745
132 솔라리스10 x86 에 sendmail 8.13.3 설치하기 하록 2006-11-23 1291