LAMP是Linux, Apache, MySQL, PHP的缩写.这篇教程将教你如何在一台Fedora 12服务器上安装Apache2web服务器+PHP(mod_php) +MySQL .
我已经测试无误,你可以放心使用。
yum install mysql mysql-serverchkconfig --levels 235 mysqld on<br/> /etc/init.d/mysqld startmysqladmin -u root password yourrootsqlpassword<br/> mysqladmin -h server1.example.com -u root password yourrootsqlpasswordyum install httpdchkconfig --levels 235 httpd on/etc/init.d/httpd startyum install php/etc/init.d/httpd restartvi /var/www/html/info.php<br/> <br/> <?php<br/> <br/> phpinfo();<br/> <br/> ?>yum search phpyum 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 restartyum install phpmyadminvi /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
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号