1 package required
apache_1.3.19.tar.gz
php-4.0.4.tar.gz
mysql-3.23.32.tar.gz
Note: These are not the RPM package source code
2 Software Installation
2.1 Extract the package
cd / usr / local
tar-zvxf mysql-3.23.32.tar.gz
Will have a mysql-3.23.32 directory to / usr / local / mysql
mv msql-3.23.32 / usr / local / mysqly
Compiled MySQL 2.2
cd / usr / local / mysql
. / Configure - prefix = / usr / local / mysql
make
make install
2.3 Install database files
/ Usr / local / mysql / scripts / mysql_install_db
/ Usr / local / mysql / bin / safe_mysqld &
2.4 MySQL licensing operation
MySQL access control and powerful, more flexible than Postgres.MySQL user name and password used in the encryption algorithm and Unix systems are different, their user name can be up to 16 characters.
First to root login MySQl, then the prompt, type in the MySQL grant all privileges on eshow_sitemap.html generate.sh sitemap.html to thj @ localhost identified by''thj''with grant option; way, no matter from where the user thjlogin to this server can use MySQL.
2.5 MySQL database a simple operating statements
Create Database
Command: create database database name;
Delete Database
Command: drop database database name;
What is MySQL, the database query has
Command: show databases;
Change the current use of the database
Command: use tbl_name
Create a data table
Command: create table tbl_name (column_specs);
Description: tbl_name data table shows the columns in the table column_specs
Query the structure of the specified data table
Command: describe tbl_name;
What is there to query the database in the data table
Command: show tables;
Add new record
Command: insert into tbl_name (col_name1, col_name2, ...) values (values1, values2, ....)
Note: insert statement easy to use, but it also has a defect that can only insert a record.
Bulk loading data
Command: load data local infile "filename.txt" into table tbl_name;
Description: MySQl not be lower than the version 3.22.15, or load data local does not work.The statement is actually called / usr / bin / mysqlimport.
Retrieve information
Command: select what you want to select from one or more tables where data must meet the conditions
Note: In MySQL, every type a command, the command line at the end of every type ";", marked by a command, or press Enter after knocking go, on top of the command prompt implementation of the system; In addition,In most reference books on MySQL, the command to uppercase, lowercase actually can; there, use statements can not add ";" This is the only one of all MySQL do not add the language ";"; to be executed statement.
Note: MySQL installation is over
3 Apache, PHP3 mixed compilation
3.1 Extract the package
cd / usr / local
tar xvzf apache_1.3.19.tar.gz
tar xvzf php-4.0.4.tar.gz
mv apache_1.3.19.tar.gz apache
mv php-4.0.4.tar.gz php
The Apache installation directory as / usr / local / apache
cd apache
. / Configure - prefix = / usr / local / apache - with-port = 8000
Configuration to support MySQL, as Apache modules, tracking variables and effective
cd .. / php
. / Configure - with-mysql = / usr / local / mysql - with-apache =.. / apache - enable-track-vars-with-pgsql = / usr / lib / pgsql - prefix = / usr /local / apache / php-with-config-file-path = / usr / local / apache / php
make
make install
Note: PHP installation is over
3.2 configuring Apache, PHP4 module added
cd .. / apache
cp / usr/local/php/libs/libphp4.a / usr/local/apache/src/modules/php4
. / Configure - prefix = / usr / local / apache - activate-module = src/modules/php4/libphp4.a - with-port = 8000
make
make install
Note: APACHE installed
3.3 Change the Configuration
Kaodao the php.ini file / usr / local / apache / php directory.
cd .. / php
cp php.ini-dist / usr/local/apache/php/php4.ini
Change the Apache configuration file
cd / usr / local / apache / conf
vi httpd.conf
Find AddType application / x-httpd-php. Php4 put it ahead of the # to delete the course can also be added line AddType application/x-httpd-php3.asp so easy to use FrontPage editors point.
Finally, run / usr / local / apache / bin / apachectl start start the apache process.