---
# System prepended metadata

title: 10. Безопасность бизнес систем и баз данных

---

# 10. Безопасность бизнес систем и баз данных
Обновим информацию о пакетах

```bash=
sudo apt update && sudo apt upgrade
```
![](https://i.imgur.com/oubPlTg.png)
![](https://i.imgur.com/v2YdIUi.png)
![](https://i.imgur.com/XmQwfSx.png)

Установим пакеты для подключения репозитория clickhouse

```bash=
sudo apt install -y apt-transport-https ca-certificates dirmngr
```
![](https://i.imgur.com/Dic11TZ.png)

Добавим ключ

```bash=
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 8919F6BD2B48D754
```
![](https://i.imgur.com/VwkKtE0.png)

Довабим репозиторий

```bash=
echo "deb https://packages.clickhouse.com/deb stable main" | sudo tee /etc/apt/sources.list.d/clickhouse.list
```
![](https://i.imgur.com/hWIKQ16.png)

Обновим информацию о пакетах

```bash=
sudo apt update
```
![](https://i.imgur.com/tmwFcRB.png)
![](https://i.imgur.com/S3huQzQ.png)

Установим клиент и сервер clickhouse

```bash=
sudo apt install clickhouse-server clickhouse-client
```
![](https://i.imgur.com/lME5pHG.png)
![](https://i.imgur.com/9eWaAMw.png)


Добавим сервер в автозагрузку
```bash=
sudo systemctl enable clickhouse-server
```
![](https://i.imgur.com/PrtyAwh.png)


Запустим сервер
```bash=
sudo systemclt start clickhouse-server
```
![](https://i.imgur.com/b65nynm.png)

Проверим статус
```bash=
sudo systemctl status clickhouse-server
```
![](https://i.imgur.com/R3mNgxb.png)

Войдем
```bash=
clickhouse-client --password
```
![](https://i.imgur.com/zMGLIkt.png)

Выполним запрос к таблице логирования system.query_log
```bash=
SELECT * FROM system.query_log WHERE type = 'QueryFinish' ORDER BY query_start_time DESC LIMIT 1 FORMAT Vertical;
```
![](https://i.imgur.com/kDnUZqS.png)
![](https://i.imgur.com/gcbEA6C.png)
![](https://i.imgur.com/TGBs12M.png)



Увы, работа не завершена.