本站用于记录日常工作内容,虚拟化云计算,系统运维,数据库DBA,网络与安全。
利用LVS+Keepalived 实现高性能高可用负载均衡服务器 背景:        随着你的网站业务量的增长你网站的服务器压力越来越大?需要负载均衡方案!商业的硬件如F5又太贵,你们又是创业型互联公司如何有效节约成本,节省不必要的浪费?同时实现商业硬件一样的高性能高可用的功能?有什么好的负载均衡可伸张可扩展的方案吗?答案是肯定的!有!我们利用LVS+Keepalived基于完整开源软件的架构可以为你提供一个负载均衡及高可用的服务器。LVS+Keepalived 介绍LVSLVS是Linux Virtual Server的简写,意即Linux虚拟服务器,是一个虚拟的服务器集群系统。本项目在1998年5月由章文嵩博士成立,是中国国内最早出现的自由软件项目之一。目前有三种IP负载均衡技术(VS/NAT、VS/TUN和VS/DR);十种调度算法(rrr|wrr|lc|wlc|lblc|lblcr|dh|sh|sed|nq)。Keepalvied               Keepalived在这里主要用作RealServer的健康状态检查以及LoadBalance主机和BackUP主机之间failover的实现二. 网站负载均衡拓朴图IP信息列表:名称        IPLVS-DR-Master     &nb...
利用红帽Piranha方案实现WEB负载均衡 实验平台 :    CentOS release5.2 (Final)实验目标 : 快速撑握和理解Piranha方案,并利用15分钟构建WEB高可用负载均衡解决方案.结构:LVS-ACTIVE:192.168.1.210LVS-BACKUP: 192.168.1.211LVS-VIP: 192.168.1.212Realsever: 192.168.1.204,192.168.1.205一.Piranha方案基本简绍.1.Piranha方案优点:1.1.1配置简洁高效:配置简便一个lvs.conf配置文件即可搞定(类keepalived方案.)1.1.2WEB 配置界面.WEB配置对于那些不懂LVS配置的人员来说非常吸引力,你几乎只要花15分钟就可以配置好一个完美的负载均衡及高可用性方案.1.1.3 完整的功能:主备LVS (Load Balancer)的Heartbeat和HA (pulse,send_arp)LoadBalancer和Real Server间进程服务的Heartbeat (nanny)IPVS功能 (lvsd)IPVS的管理 (ipvsadm)2.Piranha 方案原理结构描述:Piranha方案是基于LVS基础上设计的一套负载均衡高可用解决方案.LVS运行在一对有相似配置的计算机上:一个作为活动LVS Router(Active LVS Router),一个作为备份LVS Router(Backup LVS Router)。 活动LVS Router服务有两个角色:* 均衡负载到真实服务器上。* 检查真实服务器提供的服务是否正常。备份LVS Router用来...
CentOS 5.5环境下安装配置Varnish    #!/bin/bash# BY kerryhu# MAIL:king_819@163.com# BLOG:http://kerry.blog.51cto.com# Please manual operation yum of before Operation.....#============================ 更新系统时间 ============================yum install -y ntpntpdate time.nist.govecho "00 01 * * * ntpdate time.nist.gov" >> /etc/crontab#============================ Varnish安装 =============================如果是RedHat/CentOS系统,在安装varnish的时候首先要安装以下软件包automakeautoconflibtoolncurses-devellibxsltgroffpcre-develpkgconfiggroupadd wwwuseradd www -g www -s /sbin/nologinmkdir -p /data/varnish/{cache,logs}chmod +w /data/varnish/{cache,logs}chown -R www:www /data/varnish/{cache,logs}cd /optyum install -y automake autoconf libtool ncurses-devel libxslt groff pcre-devel pkgconfigwgethttp://sourceforge.net/projects/varnish/files/varnish/2.1.3/varnish-2.1.3.tar.gz/downloadtar -zxvf varnish-2.1.3.tar.gzcd varnish-2.1.3./configure --prefix=/usr/local/varn...
Nginx服务器搭建 -nginx基于域名的虚拟主机,nginx虚拟主机 nginx基于域名的虚拟主机是最常见的一种虚拟主机。只需配置你的DNS服务器,将每个主机名映射到正确的IP地址,然后配置nginx服务器,令其识别不同的主机名就可以了。这种虚拟主机技术,使很多虚拟主机可以共享一个IP地址,有效解决了IP地址不足的问题。详细的配置方法如下:http { #第一个虚拟主机 server { #监听的端口 listen 80; #主机名称 server_name szcdn.cn; #默认首页文件,匹配顺序从左到右 index index.html index.htm; #web访问日志文件路径 access_log /var/log/nginx/szcdn.access_log combined; #网页文件存放的目录 root /www/webroot/szcdn.cn; } #第二个虚拟主机 server { #监听的端口 listen 80; #主机名称 server_name oplinux.com; #默认首页文件,匹配顺序从左到右 index index.html ...
apache限制下载类型和实现对连接带宽的限制 apache限制下载除jpg,gif,tar.gz的外全部文件禁止下载!Order Allow,DenyAllow from all下载模块:ftp://ftp.cohprog.com/pub/apache/module/1.3.0/mod_bandwidth.c官方网址:http://www.cohprog.com/mod_bandwidth.html安装方法1、APACI 安装cp mod_bandwidth.c /path/to/apache/source./configure –add-module=mod_bandwidth.c –permute-module=BEGIN:bandwidth2、DSO方式安装apxs -c /mod_bandwidth.c -o /path/to/apache/libexec/mod_bandwidth.so在httpd.conf加入LoadModule bandwidth_module libexec/mod_bandwidth.soAddModule mod_bandwidth.c建立mod_bandwidth工作目录mkdir -p /tmp/apachebw/linkmkdir -p /tmp/apachebw/masterchown -R nobody:nobody /tmp/apachebwchmod -R 755 /tmp/apachebw配置:BandWidthModule OnBandWidthPulse 1000000 单位毫秒BandWidth all 2048 单位bytes/sec #该目录下所有文件都按照2048bytes/sec速率传输LargeFileLimit 100 1024 #大于100k的文件传输速率按1024bytes/secMaxConnection 1000 #最大同时连接数量apache下实现对连接带宽的限制
 
0
Nginx+php安装配置安装php./configure –prefix=/usr/local/php –with-mysql=/usr/local/mysql \                                –enable-cgi –enable-fpm –with-zlib –disable-debug \                                –enable-inline-optimization –with-gd –enable-gd-native-ttf \                                –with-freetype-dir=/usr/local –enable-mbstring –with-openssl \                           &n...
simple-log 1.6 官网下载博客程序升级后。上传与图片功能不能正常使用。上传图片 报错如下:dmin.php?act=upload&type=img 上传接口发生错误!返回的错误内容为: Parse error:  syntax error, unexpected T_IF in /www/web/92cto_com/public_html/admin/includes/upload.php on line 1解决方式:使用 notepad++ 打开文件,然后转换成 windows 格式就可以正常使用了。如下图:
apache 日志报以下错误提示:NoCase option for non-regex pattern '-f' is not supported and will be ignored[Sat Jul 11 23:06:22 2009] [warn] RewriteCond: NoCase option for non-regex pattern '-f' is not supported and will be ignored.[Sat Jul 11 23:06:22 2009] [warn] RewriteCond: NoCase option for non-regex pattern '-f' is not supported and will be ignored.[Sat Jul 11 23:06:23 2009] [warn] RewriteCond: NoCase option for non-regex pattern '-f' is not supported and will be ignored.[Sat Jul 11 23:06:23 2009] [warn] RewriteCond: NoCase option for non-regex pattern '-f' is not supported and will be ignored.[Sat Jul 11 23:06:24 2009] [warn] RewriteCond: NoCase option for non-regex pattern '-f' is not supported and will be ignored.是不是静态化哪里有什么问题呢?网站一直运行正常,就是常出现这些错误日志试试在根目录下的 .htaccess 文件中,将RewriteCond %{REQUEST_FILENAME} !-f [NC] 改为RewriteCond %{REQUEST_FILENAME} !-f [OR]
突然想玩MUD 了,记的以前在XP中架设时总有这样或那样的情况发生,这次我决定要把西游记2000架到Linux中!先作功课,上网查了很多的说明和帮助,看到别人说起来很简单,按图索骥,最终是搞定它,觉的应该记录一下,如果有朋友也想玩的话,不用走太多的弯路!(我是走的很远很远了 :p)前提 :有一台装好XP系统能上网的电脑 最好指定IP或着知道当前DHCP给分配的IP地址(假设为192.168.1.88))第一步下载所需要的文件linux的安装镜像,我选择的是Debian-4.0 第一张安装光盘down2点chinaunix点net/feaa3ce2b14b6e6343d4d9c690b93723/data1/disc3/debian/debian-40r0-i386-CD-1.isoWorkstation7.01虚拟机gsts点onlinedown点net/down/VMware+Workstation+V7.0.1hhjjb.zip bison编译工具www点gszjedu点com/uploads/soft/110615/bison-2.5.tar.gz 小熊泥苑的网站上 泥巴下载页的xyj2000.rar和MudOS-v22pre11 for linuxxyj2000.rar的网页地址www点dtxyj点com/SoftView.asp?typeid=1&ID=87MudOS-v22pre11 for linux的网页地址 www点dtxyj点com/SoftView.asp?typeid=1&ID=250 ftp工具最小ftp软件.exe 在新浪爱问共享中有免费下载的第二步。OK 现在开始,Step by step 呵呵,就...
RedHatEnterpriseLinux下apache2.2.6+tomcat6+jdk6安装 RedHatEnterpriseLinux下apache+tomcat 安装配置 说明: apache的安装配置见上一篇文章● 装jdkjdk-6u3-linux-i586.bin#chmod u+x jdk-6u3-linux-i586.bin #./jdk-6u3-linux-i586.binln -s /usr/local/jdk1.6.0_03 /usr/local/jdk ln -s /usr/local/jdk1.6.0_03 /jre /usr/local/jre#vi /etc/profile加入以下几行export JAVA_HOME=/usr/local/jdkexport CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jarexport PATH=$PATH:$JAVA_HOME/binexport CATALINA_HOME=/usr/local/tomcat保存退出。#source /etc/profile 很重要 刷新环境变量java –version 查看jdk是否安装成功 ●apache-tomcat-6.0.14.tar.gz安装配置#tar zxvf apache-tomcat-6.0.14.tar.gz#cp –r apache-tomcat-6.0.14 /usr/local/tomcat#/usr/local/tomcat/bin/startup.sh设置系统环境变量:# vi /usr/local/tomcat/bin/startup.sh 和 vi /usr/local/tomcat/bin/shutdown.sh在“#――――――――――――――――――“下分别加export JAVA_HOME=/usr/local/jdkexport PATH=$PATH:$JAVA_HOME/binexport CLASSPATH=$JAVA_HOME/li...
    总共48页,当前第39页 | 页数:
  1. 29
  2. 30
  3. 31
  4. 32
  5. 33
  6. 34
  7. 35
  8. 36
  9. 37
  10. 38
  11. 39
  12. 40
  13. 41
  14. 42
  15. 43
  16. 44
  17. 45
  18. 46
  19. 47
  20. 48