mirror of
https://github.com/winsw/winsw.git
synced 2025-12-10 18:37:28 +08:00
Revise docs for 3.0.0-alpha.7 (#731)
* Revise docs for 3.0.0-alpha.7 * Merge the installation guide into the homepage * Fix header levels * Add Jenkins sample * Strip common file name prefix
This commit is contained in:
43
README.md
43
README.md
@@ -12,8 +12,6 @@ WinSW wraps and manages any application as a Windows service.
|
||||
|
||||
**We are actively developing WinSW 3. Please refer to the [v2](https://github.com/winsw/winsw/tree/master) branch for previous version documentation.**
|
||||
|
||||
**Please help us prioritize items by voting or commenting on the issues!**
|
||||
|
||||
## Why?
|
||||
|
||||
See the [project manifest](MANIFEST.md).
|
||||
@@ -43,6 +41,44 @@ Alternative sources:
|
||||
* [Maven packaging](https://github.com/jenkinsci/winsw-maven-packaging) for executables, hosted by the [Jenkins project](https://jenkins.io/).
|
||||
Binaries are available [here](https://repo.jenkins-ci.org/releases/com/sun/winsw/winsw/). (2.x)
|
||||
|
||||
## Get started
|
||||
|
||||
### Use WinSW as a global tool
|
||||
|
||||
1. Take *WinSW.exe* or *WinSW.zip* from the distribution.
|
||||
1. Write *myapp.xml* (see the [XML config file specification](docs/xml-config-file.md) and [samples](samples) for more details).
|
||||
1. Run [`winsw install myapp.xml [options]`](docs/cli-commands.md#install-command) to install the service.
|
||||
1. Run [`winsw start myapp.xml`](docs/cli-commands.md#start-command) to start the service.
|
||||
1. Run [`winsw status myapp.xml`](docs/cli-commands.md#status-command) to see if your service is up and running.
|
||||
|
||||
### Use WinSW as a bundled tool
|
||||
|
||||
1. Take *WinSW.exe* or *WinSW.zip* from the distribution, and rename the *.exe* to your taste (such as *myapp.exe*).
|
||||
1. Write *myapp.xml* (see the [XML config file specification](docs/xml-config-file.md) and [samples](samples) for more details).
|
||||
1. Place those two files side by side, because that's how WinSW discovers its co-related configuration.
|
||||
1. Run [`myapp.exe install [options]`](docs/cli-commands.md#install-command) to install the service.
|
||||
1. Run [`myapp.exe start`](docs/cli-commands.md#start-command) to start the service.
|
||||
|
||||
### Sample configuration file
|
||||
|
||||
You write the configuration file that defines your service.
|
||||
The example below is a primitive example being used in the Jenkins project:
|
||||
|
||||
```xml
|
||||
<service>
|
||||
<id>jenkins</id>
|
||||
<name>Jenkins</name>
|
||||
<description>This service runs Jenkins continuous integration system.</description>
|
||||
<env name="JENKINS_HOME" value="%BASE%"/>
|
||||
<executable>java</executable>
|
||||
<arguments>-Xrs -Xmx256m -jar "%BASE%\jenkins.war" --httpPort=8080</arguments>
|
||||
<log mode="roll"></log>
|
||||
</service>
|
||||
```
|
||||
|
||||
The full specification of the configuration file is available [here](docs/xml-config-file.md).
|
||||
You can find more samples [here](samples).
|
||||
|
||||
## Usage
|
||||
|
||||
WinSW is being managed by the [XML configuration file](docs/xml-config-file.md).
|
||||
@@ -51,7 +87,7 @@ Your renamed *WinSW.exe* binary also accepts the following commands:
|
||||
|
||||
| Command | Description |
|
||||
| ------- | ----------- |
|
||||
| [install](docs/cli-commands.md#install-command) | Installs the service. This command requires some preliminary steps described in the [installation guide](docs/installation.md). |
|
||||
| [install](docs/cli-commands.md#install-command) | Installs the service. |
|
||||
| [uninstall](docs/cli-commands.md#uninstall-command) | Uninstalls the service. |
|
||||
| [start](docs/cli-commands.md#start-command) | Starts the service. |
|
||||
| [stop](docs/cli-commands.md#stop-command) | Stops the service. |
|
||||
@@ -74,7 +110,6 @@ Most commands require Administrator privileges to execute. WinSW will prompt for
|
||||
|
||||
## Documentation
|
||||
|
||||
* [Get started](docs/installation.md)
|
||||
* [Migrate to WinSW 3.x](docs/migrate-to-3-x.md)
|
||||
* Configuration:
|
||||
* [XML configuration file](docs/xml-config-file.md)
|
||||
|
||||
Reference in New Issue
Block a user