標籤: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” 部落格,轉載請與作者聯絡!