mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-17 01:18:55 +00:00

as UNIX is a registered trademark by the Open Group. References to UNIX were left in where it made sense, like example outputs, and so forth. You can read the Trademark User Guide for "UNIX" at: http://www.unix.org/tmug2.ps or http://www.unix.org/tmug2.pdf git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@147067 c90b9560-bf6c-de11-be94-00142212c4b1
163 lines
4.6 KiB
XML
163 lines
4.6 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.4 $ -->
|
|
<sect1 id="install.unix">
|
|
<title>Installation on Unix systems</title>
|
|
<para>
|
|
This section will guide you through the general configuration and
|
|
installation of PHP on Unix systems. Be sure to investigate any
|
|
sections specific to your platform or web server before you begin
|
|
the process.
|
|
</para>
|
|
<para>
|
|
Prerequisite knowledge and software:
|
|
<itemizedlist>
|
|
<listitem>
|
|
<simpara>
|
|
Basic Unix skills (being able to operate "make" and a C
|
|
compiler, if compiling)
|
|
</simpara>
|
|
</listitem>
|
|
<listitem>
|
|
<simpara>
|
|
An ANSI C compiler (if compiling)
|
|
</simpara>
|
|
</listitem>
|
|
<listitem>
|
|
<simpara>
|
|
flex (for compiling)
|
|
</simpara>
|
|
</listitem>
|
|
<listitem>
|
|
<simpara>
|
|
bison (for compiling)
|
|
</simpara>
|
|
</listitem>
|
|
<listitem>
|
|
<simpara>
|
|
A web server
|
|
</simpara>
|
|
</listitem>
|
|
<listitem>
|
|
<simpara>
|
|
Any module specific components (such as gd, pdf libs, etc.)
|
|
</simpara>
|
|
</listitem>
|
|
</itemizedlist>
|
|
</para>
|
|
|
|
<para>
|
|
There are several ways to install PHP for the Unix platform, either
|
|
with a compile and configure process, or through various
|
|
pre-packaged methods. This documentation is mainly focused around
|
|
the process of compiling and configuring PHP.
|
|
</para>
|
|
|
|
<para>
|
|
The initial PHP setup and configuration process is controlled by the
|
|
use of the commandline options of the <filename>configure</filename>
|
|
script. This page outlines the usage of the most common options,
|
|
but there are many others to play with. Check out the <link
|
|
linkend="install.configure">Complete list of configure
|
|
options</link> for an exhaustive rundown. There are several ways
|
|
to install PHP:
|
|
<itemizedlist>
|
|
<listitem>
|
|
<simpara>
|
|
As an <link linkend="install.apache">Apache 1.x module</link> or
|
|
an <link linkend="install.apache2">Apache 2.x module</link>.
|
|
</simpara>
|
|
</listitem>
|
|
<listitem>
|
|
<simpara>
|
|
As an <link linkend="install.caudium">Pike module for Caudium</link>
|
|
</simpara>
|
|
</listitem>
|
|
<listitem>
|
|
<simpara>
|
|
For use with <link
|
|
linkend="install.otherhttpd">AOLServer, NSAPI,
|
|
phttpd, Pi3Web, Roxen, thttpd, or Zeus.</link>
|
|
</simpara>
|
|
</listitem>
|
|
<listitem>
|
|
<simpara>
|
|
As a <link linkend="install.commandline">CGI executable</link>
|
|
</simpara>
|
|
</listitem>
|
|
</itemizedlist>
|
|
</para>
|
|
|
|
<sect2 id="install.unix.apache-module">
|
|
<title>Apache Module Quick Reference</title>
|
|
|
|
<para>
|
|
PHP can be compiled in a number of different ways, but one of
|
|
the most popular is as an Apache module. The following is a quick
|
|
installation overview.
|
|
</para>
|
|
|
|
<example id="install.unix.apache-module.quick">
|
|
<title>
|
|
Quick Installation Instructions for PHP 4 (Apache Module Version)
|
|
</title>
|
|
<programlisting role="shell">
|
|
<![CDATA[
|
|
1. gunzip apache_1.3.x.tar.gz
|
|
2. tar xvf apache_1.3.x.tar
|
|
3. gunzip php-x.x.x.tar.gz
|
|
4. tar xvf php-x.x.x.tar
|
|
5. cd apache_1.3.x
|
|
6. ./configure --prefix=/www
|
|
7. cd ../php-x.x.x
|
|
8. ./configure --with-mysql --with-apache=../apache_1.3.x --enable-ftp
|
|
9. make
|
|
10. make install
|
|
11. cd ../apache_1.3.x
|
|
12. ./configure --activate-module=src/modules/php4/libphp4.a
|
|
13. make
|
|
14. make install
|
|
15. cd ../php-x.x.x
|
|
16. cp php.ini-dist /usr/local/lib/php.ini
|
|
17. Edit your httpd.conf or srm.conf file and add:
|
|
AddType application/x-httpd-php .php
|
|
|
|
18. Use your normal procedure for restarting the Apache server. (You must
|
|
stop and restart the server, not just cause the server to reload by
|
|
use a HUP or USR1 signal.)
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</sect2>
|
|
|
|
<sect2 id="install.building">
|
|
<title>Building</title>
|
|
<simpara>
|
|
When PHP is configured, you are ready to build the CGI executable.
|
|
The command <command>make</command> should
|
|
take care of this. If it fails and you can't figure out why, see
|
|
the <link linkend="install.problems">Problems section</link>.
|
|
</simpara>
|
|
</sect2>
|
|
</sect1>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|
|
|