本站用于记录日常工作内容,虚拟化云计算,系统运维,数据库DBA,网络与安全。
Centos Piranha安装过程 随着计算机跟网络的发展,人们对网络的流量及计算机的处理能力,要求越来越高,在现今,单靠一台计算机处理,是达不到要求的。所以就出现集群、负载均衡等应用。 说到负载均衡,大家都知道LVS,值得我们高兴的是,这个软件是中国linux程序员章文嵩博士发起和领导的,其实现目标是创建一个具有良好的扩展性、高可靠性、高性能和高可用性的体系。在lvs的基础上,也出现了很多商业性的软件,比如RedHat的Piranha、Turbo Linux公司的Turbo Cluster等,都是基于LVS的核心代码的。下面我介绍的就是RedHat的Piranha,其实centos跟redhat是一样的,不明白的可以到网上找一下说明,不在这里罗嗦。随便说一下,lvs可以多达几千个点,目前,在实际应用中,好象有公司做到了2千多个点。首先介绍我的环境: 先安装好apache应用程序 一、    需要的软件包 操作系统:RedHat AS51、ipvsadm-1.24-8.1.i386.rpm2、modcluster-0.8-27.el5.i386.rpm3、piranha-0.8.4-7.el5.i386.rpm4、system-config-cluster-1.0.39-1.0.noarch.rp...
Piranha - Load-balanced generic service clustering enviroment DescriptionPiranha is not one singular tool but a collection of programs arranged to provide a more cohesive enviroment for those administrators that wish to setup clustering services in the linux enviroment.RequirementsBase requirements:The recommended base kernel you should be using is linux-2.2.14 which has had the ipvs patch applied (0.9.10) You should compile, install and reboot your designated clustering computers on this patched kernel. The ipvs patch also contains the source code to build ipvsadm. ipvsadm is the workhorse of the Note, the kernel patch MUST be applied before you attempt to compile the utility as the patch carries some extra defines for some header files. If in doubt follow the README file included in the ipvs patch kit.By following the above instructions you should have the basics required for using virtual IP services under linux. At time of writing, the RH6.2 release of the kernel is built wi...
利用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]
    总共47页,当前第38页 | 页数:
  1. 28
  2. 29
  3. 30
  4. 31
  5. 32
  6. 33
  7. 34
  8. 35
  9. 36
  10. 37
  11. 38
  12. 39
  13. 40
  14. 41
  15. 42
  16. 43
  17. 44
  18. 45
  19. 46
  20. 47