国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > Linux > 正文

linux 下配置LAMP環境

2024-08-28 00:00:25
字體:
來源:轉載
供稿:網友
本文給大家介紹的是如何在linux 下配置LAMP環境,學習PHP腳本編程語言之前,必須先搭建并熟悉開發環境,開發環境有很多種,例如LAMP、WAMP、MAMP等。這里我介紹一下LAMP環境的搭建,即Linux、Apache、MySQL、PHP環境。

1.準備

根據系統的不同,可能準備的文件也不同,我用的是Ubuntu Linux ,我已將以下五個文件打包,點擊下方鏈接下載吧

httpd-2.2.9.tar.gz

mysql-5.1.52.tar.gz

php-5.3.5.tar.gz

libxml2-2.7.7.tar.gz

ncurses-5.6.tar.gz

百度網盤下載:Linux lamp環境安裝包

2.安裝mysql

復制代碼 代碼如下:
在安裝之前需要添加mysql組和用戶
//添加用戶組用戶,先取得root權限
trigkit4@ubuntu:~$ su root
Password:
root@ubuntu:/home/trigkit4# groupadd mysql
root@ubuntu:/home/trigkit4# useradd -g mysql mysql
//解壓壓縮包,首先進入下載文件所在目錄
$ cd /home/trigkit4/Downloads tar -zxvf mysql-5.1.52.tar.gz
//進入解壓出來的文件夾
root@ubuntu:/home/trigkit4/Downloads# cd mysql-5.1.52
//進入目錄解壓ncurses-5.6.tar.gz
cd /home/trigkit4/Downloads tar -zxvf ncurses-5.6.tar.gz
//再進入ncurse-5.6文件夾
root@ubuntu:/home/trigkit4/Downloads/mysql-5.1.52# cd /home/trigkit4/Downloads/ncurses-5.6
//配置安裝目錄等信息
./configure  --prefix=/usr/local/ncurses  --with-shared  --without-debug  --enable-widec
//編譯,有點耗時
root@ubuntu:/home/trigkit4/Downloads/ncurses-5.6# make
//安裝
root@ubuntu:/home/trigkit4/Downloads/ncurses-5.6# sudo make install

3.安裝Apache

復制代碼 代碼如下:
//首先進入httpd-2.2.9.tar.gz所在目錄
cd /home/trigkit4/Downloads/
//解壓縮Apache文件包
$ tar -zxvf httpd-2.2.17.tar.gz 
//進入解壓后的文件目錄
root@ubuntu:/home/trigkit4# cd /home/trigkit4/Downloads/httpd-2.2.9
//配置安裝目錄
root@ubuntu:/home/trigkit4/Downloads/httpd-2.2.9# ./configure -prefix=/home/trigkit4/Downloads/apache -enable-so
//編譯
root@ubuntu:/home/trigkit4/Downloads/httpd-2.2.9# make
//安裝
root@ubuntu:/home/trigkit4/Downloads/httpd-2.2.9# sudo make install

4.安裝libxml2

復制代碼 代碼如下:
//進入libxml2文件所在目錄
root@ubuntu:/home/trigkit4# cd /home/trigkit4/Downloads
//解壓libxml軟件包
tar -zxvf libxml2-2.7.7.tar.gz
//進入解壓后的文件目錄
root@ubuntu:/home/trigkit4/Downloads# cd libxml2-2.7.7
//配置
$ ./configure
//編譯
$ make
//安裝
$ sudo make install

5.安裝php

復制代碼 代碼如下:
//進入php文件所在目錄然后解壓縮
$ tar -zxvf php-5.3.5.tar.gz
//進入解壓后的文件目錄
root@ubuntu:/home/trigkit4/Downloads# cd /home/trigkit4/Downloads/php-5.3.5
//進入libxml2文件目錄并安裝libxml2
./configure --prefix=/usr/local/libxml2/
//配置目錄
./configure --with-apxs2=/opt/www/bin/apxs

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 金平| 德州市| 若尔盖县| 太保市| 广南县| 红桥区| 丹阳市| 冷水江市| 台州市| 平舆县| 乌苏市| 潼关县| 新龙县| 高雄市| 方正县| 弋阳县| 亳州市| 吴江市| 阿巴嘎旗| 大宁县| 曲周县| 崇文区| 海南省| 大渡口区| 宁波市| 和政县| 卢龙县| 青浦区| 光泽县| 泾川县| 彩票| 乌海市| 永康市| 巴彦县| 克山县| 沙雅县| 楚雄市| 绥中县| 那坡县| 巴林左旗| 扶风县|