Cent OS 6.5 LAMP(Apache+php+mysql+Xcache) 編譯安裝

來源:互聯網
上載者:User

標籤:localhost   linux   軟體版本   mysql   主機   

詳細編譯安裝LAMP環境

安裝OS及軟體版本

    OS:Cent OS 6.5

    apache:httpd-2.4.10.tar.gz

    php:php-5.4.31.tar.bz2

    mysql:mysql-5.6.19.tar.gz

    Xcache:xcache-3.1.0.tar.gz

一、安裝前準備

修改主機名稱 

   [[email protected] ~]#sed -i ‘s/HOSTNAME=localhost.localdomain/HOSTNAME=linux.lamp.com/g‘ /etc/sysconfig/network    [[email protected] ~]#vim /etc/hosts    127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4   ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6   10.0.20.203 linux linux.topgloira.com.cn

關閉selinux

 

   [[email protected] ~]#sed -i ‘[email protected][email protected][email protected]‘ /etc/sysconfig/selinux

設定防火牆,允許httpd:80和mysqld:3306連接埠訪問 

   [[email protected] ~]#vim /etc/sysconfig/iptables   -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT       -A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT

二、安裝Apache

首先建立一個YUM倉庫

  1.下載64位rpmforge的rpm包     

[[email protected] ~]#wget

  2.安裝DAG的PGP Key

[[email protected] ~]#rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt

  3.驗證rpmforge的rpm檔案包

[[email protected] ~]#rpm -K rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm  rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm: (sha1) dsa sha1 md5 gpg OK

  4.安裝rpmforge的rpm檔案包

[[email protected] ~]#rpm -i rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm

  5.編輯自己伺服器的YUM倉庫

[[email protected] ~]#vim /etc/yum.repos.d/rpmforge.repo[rpmforge]name=CentOS-6.5_X86-64_rpmforgebaseurl=http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/baseurlextra=http://apt.sw.be/redhat/el6/en/x86_64/extras/mirrorlist=http://apt.sw.be/redhat/el6/en/mirrors-rpmforgemirrotextras=http://apt.sw.be/redhat/el6/en/mirrors-rpmforge-extrasenbaled=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-daggpgcheck=1[[email protected] ~]#yum repolistLoaded plugins: fastestmirror, priorities, refresh-packagekit, securityLoading mirror speeds from cached hostfile * rpmforge: ftp.riken.jpbase                                                     | 3.7 kB     00:00     rpmforge                                                 | 1.9 kB     00:00     rpmforge/primary_db                                      | 2.7 MB     00:02     15 packages excluded due to repository priority protectionsrepo id                    repo name                                    statusbase                       CentOS-6.5_X86-64_sohu                       6,352+15rpmforge                   CentOS-6.5_X86-64_rpmforge                      4,718repolist: 11,070

本文出自 “linux” 部落格,轉載請與作者聯絡!

相關文章

聯繫我們

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