Last active
August 28, 2015 03:42
-
-
Save tkuchiki/2f3976e15da2c8e4f551 to your computer and use it in GitHub Desktop.
CentOS6 に zabbix-server を入れる
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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_pass 127.0.0.1:9000; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include fastcgi_params; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yum install -y http://repo.zabbix.com/zabbix/2.0/rhel/6/x86_64/zabbix-release-2.0-1.el6.noarch.rpm | |
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vm.box = "centos6.6" | |
config.vm.provider :virtualbox do |vb| | |
vb.customize ["modifyvm", :id, "--memory", "2048", "--cpus", "2", "--ioapic", "on"] | |
end | |
config.vm.network :forwarded_port, guest: 80, host: 8080 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment