ソースコードを展開し、configure, make, make install します。
make install のみ、root 権限が必要なので、sudo を付けています。
% tar xzf php-4.3.2.tar.gz
% cd php-4.3.2
% ./configure --with-apxs
...
+--------------------------------------------------------------------+
| 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. |
+--------------------------------------------------------------------+
| *** NOTE *** |
| The default for register_globals is now OFF! |
| |
| If your application relies on register_globals being ON, you |
| should explicitly set it to on in your php.ini file. |
| Note that you are strongly encouraged to read |
| http://www.php.net/manual/en/security.registerglobals.php |
| about the implications of having register_globals set to on, and |
| avoid using it if possible. |
+--------------------------------------------------------------------+
Thank you for using PHP.
% make
...
/path/to/file:nnn: warning: `xxx' redefined
/path/to/file:nnn: warning: this is the location of the previous definition
...
% sudo make install
Password:
Installing PHP CLI binary: /usr/local/bin/
Installing PHP CLI man page: /usr/local/man/man1/
...
Installing PHP SAPI module
[activating module `php4' in /private/etc/httpd/httpd.conf]
cp libs/libphp4.so /usr/libexec/httpd/libphp4.so
chmod 755 /usr/libexec/httpd/libphp4.so
cp /private/etc/httpd/httpd.conf /private/etc/httpd/httpd.conf.bak
cp /private/etc/httpd/httpd.conf.new /private/etc/httpd/httpd.conf
rm /private/etc/httpd/httpd.conf.new
Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts
-20020429/
Installing PEAR environment: /usr/local/lib/php/
[PEAR] Archive_Tar - installed: 0.9
[PEAR] Console_Getopt - installed: 1.0
[PEAR] PEAR - installed: 1.1
[PEAR] DB - installed: 1.3
[PEAR] HTTP - installed: 1.2
[PEAR] Mail - installed: 1.0.1
[PEAR] Net_SMTP - installed: 1.0
[PEAR] Net_Socket - installed: 1.0.1
[PEAR] XML_Parser - installed: 1.0.1
[PEAR] XML_RPC - installed: 1.0.4
Installing build environment: /usr/local/lib/php/build/
Installing header files: /usr/local/include/php/
Installing helper programs: /usr/local/bin/
program: phpize
program: php-config
program: phpextdist