记录关于Devops运维,虚拟化容器云计算,数据库,网络安全等各方面问题。
CentOS 6.3部署LVS(NAT)+keepalived实现高性能高可用负载均衡一、简介VS/NAT原理图:二、系统环境实验拓扑:系统平台:CentOS 6.3Kernel:2.6.32-279.el6.i686LVS版本:ipvsadm-1.26keepalived版本:keepalived-1.2.4三、安装0、安装LVS前系统需要安装popt-static,kernel-devel,make,gcc,openssl-devel,lftp,libnl*,popt*1、在两台Director Server上分别配置LVS+KeepalivedLVS install -------------[root@CentOS-LVS_MASTER ~]# wget http://www.linuxvirtualserver.org/software/kernel-2.6/ipvsadm-1.26.tar.gz[root@CentOS-LVS_MASTER ~]# ln -s /usr/src/kernels/2.6.32-279.el6.i686//usr/src/linux/[root@CentOS-LVS_MASTER ~]# tar zxvf ipvsadm-1.26.tar.gz[root@CentOS-LVS_MASTER ~]# cd ipvsadm-1.26[root@CentOS-LVS_MASTER ipvsadm-1.26]# make && make installKeepalived install -------------[root@CentOS-LVS_MASTER ~]# wget http://www.keepalived.org/software/keepalived-1.2.4.tar.gz[root@CentOS-LVS_MASTER ~]# tar zxvf keepalived-1.2.4.tar.gz[root@CentOS-LVS_MASTER ~]# cd keepalived-1.2.4[root@CentOS-LVS_MASTER keepalive...
CentOS6.4 配置LVS(DR模式)DR模式中LVS主机与实际服务器都有一块网卡连在同一物理网段上。IP分配VIP:10.10.3.170RIP1:10.10.3.140RIP2:10.10.3.1411、安装所需的依赖包yum install -y wget make kernel-devel gcc gcc-c++ libnl* libpopt* popt-static2、创建一个软链接,防止后面编译安装ipvsadm时找不到系统内核ln -s /usr/src/kernels/2.6.32-358.18.1.el6.x86_64/ /usr/src/linux3、下载安装ipvsadmwget http://www.linuxvirtualserver.org/software/kernel-2.6/ipvsadm-1.26.tar.gz
tar zxvf ipvsadm-1.26.tar.gz
cd ipvsadm-1.26
make && make install4、编写并运行脚本(LVS服务器的脚本)vi lvs.sh#!/bin/bash
# 2013-09-07 by kgdxpr
VIP=10.10.3.170
RIP1=10.10.3.140
RIP2=10.10.3.141
/etc/rc.d/init.d/functions
logger $0 called with $1
case "$1" in
start)
echo " start LVS of DirectorServer"
/sbin/ifconfig eth0:0 $VIP broadcast $VIP netmask 255.255.255.255 up
/sbin/route add -host $VIP dev eth0:0
echo "1" >/proc/sys/net/ipv4/ip_forward
#Clear IPVS table
/sbin/ip...
CentOS6.5 LVS + KeepAlived搭建步骤 测试环境架构: 废话不说,开始搭建: 1.创建内核文件的软链接,如果不创建此链接编译ipvsadm将报错 ln -s /usr/src/kernels/2.6.18-308.el5-x86_64/ /usr/src/linux (2.6.18-308.el5-x86_64:内核版本) 2.下载ipvsadm wget http://www.linuxvirtualserver.org/software/kernel-2.6/ipvsadm-1.24.tar.gz 3.安装ipvsadm # tar xvf ipvsadm-1.24.tar.gz -C /usr/local/src/ # cd /usr/local/src/ipvsadm-1.24/  ...
SSH/OpenSSH/PortForwarding Parent page: Internet and Networking >> SSH ContentsIntroductionTypes of Port ForwardingLocal Port ForwardingRemote Port ForwardingDynamic Port ForwardingForwarding GUI ProgramsSingle ApplicationsPort Forwarding ExplainedTroubleshootingIntroductionPort forwarding via SSH (SSH tunneling) creates a secure connection between a local computer and a remote machine through which services can be relayed. Because the connection is encrypted, SSH tunneling is useful for transmitting information that uses an unencrypted protocol, such as IMAP, VNC, or IRC. Types of Port ForwardingSSH's port forwarding feature can smuggle various types of Internet traffic into or out of a network. This can be used to avoid network monitoring or sniffers, or bypass badly configured routers on the Internet. Note: You might also need to change the settings in other programs (like your web browser) in order to circumvent the...
通过非XenCenter方式连接到XenServer各个VM的VNC本地界面 下面,就是我们在线上所使用的脚本,只需要你本地安装有一个VNC客户端就可以了。获取本地VM列表# ./getvnc1Usage: ./getvnc vm_name2VMs found:3idc2-server1 4idc2-server2获取指定VM的VNC端口号# ./getvnc idc2-server21run this on laptop and connect via vnc to localhost:5903 2--> ssh -L 5903:localhost:5903 root@10.100.1.30接下来,直接在本地运行"ssh -L 5903:localhost:5903 root@10.100.1.30";再通过VNC客户端连接"localhost:5903"就可以了。脚本代码:
#!/bin/bash
vm=$1
if [ -z ${vm} ]; then
echo "Usage: $0 vm_name"
echo "VMs found:"
xl list-vm | awk '{print $3}' | grep -vw name
exit 1
fi
xe vm-list params=name-label name-label=${vm} | grep ${vm} > /dev/null
if [ $? -gt 0 ]; then
echo "Error: invalid VM name"
exit 1
fi
h...
XEN: "x0" re-spawning too fast message in DomU consoleThis document (7000048) is provided subject to the disclaimer at the end of this document. EnvironmentNovell SUSE Linux EnterpriseServer 10 Service Pack 1Novell SUSE Linux EnterpriseServer 10 Service Pack 2 SituationSLES 10 SP1 and other some otherLinux distributions may have the following errors.In/var/log/messages:init: Id "x0" respawning toofast: disabled for 5 minutesIn/var/log/messages:Apr 13 17:02:43 bhoward5agetty[8511]: /dev/xvc0: No such file or directoryApr 13 17:02:53 bhoward5agetty[8927]: /dev/xvc0: No such file or directoryApr 13 17:03:03 bhoward5agetty[8929]: /dev/xvc0: No such file or directoryOn the console:init: Id "x0" respawning toofast: disabled for 5 minutesResolutionBetween SLES 10 and SLES 10 SP1,the version of Xen changed. In 3.04. A new console device,/dev/xvc0 was introduced to handle the console. This error is typically seen on DomU's which support "xvc0" but have b...
解决ORA-00060: Deadlock detected小例 数据库版本:?12345678SQL > select * from v$version;BANNER----------------------------------------------------------------Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64biPL/SQL Release 10.2.0.5.0 - ProductionCORE 10.2.0.5.0 ProductionTNS for Linux: Version 10.2.0.5.0 - ProductionNLSRTL Version 10.2.0.5.0 - Production 事件:数据库产生死锁: ORA-00060: Deadlock detected alert 日志如下:?123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263ORA-00060: Deadlock detected. More info in file /u01/app/oracle/admin/xezf/udump/xezf_ora_13794.trc.Wed Jul 10 12:39:00 CST 2013ORA-00060: Deadlock detected. More info in file /u01/app/oracle/admin/xezf/udump/xezf_ora_13792.trc.Wed Jul 10 12:40:02 CST 2013ORA-00060: Deadlock detected. More info in file /u01/app/oracle/admin/xezf/udump/xezf_ora_13794.trc.Wed Jul 10 12:41:56 CST 2013ORA-00060: Deadlock detected....
ORA-19527与ORA-00312和db_recovery_file_dest_size of 2048 MB is 0.00% usedErrors in file d:\oracle\product\10.2.0\admin\billing\bdump\billing_mrp0_2216.trc:ORA-19527: 必须重命名物理备用重做日志ORA-00312: 联机日志 1 线程 1: 'E:\CZ\BILLING\REDO01.LOG'Clearing online redo logfile 1 completeMedia Recovery Waiting for thread 1 sequence 13364Tue Aug 21 13:41:52 2012Completed: alter database recover managed standby database disconnect from sessionTue Aug 21 13:55:58 2012db_recovery_file_dest_size of 2048 MB is 0.00% used. This is auser-specified limit on the amount of space that will be used by thisdatabase for recovery-related files, and does not reflect the amount ofspace available in the underlying filesystem or ASM diskgroup.这是10g以后,oracle为了加快swtichover的速度,在can become a primary之前就去clear the online logfiles了,而如果没有设置log_file_name_convert,这个时候oracle可能就不认识哪怕是你copy过来的一模一样的logfile了 这个说法也在taobao dba team的blog中得到...
Centos7.2/Centos7.4配置gnome图形界面并安装vnc服务 1,首先,需要更新系统。#: yum update -y#: rebbot2,然后,安装gnome环境包。 #: yum groupinstall "GNOME Desktop" "Graphical Administration Tools" -y现在,我们要在服务器上安装 VNC 服务器了。4. yum 安装vnc #:yum install -y tigervnc tigervnc-server tigervnc-server-module -y5 配置vnc编辑# vim /lib/systemd/sytem/vncserver@.service找到下面这几行,用自己的用户名替换掉 。我的用户名是 root 所以我用 root 来替换掉 :ExecStart=/sbin/runuser -l -c "/usr/bin/vncserver %i"PIDFile=/home//.vnc/%H%i.pid替换为ExecStart=/usr/sbin/runuser -l root -c "/usr/bin/vncserver :1 -geometry 1024x768 -depth 16"PIDFile=/root/.vnc/%H%i.pid将 /lib/systemd/system/vncserver@.service 改为 /lib/systemd/system/vncserver@:1.service#mv /lib/systemd/system/vncserver@.service /lib/systemd/system/vncserver@:1.service重启 systemd#systemctl daemon-reload6.最后还要设置一下用户的 VNC 密...
Linux系统配置Squid代理内网服务器上网功能 本文为大家介绍普通代理的搭建方式。 本实验环境:操作系统:CentOS release 6.5(Final)Squid版本:squid-3.1.23-9.el6.x86_64 1. 检查squid软件是否安装# rpm -qa|grep squid 2. 如果未安装,则使用yum 方式安装# yum -y install squid 3. 设置开机自启动# chkconfig --level 35 squid on 4. 编辑squid 的主配置文件 /etc/squid/squid.conf http_port 3128cache_mem 64 MBmaximum_object_size 4 MBcache_dir ufs /var/spool/squid 100 16 256access_log /var/log/squid/access.logacl localnet src 10.0.0.0/8http_access allow localnethttp_access deny allvisible_hostname squid.taotie.devcache_mgr admin@test.com 请注意:acl localnet src 10.0.0.0/8 中 10.0.0.0/8是ECS内网的网段,要求ECS之间内网可以互通。请根据自己的实际情况替换成内网IP段5.初始化squid# squid –z6.启动Squid# /etc/init.d/squid start 到这里squid就配置好了,我们使用另一台没有公网IP的服务器连接squid代理,测试是否可以上网。 打...
最新评论