欧美性猛交xxxx免费看_牛牛在线视频国产免费_天堂草原电视剧在线观看免费_国产粉嫩高清在线观看_国产欧美日本亚洲精品一5区

0
  • 聊天消息
  • 系統(tǒng)消息
  • 評(píng)論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線課程
  • 觀看技術(shù)視頻
  • 寫文章/發(fā)帖/加入社區(qū)
會(huì)員中心
創(chuàng)作中心

完善資料讓更多小伙伴認(rèn)識(shí)你,還能領(lǐng)取20積分哦,立即完善>

3天內(nèi)不再提示

云服務(wù)器 Flexus X 實(shí)例:輕量級(jí) http 服務(wù)器 Tinyhttpd 部署

jf_21561199 ? 來源:jf_21561199 ? 作者:jf_21561199 ? 2025-01-07 16:59 ? 次閱讀

Flexus 云服務(wù)器 X 實(shí)例是華為云推出的一款高性能、高可靠性的云服務(wù)器產(chǎn)品,它專為滿足企業(yè)級(jí)用戶對(duì)計(jì)算資源的嚴(yán)格要求而設(shè)計(jì)。本篇文章通過部署輕量級(jí) http 服務(wù)器Tinyhttpd來體驗(yàn)Flexus 云服務(wù)器 X 實(shí)例。

wKgZPGd87PSAZyNAAACs8OHiswI529.png

一、云服務(wù)器 Flexus

首先,進(jìn)入官網(wǎng)購(gòu)買Flexus 云服務(wù)器 X 實(shí)例,點(diǎn)擊這里購(gòu)買,點(diǎn)擊購(gòu)買界面如下所示。

wKgZO2d87PSADu0VAAC1-cXkkD4555.png

其中,CPU 和內(nèi)存可以自定義,如上圖所示。

(1)可以開啟性能模式,能夠支付額外算力費(fèi)用,享受極致穩(wěn)定性能 SLA 保障;

(2)鏡像中有多種鏡像可以選擇,每種鏡像有不同的版本可供選擇;

(3)帶寬可以根據(jù)自己的需要選擇,同時(shí)支持直接輸入。

完成配置后,點(diǎn)擊下一步:確認(rèn)配置,如下所示。

wKgZPGd87PWAPrjBAACycqpRqNc344.png

選擇協(xié)議許可后點(diǎn)擊購(gòu)買即可。

二、Tinyhttpd 介紹

Tinyhttpd 是一個(gè)簡(jiǎn)易的 http 服務(wù)器,支持 CGI。代碼量少,非常容易閱讀,十分適合網(wǎng)絡(luò)編程初學(xué)者學(xué)習(xí)的項(xiàng)目。麻雀雖小,五臟俱全。在 Tinyhttpd 中可以學(xué)到 linux 上進(jìn)程的創(chuàng)建,管道的使用。linux 下 socket 編程基本方法和 http 協(xié)議的最基本結(jié)構(gòu)。

Github 倉庫如下所示,點(diǎn)這里進(jìn)入~

wKgZO2d87PWAY6TbAADzfUWN3kw945.png

如上所示,tinyhttpd 項(xiàng)目核心代碼在 httpd.c 中。

三、部署 Tinyhttpd

華為云服務(wù)器自帶 Git,不用自己下載。

root@flexusx-c1f3:~# git clone https://github.com/cbsheng/tinyhttpd.git

Cloning into 'tinyhttpd'...

remote: Enumerating objects: 76, done.

remote: Total 76 (delta 0), reused 0 (delta 0), pack-reused 76 (from 1)

Unpacking objects: 100% (76/76), 21.13 KiB | 92.00 KiB/s, done.

root@flexusx-c1f3:~# ls

tinyhttpd

root@flexusx-c1f3:~#

安裝軟件包 tree,用于查看目錄結(jié)構(gòu),如下所示。

root@flexusx-c1f3:~/tinyhttpd# apt install tree

Reading package lists... Done

Building dependency tree

Reading state information... Done

The following NEW packages will be installed:

tree

0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.

Need to get 43.0 kB of archives.

After this operation, 115 kB of additional disk space will be used.

Get:1 http://repo.huaweicloud.com/ubuntu focal/universe amd64 tree amd64 1.8.0-1 [43.0 kB]

Fetched 43.0 kB in 0s (1,003 kB/s)

Selecting previously unselected package tree.

(Reading database ... 116710 files and directories currently installed.)

Preparing to unpack .../tree_1.8.0-1_amd64.deb ...

Unpacking tree (1.8.0-1) ...

Setting up tree (1.8.0-1) ...

Processing triggers for man-db (2.9.1-1) ...

root@flexusx-c1f3:~/tinyhttpd#

下面通過 tree 查看 tinyhttpd 項(xiàng)目的目錄層級(jí)。

root@flexusx-c1f3:~/tinyhttpd# tree .

.

├── example

│ ├── echoclient.cpp

│ ├── echoserver.cpp

│ ├── README.md

│ ├── UDPclient.cpp

│ └── UDPserver.cpp

├── htdocs

│ ├── check.cgi

│ ├── color.cgi

│ ├── index.html

│ └── README

├── httpd.c

├── Makefile

├── README

└── simpleclient.c

2 directories, 13 files

root@flexusx-c1f3:~/tinyhttpd#

如上所示,tinyhttpd 項(xiàng)目是一個(gè)非常精致的項(xiàng)目,雖然功能不多,但是該有的功能都有。

四、運(yùn)行

4.1 編譯項(xiàng)目

進(jìn)入 tinyhttpd 目錄,執(zhí)行 make 命令編譯項(xiàng)目代碼,如下所示。

root@flexusx-c1f3:~/tinyhttpd# make

gcc -W -Wall -lpthread -o httpd httpd.c

httpd.c: In function ‘startup’:

httpd.c:533:52: warning: pointer targets in passing argument 3 of ‘getsockname’ differ in signedness [-Wpointer-sign]

if (getsockname(httpd, (struct sockaddr *)&name, &namelen) == -1) int *

In file included from httpd.c:23:

/usr/include/x86_64-linux-gnu/sys/socket.h:117:26: note: expected ‘socklen_t * restrict’ {aka ‘unsigned int * restrict’} but argument is of type ‘int *’

socklen_t *__restrict __len) __THROW;

httpd.c: In function ‘main’:

httpd.c:591:24: warning: pointer targets in passing argument 3 of ‘a(chǎn)ccept’ differ in signedness [-Wpointer-sign] &client_name_len); int *

In file included from httpd.c:23:

/usr/include/x86_64-linux-gnu/sys/socket.h:233:28: note: expected ‘socklen_t * restrict’ {aka ‘unsigned int * restrict’} but argument is of type ‘int *’

socklen_t *__restrict __addr_len);

編譯完成,當(dāng)前目錄下存在可執(zhí)行文件 httpd,如下所示。

root@flexusx-c1f3:~/tinyhttpd# ls

example htdocs httpd httpd.c Makefile README simpleclient.c

root@flexusx-c1f3:~/tinyhttpd#

4.2 運(yùn)行項(xiàng)目

直接執(zhí)行 httpd,如下所示。

root@flexusx-c1f3:~/tinyhttpd# ./httpd

httpd running on port 50547

這里需要將 50547 端口加入到安全規(guī)則中,如下所示。

wKgZPGd87PWAKQMiAAByyfO016Q214.png

然后,訪問http://服務(wù)器 IP 地址:50547即可,如下所示。

wKgZO2d87PaARQcMAABJHovevoU501.png

五、總結(jié)

Flexus 云服務(wù)器 X 實(shí)例是一個(gè)強(qiáng)大、靈活且經(jīng)濟(jì)高效的云服務(wù)解決方案。華為云的 Flexus 云服務(wù)器 X 實(shí)例以其卓越的性能、高度的靈活性和顯著的成本效益,為企業(yè)提供了一個(gè)全面而高效的云計(jì)算解決方案。部署輕量級(jí) Web 服務(wù)器 Tinyhttpd 至 Flexus 云服務(wù)器 X 實(shí)例 的過程異常便捷,這得益于華為云提供的直觀管理界面和工具。用戶可以輕松地通過幾個(gè)簡(jiǎn)單的步驟完成部署,無需深入的系統(tǒng)配置知識(shí)。此外,更新軟件源的速度也得到了顯著提升,這不僅確保了服務(wù)器能夠快速獲取最新軟件更新,也提高了整體的系統(tǒng)穩(wěn)定性和安全性。

審核編輯 黃宇

聲明:本文內(nèi)容及配圖由入駐作者撰寫或者入駐合作網(wǎng)站授權(quán)轉(zhuǎn)載。文章觀點(diǎn)僅代表作者本人,不代表電子發(fā)燒友網(wǎng)立場(chǎng)。文章及其配圖僅供工程師學(xué)習(xí)之用,如有內(nèi)容侵權(quán)或者其他違規(guī)問題,請(qǐng)聯(lián)系本站處理。 舉報(bào)投訴
  • 云服務(wù)器
    +關(guān)注

    關(guān)注

    0

    文章

    737

    瀏覽量

    13430
  • 華為云
    +關(guān)注

    關(guān)注

    3

    文章

    2696

    瀏覽量

    17595
收藏 人收藏

    評(píng)論

    相關(guān)推薦

    華為 Flexus X 實(shí)例服務(wù)器部署即時(shí)通訊 IM 項(xiàng)目

    @TOC ? 寫在前面 手里拿到了一臺(tái) 華為 Flexus X 實(shí)例服務(wù)器,
    的頭像 發(fā)表于 02-07 10:15 ?77次閱讀
    華為<b class='flag-5'>云</b> <b class='flag-5'>Flexus</b> <b class='flag-5'>X</b> <b class='flag-5'>實(shí)例</b><b class='flag-5'>云</b><b class='flag-5'>服務(wù)器</b><b class='flag-5'>部署</b>即時(shí)通訊 IM 項(xiàng)目

    服務(wù)器 Flexus X 實(shí)例:one-api 部署,支持眾多大模型

    本文通過 Flexus 服務(wù)器 X 實(shí)例 部署 one-api。
    的頭像 發(fā)表于 02-06 17:35 ?86次閱讀
    <b class='flag-5'>云</b><b class='flag-5'>服務(wù)器</b> <b class='flag-5'>Flexus</b> <b class='flag-5'>X</b> <b class='flag-5'>實(shí)例</b>:one-api <b class='flag-5'>部署</b>,支持眾多大模型

    Flexus 服務(wù)器 X 實(shí)例實(shí)踐:部署思源筆記工具

    服務(wù)器,它為各種應(yīng)用的部署提供了堅(jiān)實(shí)的基礎(chǔ),就如我們即將探討的思源筆記工具的部署一樣。 一、Flexus
    的頭像 發(fā)表于 02-06 15:37 ?84次閱讀
    <b class='flag-5'>Flexus</b> <b class='flag-5'>云</b><b class='flag-5'>服務(wù)器</b> <b class='flag-5'>X</b> <b class='flag-5'>實(shí)例</b>實(shí)踐:<b class='flag-5'>部署</b>思源筆記工具

    華為 Flexus 服務(wù)器 X 實(shí)例部署 Mininote 輕量級(jí)筆記工具

    @TOC ? 一、Flexus 服務(wù)器 X 實(shí)例介紹 1.1 Flexus
    的頭像 發(fā)表于 01-23 17:56 ?133次閱讀
    華為<b class='flag-5'>云</b> <b class='flag-5'>Flexus</b> <b class='flag-5'>云</b><b class='flag-5'>服務(wù)器</b> <b class='flag-5'>X</b> <b class='flag-5'>實(shí)例</b><b class='flag-5'>部署</b> Mininote <b class='flag-5'>輕量級(jí)</b>筆記工具

    Flexus 服務(wù)器 X 實(shí)例實(shí)踐:部署 Alist 文件列表程序

    引言 在當(dāng)今數(shù)字化時(shí)代,華為以其卓越的技術(shù)實(shí)力和可靠的服務(wù)品質(zhì)成為眾多企業(yè)和開發(fā)者的首選。華為 Flexus
    的頭像 發(fā)表于 01-14 09:31 ?370次閱讀
    <b class='flag-5'>Flexus</b> <b class='flag-5'>云</b><b class='flag-5'>服務(wù)器</b> <b class='flag-5'>X</b> <b class='flag-5'>實(shí)例</b>實(shí)踐:<b class='flag-5'>部署</b> Alist 文件列表程序

    Flexus 服務(wù)器 X 實(shí)例實(shí)踐:安裝 Dashdot 開源服務(wù)器儀表板

    引言 在當(dāng)今計(jì)算的浪潮下,華為憑借其卓越的技術(shù)實(shí)力,成為眾多企業(yè)和開發(fā)者的信賴之選。華為 Flexus
    的頭像 發(fā)表于 01-13 15:51 ?324次閱讀
    <b class='flag-5'>Flexus</b> <b class='flag-5'>云</b><b class='flag-5'>服務(wù)器</b> <b class='flag-5'>X</b> <b class='flag-5'>實(shí)例</b>實(shí)踐:安裝 Dashdot 開源<b class='flag-5'>服務(wù)器</b>儀表板

    Flexus 服務(wù)器 X 實(shí)例實(shí)踐:安裝 Ward 服務(wù)器監(jiān)控工具

    引言 在當(dāng)今數(shù)字化快速發(fā)展的時(shí)代,企業(yè)和開發(fā)者對(duì)于計(jì)算資源的需求日益增長(zhǎng)。華為憑借其卓越的技術(shù)實(shí)力脫穎而出,Flexus 服務(wù)器
    的頭像 發(fā)表于 01-13 15:51 ?149次閱讀
    <b class='flag-5'>Flexus</b> <b class='flag-5'>云</b><b class='flag-5'>服務(wù)器</b> <b class='flag-5'>X</b> <b class='flag-5'>實(shí)例</b>實(shí)踐:安裝 Ward <b class='flag-5'>服務(wù)器</b>監(jiān)控工具

    基于華為 Flexus 服務(wù)器 X 實(shí)例快速搭建 Halo 博客平臺(tái)

    如何基于華為 Flexus 服務(wù)器 X 實(shí)例快速搭建 Halo 博客平臺(tái),幫助大家掌握從選購(gòu)
    的頭像 發(fā)表于 01-08 11:46 ?210次閱讀
    基于華為<b class='flag-5'>云</b> <b class='flag-5'>Flexus</b> <b class='flag-5'>云</b><b class='flag-5'>服務(wù)器</b> <b class='flag-5'>X</b> <b class='flag-5'>實(shí)例</b>快速搭建 Halo 博客平臺(tái)

    華為 Flexus 服務(wù)器 X 實(shí)例之 openEuler 系統(tǒng)下部署 dufs 文件服務(wù)器

    一、Flexus 服務(wù)器 X 實(shí)例介紹 1.1 Flexus
    的頭像 發(fā)表于 01-08 11:45 ?240次閱讀
    華為<b class='flag-5'>云</b> <b class='flag-5'>Flexus</b> <b class='flag-5'>云</b><b class='flag-5'>服務(wù)器</b> <b class='flag-5'>X</b> <b class='flag-5'>實(shí)例</b>之 openEuler 系統(tǒng)下<b class='flag-5'>部署</b> dufs 文件<b class='flag-5'>服務(wù)器</b>

    華為 Flexus 服務(wù)器 X 實(shí)例之 openEuler 系統(tǒng)下部署 emlog 輕量級(jí)博客平臺(tái)

    前言 隨著計(jì)算技術(shù)的不斷進(jìn)步,華為 Flexus 服務(wù)器 X
    的頭像 發(fā)表于 01-03 09:20 ?211次閱讀
    華為<b class='flag-5'>云</b> <b class='flag-5'>Flexus</b> <b class='flag-5'>云</b><b class='flag-5'>服務(wù)器</b> <b class='flag-5'>X</b> <b class='flag-5'>實(shí)例</b>之 openEuler 系統(tǒng)下<b class='flag-5'>部署</b> emlog <b class='flag-5'>輕量級(jí)</b>博客平臺(tái)

    華為 Flexus 服務(wù)器 X 實(shí)例部署 Trilium Notes 知識(shí)庫工具

    一、Flexus 服務(wù)器 X 實(shí)例介紹 1.1 Flexus
    的頭像 發(fā)表于 01-02 20:45 ?220次閱讀
    華為<b class='flag-5'>云</b> <b class='flag-5'>Flexus</b> <b class='flag-5'>云</b><b class='flag-5'>服務(wù)器</b> <b class='flag-5'>X</b> <b class='flag-5'>實(shí)例</b><b class='flag-5'>部署</b> Trilium Notes 知識(shí)庫工具

    華為 Flexus 服務(wù)器 X 實(shí)例部署 Note Mark 筆記工具

    前言 華為 Flexus 服務(wù)器 X 實(shí)例作為專為中小企業(yè)和開發(fā)者設(shè)計(jì)的新一代柔性算力
    的頭像 發(fā)表于 01-02 13:42 ?110次閱讀
    華為<b class='flag-5'>云</b> <b class='flag-5'>Flexus</b> <b class='flag-5'>云</b><b class='flag-5'>服務(wù)器</b> <b class='flag-5'>X</b> <b class='flag-5'>實(shí)例</b><b class='flag-5'>部署</b> Note Mark 筆記工具

    華為 Flexus 服務(wù)器 X 實(shí)例的使用教程

    引言 選擇一款性價(jià)比高、性能強(qiáng)勁的服務(wù)器是 IT 技術(shù)人員常面臨的問題。華為Flexus 服務(wù)
    的頭像 發(fā)表于 12-30 09:16 ?287次閱讀
    華為<b class='flag-5'>云</b> <b class='flag-5'>Flexus</b> <b class='flag-5'>云</b><b class='flag-5'>服務(wù)器</b> <b class='flag-5'>X</b> <b class='flag-5'>實(shí)例</b>的使用教程

    采用 Flexus 服務(wù)器 X 實(shí)例搭建 RTSP 直播服務(wù)器

    監(jiān)控、直播和多媒體應(yīng)用的核心組件。在當(dāng)今高度互聯(lián)的世界中,能夠快速部署且穩(wěn)定運(yùn)行的 RTSP 服務(wù)器對(duì)于確保高質(zhì)量的視頻流體驗(yàn)至關(guān)重要。本文將指導(dǎo)如何在華為 Flexus?
    的頭像 發(fā)表于 12-24 17:36 ?267次閱讀
    采用 <b class='flag-5'>Flexus</b> <b class='flag-5'>云</b><b class='flag-5'>服務(wù)器</b> <b class='flag-5'>X</b> <b class='flag-5'>實(shí)例</b>搭建 RTSP 直播<b class='flag-5'>服務(wù)器</b>

    華為 Flexus 服務(wù)器 X 實(shí)例的購(gòu)買及使用體驗(yàn)

    價(jià)比服務(wù)。其中,華為 Flexus 服務(wù)器 X
    的頭像 發(fā)表于 12-24 17:26 ?235次閱讀
    華為<b class='flag-5'>云</b> <b class='flag-5'>Flexus</b> <b class='flag-5'>云</b><b class='flag-5'>服務(wù)器</b> <b class='flag-5'>X</b> <b class='flag-5'>實(shí)例</b>的購(gòu)買及使用體驗(yàn)