本站用于记录日常工作内容,虚拟化云计算,系统运维,数据库DBA,网络与安全。
通过我们会用Nginx的upstream做基于http/https端口的7层负载均衡,由于Nginx老版本不支持tcp协议,所以基于tcp/udp端口的四层负载均衡一般用LVS或Haproxy来做。至于4层负载均衡和7层负载均衡的区别,可以参考:http://www.cnblogs.com/kevingrace/p/6137881.html。然而Nginx从1.9.0版本开始,新增加了一个stream模块,用来实现四层协议的转发、代理或者负载均衡等,鉴于Nginx在7层负载均衡和web service上的成功,和Nginx良好的框架,stream模块前景一片光明。官方文档:http://nginx.org/en/docs/stream/ngx_stream_core_module.html Nginx的stream模块默认不会自带安装,需要编译安装的时候手动添加上这个模块。废话不多说了,下面介绍下一个自己使用stream做四层负载均衡(socket协议代理)的案例: 在此之前已经使用Ningx+Keepalived(主从模式)做了7层负载均衡的LB环境,之前编译的时候,没有加上这个stream模块,所以需要后续手动添加该模块。
由于Nginx的LB已经有业务跑在上面,可以选择平滑添加stream模块,并不会对线上业务造成多大影响。步骤如下:
1)先在LB的slave从机上进行平滑添加,然后再将vip切换到从机上,随即在对master主机进行平滑添加该模...
前两天发天 edge的浏览器升级后,出现web页面排版错乱问题。于是对着自己的博客源码乱折腾一晚上,还是老样子,今天用firefox试了试,web显示正常的,真恶心,估计是edge浏览器又出BUG了,要么就是之前的HTML有些代码被甩了。如下图:经过多次测试,发现是AdGuard的扩展插件的问题,禁用或是删除就好了,可以更换成其它的。比如uBlock
nginx反向代理+nginx性能优化配置详解前言:代理服务可简单的分为正向代理和反向代理:正向代理: 用于代理内部网络对Internet的连接请求(如VPN/NAT),客户端指定代理服务器,并将本来要直接发送给目标Web服务器的HTTP请求先发送到代理服务器上,然后由代理服务器去访问Web服务器, 并将Web服务器的Response回传给客户端:反向代理: 与正向代理相反,如果局域网向Internet提供资源,并让Internet上的其他用户可以访问局域网内资源, 也可以设置一个代理服务器, 它提供的服务就是反向代理. 反向代理服务器接受来自Internet的连接,然后将请求转发给内部网络上的服务器,并将Response回传给Internet上请求连接的客户端:一、Nginx反向代理=Web服务器的调度器:(1.)反向代理(Reverse Proxy)方式是指以代理服务器来接受客户端的连接请求,然后将请求转发给网络上的web服务器(可能是apache、nginx、tomcat、iis等),并将从web服务器上得到的结果返回给请求连接的客户端,此时代理服务器对外就表现为一个服务器。从上图可以看出:反向代理服务器代理网站Web服务器接收Http请求,对请求进行转发。而且nginx作为反向代理服务器可以根据用户请求的内容把请求转发给后端不同的web服务器,例如静...
sersync实现实时同步备份sersync github下载地址:https://github.com/wsgzao/sersync/(下载这个sersync2.5.4_64bit_binary_stable_final.tar.gz)sersync:监控目录的变化,推送到rsync服务器上这里检测到指定目录文件有变化时会自动调用rsync同步到backup服务器中(backup服务器安装rsync服务)1、安装解压后得到两个文件:sersync,confxml.xml,移动到/usr/local/sersync目录下(目录结构可以自己创建)[root@nfs01 ~]# tree /usr/local/sersync/
/usr/local/sersync/
├── bin
│ └── sersync
├── conf
│ └── confxml.xml
└── logs
#创建软连接,方便以后使用
[root@nfs01 sersync]# ln -s /usr/local/sersync/bin/sersync /bin/
[root@nfs01 sersync]# chmod +x /usr/local/sersync/bin/sersync2、修改配置文件打开confxml.xml配置文件<?xml version="1.0" encoding="ISO-8859-1" ?>
- <head version="2.5">
<host hostip="localhost" port="8008" />
<debug start="false" />
<fileSystem xfs="true" /> # 文件系统类...
Install and Use Guacamole Remote Desktop on Ubuntu 20.04具体请下载PDF查看英文原版
Centos7安装guacamole-HTML5-VNC Guacamole 是无客户端的远程桌面网关,Guacamole 支持标准协议,比如 VNC 和 RDP。安装java export JAVA_HOME=/usr/jvm/javaexport JRE_HOME=$JAVA_HOME/jreexport CLASSPATH=.:JAVA_HOME/lib:JAVAHOME/lib:{JRE_HOME}/libexport PATH=JAVA_HOME/bin:JAVAHOME/bin:PATHexport GUACAMOLE_HOME=/etc/guacamolesource /etc/profile 配置GUACAMOLE_HOMEmkdir /etc/guacamolemkdir /etc/guacamole/extensions/mkdir /etc/guacamole/libmkdir /root/.guacamoletouch /etc/guacamole/guacamole.propertiesln -s /etc/guacamole/guacamole.properties /root/.guacamole/ 安装依赖包yum install -y cairo-devel libjpeg-turbo-devel libjpeg-devel libpng-devel uuid-devel ffmpeg-devel freerdp-devel pango-devel libssh2-devel libtelnet-devel libvncserver-devel pulseaudio-libs-devel openssl-devel libvorbis-devel libwebp-deve libwebsockets-devel libwebsockets mariadb mariadb-server wget git libtool 安装apache-mavenwget http://repos.fedorapeople.org/repos/dchen/apache...
Install Asterisk 18 LTS on CentOS 8 | RHEL 8Asterisk is a free to use, opensource and powerful communication system powering many IP PBX systems, VoIP gateways, conference servers used in SMBs, enterprises, call centers, carriers and government institutions around the globe. Installing Asterisk Server is the first step towards implementation of an affordable, reliable and highly available PBX and VoIP systems.In today’s guide we will be covering the installation and configuration of Asterisk 18 LTS on CentOS 8 | RHEL 8. Asterisk 18.0 was recently released for production use and is available for download. This is an LTS release, meaning it will be supported for a few several years. If you’re using earlier releases of Asterisk such as 16 LTS or 17.x it is the right time to plan for upgrade.Features of Asterisk PBX systemConference callingCall RecordingCall MonitoringDistributed Universal Number DiscoveryCaller ID on Call WaitingDirect Inward System AccessCall ParkingSMS Mess...
1,资料。官网:https://www.kafka-eagle.org/index.htmlGithub:https://github.com/smartloli/kafka-eagle/官方文档:https://docs.kafka-eagle.org/下载地址:http://download.kafka-eagle.org/2,部署。当我们把kafka集群部署完成之后,就可以部署Kafka Eagle监控系统了。github上的releases中事实上还是源码,而源码可能不容易编译成功,因此可以直接通过官网的下载地址下载作者已经提供的编译好的包进行部署。1,下载包。$ wget https://codeload.github.com/smartloli/kafka-eagle-bin/tar.gz/v1.3.32,解压包。[root@localhost opt]$ tar xf v1.3.3l[root@localhost opt]$ lskafka-eagle-bin-1.3.3 v1.3.3[root@localhost opt]$ cd kafka-eagle-bin-1.3.3/[root@localhost kafka-eagle-bin-1.3.3]$ lskafka-eagle-web-1.3.3-bin.tar.gz[root@localhost kafka-eagle-bin-1.3.3]$ tar xf kafka-eagle-web-1.3.3-bin.tar.gzl[root@localhost kafka-eagle-bin-1.3.3]$ lskafka-eagle-web-1.3.3 kafka-eagle-web-1.3.3-bin.tar.gz[root@localhost kafka-eagle-bin-1.3.3]$ mv kafka-eagle-web-1.3.3 /opt/kafka-eagle3,配置环境变量。cat >> /etc/profile <&l...
Centos7进行kafka-2.11集群部署1,准备工作1,主机准备。准备三台主机,都是CentOS-7,IP如下:192.168.106.7192.168.106.8192.168.106.9为了方便后续操作,先配置一下主机免密码登陆。[root@localhost ~]$ssh-keygen[root@localhost ~]$ssh-copy-id root@192.168.106.7[root@localhost ~]$ssh-copy-id root@192.168.106.8[root@localhost ~]$ssh-copy-id root@192.168.106.9更改三节点的主机名。[root@localhost ~]$hostnamectl set-hostname node1[root@localhost ~]$hostnamectl set-hostname node2[root@localhost ~]$hostnamectl set-hostname node3配置hosts。[root@localhost ~]$ cat >> /etc/hosts << EOF127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain6192.168.106.7 node1192.168.106.8 node2192.168.106.9 node3EOF2,依赖准备。只需准备jdk环境即可,通过如下命令安装:curl 192.168.1.1/a | sh。此种安装方式可以参考这里。3,安装包。下载kafka。wget https://mirrors.cnnic.cn/apache/kafka/0.11.0.2/kafka_2.11-0.11.0.2.tgz2...
总共46页,当前第8页 | 页数: - 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
最新评论