Upload the installation file to the/OPT directory of linux.
Environment: REDHAT5.5
Tool: httpd-2.2.17.tar.gz
Mysql-5.0.22.tar.gz
Php-5.2.17.tar.gz
PhpMyAdmin-3.3.4-all-languages.tar.bz2
Gd-2.0.32.tar.gz
Freetype-2.1.10.tar.gz
Libpng-1.2.14.tar.gz.TAR.GZ
Libxml2-2.6.19.tar.gz.GZ
Zlib-1.2.3.tar.gz
: Http://www.everbox.com/f/p5knHnhIVuV1LWdskGeC8VmMfA
1. install apache
Tar zxvf httpd-2.2.17.tar.gz Decompression
Cd httpd-2.2.17 entry
Compile and install:
. /Configure -- prefix =/usr/local/apache2 -- enable-so -- enable-rewrite -- enable-cgi -- enable-suexec -- with-suexec-caller = daemon -- with-suexec- docroot =/usr/local/apache2/htdocs
Make
Make install
Modify the configuration file after compilation and installation.
Vi/usr/local/apache2/conf/httpd. conf
ServerName www.example.com: 80 changed to: own IP: 80 I changed to: www.xiaodu.com
Here, I use a domain name to access my hosts file!
Add 192.168.1.2 www.xiaodu.com (my lab machine IP address is 192.168.1.2)
Enable service:/usr/local/apache2/bin/apachectl start
View service: netstat-antpl | grep 80
Access the webpage to check whether the webpage is normal
OK. The webpage can be accessed normally.
Ii. Install mysql
Unzip: tar zxvf mysql-5.0.22.tar.gz
1. Compile and install:./configure -- prefix =/usr/local/mysql
Make & make install
2. Add a user: useradd-M-s/sbin/nologin mysql
3. [root @ RHCE mysql-5.0.22] #/usr/local/mysql/bin/mysql_install_db -- user = mysql
Installing all prepared tables
Fill help tables
To start mysqld at boot time you have to copy support-files/mysql. server
To the right place for your system
Please remember to set a password for the MySQL root USER!
To do so, start the server, then issue the following commands:
/Usr/local/mysql/bin/mysqladmin-u root password 'new-password'
/Usr/local/mysql/bin/mysqladmin-u root-h RHCE password 'new-password'
See the manual for more instructions.
You can start the MySQL daemon:
Cd/usr/local/mysql;/usr/local/mysql/bin/mysqld_safe &
You can test the MySQL daemon with the benchmarks in the 'SQL-Shanghai' directory:
Cd SQL-scripts; perl run-all-tests
Please report any problems with the/usr/local/mysql/bin/mysqlbug script!
The latest information about MySQL is available on the web
Http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
[Root @ RHCE mysql-5.0.22] # cp support-files/my-medium.cnf/etc/my. cnf
Cp: overwrite '/etc/my. cnf '? Y
[Root @ RHCE mysql-5.0.22] # chown-R root: mysql/usr/local/mysql/
[Root @ fig mysql-5.0.22] # chown-R mysql/usr/local/mysql/var/
[Root @ RHCE mysql-5.0.22] # echo "/usr/local/mysql/lib/mysql/">/etc/ld. so. conf
[Root @ fig mysql-5.0.22] # ldconfig
[Root @ RHCE mysql-5.0.22] #/usr/local/mysql/bin/mysqld_safe -- user = mysql &
[Root @ fig mysql-5.0.22] # cp support-files/mysql. server/etc/init. d/mysqld
Cp: overwrite'/etc/init. d/mysqld '? Y
[Root @ RHCE mysql-5.0.22] # chmod + x/etc/init. d/mysqld
Add a startup Item:
[Root @ RHCE mysql-5.0.22] # chkconfig -- add mysqld
[Root @ RHCE mysql-5.0.22] # chkconfig -- level 35 mysqld on
Set the execution path of the mysql program:
[Root @ RHCE mysql-5.0.22] # export PATH = $ PATH:/usr/local/mysql/bin -- (set environment variables)
[Root @ fig mysql-5.0.22] # echo "PATH = $ PATH: /usr/local/mysql/bin ">/etc/profile --- (add environment variables to the global configuration file)
Check whether MYSQL is successfully installed:
[Root @ fig mysql-5.0.22] # mysql-u root
Welcome to the MySQL monitor. Commands end with; or \ g.
Your MySQL connection id is 1
Server version: 5.0.22-log
Type 'help; 'or' \ H' for help. Type '\ C' to clear the buffer.
Mysql> show databases;
+ -------------------- +
| Database |
+ -------------------- +
| Information_schema |
| Mysql |
| Test |
+ -------------------- +
3 rows in set (0.00 sec)
Mysql>
If the above information is displayed, it indicates that the installation is successful and can be used properly!
Run the following command to modify the mysql administrator password:
[Root @ RHCE mysql-5.0.22] # mysqladmin-u root password 'new _ password'
3. Compile and install php and add GD support!
1. Add GD support components
(1) tar zxvf zlib-1.2.3.tar.gz
Cd zlib-1.2.3
./Configure
Make
Make install
(2) tar zxvf libpng-1.2.14.tar.gz.TAR.GZ
Cd libpng-1.2.14
./Configure
Make
Make install
(3) tar zxvf freetype-2.1.10.tar.gz
Cd freetype-2.1.10
./Configure
Make
Make install
(4) tar zxvf jpegsrc.v8b.tar.gz
Cd jpeg-8b/
./Configure -- enable-shared
Make
Make test
Make install
(5) tar zxvf libxml2-2.6.19.tar.gz.GZ
Cd libxml2-2.6.19
./Configure
Make
Make install
(6) tar zxvf gd-2.0.32.tar.gz
Cd gd-2.0.32
./Configure -- with-png -- with-freetype -- with-jpeg
Make
Make install
2. install php
(1) Tar zxvf php-5.2.17.tar.gz
(2) Cd php-5.2.17
(3 ). /configure -- prefix =/usr/local/php5 -- with-apxs2 =/opt/apache/bin/apxs -- with-mysql =/usr/local/mysql -- enable-sockets -- enable- mbstring -- with-config-file-path =/usr/local/php5/lib -- with-gd -- with-zlib -- with-png-dir =/usr/local/include/ libpng12/-- with-libxml-dir =/usr/local/include/libxml2/libxml -- with-jpeg-dir =/usr/local/include -- with-freetype-dir =/ usr/local/include/freetype2/freetype
If the following prompt is displayed and no error message is reported, it indicates that the operation is successful:
+ -------------------------------------------------------------------- +
| 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. |
+ -------------------------------------------------------------------- +
Thank you for using PHP.
(4) Make
Make install
[Wonderful] [GD] the simplest method in history for PHP to support GD is especially suitable for cainiao.
Edit the apache configuration file
Vi/usr/local/apache2/conf/httpd. conf
Modify file content: Add a red font
<IfModule dir_module>
DirectoryIndex index.html index. php
</IfModule>
# Example:
# LoadModule foo_module modules/mod_foo.so
#
LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php. php
AddType application/x-httpd-php-source. phps
<IfModule! Mpm_netware_module>
<IfModule! Mpm_winnt_module>
3. Test php
Vi/etc/usr/local/apache2/htdocs/info. php
Add content:
<? Php
Echo phpinfo ();
?>
After apache is restarted, visit www.xiaodu.com/info.php and the installation on this page is successful.
Now you can install the DZ forum. For details, click here to download and view the installation tutorial.
Decompress phpmyadmin to/usr/local/apache2/htdocs/
Modify the config. default. php file
$ Cfg ['blowfish _ secret'] = ''; set a secret and log on as the root user!
You can also learn from the tutorials on the DZ official website.
This article is from the "Technical Achievements" blog