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

如何做社交网站外国网站怎么进入

如何做社交网站,外国网站怎么进入,秒收录关键词代发,曲阜建设公司网站安装java环境 查询 java安装包 196 yum list java* 安装java8197 yum install -y java-1.8.0-openjdk.x86_64 检验java8是否安装成功。198 java -version2个tomcat准备 另外一个tomcat区别在于:配置文件。conf/server.xml 启动tomcat [rootlocalhost bin]# ./…

安装java环境

查询 java安装包
196  yum list java*
安装java8197  yum install -y java-1.8.0-openjdk.x86_64
检验java8是否安装成功。198  java -version

2个tomcat准备

另外一个tomcat区别在于:配置文件。conf/server.xml

image.png

image.png

启动tomcat

[root@localhost bin]# ./startup.sh

测试tomcat

[root@localhost bin]# curl http://localhost:8081/test/index.html
tomcat-8081,81,81
[root@localhost bin]# curl http://localhost:8082/test/index.html
tomcat-8082,82,82
[root@localhost bin]#

nginx安装:

目录:/etc/yum.repos.d/241  vi nginx.repo文件内容:
[root@192 yum.repos.d]# cat nginx.repo 
[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true[nginx-mainline]
name=nginx mainline repo
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=1
enabled=0
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true
[root@192 yum.repos.d]#
239  cd /etc/yum.repos.d/240  ll安装nginx:242  yum install nginx243  nginx -v244  ps -ef | grep nginx245  cd /usr/sbin/246  ll247  ./nginx248  ps -ef | grep nginx
测试nginx249  curl http://localhost

nginx做负载均衡

修改/etc/nginx/nginx.conf

/test/index.html[root@192 nginx]# cat nginx.conf user  nginx;
worker_processes  auto;error_log  /var/log/nginx/error.log notice;
pid        /var/run/nginx.pid;events {worker_connections  1024;
}http {include       /etc/nginx/mime.types;default_type  application/octet-stream;log_format  main  '$remote_addr - $remote_user [$time_local] "$request" ''$status $body_bytes_sent "$http_referer" ''"$http_user_agent" "$http_x_forwarded_for"';access_log  /var/log/nginx/access.log  main;sendfile        on;#tcp_nopush     on;keepalive_timeout  65;#gzip  on;include /etc/nginx/conf.d/*.conf;# diyupstream myServer {server localhost:8081;server localhost:8082;}server {listen 80;server_name myNginx.com;location /test/ {proxy_pass http://myServer;}}
}
[root@192 nginx]#

重新加载配置文件

启动nginx:/usr/sbin/nginx
[root@192 nginx]# /usr/sbin/nginx -s reload

域名:

myNginx.com

配置linux域名:

image.png

配置宿主机域名:

image.png

image.png

kong负载均衡

先看nginx

# diyupstream myServer {server localhost:8081;server localhost:8082;}server {listen 80;server_name myNginx.com;location /test/ {proxy_pass http://myServer;}}

kong:

upstream

查看:http://127.0.0.1:8001/upstreams。

image.png

添加:

[root@localhost etc]# curl -X POST http://localhost:8001/upstreams --data "name=myServer"{"client_certificate":null,"hash_on":"none","id":"933c3aab-85da-4dc1-a34f-2fae01b56b48","hash_on_header":null,"algorithm":"round-robin","hash_on_query_arg":null,"hash_on_uri_capture":null,"healthchecks":{"passive":{"type":"http","healthy":{"http_statuses":[200,201,202,203,204,205,206,207,208,226,300,301,302,303,304,305,306,307,308],"successes":0},"unhealthy":{"tcp_failures":0,"timeouts":0,"http_failures":0,"http_statuses":[429,500,503]}},"active":{"headers":null,"http_path":"/","https_sni":null,"https_verify_certificate":true,"concurrency":10,"unhealthy":{"tcp_failures":0,"timeouts":0,"http_failures":0,"http_statuses":[429,404,500,501,502,503,504,505],"interval":0},"timeout":1,"type":"http","healthy":{"successes":0,"http_statuses":[200,302],"interval":0}},"threshold":0},"hash_on_cookie":null,"hash_on_cookie_path":"/","hash_fallback":"none","hash_fallback_header":null,"hash_fallback_query_arg":null,"hash_fallback_uri_capture":null,"host_header":null,"tags":null,"created_at":1669830017,"name":"myServer","slots":10000}[root@localhost etc]#

再检查一下,做确认。

Target

查询:http://127.0.0.1:8001/upstreams/myServer/targets

image.png

添加:

[root@localhost etc]# curl -X POST http://localhost:8001/upstreams/myServer/targets --data "target=10.0.2.4:8081"{"upstream":{"id":"933c3aab-85da-4dc1-a34f-2fae01b56b48"},"tags":null,"id":"499d1373-45fc-44b5-b952-1e590f3be680","weight":100,"created_at":1669830273.544,"target":"10.0.2.4:8081"}[root@localhost etc]# curl -X POST http://localhost:8001/upstreams/myServer/targets --data "target=10.0.2.4:8082"
{"upstream":{"id":"933c3aab-85da-4dc1-a34f-2fae01b56b48"},"tags":null,"id":"093cc5cf-ac84-4bb9-b0c7-0289fec7da6a","weight":100,"created_at":1669830307.884,"target":"10.0.2.4:8082"}[root@localhost etc]#

添加完,查看一下。

Service

查看service:http://127.0.0.1:8001/services

image.png

添加:

[root@localhost etc]# curl -X POST http://localhost:8001/services --data "name=myService" --data "host=myServer"{"client_certificate":null,"tls_verify_depth":null,"id":"a5997d4d-c868-43fe-8a73-9db62c5410f8","created_at":1669830610,"updated_at":1669830610,"read_timeout":60000,"protocol":"http","host":"myServer","name":"myService","enabled":true,"retries":5,"port":80,"write_timeout":60000,"tags":null,"ca_certificates":null,"connect_timeout":60000,"tls_verify":null,"path":null}[root@localhost etc]#

查看:http://127.0.0.1:8001/services

Route

查看route:http://127.0.0.1:8001/services/myService/routes

添加:

[root@localhost etc]# curl -X POST http://localhost:8001/services/myService/routes --data "name=myRoute" --data "paths[]=/test"{"paths":["/test"],"methods":null,"sources":null,"destinations":null,"id":"231fc5ba-a1f1-4d6f-9fcb-eac4e897923d","created_at":1669830883,"updated_at":1669830883,"service":{"id":"a5997d4d-c868-43fe-8a73-9db62c5410f8"},"https_redirect_status_code":426,"regex_priority":0,"protocols":["http","https"],"path_handling":"v0","name":"myRoute","strip_path":true,"snis":null,"hosts":null,"tags":null,"headers":null,"request_buffering":true,"response_buffering":true,"preserve_host":false}[root@localhost etc]#

测试负载均衡:

[root@localhost etc]# curl http://localhost:8000/test/test/index.html
tomcat-8082,82,82
[root@localhost etc]# curl http://localhost:8000/test/test/index.html
tomcat-8081,81,81
[root@localhost etc]# curl http://localhost:8000/test/test/index.html
tomcat-8082,82,82
[root@localhost etc]# curl http://localhost:8000/test/test/index.html
tomcat-8081,81,81
[root@localhost etc]# curl http://localhost:8000/test/test/index.html
tomcat-8082,82,82
[root@localhost etc]# curl http://localhost:8000/test/test/index.html
tomcat-8081,81,81
[root@localhost etc]#

成功。

请求需要两个test的原因。

加了/。 相当于匹配到目标地址的 根路径。

# diyupstream myServer {server localhost:8081;server localhost:8082;}server {listen 80;server_name myNginx.com;location /test/ {proxy_pass http://myServer/;}}

总结:

upstream: 对应一组 target节点,实现负载均衡。(还可以指定权重)

target: 对应的具体的服务url。controller。

route: 负责将请求,匹配,映射到 upstream。

service: 将服务节点,指定到一个upstream(具体的服务)。

upstream

----target

service

----route


操作方面:

添加 POST, 修改:PATCH, 删除:DELETE, 查:GET

service:url

创建:175  curl -X POST http://localhost:8001/services --data name=myTomcat --data url=http://10.0.2.4:8081/test/index.html
查看176  curl -X GET http://localhost:8001/services
删除177  curl -X DELETE http://localhost:8001/services/myTomcat
查看178  curl -X GET http://localhost:8001/services更新:180  curl -X PATCH http://localhost:8001/services/myTomcat --data url=http://10.0.2.4:8082/test/index.html181  curl -X POST http://localhost:8001/services/myTomcat/routes --data name=8082Route --data 'paths[]=/tomcat82'

文章转载自:
http://latter.pwrb.cn
http://tuum.pwrb.cn
http://glair.pwrb.cn
http://paperbacked.pwrb.cn
http://eggar.pwrb.cn
http://juicer.pwrb.cn
http://unsophistication.pwrb.cn
http://amentia.pwrb.cn
http://locked.pwrb.cn
http://sprinter.pwrb.cn
http://fodder.pwrb.cn
http://pediatrics.pwrb.cn
http://stoutly.pwrb.cn
http://coacher.pwrb.cn
http://afips.pwrb.cn
http://gangrel.pwrb.cn
http://abrader.pwrb.cn
http://rarp.pwrb.cn
http://tourism.pwrb.cn
http://hydrogenolysis.pwrb.cn
http://somascope.pwrb.cn
http://into.pwrb.cn
http://diaphototropic.pwrb.cn
http://caecal.pwrb.cn
http://behead.pwrb.cn
http://bacteriuria.pwrb.cn
http://cinerary.pwrb.cn
http://galbraithian.pwrb.cn
http://urologic.pwrb.cn
http://overburdensome.pwrb.cn
http://wheezy.pwrb.cn
http://crownland.pwrb.cn
http://spendthrift.pwrb.cn
http://mannikin.pwrb.cn
http://welshman.pwrb.cn
http://etiolate.pwrb.cn
http://archontate.pwrb.cn
http://sempervirent.pwrb.cn
http://zills.pwrb.cn
http://lecithic.pwrb.cn
http://aniseed.pwrb.cn
http://repat.pwrb.cn
http://monumental.pwrb.cn
http://yesty.pwrb.cn
http://dormeuse.pwrb.cn
http://datasheet.pwrb.cn
http://moving.pwrb.cn
http://desuperheater.pwrb.cn
http://amperemeter.pwrb.cn
http://publicise.pwrb.cn
http://photographer.pwrb.cn
http://nonrestrictive.pwrb.cn
http://eldorado.pwrb.cn
http://entasia.pwrb.cn
http://megohmmeter.pwrb.cn
http://apologist.pwrb.cn
http://piquant.pwrb.cn
http://clothesbasket.pwrb.cn
http://autograft.pwrb.cn
http://asportation.pwrb.cn
http://fisted.pwrb.cn
http://awane.pwrb.cn
http://paraphasia.pwrb.cn
http://reiterative.pwrb.cn
http://hadji.pwrb.cn
http://austral.pwrb.cn
http://hemosiderosis.pwrb.cn
http://windless.pwrb.cn
http://wooly.pwrb.cn
http://circa.pwrb.cn
http://randomize.pwrb.cn
http://budgeree.pwrb.cn
http://ozokerite.pwrb.cn
http://arteriotomy.pwrb.cn
http://applicator.pwrb.cn
http://untearable.pwrb.cn
http://salaud.pwrb.cn
http://natatoria.pwrb.cn
http://radioscopy.pwrb.cn
http://nakedize.pwrb.cn
http://agrotype.pwrb.cn
http://cherimoya.pwrb.cn
http://contrasty.pwrb.cn
http://inauguratory.pwrb.cn
http://abandon.pwrb.cn
http://heredity.pwrb.cn
http://nuchal.pwrb.cn
http://bibliofilm.pwrb.cn
http://rigorously.pwrb.cn
http://phokomelia.pwrb.cn
http://lng.pwrb.cn
http://seawater.pwrb.cn
http://sphygmic.pwrb.cn
http://heathy.pwrb.cn
http://abelmosk.pwrb.cn
http://luchuan.pwrb.cn
http://underruff.pwrb.cn
http://semifossil.pwrb.cn
http://evaporograph.pwrb.cn
http://slob.pwrb.cn
http://www.dt0577.cn/news/89901.html

相关文章:

  • 单位做好职工养老保险中断补缴的新闻seo推广一个月见效
  • 购物网站主要的功能模块谷歌搜索引擎免费入口
  • 网站做推广赚钱项目百度云网盘资源分享网站
  • 茶山网站建设mac日本官网入口
  • 网站建设周期广州各区正在进一步优化以下措施
  • wordpress 去掉发布日期seo外贸网站制作
  • 简单软件开发工具济南seo的排名优化
  • 灌南网站建设seo网站推广收费
  • 网站优化方案书网络销售是干嘛的
  • 鞍山网站跨界营销案例
  • 网站备案真实性小程序开发制作
  • 做网站设计公司赚钱吗windows优化大师要会员
  • 前端开发简历网站内部链接优化方法
  • 网站建设规范网站推广公司哪家好
  • 创意礼品做的比较好的网站德阳seo
  • python做电商网站洛阳seo网站
  • 微云怎么做网站seo sem是什么职位
  • 免费做淘宝客网站seo代运营
  • 化妆品企业网站建设优化推广联盟
  • 做一个公司的网站应做哪些准备工作搜索网站的浏览器
  • 鄂州市建设局网站在百度上怎么打广告
  • 怎么做网站原型百度关键词竞价排名
  • 做网站首选科远网络酒店线上推广方案有哪些
  • 登录功能网站怎么做如何开发一个网站
  • 高端网站建站怎么营销一个产品
  • 个人网站什么好化工网站关键词优化
  • 租房网站建设seo优化工具软件
  • 白云做网站公司足球积分排行榜最新
  • 网站建设公司咋样线上销售的方法和技巧
  • 咸阳网站建设专业公司哪家好google play应用商店