Fedora14下MySQL、Apache、PHP、phpMyAdmin的安裝步聚

來源:互聯網
上載者:User

**********************************************************************
先查看下本機是否已安裝了MySQL、Apache、PHP、phyMyAdmin,新手最好卸載重裝吧。避免出現一些問題。

[test1@localhost ~]$ rpm -qa | grep MySQL

[test1@localhost ~]$ rpm -qa | grep mysql

MySQL-client-5.5.24-1.linux2.6.i386

MySQL-server-5.5.24-1.linux2.6.i386
[root@localhost test1]# rpm -e MySQL-client-5.5.24-1.linux2.6.i386

[root@localhost test1]# rpm -e MySQL-server-5.5.24-1.linux2.6.i386

**********************************************************************

**********************************************************************
一、Fedora14下MySQL的安裝配置
**********************************************************************
**********************************************************************
二、Fedora14下Apache的安裝
[root@localhost ~]# yum install httpd
Package httpd-2.2.17-1.fc14.i686 already installed and latest version
Nothing to do
設定Apache2開機啟動21      
[root@localhost ~]# chkconfig --levels 235 httpd on
[root@localhost ~]# /etc/init.d/httpd start    
Starting httpd:                                            [  OK  ]
[root@localhost ~]# netstat -nl | grep 80
tcp        0      0 :::80                       :::*                        LISTEN
開啟瀏覽器地址欄輸入:http://localhost/
會出現:Fedora Test Page
成功安裝Apache了。

在Fedora中Apache的預設文件路徑在/var/www/html,設定檔是/etc/httpd/conf/httpd.conf。其餘的設定檔儲存在/etc/httpd/conf.d/,/記錄檔在etc/httpd/logs/裡
**********************************************************************
httpd和Apache的關係?
httpd stands for Hypertext Transfer Protocol Daemon (i.e. web server).
httpd是*nix系統(例如Unix,bsd)apache的可執行檔的檔案名稱,一般在這些系統,httpd指的就是apache

**********************************************************************
**********************************************************************
三、Fedora14下PHP的安裝
[root@localhost test1]# yum install php
Installing:
 php                 i686          5.3.8-3.fc14          updates          1.1 M
Installing for dependencies:
 php-cli             i686          5.3.8-3.fc14          updates          2.3 M
 php-common          i686          5.3.8-3.fc14          updates          538 k

然後在/var/www/html中建立一個info.php檔案,在裡面加入以下代碼
<?php

 phpinfo();

 ?>

[root@localhost test1]# /etc/init.d/httpd restart
重啟apache後
在瀏覽器中輸入http://localhost/info.php
出現了PHP Version 5.3.8的一些資訊,表示PHP5安裝成功了。
搜尋下MySQL看不到下相關資訊。故再安裝php-mysql軟體包,讓PHP5獲得MySQL支援。
**********************************************************************
**********************************************************************
讓PHP5支援MySQL
[root@localhost www]# yum install php-mysql
Installing:
 php-mysql          i686          5.3.8-3.fc14           updates           76 k
Installing for dependencies:
 php-pdo            i686          5.3.8-3.fc14           updates           71 k
安裝好後重啟Apache
mysql
在瀏覽器中輸入http://localhost/info.php。
搜尋下MySQL可以看到下面的相關資訊:
MySQL Support    enabled
Active Persistent Links    0
Active Links    0
Client API version    5.1.60
**********************************************************************
**********************************************************************
四、Fedora14下phpMyAdmin的安裝
[root@localhost Desktop]# yum install phpmyadmin
Installing:
 phpMyAdmin            noarch       3.4.7.1-1.fc14          updates       4.1 M
Installing for dependencies:
 libmcrypt             i686         2.5.8-9.fc12            fedora         90 k
 php-gd                i686         5.3.8-3.fc14            updates       105 k
 php-mbstring          i686         5.3.8-3.fc14            updates       455 k
 php-mcrypt            i686         5.3.8-3.fc14            updates        30 k
 php-php-gettext       noarch       1.0.11-3.fc14           updates        21 k
 t1lib                 i686         5.1.2-6.fc14            fedora        152 k
安裝好後重啟Apache。
在瀏覽器中輸入 http://localhost/phpmyadmin

出現一個對話方塊要求輸入使用者名稱跟密碼,說明phpMyAdmin安裝成功了。


phpMyAdmin的設定檔是/usr/share/phpMyAdmin/libraries/config.default.php

@@@@@@@@@@@@@@@@@@@@@@

參考:Fedora 15(lmap,flash,phpmyadmin) 安裝使用教程全攻略

Fedora 11下7步輕鬆搞定LAMP安裝

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.