@@ -109,8 +109,8 @@ MSI installers are also available:
109109
110110To check the integrity, use the ` Get-FileHash ` cmdlet for PowerShell.
111111
112- ``` text copy
113- PS> Get-FileHash fluent-bit-4.0.4-win32.exe
112+ ``` shell copy
113+ Get-FileHash fluent-bit-4.0.4-win32.exe
114114```
115115
116116## Installing from a ZIP archive
@@ -121,8 +121,8 @@ PS> Get-FileHash fluent-bit-4.0.4-win32.exe
1211211 . Expand the ZIP archive. You can do this by clicking ** Extract All** in Explorer
122122 or ` Expand-Archive ` in PowerShell.
123123
124- ``` text
125- PS> Expand-Archive fluent-bit-4.0.4-win64.zip
124+ ``` shell
125+ Expand-Archive fluent-bit-4.0.4-win64.zip
126126 ```
127127
128128 The ZIP package contains the following set of files.
@@ -146,14 +146,14 @@ PS> Get-FileHash fluent-bit-4.0.4-win32.exe
146146
1471471 . Launch ` cmd.exe ` or PowerShell on your machine, and execute ` fluent-bit.exe ` :
148148
149- ``` text
150- PS> .\bin\fluent-bit.exe -i dummy -o stdout
149+ ``` shell
150+ .\b in\f luent-bit.exe -i dummy -o stdout
151151 ```
152152
153153The following output indicates Fluent Bit is running:
154154
155- ``` text
156- PS> .\bin\fluent-bit.exe -i dummy -o stdout
155+ ``` shell
156+ .\b in\f luent-bit.exe -i dummy -o stdout
157157Fluent Bit v2.0.x
158158* Copyright (C) 2019-2020 The Fluent Bit Authors
159159* Copyright (C) 2015-2018 Treasure Data
@@ -178,15 +178,11 @@ To halt the process, press `Control+C` in the terminal.
1781781 . Download an EXE installer for the appropriate 32-bit or 64-bit build.
1791791 . Double-click the EXE installer you've downloaded. The installation wizard starts.
180180
181- ![ Installation wizard screenshot] ( < ../.gitbook/assets/windows\_ installer (1) (1).png > )
182-
1831811 . Click ** Next** and finish the installation. By default, Fluent Bit is installed
184182 in ` C:\Program Files\fluent-bit\ ` .
185183
186- You should be able to launch Fluent Bit using the following PowerShell command:.
187-
188- ``` text
189- PS> C:\Program Files\fluent-bit\bin\fluent-bit.exe -i dummy -o stdout
184+ ``` shell
185+ & " C:\Program Files\fluent-bit\bin\fluent-bit.exe" -i dummy -o stdout
190186```
191187
192188### Installer options
@@ -198,8 +194,8 @@ for silent installation and install directory.
198194
199195To silently install to ` C:\fluent-bit ` directory here is an example:
200196
201- ``` text
202- PS> <installer exe> /S /D=C:\fluent-bit
197+ ``` shell
198+ < installer exe> /S /D=C:\f luent-bit
203199```
204200
205201The uninstaller also supports a silent uninstall using the same ` /S ` flag.
@@ -228,15 +224,15 @@ C:\fluent-bit\
228224To register Fluent Bit as a Windows service, execute the following command on
229225at a command prompt. A single space is required after ` binpath= ` .
230226
231- ``` text
227+ ``` shell
232228sc.exe create fluent-bit binpath= " \fluent-bit\bin\fluent-bit.exe -c \fluent-bit\conf\fluent-bit.conf"
233229```
234230
235231Fluent Bit can be started and managed as a normal Windows service.
236232
237- ``` text
238- % sc.exe start fluent-bit
239- % sc.exe query fluent-bit
233+ ``` shell
234+ sc.exe start fluent-bit
235+ sc.exe query fluent-bit
240236SERVICE_NAME: fluent-bit
241237 TYPE : 10 WIN32_OWN_PROCESS
242238 STATE : 4 Running
@@ -245,46 +241,38 @@ SERVICE_NAME: fluent-bit
245241
246242To halt the Fluent Bit service, use the ` stop ` command.
247243
248- ``` text
244+ ``` shell
249245sc.exe stop fluent-bit
250246```
251247
252248To start Fluent Bit automatically on boot, execute the following:
253249
254- ``` text
250+ ``` shell
255251sc.exe config fluent-bit start= auto
256252```
257253
258254## FAQs
259255
260- ### Fluent Bit fails to start up when installed under ` C:\Program Files `
261-
262- Quotations are required if file paths contain spaces. For example:
263-
264- ``` text
265- sc.exe create fluent-bit binpath= "\"C:\Program Files\fluent-bit\bin\fluent-bit.exe\" -c \"C:\Program Files\fluent-bit\conf\fluent-bit.conf\""
266- ```
267-
268256### Can you manage Fluent Bit service using PowerShell?
269257
270258Instead of ` sc.exe ` , PowerShell can be used to manage Windows services.
271259
272260Create a Fluent Bit service:
273261
274- ``` text
275- PS> New-Service fluent-bit -BinaryPathName "`"C:\Program Files\fluent-bit\bin\fluent-bit.exe`" -c `"C:\Program Files\fluent-bit\conf\fluent-bit.conf`"" -StartupType Automatic -Description "This service runs Fluent Bit, a log collector that enables real-time processing and delivery of log data to centralized logging systems."
262+ ``` shell
263+ New-Service fluent-bit -BinaryPathName " ` " C:\Program Files\fluent-bit\bin\fluent-bit.exe` " -c ` " C:\Program Files\fluent-bit\conf\fluent-bit.conf` " " -StartupType Automatic -Description " This service runs Fluent Bit, a log collector that enables real-time processing and delivery of log data to centralized logging systems."
276264` ` `
277265
278266Start the service:
279267
280- ``` text
281- PS> Start-Service fluent-bit
268+ ` ` ` shell
269+ Start-Service fluent-bit
282270` ` `
283271
284272Query the service status:
285273
286- ``` text
287- PS> get-Service fluent-bit | format-list
274+ ` ` ` shell
275+ get-Service fluent-bit | format-list
288276Name : fluent-bit
289277DisplayName : fluent-bit
290278Status : Running
@@ -298,14 +286,14 @@ ServiceType : Win32OwnProcess
298286
299287Stop the service:
300288
301- ``` text
302- PS> Stop-Service fluent-bit
289+ ` ` ` shell
290+ Stop-Service fluent-bit
303291` ` `
304292
305293Remove the service (requires PowerShell 6.0 or later)
306294
307- ``` text
308- PS> Remove-Service fluent-bit
295+ ` ` ` shell
296+ Remove-Service fluent-bit
309297` ` `
310298
311299## Compile from Source
@@ -318,21 +306,21 @@ compile Fluent Bit by yourself.
3183061. Install Microsoft Visual C++ to compile Fluent Bit. You can install the minimum
319307 toolkit using the following command:
320308
321- ``` text
322- PS> wget -o vs.exe https://aka.ms/vs/16/release/vs_buildtools.exe
323- PS> start vs.exe
309+ ` ` ` shell
310+ wget -o vs.exe https://aka.ms/vs/16/release/vs_buildtools.exe
311+ start vs.exe
324312` ` `
325313
3263141. Choose ` C++ Build Tools` and ` C++ CMake tools for Windows` and wait until the process finishes.
327315
3283161. Install flex and bison. One way to install them on Windows is to use
329317 [winflexbison](https://github.com/lexxmark/winflexbison).
330318
331- ``` text
332- PS> wget -o winflexbison.zip https://github.com/lexxmark/winflexbison/releases/download/v2.5.22/win_flex_bison-2.5.22.zip
333- PS> Expand-Archive winflexbison.zip -Destination C:\WinFlexBison
334- PS> cp -Path C:\WinFlexBison\win_bison.exe C:\WinFlexBison\bison.exe
335- PS> cp -Path C:\WinFlexBison\win_flex.exe C:\WinFlexBison\flex.exe
319+ ` ` ` shell
320+ wget -o winflexbison.zip https://github.com/lexxmark/winflexbison/releases/download/v2.5.22/win_flex_bison-2.5.22.zip
321+ Expand-Archive winflexbison.zip -Destination C:\W inFlexBison
322+ cp -Path C:\W inFlexBison\w in_bison.exe C:\W inFlexBison\b ison.exe
323+ cp -Path C:\W inFlexBison\w in_flex.exe C:\W inFlexBison\f lex.exe
336324 ` ` `
337325
3383261. Add the path ` C:\W inFlexBison` to your systems environment variable ` Path` .
@@ -342,9 +330,9 @@ PS> start vs.exe
342330
3433311. Install [Git](https://git-scm.com/download/win) to pull the source code from the repository.
344332
345- ``` text
346- PS> wget -o git.exe https://github.com/git-for-windows/git/releases/download/v2.28.0.windows.1/Git-2.28.0-64-bit.exe
347- PS> start git.exe
333+ ` ` ` shell
334+ wget -o git.exe https://github.com/git-for-windows/git/releases/download/v2.28.0.windows.1/Git-2.28.0-64-bit.exe
335+ start git.exe
348336 ` ` `
349337
350338### Compilation
@@ -358,21 +346,21 @@ PS> start vs.exe
358346
3593471. Clone the source code of Fluent Bit.
360348
361- ``` text
362- % git clone https://github.com/fluent/fluent-bit
363- % cd fluent-bit/build
349+ ` ` ` shell
350+ git clone https://github.com/fluent/fluent-bit
351+ cd fluent-bit/build
364352 ` ` `
365353
3663541. Compile the source code.
367355
368- ``` text
369- % cmake .. -G "NMake Makefiles"
370- % cmake --build .
356+ ` ` ` shell
357+ cmake .. -G " NMake Makefiles"
358+ cmake --build .
371359 ` ` `
372360
373361Now you should be able to run Fluent Bit:
374362
375- ``` text
363+ ` ` ` shell
376364.\b in\d ebug\f luent-bit.exe -i dummy -o stdout
377365` ` `
378366
0 commit comments