<commit_before>---
layout: posts
title: docker+zabbix+postgresql+snmptrap+zabbix_agent for ubuntu
image: img/default.png
---

## docker+zabbix+postgresql+snmptrap+zabbix_agent for ubuntu
---
#### 1. download the dockerfiles and structure :
[dockerfiles&structure ](https://github.com/lumiere000/blog/blob/master/dockerize/readme.md)

structure :
```markdown
/home/zabbix
        ├── agent
        ├── server-pgsql
        ├── snmptraps
        ├── web-nginx-pgsql
        └── zbx_env
              ├── etc
              ├── usr
              └── var
```

#### 2. place docker-compose.yml

place [docker-compose.yml](https://github.com/lumiere000/blog/blob/master/dockerize/docker-compose.yml) to /home/zabbix


#### 3. build and start
```markdown
cd /home/zabbix
docker-compose start -d
```


### useful things
---
##### PHP time zone config
goto
```markdown
/home/zabbix/web-nginx-pgsql/ubuntu/conf/etc/php5/fpm/conf.d
vi 99-zabbix.ini
```
modify
```markdown
date.timezone=Asia/Hong_Kong
```

##### rebuild container without cache
```markdown
docker-compose build --no-cache
```<commit_msg>Update 2017-10-31-docker+zabbix.md<commit_after>---
layout: posts
title: docker+zabbix+postgresql+snmptrap+zabbix_agent for ubuntu
image: img/default.png
---

## docker+zabbix+postgresql+snmptrap+zabbix_agent for ubuntu
---
#### 1. download the dockerfiles and structure :
[dockerfiles&structure ](https://github.com/lumiere000/blog/blob/master/dockerize/readme.md)

structure :
```markdown
/home/zabbix
        ├── agent
        ├── server-pgsql
        ├── snmptraps
        ├── web-nginx-pgsql
        └── zbx_env
              ├── etc
              ├── usr
              └── var
```

#### 2. place docker-compose.yml

place [docker-compose.yml](https://github.com/lumiere000/blog/blob/master/dockerize/docker-compose.yml) to /home/zabbix


#### 3. build and start
```markdown
cd /home/zabbix
docker-compose start -d
```


### useful things
---
##### PHP time zone config
goto
```markdown
/home/zabbix/web-nginx-pgsql/ubuntu/conf/etc/php5/fpm/conf.d
vi 99-zabbix.ini
```
modify
```markdown
date.timezone=Asia/Hong_Kong
```


---
##### rebuild container without cache
```markdown
docker-compose build --no-cache
```
{'fraction_non_alphanumeric': 0.16847826086956522, 'fraction_numerical': 0.014492753623188406, 'mean_word_length': 3.1916508538899433, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4103385', 'n_tokens_mistral': 892, 'n_tokens_neox': 791, 'n_words': 157}