RHEL5.4下最新源码搭建Apache+Mysql+Php+Discuz+PhpMyAdmin+A

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

RHEL5.4下最新源码搭建Apache+Mysql+Php+Discuz+PhpMyAdmin+Awstats+AB压力测试2010/05/14第二版BycrazylinuxEmail:crazy_linux@163.com相比第一版本,改变了实验中的某些步骤顺序,使整个实验更具真实性。并且有些服务版本已经更新。如有什么疑问,请发Email与作者联系。实验目的:完成Linux下面的LAMP环境的搭建,实现Discuz论坛,实现awstats分析Web日志,以及AB实现HTTP性能测试,最后通过phpMyAdmin管理MySQL数据库实验软件包:(都存放到Web服务器的/home下)软件下载地址:Apache::::::::=1274057671_c83ff38693dae0e762fa9f82428c5f6d&TicketId=B%2Fw6lxyASF5LSBFDOldakATj&GroupName=CDS&FilePath=/ESD6/JSCDL/jdk/6u20-b02/jdk-6u20-linux-i586.bin&File=jdk-6u20-linux-i586.binlibmcrypt、mhash、mcrypt:实验环境:RHEL5.4Webserver:192.168.0.10/24Dnsserver:192.168.0.20/24:192.168.0.100/24前提条件:在所有linux主机上配置yum仓库,把DVD光盘挂在到本地/media下,红色字体代表修改后结果[root@localhost~]#cat/etc/yum.repos.d/rhel-debuginfo.repo[rhel-debuginfo]name=RedHatEnterpriseLinux$releasever-$basearch-Debugbaseurl=file:///media/Server//指定本地/mediaenabled=1//开启仓库gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release关闭所有linux防火墙与SELINUX[root@localhostbin]#iptables-F[root@localhostbin]#iptables-X[root@localhostbin]#iptables-Z[root@localhostbin]#setenforce0[root@localhostbin]#serviceiptablessave一、DNS环境的搭建1、安装DNS相关软件包[root@localhost~]#yum-yinstallbindbind-develbind-chrootcaching-nameserver2、配置DNS主配置文件[root@localhost~]#cd/var/named/chroot/etc/[root@localhostetc]#cp-pnamed.caching-nameserver.confnamed.conf[root@localhostetc]#catnamed.conf////named.caching-nameserver.conf////ProvidedbyRedHatcaching-nameserverpackagetoconfigurethe//ISCBINDnamed(8)DNSserverasacachingonlynameserver//(asalocalhostDNSresolveronly).////See/usr/share/doc/bind*/sample/forexamplenamedconfigurationfiles.////DONOTEDITTHISFILE-usesystem-config-bindoraneditor//tocreatenamed.conf-editstothisfilewillbeloston//caching-nameserverpackageupgrade.//options{listen-onport53{any;};listen-on-v6port53{::1;};directory/var/named;dump-file/var/named/data/cache_dump.db;statistics-file/var/named/data/named_stats.txt;memstatistics-file/var/named/data/named_mem_stats.txt;//Thoseoptionsshouldbeusedcarefullybecausetheydisableport//randomization//query-sourceport53;//query-source-v6port53;allow-query{any;};allow-query-cache{any;};};logging{channeldefault_debug{filedata/named.run;severitydynamic;};};viewlocalhost_resolver{match-clients{any;};match-destinations{any;};recursionyes;include/etc/named.rfc1912.zones;};[root@localhostetc]#vimnamed.rfc1912.zones在文件最后添加zonecrazylinux.comIN{typemaster;filecl.zheng;};zonegoogle.comIN{typemaster;fileg.zheng;};zone0.168.192.in-addr.arpaIN{typemaster;filecl.fan;};3、配置区域文件[root@localhostetc]#cd/var/named/chroot/var/named/[root@localhostnamed]#cp-pnamed.zerocl.zheng[root@localhostnamed]#cp-pnamed.zerog.zheng[root@localhostnamed]#cp-pnamed.zerocl.fan[root@localhostnamed]#catcl.zheng$TTL86400@INSOAlocalhost.root.localhost.(42;serial(d.adams)3H;refresh15M;retry1W;expiry1D);minimumINNSdns.crazylinux.com.dnsINA192.168.0.20[root@localhostnamed]#catg.zheng$TTL86400@INSOAlocalhost.root.localhost.(42;serial(d.adams)3H;refresh15M;retry1W;expiry1D);minimumINNSdns.google.com.dnsINA192.168.0.20[root@localhostnamed]#catcl.fan$TTL86400@INSOAlocalhost.root.localhost.(42;serial(d.adams)3H;refresh15M;retry1W;expiry1D);minimumINNSdns.crazylinux.com.20INPTRdns.crazylinux.com.20INPTRdns.google.com.10INPTR[root@localhostnamed]#cat/etc/resolv.confnameserver192.168.0.20[root@localhostnamed]#servicenamedrestart[root@localhostnamed]#chkconfignamedon4、测试DNS(在clinet中把DNS指向192.168.0.20)[root@localhostnamed]#host[root@localhostnamed]#host二、LAMP环境的搭建1、安装APACHE(配置源码包之前先安装GCC环境)[root@localhost~]#yum-yinstall*gcc*[root@localhost~]#rpm-ehttpd–nodeps//卸载系统自带的httpd这个包[root@localhost~]#cd/home/[root@localhosthome]#tar-zxvfhttpd-2.2.15.tar.gz-C/usr/local/src/[root@localhosthome]#cd/usr/local/src/httpd-2.2.15/[root@localhosthttpd-2.2.15]#./configure--prefix=/usr/local/apache2--enable-so--enable-rewrite[root@localhosthttpd-2.2.15]#make&&makeinstall做个小技巧,实现开机自动启动APACHE[root@localhosthttpd-2.2.15]#cd/usr/local/apache2/bin/[root@localhostbin]#vimapachectl#!/bin/sh#chkconfig:358515#description:ApacheisaWorldWideWebServer[root@localhostbin]#cpapachectl/etc/init.d/apache[root@localhostbin]#chkconfig--addapache[root

1 / 19
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功