LAMP就是Linux+Apache+MySql+PHP
安装Apache
[root@linux-a ~]# rpm -ivh /media/Server/httpd-2.2.3-6.el5.i386.rpm
warning: /media/Server/httpd-2.2.3-6.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
error: Failed dependencies:
libapr-1.so.0 is needed by httpd-2.2.3-6.el5.i386
libaprutil-1.so.0 is needed by httpd-2.2.3-6.el5.i386
[root@linux-a ~]#
[root@linux-a ~]# rpm -ivh /media/Server/apr-1.2.7-11.i386.rpm
warning: /media/Server/apr-1.2.7-11.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:apr ########################################### [100%]
[root@linux-a ~]# rpm -ivh /media/Server/postgresql-libs-8.1.4-1.1.i386.rpm
warning: /media/Server/postgresql-libs-8.1.4-1.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:postgresql-libs ########################################### [100%]
[root@linux-a ~]#
[root@linux-a ~]# rpm -ivh /media/Server/apr-util-1.2.7-6.i386.rpm
warning: /media/Server/apr-util-1.2.7-6.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:apr-util ########################################### [100%]
[root@linux-a ~]#
[root@linux-a ~]# rpm -ivh /media/Server/httpd-2.2.3-6.el5.i386.rpm
warning: /media/Server/httpd-2.2.3-6.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:httpd ########################################### [100%]
[root@linux-a ~]#
[root@linux-a ~]# rpm -ivh /media/Server/perl-DBI-1.52-1.fc6.i386.rpm
warning: /media/Server/perl-DBI-1.52-1.fc6.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:perl-DBI ########################################### [100%]
[root@linux-a ~]#
[root@linux-a ~]# rpm -ivh /media/Server/perl-DBD-MySQL-3.0007-1.fc6.i386.rpm
warning: /media/Server/perl-DBD-MySQL-3.0007-1.fc6.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:perl-DBD-MySQL ########################################### [100%]
[root@linux-a ~]#
[root@linux-a ~]# rpm -ivh /media/Server/mysql-5.0.22-2.1.i386.rpm
warning: /media/Server/mysql-5.0.22-2.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:mysql ########################################### [100%]
[root@linux-a ~]#
[root@linux-a ~]# rpm -ivh /media/Server/mysql-server-5.0.22-2.1.i386.rpm
warning: /media/Server/mysql-server-5.0.22-2.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:mysql-server ########################################### [100%]
[root@linux-a ~]#
[root@linux-a ~]# mysql_install_db
Installing all prepared tables
Fill help tablesTo start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your systemPLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h linux-a.test.com password 'new-password'
See the manual for more instructions.You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; perl run-all-testsPlease report any problems with the /usr/bin/mysqlbug script!The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
[root@linux-a ~]#
[root@linux-a ~]# cp /usr/share/doc/mysql-server-5.0.22/my-medium.cnf /etc/my.cnf
[root@linux-a ~]# rpm -ivh /media/Server/php-5.1.6-5.el5.i386.rpm
warning: /media/Server/php-5.1.6-5.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
error: Failed dependencies:
libgmp.so.3 is needed by php-5.1.6-5.el5.i386
php-cli = 5.1.6-5.el5 is needed by php-5.1.6-5.el5.i386
php-common = 5.1.6-5.el5 is needed by php-5.1.6-5.el5.i386
[root@linux-a ~]# rpm -ivh /media/Server/gmp-4.1.4-10.el5.i386.rpm
warning: /media/Server/gmp-4.1.4-10.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:gmp ########################################### [100%]
[root@linux-a ~]# rpm -ivh /media/Server/php-common-5.1.6-5.el5.i386.rpm
warning: /media/Server/php-common-5.1.6-5.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:php-common ########################################### [100%]
[root@linux-a ~]#
[root@linux-a ~]# rpm -ivh /media/Server/php-cli-5.1.6-5.el5.i386.rpm
warning: /media/Server/php-cli-5.1.6-5.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:php-cli ########################################### [100%]
[root@linux-a ~]#
[root@linux-a ~]# rpm -ivh /media/Server/php-5.1.6-5.el5.i386.rpm
warning: /media/Server/php-5.1.6-5.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:php ########################################### [100%]
[root@linux-a ~]#
[root@linux-a ~]# rpm -ivh /media/Server/php-pdo-5.1.6-5.el5.i386.rpm
warning: /media/Server/php-pdo-5.1.6-5.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:php-pdo ########################################### [100%]
[root@linux-a ~]#
[root@linux-a ~]# rpm -ivh /media/Server/php-mysql-5.1.6-5.el5.i386.rpm
warning: /media/Server/php-mysql-5.1.6-5.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:php-mysql ########################################### [100%]
[root@linux-a ~]#
#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#LoadModule php5_module modules/libphp5.so#
# Cause the PHP interpreter to handle files with a .php extension.
#
AddHandler php5-script .php
AddType text/html .php#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php#
# Uncomment the following line to allow PHP to pretty-print .phps
# files as PHP source code:
#
#AddType application/x-httpd-php-source .phps
[root@linux-a ~]# vim /var/www/html/index.php<?
phpinfo();
?>