linux下手動設定lamp環境

來源:互聯網
上載者:User

標籤:des   style   http   color   strong   檔案   

  前提:這是SercureCRT遠程虛擬機器中的ubuntu server完成的實驗。
  首先我們要知道lamp這個單詞的構成:linux,apache,mysql,php。這篇文章就是要說明如何在linux下面完成apache,mysql,php的安裝,並且讓他們協同工作。
  第一步:安裝apache
  採用ubuntu內建的軟體安裝方式:apt-get install apache2

  
  安裝完之後,/var/www/ 就是它的工作目錄,/etc/apache2 就是它的安裝路徑。
  進行測試 http://ip地址
  

  注意ubuntu12.04的顯示是這樣的
  
  
  第二步:安裝mysql

  同樣是實用ubuntu內建的軟體安裝方式 apt-get install mysql-server mysql-client 進行安裝。
  注意在安裝的過程中你需要設定mysql中root使用者的密碼。
  第三步:安裝php

  同樣是實用ubuntu內建的軟體安裝方式 apt-get install php5 進行安裝。

  同時安裝php的mysql支援模組。

  apt-get install php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap
  php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp
  php5-sqlite php5-tidy php5-xmlrpc php5-xsl

  
  到這裡為止,lamp環境就搭建好了,你只需要將專案檔放置到/var/www/html中,然後/etc/init.d/apache2 start 開啟服務,然後就可以訪問你的應用了。

  
  

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.