2022-12-05 13:19:44 +00:00
|
|
|
---
|
|
|
|
slug: /en/operations/update
|
|
|
|
---
|
2020-04-03 13:23:32 +00:00
|
|
|
|
2022-12-05 13:19:44 +00:00
|
|
|
# Update
|
2022-11-01 20:25:54 +00:00
|
|
|
|
|
|
|
## Self-managed ClickHouse Upgrade
|
2019-02-06 12:52:46 +00:00
|
|
|
|
2020-06-17 17:44:45 +00:00
|
|
|
If ClickHouse was installed from `deb` packages, execute the following commands on the server:
|
2019-02-06 12:52:46 +00:00
|
|
|
|
2020-03-20 10:10:48 +00:00
|
|
|
``` bash
|
2019-09-23 15:31:46 +00:00
|
|
|
$ sudo apt-get update
|
|
|
|
$ sudo apt-get install clickhouse-client clickhouse-server
|
|
|
|
$ sudo service clickhouse-server restart
|
2019-02-06 12:52:46 +00:00
|
|
|
```
|
|
|
|
|
2020-06-17 17:44:45 +00:00
|
|
|
If you installed ClickHouse using something other than the recommended `deb` packages, use the appropriate update method.
|
2019-02-06 12:52:46 +00:00
|
|
|
|
2022-06-02 10:55:18 +00:00
|
|
|
:::note
|
2022-04-09 13:29:05 +00:00
|
|
|
You can update multiple servers at once as soon as there is no moment when all replicas of one shard are offline.
|
|
|
|
:::
|
2021-01-20 22:29:45 +00:00
|
|
|
|
|
|
|
The upgrade of older version of ClickHouse to specific version:
|
|
|
|
|
2021-02-10 09:02:42 +00:00
|
|
|
As an example:
|
2021-07-29 15:20:55 +00:00
|
|
|
|
2021-02-10 09:04:25 +00:00
|
|
|
`xx.yy.a.b` is a current stable version. The latest stable version could be found [here](https://github.com/ClickHouse/ClickHouse/releases)
|
2021-01-20 22:29:45 +00:00
|
|
|
|
|
|
|
```bash
|
|
|
|
$ sudo apt-get update
|
2021-02-10 09:01:43 +00:00
|
|
|
$ sudo apt-get install clickhouse-server=xx.yy.a.b clickhouse-client=xx.yy.a.b clickhouse-common-static=xx.yy.a.b
|
2021-01-20 22:29:45 +00:00
|
|
|
$ sudo service clickhouse-server restart
|
|
|
|
```
|