自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Ubuntu下LAMP+PHPadmin的配置

運(yùn)維 系統(tǒng)運(yùn)維
LAMP(Linux-Apache-MySQL-PHP)網(wǎng)站架構(gòu)是目前國際流行的Web框架。包括Linux操作系統(tǒng),Apache網(wǎng)絡(luò)服務(wù)器,MySQL數(shù)據(jù)庫,Perl、PHP或者Python編程語言。LAMP所有組成產(chǎn)品均是開源軟件,是國際上成熟的架構(gòu)框架。

  Ubuntu下配置LAMP+phpadmin

  用ubuntu安裝lamp其實(shí)十分簡單:

  搭建LAMP:

  1.   sudo apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-server  
  2.  
  3.   sudo apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-server  
  4.  

  在地址欄輸入:http://localhost ,當(dāng)出現(xiàn)It works!說明我們的環(huán)境已經(jīng)搭建好!

  然后安裝下phpadmin:

  在phpmyadmin網(wǎng)站上下載軟件包,解壓縮到本地目錄/var/www/phpmyadmin,如果你請直接解壓到/var/www/phpmyadmin,如果不存在phpmyadmin,請自行創(chuàng)建在終端下執(zhí)行

  1.   sudo cp /var/www/phpmyadmin/config.sample.inc.php /var/www/phpmyadmin/config.inc.php  
  2.  
  3.   sudo cp /var/www/phpmyadmin/config.sample.inc.php /var/www/phpmyadmin/config.inc.php  
  4.  
  5.   sudo gedit /var/www/phpmyadmin/config.inc.php  
  6.  
  7.   sudo gedit /var/www/phpmyadmin/config.inc.php  
  8.  

  找到“blowfish_secret”在后面填上任意字母:

  1.   $cfg['Servers'][$i]['auth_type']='cookie';  
  2.  
  3.   $cfg['Servers'][$i]['host']='localhost';  
  4.  
  5.   $cfg['Servers'][$i]['connect_type']='tcp';  
  6.  
  7.   $cfg['Servers'][$i]['compress']='false';  
  8.  
  9.   $cfg['Servers'][$i]['extension']='mysql';  
  10.  
  11.   $cfg['Servers'][$i]['auth_type']='cookie';  
  12.  
  13.   $cfg['Servers'][$i]['host']='localhost';  
  14.  
  15.   $cfg['Servers'][$i]['connect_type']='tcp';  
  16.  
  17.   $cfg['Servers'][$i]['compress']='false';  
  18.  
  19.   $cfg['Servers'][$i]['extension']='mysql';  
  20.  

  保存退出!

  在ubuntu上找到一些資料,一共參考:

  配置文件路徑:

  1>apache 的配置文件路徑 /etc/apache2/apache2.conf

  2>apache 網(wǎng)站字符編碼配置路徑 /etc/apache2/conf.d/charset

  3>php.ini 路徑 /etc/php5/apache2/php.ini

  4>mysql配置文件 路徑 /etc/mysql/my.cnf 一般不要使用,尤其是新手

  5>phpmyadmin配置文件路徑 /etc/phpmyadmin/apache.conf

  6>默認(rèn)網(wǎng)站根目錄 /var/www

  常用命令

  1.重啟apache:

 

  1.   sudo /etc/init.d/apache2 restart  
  2.  
  3.   sudo /etc/init.d/apache2 restart  
  4.  

  2.重啟mysql:

  1.   sudo /etc/init.d/mysql restart  
  2.  
  3.   sudo /etc/init.d/mysql restart  
  4.  

  配置apache

  1.更改默認(rèn)字符集

  終端中使用命令

  1.   sudo nano /etc/apache2/conf.d/charset  
  2.  
  3.   sudo nano /etc/apache2/conf.d/charset  
  4.  

  將其中的:

  1.   # AddDefaultCharset  
  2.  
  3.   # AddDefaultCharset  
  4.  

  的井號去掉,后面字段改成UTF-8(如果您的網(wǎng)站是這樣了話)

  1.   AddDefaultCharset UTF-8  
  2.  
  3.   AddDefaultCharset UTF-8  
  4.  

  中間的空格數(shù)并不重要,但一定要有。

  2.添加支持文件類型(一般不需要),與網(wǎng)站地址(需要)

  終端中使用命令:

  1.   sudo nano /etc/apache2/apache2.conf  
  2.  
  3.   sudo nano /etc/apache2/apache2.conf  
  4.  

  在配置文件最后面加入下面幾行: 添加文件類型支持

  1.   AddType application/x-httpd-php .php .htm .html  
  2.  
  3.   AddType application/x-httpd-php .php .htm .html  
  4.  

  添加首頁文件 三個(gè)的順序可以換 前面的訪問優(yōu)先 (當(dāng)然你也可以加別的 比如default.php)

  

  1.   DirectoryIndex index.htm index.html index.php  
  2.  

  ubuntu下LAMP+phpadmin的配置就是這樣了。

【編輯推薦】

  1. lamp安裝教程之編譯、安裝Mysql
  2. lamp安裝教程之編譯、安裝Apache
  3. lamp安裝教程之編譯、安裝PHP

  

責(zé)任編輯:zhaolei 來源: javaeye
相關(guān)推薦

2011-03-14 11:29:43

2011-03-09 15:13:00

UbuntuLAMP配置

2011-03-11 10:27:45

UbuntuLAMP配置

2011-03-11 10:09:59

UbuntuLAMP路徑

2011-03-09 15:44:14

UbuntuLAMP

2011-03-10 10:09:09

UbuntuLAMP搭建

2011-03-14 13:07:23

Ubuntu安裝LAMP

2011-03-11 12:57:36

UBUNTU10.10安裝LAMP

2011-03-10 08:59:04

Ubuntu安裝LAMP

2011-03-21 16:21:21

ubuntulamp

2011-03-11 16:42:38

Ubuntu安裝LAMP

2011-03-22 12:53:35

UbuntuLAMPApache

2011-03-09 09:25:53

RedHatLinuxLAMP

2011-03-08 10:35:23

2011-03-21 16:37:57

2011-03-14 10:30:15

Ubuntu10.04LAMP

2011-03-11 10:39:05

LAMP錯(cuò)誤提示

2011-03-22 10:25:54

UbuntuLAMP

2011-03-11 10:39:09

CentOS 5.5安裝LAMP

2011-09-09 17:23:53

CentOSLAMPmysql
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號