LAMP是Linux, Apache, MySQL, PHP的缩写.这篇教程将教你如何在一台Fedora 12服务器上安装Apache2web服务器+PHP(mod_php) +MySQL .
我已经测试无误,你可以放心使用。
yum install mysql mysql-server
chkconfig --levels 235 mysqld on<br> /etc/init.d/mysqld start
mysqladmin -u root password yourrootsqlpassword<br> mysqladmin -h server1.example.com -u root password yourrootsqlpassword
yum install httpd
chkconfig --levels 235 httpd on
/etc/init.d/httpd start
yum install php
/etc/init.d/httpd restart
vi /var/www/html/info.php<br> <br> <?php <br/> <br> phpinfo();<br> <br> ?>
yum search php
yum install php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-eaccelerator php-magickwand php-magpierss php-mapserver php-mbstring php-mcrypt php-mhash php-mssql php-shout php-snmp php-soap php-tidy
/etc/init.d/httpd restart
yum install phpmyadmin
vi /etc/httpd/conf.d/phpMyAdmin.conf<br> <br> # phpMyAdmin - Web based MySQL browser written in php<br> #<br> # Allows only localhost by default<br> #<br> # But allowing phpMyAdmin to anyone other than localhost should be considered<br> # dangerous unless properly secured by SSL<br> <br> Alias /phpMyAdmin /usr/share/phpMyAdmin<br> Alias /phpmyadmin /usr/share/phpMyAdmin<br> #<directory usr="" share="" phpmyadmin=""></directory><br> # order deny,allow<br> # deny from all<br> # allow from 127.0.0.1<br> # allow from ::1<br> #<br> <br> # This directory does not require access over HTTP - taken from the original<br> # phpMyAdmin upstream tarball<br> #<br> <directory usr="" share="" phpmyadmin="" libraries=""></directory><br> Order Deny,Allow<br> Deny from All<br> Allow from None<br> <br> <br> # This configuration prevents mod_security at phpMyAdmin directories from<br> # filtering SQL etc. This may break your mod_security implementation.<br> #<br> #<ifmodule mod_security.c=""></ifmodule><br> # <directory usr="" share="" phpmyadmin=""></directory><br> # SecRuleInheritance Off<br> # <br> #<br>
/etc/init.d/httpd restart