01-使用Docker快速搭建Nginx网站服务:从入门到实战

使用Docker快速搭建Nginx网站服务:从入门到实战


一、为什么选择Docker部署Nginx?

  • 秒级部署:无需手动编译安装,一条命令即可启动服务
  • 环境隔离:避免与宿主机环境产生依赖冲突
  • 版本管理:轻松切换不同Nginx版本进行测试
  • 快速迁移:镜像打包后可在任意支持Docker的平台运行

二、环境准备与Docker安装

1. 安装Docker引擎

# Ubuntu/Debian
sudo apt update && sudo apt install doc
使用docker搭建网站 1.安装 docker Linux 系统上使用 docker 大大降低了我们使用各种软件的门槛,推荐有兴趣的同学一定要去学习一下 docker, docker 安装的官方网站,复制命令一步步执行即可: docker 安装命令如下复制安装即可: (这里有个问题就是是否需要用root用户,后面需要再确定) sudo yum install -y yum-utils device-mapper-persistent-data lvm2 sudo yum-config-manager --add-repo ht 阅读详情

相关推荐

# 01_Docker快速入门到项目部署(一)

01_Docker快速入门到项目部署(一) 01.Docker课程介绍 02.Docker的安装 03.快速入门-部署MySQL 04.快速入门-命令解读 05.Docker基础-常见命令

段子手168的博客 1301

HTTPS部署全攻略:从Let‘s Encrypt申请到Nginx、Docker实战优化

HTTPS(超文本传输安全协议)是构建安全网络通信的基石,其核心原理是通过SSL/TLS协议在HTTP之上建立加密层,实现数据传输的机密性、完整性和服务器身份认证。这项技术对于保护用户隐私、防止中间人攻击至关重要,已成为现代Web应用的标配。从技术价值看,HTTPS不仅是安全屏障,更是搜索引擎排名的重要信号和用户信任的直观体现,直接影响网站流量与转化率。其应用场景广泛,涵盖从个人博客到大型电商平台的所有Web服务。本文将聚焦于**Let's Encrypt免费证书**的自动化部署,详细解析在**Nginx服

weixin_33768481的博客 408

Dify+firecrawl:一个超好用的网页转Markdown API,打造你的第一个能检索爬虫RAG知识库的聊天机器人

Firecrawl是一个超简单的API服务——你扔给它一个URL,它就能把整个网站(包括子页面!)的内容自动抓下来,并且转换成干净、易读的Markdown格式。不用配置网站的站点地图,不用写爬虫规则,API调一下,数据直接到手。接下来我们一起本地部署吧!

2501_91673550的博客 3001

ArcGIS Pro MCP 开源:自然语言驱动的 AI 制图与分析

人工智能与大模型的快速发展,正推动专业软件从“手动操作”走向“自然语言控制”。模型上下文协议(MCP)作为连接 AI 与外部工具的标准接口,类似为 AI 安装的“USB 接口”,让大模型可以通过统一协议调用 GIS 软件能力。基于 ArcPy 构建的 ArcGIS Pro MCP 项目,将复杂的地图制图与空间分析封装为 112 个可被 AI 调用的工具,使文本指令直接驱动软件完成数据加载、符号化、出图乃至叠加统计等任务。对 GIS 工程师、数据分析师与测绘规划从业者而言,该开源项目显著降低专业软件使用门槛,

weixin_29054195的博客 283

倍加福(P+F)R2000修改雷达IP

在调试车子的时候,用到了倍加福R2000的一款雷达,设备启动建图时发现建不了图,于是查看/scan发现话题无数据,尝试ping雷达接口发现ping不通,应该是IP地址与上位机端口的IP地址不对。首先查看雷达的IP地址,这个在雷达上有两个按键,按下后可以显示IP: 按两下右边的键再按一下左边的键雷达上会显示出IP号,这里拍的不是很清楚。查看到开始时雷达IP地址为192.168.111.10,而上位机ping的IP地址为192.168.188.50.与实际不同,所以需要对雷达进行配置。一台windows笔记本

YiYeZhiNian的博客 5904

Spring Authorization Server 实战指南:构建企业级 OAuth2/OIDC 授权中心

本文介绍了Spring Authorization Server作为构建企业级OAuth2/OIDC授权中心的解决方案。首先分析了传统认证模式的不足和OAuth2/OIDC协议的优势,然后详细讲解了如何从零搭建授权服务器,包括核心配置类、授权流程、数据库持久化等关键实现。文章还涵盖了资源服务器配置、客户端应用集成、安全最佳实践以及生产环境部署建议,完整呈现了Spring Authorization Server的核心功能和使用场景。通过本教程,开发者可以掌握统一认证授权系统的构建方法,为微服务架构提供安全可

qq_39476913的博客 791

基于三轴加速度计的塑料水管泄漏振动检测技术全解析

在流体力学与结构动力学领域,管道振动分析是评估系统健康状态的关键技术。其基本原理在于,当管道内流体状态发生异常(如泄漏)时,会引发管壁产生特定的机械振动信号。这项技术的核心价值在于实现了对管道系统的非侵入式、在线监测,能够提前预警潜在故障,避免资源浪费与次生灾害。在智慧城市与智能水务等应用场景中,它对于保障供水管网安全、提升运维效率具有重要意义。本文聚焦于如何利用高精度的三轴加速度计,精准捕捉塑料水管因泄漏产生的微弱振动,并通过信号处理与机器学习算法,构建一套从数据采集到泄漏识别与定位的完整工程解决方案。

weixin_32239523的博客 415

【第六届起重机创意大赛国一作品——资料分享】

文章目录前言一、比赛内容分析二、确定方案与作品模型1.方案简图2.作品模型三、电控部分控制思路单片机选择与资源分配拓展板的设计接线与走线代码分享总结

qq_19308801的博客 7790

研制过程评审活动(三)工程研制阶段

工程研制阶段主要任务、及评审活动

Abel的博客 2393

linux 内核OOM问题定位-SLAB_DEBUG

首先看slabinfo按的size排序查看 slub object,可以查看 space 总占用大小,及objects个数判断泄漏点 为kmalloc-128。那个泄露多看/sys/kernel/debug的slab/kmalloc*-的alloc-traces和free-traces。SLAB或者SLUB有一个用就可以,改menuconfig没有clean会覆盖之前的更改,现在看一下编译的过程。或者配置defconfig,配置完之后需要clean后再编译。1,配置menuconfig。

陌上花开缓缓归以的博客 902

IDEA的使用指南

IDEA基于java的使用手册,可以最快速的上手,在使用中不断的丰富自己的使用技巧.

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

上一篇: 第7节: 广域网协议与WLAN技术入门
下一篇: 02-Docker部署MySQL全攻略:从单机到高可用集群
ms72wx
博客等级 码龄4年 440粉丝 37原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值