티스토리 뷰

O.S/Unix

AIX 5.3 에 Apache2.2 설치하기..

미련곰 2010. 5. 3. 16:24


*. gcc패키지 및 liggcc는 아래 링크에서 다운로드한다.
ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/gcc/



Compiling Apache2+ on AIX using the GNU GCC compiler - By Example for Apache 2.2.2 and 2.2.4

This was performed on AIX 5.3 ML 03 - a simple default AIX install with no extras and no IBM compilers installed. It is also assumed the machine is on your network. It was quiet simple and straight forward using the latest GNU compiler and Apache source code but I did had problems using older compiler versions. Below are my notes on how to do this, step by step and where to download the tools and source code. I hope this will save you time.

  1. Make sure you have a few hundred MB of free space in following places
    • /usr this is where by default Apache will be installed
    • the directory you will use for compiling Apache
    • and some space in /tmp never does any harm!
  2. Download the following:
  3. Install libm.a from the AIX CDROMs - this is the maths library
    • As the root user
    • Insert the AIX 5.3 installation CDROM 1 into the CD and use "smitty installp" to load this package.
    • I assume you can do this without further help.
  4. Install the compiler and library - as the root user
    rpm -Uvh gcc-4*.rpm
    rpm -Uvh libgcc-4*.rpm

  5. Uncompress the Apache Web Server source and untar the files in to a directory read for compiling
    gunzip httpd-2*tar.gz
    tar xvf httpd-2*.tar

    • You should now find a sub-directory with the name of httpd plus the version number. In my case it was "httpd-2.2.2"
    • cd to this directory
    • If you downloaded the httpd-2.2.2.tar.bz2 file, use bunzip2 to uncompress the file - not obvious unless you know!
  6. Prepare for the complication using the configure script, by typing the command (as a regular AIX user):
    ./configure -C --enable-so --prefix /usr/local/apache2

    • Here we request:
      • the checks are cached (-C) to save time,
      • dynamic library support (for example used by PHP which is a .so extension) and
      • the install directly will be /usr/local/apache2
    • Some people prefer to install into /opt/feeeware/apache2 but let us stick to the defaults to make it simpler. You can always try something different later on once you know it all works.
    • ./configure --help - will show you the hundreds of options.
    • Configure can take a long time - like 15 minutes (go for a cup of tea)
    • For Apache 2.2.4 add a further option as below:
      ./configure -C --enable-so --prefix /usr/local/apache2 --with-included-apr

    • Note that if you are compiling in an AIX 6.1 environment and intend to build PHP then you should omit
      --with-included-apr

      because you will get errors when attempting to start Apache. Apache will report missing symbols when loading the library libphp5.so. See point 10.
  7. Compile Apache2 by typing (as a regular AIX user):
    make

    • Note that you can use either AIX make or GNU make.
  8. Install Apache2 - all the important stuff will be in /usr/local/apache2. Type as the root user:
    make install

  9. If it all goes wrong, you can run "make clean" to start again from point 6.
  10. One method of solving the problems associated with included-apr is to download the APR and APR-utils from the Apache website and configure and make both packages. You can then rerun the Apache configure command as follows (for example):
    ./configure -C --enable-so --prefix=/usr/local/apache2 \
    --with-apr=/opt/freeware \
    --with-apr-util=/opt/freeware \

Configuring Apache2+ on AIX - By Example

Assuming you have just compiled and installed Apache2+ as in the above section, this is what I do to configure Apache:

  1. You will need to configure Apache before you start it
    vi /usr/local/apache2/conf/httpd.conf

    • Find the line that looks like this
      DocumentRoot "/usr/local/apache2/htdocs"

    • This is the top level directory for your web pages - you need to know this or you can't add pages!!
  2. Test the Apache2 configuration
    /usr/local/apache2/bin/apachectl -t

    • I had an error "httpd: bad group name daemon".
      • To fix this I changed /usr/local/apache2/conf/httpd.conf and the line "User daemon" to "User nobody" and the line "Group daemon" to "Group nobody". This uses the standard UNIX/AIX user called "nobody". An alternative would be to create a UNIX user and UNIX group both called daemon.
  3. Start Apache2
    /usr/local/apache2/bin/apachectl -k start

    • Other useful commands are "stop" and "restart"
  4. You can now test the webserver as the default web files directory has a simple web page pre-installed. If necessary, copy these web pages to your new web files directory. Point your browser at http:/<your-machine> and you should be informed that it is working.
    • Below we assume you will use default /usr/local/apache2/htdocs for some quick testing and will set up the alternative filesystem later on but don't forget.

It works! ~ 잘~뜬다.

참고 : http://www.ibm.com/developerworks/wikis/display/WikiPtype/aixopen
        

공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함