1. Configure apache2 a). TAR ZXVF httpd-2.0.52.tar.gz b). ./Configure --prefix = / usr / local / apache --enable-so c). Make d). Make install e) . CP / usr / local / apache / bin / apachectl /etc/init.d/httpd2. Configuring mysql Description: I downloaded this mysql5.0 binary package without compiling directly, the following is the installation instructions from MySQL Out of information: Installing a mysql binary distribution --------------------------------------
This Chapter Covers The Installation of MySQL Binary Distributions (`.tar.gz 'Archives For Various Platforms (See * Note MySQL BINARIES :: for a Detailed List).
In Addition to these Generic packages, We Also Offer Binaries INPLATFORM-Specific Package Formats for Selected Platforms. See * Notequick Standard Installation :: for more information on how to installthese.
The Generic MySQL Binary Distributions Are Packaged As Gzip-Compressedgnu Tar Archives (`.tar.gz '). You NEED THE FOLLOWING TOOLS To Install Amysql Binary Distribution:
* GNU `Gunzip 'to uncompress the distribution.
* A reasonable `tar 'to unpack the distribution. GNU` tar' is known to work. Some `tar 'implementations that come pre-installed with the operating system (eg Sun` tar') are known to have problems (with long file Names, for example). in That Case, You Should Install GNU `Tar 'First.
If you run into problems, * please always use `mysqlbug '* when postingquestions to a MySQL mailing list. Even if the problem is not a bug,` mysqlbug' gathers system information that will help others solve yourproblem. By not using `mysqlbug ', you lessen the likelihood of gettinga solution to your problem. you will find `mysqlbug' in the` bin'directory after you unpack the distribution. * Note Bug reports ::. The basic commands you must execute to install and use a MySQL BinaryDistribution Are:
Shell> GroupAdd MySQL Shell> UserAdd -g mysql mysql shell> cd / usr / local shell> gunzip ln -s full-path-to -mysql-version-os mysql shell> cd mysql shell> scripts / mysql_install_db shell> chown -r root. shell> chown -r mysql data shell> chgrp -r mysql. shell> bin / mysqld_safe --user = mysql &
IF Your Version of MySQL IS Older Than 4.0, Substitution `bin / Safe_Mysqld'For` bin / mysqld_safe 'in the final command.
You can add new users using the `bin / mysql_setpermission 'script if youinstall the` dbi' and `dbd :: mysql 'perl modules.
A more detailed description Follows.
To Install a Binary Distribution, FOLLOW THESE Steps, Then Proceed To * Note Post-Installation ::, for Post-Installation Setup and Testing:
1. Pick the directory under which you want to unpack the distribution, and move into it. In the following example, we unpack the distribution under `/ usr / local '(The following instructions, therefore, assume you have permission to create files and directories in `/ usr / local '. If that directory is protected, you will need to perform the installation as` root') 2 Obtain a distribution file from one of the sites listed in * Note Getting MySQL:.. Getting MySQL.
MySQL Binary Distributions Are Provided As Compressed `Tar 'Archives And Haven.tar.gz', WHERE` Version 'Is A Number (for Example, `3.21.15'), and` OS 'Inettes The Type of Operating System for Which The Distribution Is Intended (for Example, `PC-Linux-GNU-I586 '). Note That All Binaries Are Built from The Same MySQL Source Distribution.
3. Add a user and group for `mysqld 'to Run as:
Shell> / usr / sbin / groupadd mysql shell> / usr / sbin / useradd -g mysql mysql
These commands add the `mysql 'group and the` mysql' user. The syntax for `useradd 'and` groupadd' may differ slightly on different versions of Unix. They may also be called `adduser 'and` addgroup'. You may wish To Call The User and Group Something Else Instead of `mysql '.
4. Change INTO The Intended Installation Directory:
Shell> CD / USR / LOCAL
5. Unpack The Distribution, Which Will Create The Installation Directory. THEN CREATE A SYMBOLIC LINK To That Directory:
Shell> gunzip ln-s full-path-to-mysql-version-os mysqlusing gnu tar, you can also replace the first line with The Following Alternative Command to Decompress and extra extra:
Shell> tar zxvf /path/to/mysql-version-os.tar.gz
The first command creates a directory named `mysql-VERSION-OS '. The second command makes a symbolic link to that directory. This lets you refer more easily to the installation directory as` / usr / local / mysql'.
6. Change Into The Installation Directory:
Shell> cd mysql
You will Find Several Files and Subdirector In The `mysql 'Directory. The Most Important for Installation Purposes Are The` bin' and `scripts' Subdirectories.
`Bin 'This directory contains client programs and the server You should add the full pathname of this directory to your` PATH' environment variable so that your shell finds the MySQL programs properly. * Note Environment variables ::.
`Scripts' this Directory Contains The` mysql_install_db 'script used to initialize the `mysql' Database Containing The Grant Tables That Store The Server Access Permissions.
7. If you would like to use `mysqlaccess 'and have the MySQL distribution in some non-standard place, you must change the location where` mysqlaccess' expects to find the `mysql 'client. Edit the` bin / mysqlaccess' script at Approximately Line 18. Search for a line That Looks Like this:
$ MYSQL = '/ usr / local / bin / mysql'; # path to mysql executableChange the path to reflect the location where `mysql 'actually is stored on your system If you do not do this, you will get a` Broken pipe. 'Error When You Run `mysqlaccess'.
8. Create the mysql grant table (Necessary Only if you have't installed mySQL before): shell> scripts / mysql_install_db
Note That MySQL VERSIONS OLDER THAN VERSION 3.22.10 Started The MySQL Server When You Run `mysql_install_db '. This is no longer true.
9. Change Ownership of binaries to `root 'and Ownership of the data directory to the user thing you will run` mysqld' as:
Shell> Chown -r root / usr / local / mysql /. shell> chown -r mysql / usr / local / mysql / data shell> chgrp -r mysql / usr / local / mysql /.
The first command changes the `owner 'attribute of the files to the` root' user, the second one changes the `owner 'attribute of the data directory to the` mysql' user, and the third one changes the `group 'attribute to The `mysql 'group.
10. if You Want to Install Support for the Perl `DBI '/` DBD' Interface, See * Note Perl Support ::.
11. If you would like MySQL to start automatically when you boot your machine, you can copy `support-files / mysql.server 'to the location where your system has its startup files. More information can be found in the` support-files /mysql.server 'script itself and in * note automatic start ::.
After Everything Has Been Unpacked and Installed, You Should Initializeand Test Your Distribution.
You can start the mysql server with the fol / mysqld_safe --user = mysql &
IF Your Version of MySQL IS Older Than 4.0, Substitution `bin / Safe_Mysqld'For` bin / mysqld_safe 'in the command.
Now Proceed to * Note `mysqld_safe ': mysqld_safe, and * notepost-installation :: CP support-files / mysql.server /etc/init.d/mysql cp support-files / mySQL CP Support-Files / MySQL CP Support-Files / MySQL CP Support-Files / MySQL CP Support-Files / MySQL CP Support-Files / MySQL CP Support-Files / My -Medium.cnf /etc/my.cnf chmod 755 /etc/init.d/mysql /etc/init.d/mysql start / stop / restart to / usr / local / mysql / bin ./mysql -u root - P Enter MSYQL Database 3.php Configuration I installed PHP4.3.91). TAR ZXVF PHP-4.3.9.Tar.gz2) ./configure --prefix = / usr / local / php --with-mysql = / USR / local / mysql --with-apxs2 = / usr / local / apache / bin / apxs --enable-track- vars3). make4). make install5). CP php.ini-dist / usr / local / lib / PHP.INI6). Edit the httpd.conf file to call the PHP module. The path on the right side of the Loadmolude expression must point to PHP in your system. The above Make Install commands may have already finished these, but must be checked. For PHP 4: loadModule php4_module modules / libphp4.so For PHP 5: loadModule php5_module modules / libphp5.so 7). Notice Apache to resolve a specific extension into PHP, for example, let Apache will extend the extension .php parsing into PHP. You can specify any extensions as PHP and simply add them, each with space separation. For example, we have to add .phtml: addtype application / x-httpd-php .php .phtml usually, we will also set the .phps extension to display the highlighted PHP source file, which can be done: addtype application / x-httpd -php-source .phps Reference material:
1. gzip -d httpd-2_0_nn.tar.gz
2. TAR XVF httpd-2_0_nn.tar
3. Gunzip php-nn.tar.gz
4. Tar-xvf php-nn.tar
5. CD httpd-2_0_nn
6. ./configure --enable-so
7. make
8. make install
Now you have installed apache 2.0.nn in / usr / local / apache. This installation supports loading module
And standard MPM Prefork. After that, start the Apache server using the following command:
/ usr / local / apache2 / bin / apachectl start
If successful, you can stop the Apache server and continue to install PHP: / usr / local / apache2 / bin / apachectl stop.
9. cd ../php4-nn
10. Now we need to configure PHP. Here you can use a wide variety of parameters from defining phps, such as startup
Some extension function packages, etc. Use the ./configure --help command to list all currently available
number. In our example, we will give a configuration on Apache 2 supported by MySQL.
example. The path of your local APXS may be different, in fact, in your system, it may be named
APXS2.
./configure --with-apxs2 = / usr / local / apache2 / bin / apxs
11. make
12. make install
If you decide to change the configuration option after installation, you only need to repeat the last three steps, then you need to restart
Apache enables new modules to take effect. No need to recompile.
Note that unless prompted, the 'make install' command will install PEAR, various PHP tools
Such as PHPize, installing PHP CLI, and more.
13. Configure php.ini
CP php.ini-dist /usr/local/lib/php.ini
You can edit the php.ini file to modify the PHP option. If you want to put this file in another location,
You need to add -with-config-file-path = / path options at step 10.
If you choose PHP.INI-Recommended, be sure to read the list of changes, they will affect
PHP execution.
14. Edit the httpd.conf file to call the PHP module. The path to the right side of the Loadmolude must point to you.
PHP in the system. The above Make Install commands may have already finished these, but must be checked.
For PHP 4:
LoadModule PHP4_Module Modules / Libphp4.so
For PHP 5:
LoadModule PHP5_MODULE MODULES / LIBPHP5.SO
15. Inform Apache to resolve specific extensions into PHP, for example, we let Apache will extends .php
Analysis into PHP. You can specify any extensions as PHP and simply add them, each with space separation.
For example, we have to add .phtml:
AddType Application / X-httpd-php .php .phtml
Often, we also set the .phps extension to display the highlighted PHP source file, which can be done:
AddType Application / X-httpd-php-source .phps
16. Start your Apache server:
/ usr / local / apache2 / bin / apachectl start