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

中网建站专业做网站的公司

中网建站,专业做网站的公司,企业电子商务网站建设的必要性,网页编辑器在线使用原文链接#xff1a;同步服务器操作系统公网仓库到本地02 —搭建http内网仓库源| 麒麟KOS | 统信UOS | 中科方德 NFSCNS Hello#xff0c;大家好啊#xff01;继之前我们讨论了如何同步服务器公网仓库到本地服务器之后#xff0c;今天我们将进入这个系列的第二篇文章——通…原文链接同步服务器操作系统公网仓库到本地02 —搭建http内网仓库源| 麒麟KOS | 统信UOS | 中科方德 NFSCNS Hello大家好啊继之前我们讨论了如何同步服务器公网仓库到本地服务器之后今天我们将进入这个系列的第二篇文章——通过配置nginx服务将本地源共享给其他服务器使用。这一步是建立本地镜像站点的关键环节可以帮助我们在局域网内高效地分发软件包大大提升更新和部署的速度同时也节省了宽带资源。本篇文章使用麒麟KOS服务器示例统信UOS服务器及中科方德NFSCNS服务器同样也适用。下面让我们开始详细的配置过程。 安装和配置Nginx Nginx是一个高性能的HTTP和反向代理服务器也是一个非常流行的邮件代理服务器。它以其高效、稳定而闻名。我们将利用Nginx来搭建本地源服务器。 1.查看系统信息 [rootlocalhost ~]# cat /etc/os-release [rootlocalhost ~]# uname -a2.安装nginx [rootlocalhost ~]# yum install nginx -y3.配置软连接 [rootlocalhost ~]# cd /var/www/html/ [rootlocalhost html]# ln -sf /kylinv10sp3amd64 ./4.编辑nginx配置文件 [rootlocalhost /]# vim /etc/nginx/nginx.conf [rootlocalhost /]# cat /etc/nginx/nginx.conf # For more information on configuration, see: # * Official English Documentation: http://nginx.org/en/docs/ # * Official Russian Documentation: http://nginx.org/ru/docs/user nginx; worker_processes auto; error_log /var/log/nginx/error.log; pid /run/nginx.pid;# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic. include /usr/share/nginx/modules/*.conf;events {worker_connections 1024; }http {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;tcp_nodelay on;keepalive_timeout 65;types_hash_max_size 2048;include /etc/nginx/mime.types;default_type application/octet-stream;# Load modular configuration files from the /etc/nginx/conf.d directory.# See http://nginx.org/en/docs/ngx_core_module.html#include# for more information.include /etc/nginx/conf.d/*.conf;server {listen 80 default_server;listen [::]:80 default_server;server_name _;root /var/www/html/kylinv10sp3amd64/;# Load configuration files for the default server block.include /etc/nginx/default.d/*.conf;location / {autoindex on;}error_page 404 /404.html;location /40x.html {}error_page 500 502 503 504 /50x.html;location /50x.html {}}# Settings for a TLS enabled server. # # server { # listen 443 ssl http2 default_server; # listen [::]:443 ssl http2 default_server; # server_name _; # root /usr/share/nginx/html; # # ssl_certificate /etc/pki/nginx/server.crt; # ssl_certificate_key /etc/pki/nginx/private/server.key; # ssl_session_cache shared:SSL:1m; # ssl_session_timeout 10m; # ssl_ciphers PROFILESYSTEM; # ssl_prefer_server_ciphers on; # # # Load configuration files for the default server block. # include /etc/nginx/default.d/*.conf; # # location / { # } # # error_page 404 /404.html; # location /40x.html { # } # # error_page 500 502 503 504 /50x.html; # location /50x.html { # } # }}5.校验nginx语法 [rootlocalhost ~]# nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful 6.重启nginx服务 [rootlocalhost html]# systemctl restart nginx.service [rootlocalhost html]# systemctl enable nginx.service [rootlocalhost html]# systemctl status nginx.service7.配置防火墙 [rootlocalhost html]# firewall-cmd --permanent --zonepublic --add-servicehttp [rootlocalhost html]# firewall-cmd --permanent --zonepublic --add-servicehttps [rootlocalhost html]# firewall-cmd --reload8.在浏览器访问测试 http://192.168.80.113/9.在其他服务器配置源 [rootlocalhost /]# cd /etc/yum.repos.d/ [rootlocalhost yum.repos.d]# cp kylin_x86_64.repo{,.bak2024} [rootlocalhost yum.repos.d]# vim kylin_x86_64.repo [rootlocalhost yum.repos.d]# cat kylin_x86_64.repo ###Kylin Linux Advanced Server 10 - os repo###[ks10-adv-os] name Kylin Linux Advanced Server 10 - Os baseurl http://192.168.80.113/ks10-adv-os/ gpgcheck 0 enabled 1[ks10-adv-updates] name Kylin Linux Advanced Server 10 - Updates baseurl http://192.168.80.113/ks10-adv-updates/ gpgcheck 0 enabled 110.更新源 [rootlocalhost yum.repos.d]# yum update11.安装软件测试 [rootlocalhost yum.repos.d]# yum install tigervnc-server -y至此你已经成功配置了Nginx服务将本地源共享给了其他服务器使用。这不仅能帮助你在内网环境中快速部署和更新软件还能减轻公网源的负载是一种高效且经济的解决方案。希望这篇文章对你有所帮助如果你觉得有用请不吝分享和转发。同时别忘了点个关注和在看获取更多有用的技术信息和解决方案。感谢大家的阅读我们下次再见
http://www.pierceye.com/news/702826/

相关文章:

  • 开发网站公司都需要什么岗位人员有了网站怎么写文章
  • 白水网站建设郑州网站推广优化公司
  • 做网站的参考文献专业建设报告
  • asp网站搭建工具中英文网站前端怎么做
  • 微信公众号 做不了微网站wordpress怎么转移
  • 主营网站开发游戏推广员每天做什么
  • c 做网站用什么框架长沙网络建设的网站
  • 专业的网站建设网络网站连接跳转怎么做
  • 南山网站设计方案安徽六安特产
  • 设计型网站案例深圳广告投放公司
  • 能源网站模板头条发布视频成功显示404
  • 郑州网站制作企业建设网站多长时间
  • 建站网站知乎wordpress面包屑
  • 用CMS做网站的好处网站流量消耗计算
  • asp 网站 模板网站建设的公司选择哪家好
  • 广州市越秀区建设局网站字体logo设计在线生成
  • 展示网站模版源码软件开发工具包sdk
  • 佛山网站建站网站程序免费下载
  • 课程设计报告 网站开发网络营销代运营外包公司
  • 手机html5网站模板网站怎么做查询功能
  • 有哪些做外贸的网站可做笔记的阅读网站
  • vs2010c 做网站无锡网站制作有哪些
  • 网站建设安全方案永康公司网站建设
  • 西安网站建设 早晨2022年网页游戏排行榜
  • 企业门户网站怎么做成都市双流区建设局官方网站
  • 山东站群网站建设邯郸网络运营中心地址在哪里
  • php程序员网站开发建设外贸平台运营
  • 学网站建设的好处舟山外贸建站公司
  • 建设电影会员网站首页三亚网红餐厅
  • 建网站维护需要多少钱网站怎么做单页