首页 > 代码库 > Cent OS 6.5 LAMP(Apache+php+mysql+Xcache) 编译安装
Cent OS 6.5 LAMP(Apache+php+mysql+Xcache) 编译安装
详细编译安装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
一、安装前准备
修改主机名
[root@linux ~]#sed -i ‘s/HOSTNAME=localhost.localdomain/HOSTNAME=linux.lamp.com/g‘ /etc/sysconfig/network [root@linux ~]#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
[root@linux ~]#sed -i ‘s@SELINUX=enforcing@SELINUX=disabled@g‘ /etc/sysconfig/selinux
设置防火墙,允许httpd:80和mysqld:3306端口访问
[root@linux ~]#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包
[root@linux ~]#wget
2.安装DAG的PGP Key
[root@linux ~]#rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
3.验证rpmforge的rpm文件包
[root@linux ~]#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文件包
[root@linux ~]#rpm -i rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
5.编辑自己服务器的YUM仓库
[root@linux ~]#vim /etc/yum.repos.d/rpmforge.repo [rpmforge] name=CentOS-6.5_X86-64_rpmforge baseurl=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-rpmforge mirrotextras=http://apt.sw.be/redhat/el6/en/mirrors-rpmforge-extras enbaled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag gpgcheck=1 [root@linux ~]#yum repolist Loaded plugins: fastestmirror, priorities, refresh-packagekit, security Loading mirror speeds from cached hostfile * rpmforge: ftp.riken.jp base | 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 protections repo id repo name status base CentOS-6.5_X86-64_sohu 6,352+15 rpmforge CentOS-6.5_X86-64_rpmforge 4,718 repolist: 11,070
本文出自 “linux” 博客,转载请与作者联系!
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。