Skip to content

Commit 6b1ef25

Browse files
committed
modified: README.md
1 parent 7cef051 commit 6b1ef25

1 file changed

Lines changed: 51 additions & 61 deletions

File tree

README.md

Lines changed: 51 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -14,76 +14,26 @@
1414

1515
## Installation
1616

17-
Use the one-line installer:
17+
Use the one-line installer to install ols cli binary:
1818

1919
```bash
2020
bash <(curl -fsSL https://raw.githubusercontent.com/Code-Egg/ols-cli/master/install_olscli.sh)
2121
```
2222

23-
## Usage
24-
25-
This section now provides:
26-
- a quick command overview table
27-
- a dedicated `ols site` subcommand/option table
28-
- practical examples underneath
29-
30-
### Command overview
23+
### Install runtime once
3124

32-
| Command | Purpose | Common options |
33-
| --- | --- | --- |
34-
| `ols install` | Install/align OpenLiteSpeed runtime and related packages | `--php81` `--php82` `--php83` `--php84` `--php85` `--database` `--config` `--http-port` `--https-port` `--ssl-cert` `--ssl-key` `--no-listeners` |
35-
| `ols site create <domain>` | Create a new site/vhost | `--wp` `--le` `--php81` `--php82` `--php83` `--php84` `--php85` |
36-
| `ols site update <domain>` | Update an existing site (PHP target is required) | `--wp` `--php81` `--php82` `--php83` `--php84` `--php85` |
37-
| `ols site info <domain>` | Show site metadata and detected status | *(none)* |
38-
| `ols site show <domain>` | Print OLS virtual host config (`vhconf.conf`) | *(none)* |
39-
| `ols site list` | List managed sites discovered from OLS vhost directory | *(none)* |
40-
| `ols site delete <domain>` | Remove site config/files and optionally keep DB | `--keep-db` |
41-
42-
Global options (apply to all commands): `--dry-run`, `--color`
43-
44-
### `ols site` subcommands and options
45-
46-
| Subcommand | Syntax | Options |
47-
| --- | --- | --- |
48-
| `create` | `ols site create <domain>` | `--wp` `--le` `--php81` `--php82` `--php83` `--php84` `--php85` |
49-
| `update` | `ols site update <domain>` | `--wp` and exactly one of `--php81` `--php82` `--php83` `--php84` `--php85` |
50-
| `info` | `ols site info <domain>` | *(none)* |
51-
| `show` | `ols site show <domain>` | *(none)* |
52-
| `list` | `ols site list` | *(none)* |
53-
| `delete` | `ols site delete <domain>` | `--keep-db` |
54-
55-
### Install runtime once (required before provisioning)
56-
57-
```bash
58-
sudo ols install
59-
```
60-
61-
You can switch database engine:
62-
63-
```bash
64-
sudo ols install --php83 --database mysql
65-
sudo ols install --php85 --database none
66-
```
67-
68-
Use config file defaults (recommended for first-run bootstrap):
25+
Install OpenLiteSpeed, PHP, Database.
6926

7027
```bash
71-
sudo mkdir -p /etc/ols-cli
72-
sudo cp docs/install.example.json /etc/ols-cli/install.json
7328
sudo ols install
7429
```
7530

76-
Override config values with flags when needed:
77-
78-
```bash
79-
sudo ols install --config /etc/ols-cli/install.json --php85 --database mysql --http-port 80 --https-port 443
80-
sudo ols install --no-listeners
81-
```
31+
## Usage
8232

8333
### Create a site with WordPress + Let's Encrypt
8434

8535
```bash
86-
sudo ols site create example.com --wp --le --php85
36+
sudo ols site create example.com --wp --le
8737
```
8838

8939
### Create a site with defaults (WordPress + PHP 8.5)
@@ -98,12 +48,6 @@ sudo ols site create example.com --wp
9848
sudo ols site update example.com --php85
9949
```
10050

101-
### Update a site and ensure WordPress + LiteSpeed Cache exist
102-
103-
```bash
104-
sudo ols site update example.com --wp --php83
105-
```
106-
10751
### Show site information
10852

10953
```bash
@@ -132,6 +76,33 @@ ols --dry-run site show example.com
13276
ols --dry-run site list
13377
```
13478

79+
## Command overview
80+
81+
| Command | Purpose | Common options |
82+
| --- | --- | --- |
83+
| `ols install` | Install/align OpenLiteSpeed runtime and related packages | `--php81` `--php82` `--php83` `--php84` `--php85` `--database` `--config` `--http-port` `--https-port` `--ssl-cert` `--ssl-key` `--no-listeners` |
84+
| `ols site create <domain>` | Create a new site/vhost | `--wp` `--le` `--php81` `--php82` `--php83` `--php84` `--php85` |
85+
| `ols site update <domain>` | Update an existing site (PHP target is required) | `--wp` `--php81` `--php82` `--php83` `--php84` `--php85` |
86+
| `ols site info <domain>` | Show site metadata and detected status | *(none)* |
87+
| `ols site show <domain>` | Print OLS virtual host config (`vhconf.conf`) | *(none)* |
88+
| `ols site list` | List managed sites discovered from OLS vhost directory | *(none)* |
89+
| `ols site delete <domain>` | Remove site config/files and optionally keep DB | `--keep-db` |
90+
91+
Global options (apply to all commands): `--dry-run`, `--color`
92+
93+
94+
`ols site` subcommands and options
95+
96+
| Subcommand | Syntax | Options |
97+
| --- | --- | --- |
98+
| `create` | `ols site create <domain>` | `--wp` `--le` `--php81` `--php82` `--php83` `--php84` `--php85` |
99+
| `update` | `ols site update <domain>` | `--wp` and exactly one of `--php81` `--php82` `--php83` `--php84` `--php85` |
100+
| `info` | `ols site info <domain>` | *(none)* |
101+
| `show` | `ols site show <domain>` | *(none)* |
102+
| `list` | `ols site list` | *(none)* |
103+
| `delete` | `ols site delete <domain>` | `--keep-db` |
104+
105+
135106
## Development
136107

137108
### Build locally
@@ -151,3 +122,22 @@ For verbose output:
151122
```bash
152123
go test -v ./...
153124
```
125+
126+
127+
## FAQ
128+
129+
#### Custom the default config file
130+
Use config file defaults (recommended for first-run bootstrap):
131+
132+
```bash
133+
sudo mkdir -p /etc/ols-cli
134+
sudo cp docs/install.example.json /etc/ols-cli/install.json
135+
sudo ols install
136+
```
137+
138+
Override config values with flags when needed:
139+
140+
```bash
141+
sudo ols install --config /etc/ols-cli/install.json --php85 --database mysql --http-port 80 --https-port 443
142+
sudo ols install --no-listeners
143+
```

0 commit comments

Comments
 (0)