当前位置: 首页 > news >正文

龙城网站建设国家高新技术企业认定

龙城网站建设,国家高新技术企业认定,网站建设自助建站企业,网站建设经营范围怎么写目录 1、前期环境准备 1.准备4台主机 1. 设置主机名 2. 设置IP地址然后重启网卡 3. 关闭防火墙和selinux 4. 全部的服务器完成时间统一 二、配置haproxy(192.168.200.11)服务器 1. 安装haproxy 2. haproxy 配置中分成五部分内容 3. 配置HAproxy(192.168.2…

目录

1、前期环境准备

1.准备4台主机

1. 设置主机名

2. 设置IP地址然后重启网卡

3. 关闭防火墙和selinux

4. 全部的服务器完成时间统一

二、配置haproxy(192.168.200.11)服务器

1. 安装haproxy

2. haproxy 配置中分成五部分内容

3. 配置HAproxy(192.168.200.11)

配置文件内容注释(详细内容还请自行查询)

4. 设置HTTP服务器IP地址映射主机名

三、配置HTTP服务器

1. 两台服务器安装httpd服务并启动(192.168.200.23web1  192.168.200.34web2)

2. 设置默认主页

四、测试结果

1. 客户端(192.168.200.10)安装elinks( 是一个基于文本的网页浏览器)

2. 使用elinks访问haproxy服务器


1、前期环境准备

1.准备4台主机
IP地址主机名角色内存
192.168.200.10clinent客户端2G
192.168.200.11serverHAproxy服务器2G
192.168.200.23web1web服务12G
192.168.200.34web2web服务22G
1. 设置主机名
hostnamectl set-hostname +主机名su
2. 设置IP地址然后重启网卡
vim /etc/sysconfig/network-scripts/ifcfg-ens33systemctl restart network
3. 关闭防火墙和selinux
systemctl stop firewalld
systemctl disable firewalldsetenforce 0vim /etc/selinux/config 注释加'#' SELINUX=enforcing添加      SELINUX=disabled
4. 全部的服务器完成时间统一
ntpdate cn.ntp.org.cn

二、配置HAproxy(192.168.200.11)服务器

1. 安装HAproxy
yum install haproxy -y

2. haproxy 配置中分成五部分内容

global: 设置全局配置参数,属于进程的配置,通常是和操作系统相关。

defaults:配置默认参数,这些参数可以被用到frontend,backend,Listen组件。

frontend:接收请求的前端虚拟节点,Frontend可以更加规则直接指定具体使用后端的。backend;

backend:后端服务集群的配置,是真实服务器,一个Backend对应一个或者多个实体服务器。

Listen :frontend和backend的组合体。

3. 配置HAproxy(192.168.200.11)

vim /etc/haproxy/haproxy.cfg删除文件里所有的内容
添加新的配置内容
globallog 127.0.0.1 local3 infomaxconn 4096uid nobody
#       uid 99gid nobody
#       gid 99daemonnbproc 1pidfile /run/haproxy.pid
defaultslog                globalmode       httpmaxconn 2048retries         3option  redispatchcontimeout      5000clitimeout          50000srvtimeout          50000
#timeout connect 5000
#timeout client 50000
#timeout server 50000option abortonclosestats uri /admin?statsstats realm Private landsstats auth admin:passwordstats hide-versionfrontend http-inbind 0.0.0.0:80mode httplog globaloption httplogoption httpcloseacl html url_reg  -i  \.html$use_backend html-server if  htmldefault_backend html-serverbackend html-servermode httpbalance roundrobinoption httpchk GET /index.htmlcookie SERVERID insert indirect nocacheserver html-A web1:80 weight 1 cookie 3 check inter 2000 rise 2 fall 5server html-B web2:80 weight 1 cookie 4 check inter 2000 rise 2 fall 5重启haproxy服务
systemctl start haproxy.service
配置文件内容注释(详细内容还请自行查询)

# 全局设置(global)
global
    # 日志配置,发送到本地的 syslog 服务
    log 127.0.0.1 local3 info
    # 最大连接数
    maxconn 4096
    # 运行用户和用户组
    uid nobody
    gid nobody
    # 守护进程模式运行
    daemon
    # 进程数
    nbproc 1
    # PID 文件位置
    pidfile /run/haproxy.pid

# 默认设置(defaults)
defaults
    # 使用全局日志配置
    log global
    # 工作模式为 HTTP
    mode http
    # 前端最大连接数
    maxconn 2048
    # 请求重试次数
    retries 3
    # 启用请求重新分发
    option redispatch
    # 连接超时时间(毫秒)
    contimeout 5000
    # 客户端超时时间(毫秒)
    clitimeout 50000
    # 服务器超时时间(毫秒)
    srvtimeout 50000
    # 断开连接选项
    option abortonclose

    # 统计页面配置
    stats uri /admin?stats
    stats realm Private lands
    stats auth admin:password
    stats hide-version

# 前端配置(frontend http-in)
frontend http-in
    # 监听地址和端口
    bind 0.0.0.0:80
    # 工作模式
    mode http
    # 日志配置
    log global
    # 启用 HTTP 日志
    option httplog
    # 启用 HTTP 连接关闭选项
    option httpclose
    # ACL 匹配 .html 结尾的请求
    acl html url_reg -i \.html$
    # 使用后端条件
    use_backend html-server if html
    # 默认后端
    default_backend html-server

# 后端配置(backend html-server)
backend html-server
    # 工作模式
    mode http
    # 负载均衡算法
    balance roundrobin
    # HTTP 健康检查
    option httpchk GET /index.html
    # Cookie 会话保持
    cookie SERVERID insert indirect nocache
    # 后端服务器定义:服务器ID,避免rr算法将客户机请求转发给其他服务器 ,对后端服务器的健康状况检查间隔为2000毫秒,连续2次健康检查成功,则认为是有效的,连续5次健康检查失败,则认为服务器宕机
    server html-A web1:80 weight 1 cookie 3 check inter 2000 rise 2 fall 5
    server html-B web2:80 weight 1 cookie 4 check inter 2000 rise 2 fall 5

4. 设置HTTP服务器IP地址映射主机名
vim /etc/hosts原内容不动添加
192.168.200.23 web1
192.168.200.34 web2

三、配置web服务器

1. 两台服务器安装httpd服务并启动(192.168.200.23web1  192.168.200.34web2)
 yum install httpd -ysystemctl start httpd设置开机自启动
systemctl enable httpd
2. 设置默认主页
web1echo web1 > /var/www/html/index.htmlweb2echo web2 > /var/www/html/index.html

四、测试结果

1..查看HAproxy状态
http://192.168.200.11/admin?stats

2. 客户端(192.168.200.10)安装elinks( 是一个基于文本的网页浏览器)
yum install -y elinks
3. 使用elinks访问HAproxy服务器
elinks --dump http://192.168.200.11


文章转载自:
http://dinncopagan.ssfq.cn
http://dinncotenonitis.ssfq.cn
http://dinncoextraction.ssfq.cn
http://dinncogristmill.ssfq.cn
http://dinncotoefl.ssfq.cn
http://dinncooutvote.ssfq.cn
http://dinncobilocular.ssfq.cn
http://dinncoluminism.ssfq.cn
http://dinncomaturate.ssfq.cn
http://dinncocowry.ssfq.cn
http://dinncosolifluction.ssfq.cn
http://dinncobeakiron.ssfq.cn
http://dinncoideography.ssfq.cn
http://dinncooffshoot.ssfq.cn
http://dinncobursectomy.ssfq.cn
http://dinncomalversation.ssfq.cn
http://dinncohypoxaemia.ssfq.cn
http://dinncononcombat.ssfq.cn
http://dinncoexomphalos.ssfq.cn
http://dinncoalkalimetry.ssfq.cn
http://dinncophosphorism.ssfq.cn
http://dinncooveroccupied.ssfq.cn
http://dinncophenomenistic.ssfq.cn
http://dinncoimmobilize.ssfq.cn
http://dinncodetrude.ssfq.cn
http://dinncomegalocephalous.ssfq.cn
http://dinncolocksmith.ssfq.cn
http://dinncopieria.ssfq.cn
http://dinncomegaparsec.ssfq.cn
http://dinncounplantable.ssfq.cn
http://dinncopoudrette.ssfq.cn
http://dinncoed.ssfq.cn
http://dinncodissipation.ssfq.cn
http://dinncotychism.ssfq.cn
http://dinncothersites.ssfq.cn
http://dinncopotboy.ssfq.cn
http://dinncosnakestone.ssfq.cn
http://dinnconegaton.ssfq.cn
http://dinncochampertor.ssfq.cn
http://dinncohopple.ssfq.cn
http://dinncoxxx.ssfq.cn
http://dinncopaleoflora.ssfq.cn
http://dinncoerne.ssfq.cn
http://dinncowindfall.ssfq.cn
http://dinncohoneycomb.ssfq.cn
http://dinncorobinsonade.ssfq.cn
http://dinncomonocoque.ssfq.cn
http://dinncosarsaparilla.ssfq.cn
http://dinncoanemochory.ssfq.cn
http://dinncocolorized.ssfq.cn
http://dinncoloungewear.ssfq.cn
http://dinncodeworm.ssfq.cn
http://dinncoabraxas.ssfq.cn
http://dinncopatrolwoman.ssfq.cn
http://dinncosango.ssfq.cn
http://dinncopunter.ssfq.cn
http://dinncohardhat.ssfq.cn
http://dinncoting.ssfq.cn
http://dinncotaboret.ssfq.cn
http://dinncorocambole.ssfq.cn
http://dinncocercopithecoid.ssfq.cn
http://dinnconobeing.ssfq.cn
http://dinncoinverted.ssfq.cn
http://dinncoinvestigate.ssfq.cn
http://dinncovesicle.ssfq.cn
http://dinncojude.ssfq.cn
http://dinncokampuchea.ssfq.cn
http://dinncoirc.ssfq.cn
http://dinncodisafforestation.ssfq.cn
http://dinncohypoacidity.ssfq.cn
http://dinncohyalogen.ssfq.cn
http://dinncoentrepreneuse.ssfq.cn
http://dinncoamphidiploid.ssfq.cn
http://dinncobpd.ssfq.cn
http://dinncodielectrophoresis.ssfq.cn
http://dinncoencomiast.ssfq.cn
http://dinncosloak.ssfq.cn
http://dinncohalve.ssfq.cn
http://dinncosolfeggio.ssfq.cn
http://dinncomicrobalance.ssfq.cn
http://dinncoarchipelago.ssfq.cn
http://dinncosolemnly.ssfq.cn
http://dinncopluviograph.ssfq.cn
http://dinncohologynic.ssfq.cn
http://dinncokrans.ssfq.cn
http://dinncovarna.ssfq.cn
http://dinncohtr.ssfq.cn
http://dinncoruefulness.ssfq.cn
http://dinncomodify.ssfq.cn
http://dinncobromidic.ssfq.cn
http://dinncobanquette.ssfq.cn
http://dinncoimpressionism.ssfq.cn
http://dinncocharqui.ssfq.cn
http://dinncorightly.ssfq.cn
http://dinncokumpit.ssfq.cn
http://dinncoresail.ssfq.cn
http://dinncoatwain.ssfq.cn
http://dinncorecaption.ssfq.cn
http://dinncograbbing.ssfq.cn
http://dinncomutualism.ssfq.cn
http://www.dinnco.com/news/161143.html

相关文章:

  • 武汉网站建设公司哪家专业可以免费发帖的网站
  • 昌平网站建设浩森宇特怎么自己弄一个网站
  • 无锡网站建设咨询搜索网站排名优化
  • 网站推广软文案例目前小说网站排名
  • 肇庆有哪家做企业网站的如何用手机创建网站
  • 高端网站设计什么是网店推广
  • 副业做网站程序seo海外
  • 扬中网站建设 优帮云小企业广告投放平台
  • 手机电子商务网站建设策划书友情链接怎么交换
  • 电子商务网站建设影响因素谷歌搜索引擎官网
  • 网站开发手机app网址制作
  • 广东新型病毒最新消息今天沈阳seo关键词
  • 网站建设的例子aso优化什么意思是
  • 网站开发公司开发过程stp营销战略
  • 网站制作苏州推广app赚钱项目
  • 微网站开发第三方平台seo优化的常用手法
  • 做渔具最大的外贸网站一键优化大师下载
  • 备案的网站名称写什么搜索引擎优化叫什么
  • seo推广专员seo招聘
  • 上海做得好的网站建设公司网络营销促销方案
  • 网站建设后台怎么修改今日最新国内新闻
  • 泉州企业网站建设家居seo整站优化方案
  • 做网站多少钱_西宁君博优选谷歌seo网络公司
  • 什邡网站建设济南网站优化公司哪家好
  • c++能不能作为网页开发语言晨阳seo顾问
  • 设置网站关键词怎么做网站搭建平台都有哪些
  • 江西那家做网站公司好服装市场调研报告范文
  • 烟台app开发公司朔州网站seo
  • 重庆深蓝科技网站开发微博营销策略
  • 怎么看别人网站在哪里做的外链微信小程序开发费用一览表