<commit_before># Zabbix

- [Reference](http://knowledge.sakura.ad.jp/tech/2917/)

## Zabbix Server
- ListenPort 10051
```
yum -y install httpd
yum -y install mysql-server
yum -y install http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
yum-config-manager --disablerepo=zabbiz*
yum -y --enablerepo=zabbix install zabbix-server-mysql zabbix-web-mysql zabbix-web-japanese
chkconfig mysqld on
service mysqld start
mysql_secure_installation
  BuNaiKyoutsu
mysql -u root -p
  CREATE USER zabbix;
  CREATE DATABASE zabbix CHARACTER SET utf8;
  GRANT ALL PRIVILEGES on zabbix.* TO zabbix@localhost IDENTIFIED BY 'BuNaiKyoutsu';
  FLUSH PRIVILEGES;
mysql -u zabbix -p zabbix < /usr/share/doc/zabbix-server-mysql-2.4.8/create/schema.sql
mysql -u zabbix -p zabbix < /usr/share/doc/zabbix-server-mysql-2.4.8/create/images.sql
mysql -u zabbix -p zabbix < /usr/share/doc/zabbix-server-mysql-2.4.8/create/data.sql
sed -r -e 's/^(# DBPassword=)$/# '"$(date +%Y%m%d)"' #\1\nDBPassword=BuNaiKyoutsu/g' /etc/zabbix/zabbix_server.conf
sed -r -e 's@^([ \t]*)(#[ \t]*)(php_value date.timezone )(Europe/Riga)@# '"$(date +%Y%m%d)"' #\1\2\3\4\n\1\3Asia/Tokyo@g' /etc/httpd/conf.d/zabbix.conf
chkconfig zabbix-server on
service zabbix-server start
chkconfig httpd on
service httpd start
```

## Zabbix Agent
- ListenPort 10050
```
yum -y install http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
yum-config-manager --disablerepo=zabbiz*
yum -y --enablerepo=zabbix install zabbix-agent
chkconfig zabbix-agent on
server zabbix-agent start
```<commit_msg>Update zabbix.md<commit_after># Zabbix

- [Reference](http://knowledge.sakura.ad.jp/tech/2917/)

## Zabbix Server
- ListenPort 10050
```
yum -y install httpd
yum -y install mysql-server
yum -y install http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
yum-config-manager --disablerepo=zabbiz*
yum -y --enablerepo=zabbix install zabbix-server-mysql zabbix-web-mysql zabbix-web-japanese
chkconfig mysqld on
service mysqld start
mysql_secure_installation
  BuNaiKyoutsu
mysql -u root -p
  CREATE USER zabbix;
  CREATE DATABASE zabbix CHARACTER SET utf8;
  GRANT ALL PRIVILEGES on zabbix.* TO zabbix@localhost IDENTIFIED BY 'BuNaiKyoutsu';
  FLUSH PRIVILEGES;
mysql -u zabbix -p zabbix < /usr/share/doc/zabbix-server-mysql-2.4.8/create/schema.sql
mysql -u zabbix -p zabbix < /usr/share/doc/zabbix-server-mysql-2.4.8/create/images.sql
mysql -u zabbix -p zabbix < /usr/share/doc/zabbix-server-mysql-2.4.8/create/data.sql
sed -r -e 's/^(# DBPassword=)$/# '"$(date +%Y%m%d)"' #\1\nDBPassword=Bu<PASSWORD>su/g' /etc/zabbix/zabbix_server.conf
sed -r -e 's@^([ \t]*)(#[ \t]*)(php_value date.timezone )(Europe/Riga)@# '"$(date +%Y%m%d)"' #\1\2\3\4\n\1\3Asia/Tokyo@g' /etc/httpd/conf.d/zabbix.conf
chkconfig zabbix-server on
service zabbix-server start
chkconfig httpd on
service httpd start

lokkit -p 10050:tcp
```

## Zabbix Agent
- ListenPort 10051
```
yum -y install http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
yum-config-manager --disablerepo=zabbiz*
yum -y --enablerepo=zabbix install zabbix-agent
chkconfig zabbix-agent on
service zabbix-agent start

lokkit -p 10051:tcp
```
{'fraction_non_alphanumeric': 0.15852904820766378, 'fraction_numerical': 0.03584672435105068, 'mean_word_length': 4.113744075829384, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1821382', 'n_tokens_mistral': 1490, 'n_tokens_neox': 1413, 'n_words': 273}