新聞中心

        EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計應(yīng)用 > LAMP 架構(gòu)的編譯安裝及錯誤完全分析

        LAMP 架構(gòu)的編譯安裝及錯誤完全分析

        作者: 時間:2016-09-12 來源:網(wǎng)絡(luò) 收藏

        本次試驗用的是新安裝的系統(tǒng),以此保證純凈,站在第一次編譯安裝lamp的角度,分析各種錯誤,從錯誤開始入手。

        本文引用地址:http://www.104case.com/article/201609/305269.htm

        至于lamp是干什么用的,我就不贅述了,直接開始。

        本文中的軟件我都已經(jīng)下好了,并且打包好了,如果有需要的朋友,可以自己下載我的軟件包

        首先交代一下系統(tǒng)的版本

        [root@localhost libevent-2.0.18-stable]# lsb_release -a

        LSB Version: :core-4.0-ia32:core-4.0-noarch:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-ia32:printing-4.0-noarch

        Distributor ID: RedHatEnterpriseServer

        Description: Red Hat Enterprise Linux Server release 6.0 (Santiago)

        Release: 6.0

        Codename: Santiago

        一、apache的編譯安裝

        為了方便管理,編譯安裝時最好養(yǎng)成集中管理的習(xí)慣,在這我先定義一個文件夾/usr/src/lamp

        [root@localhost ~]# mkdir /usr/local/lamp

        apache的編譯安裝很簡單,但是我們需要安裝一些包便于apache功能的擴(kuò)展

        1、apr-1.4.6.tar.gz 的安裝

        [root@localhost lamp]# tar xf apr-1.4.6.tar.gz -C /usr/src/lamp/

        [root@localhost apr-1.4.6]# pwd

        /usr/src/lamp/apr-1.4.6

        [root@localhost apr-1.4.6]# ./configure --enable-threads --disable-ipv6 --with-devrandowm=/dev/random make make install

        2、libiconv-1.13.tar.gz的安裝

        [root@localhost libiconv-1.13]# ./configure --enable-static make make install

        3、apr-iconv-1.2.1.tar.gz的安裝

        [root@localhost lamp]# tar xf apr-iconv-1.2.1.tar.gz -C /usr/src/lamp/

        [root@localhost apr-iconv-1.2.1]# ./configure --with-apr=/usr/local/apr/bin/apr-1-config

        [root@localhost lamp]# make make install

        [root@localhost apr-iconv-1.2.1]# ln -s /usr/src/lamp/apr-iconv-1.2.1/lib/libapriconv-1.la /usr/src/lamp/apr-iconv-12.1/lib/libapriconv.la

        4、安裝openssl nss-devel

        [root@localhost lamp]# yum install openssl* nss-devel -y

        5、安裝apr-util-1.4.1.tar.gz

        [root@localhost lamp]# tar xf apr-util-1.4.1.tar.gz -C /us

        r/src/lamp/

        [root@localhost apr-util-1.4.1]# ./configure --with-apr=/usr/local/apr/bin/apr-1-config --with-apr-iconv=./apr-iconv --with-openssl=/usr --with-nss=/usr --with-mysql=/usr/local/mysql --with-iconv=/usr/local make make install

        6、安裝兩個rpm包

        libzip-0.9-3.1.el6.i686.rpm

        libzip-devel-0.9-3.1.el6.i686.rpm

        [root@localhost lamp]# rpm -ivh libzip-0.9-3.1.el6.i686.rpm

        warning: libzip-0.9-3.1.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEY

        Preparing... ########################################### [100%]

        1:libzip ########################################### [100%]

        [root@localhost lamp]# rpm -ivh libzip-devel-0.9-3.1.el6.i686.rpm

        warning: libzip-devel-0.9-3.1.el6.i686.rpm: Header V4 DSA/SHA1 Signature, key ID 192a7d7d: NOKEY

        Preparing... ########################################### [100%]

        1:libzip-devel ########################################### [100%]

        7、安裝pcre-7.9.tar.gz

        [root@localhost lamp]# tar xf pcre-7.9.tar.gz -C /usr/src/lamp/

        [root@localhost pcre-7.9]# ./configure --enable-utf8 --enable-rebuild-chartables --enable-newline-is-any --enable-pcregrep-libz --enable-pcregrep-libbz2

        make make install

        8、安裝

        [root@localhost lamp]# tar xf

        [root@localhost ]# pwd

        /usr/src/lamp/

        [root@localhost ]# ./configure --enable-modules=all --enable-mods-shared=all --enable-cache --enable-disk-cache --enable-dumpio --enable-echo --enable-example --enable-logio --enable-mime-magic --enable-expires --enable-headers --enable-unique-id --enable-proxy --enable-proxy-balancer --enable-proxy-http --enable-proxy-ajp --enable-proxy-connect --enable-ssl --enable-static-ab --enable-http --enable-info --enable-cgi --enable-vhost-alias --enable-so --enable-rewrite --with-apr=/usr/local/apr/bin/apr-1-config --with-apr-util=/usr/local/apr/bin/apu-1-config --with-pcre=/usr/local --with-ssl=/usr --with-mpm=prefork

        make make install

        9、apache的配置文件修改

        [root@localhost conf]# pwd

        /usr/local/apache2/conf

        [root@localhost conf]# ls

        extra ;magic mime.types original

        [root@localhost conf]# vi

        去掉下面幾個Include前面的#號

        [root@localhost extra]# pwd

        /usr/local/apache2/conf/extra


        上一頁 1 2 下一頁

        關(guān)鍵詞:

        評論


        相關(guān)推薦

        技術(shù)專區(qū)

        關(guān)閉
        主站蜘蛛池模板: 长岭县| 监利县| 嵊泗县| 鄯善县| 商洛市| 昭觉县| 朔州市| 武鸣县| 阿图什市| 河间市| 四会市| 平谷区| 靖宇县| 江口县| 维西| 临西县| 安阳县| 蒙城县| 宁远县| 常宁市| 色达县| 洪雅县| 利川市| 江山市| 大洼县| 离岛区| 米泉市| 玉林市| 宁安市| 定州市| 衡东县| 曲周县| 常德市| 定安县| 集安市| 宜州市| 达尔| 柳林县| 浮梁县| 桂阳县| 五华县|