Skip to content

Instantly share code, notes, and snippets.

Last active Aug 28, 2015
What would you like to do?
CentOS6 に zabbix-server を入れる
server {
listen 80;
server_name localhost;
index index.html;
access_log /var/log/nginx/zabbix_access_log main;
error_log /var/log/nginx/zabbix_error_log error;
root /usr/share/nginx/html;
location /zabbix {
index index.php;
location ~ \.php$ {
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
yum install -y
yum install -y --disablerepo=epel zabbix-web-japanese zabbix-server zabbix-server-mysql zabbix-web-mysql zabbix-agent
mysql -u root -e "CREATE DATABASE zabbix CHARACTER SET utf8;"
mysql -u root -e "GRANT ALL PRIVILEGES ON zabbix.* to zabbix@localhost IDENTIFIED BY 'password';"
mysql -u root zabbix < /usr/share/doc/zabbix-server-mysql-2.0.*/create/schema.sql
mysql -u root zabbix < /usr/share/doc/zabbix-server-mysql-2.0.*/create/images.sql
mysql -u root zabbix < /usr/share/doc/zabbix-server-mysql-2.0.*/create/data.sql
sed -i -e '/# DBPassword=/c\DBPassword=password' /etc/zabbix/zabbix_server.conf
service zabbix-server start
service zabbix-agent start
chkconfig zabbix-server on
chkconfig zabbix-agent on
mkdir -p /usr/share/nginx/html/zabbix
ln -s /usr/share/zabbix /usr/share/nginx/html/zabbix
yum install -y php php-fpm
service php-fpm start
chkconfig php-fpm on
sed -i -e '/;date.timezone =/c\date.timezone = Asia/Tokyo' /etc/php.ini
sed -i -e '/post_max_size = 8M/c\post_max_size = 16M' /etc/php.ini
sed -i -e '/max_execution_time = 30/c\max_execution_time = 300' /etc/php.ini
sed -i -e '/max_input_time = 60/c\max_input_time = 300' /etc/php.ini
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config| = "centos6.6"
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "2048", "--cpus", "2", "--ioapic", "on"]
end :forwarded_port, guest: 80, host: 8080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment