安装系统为centos 6.5 mini x64
基本功能安装:yum -y install gcc automake autoconf libtool make gccgcc-c++ glibc libxslt-devel libjpeg libjpeg-devel libpng libpng-devel freetypefreetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogse2fsprogs-devel ImageMagick ImageMagick-devel krb5* krb5-devel libidnlibidn-devel openssl openssl-devel gcc automake autoconf libtool make gccgcc-c++ mlocate wget
nginx安装:
wget http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
rpm -ivh nginx-release-centos-6-0.el6.ngx.noarch.rpm
yum install nginx
mysql安装: yum install mysql mysql-server
php安装:1.yum install php php-devel
2.功能组件安装:rpm-Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
yum install php-mysql php-gd libjpeg* php-imap php-ldap php-odbc php-pearphp-xml php-xmlrpc php- mbstring mcrypt php-bcmath mhash libmcryptlibmcrypt-devel php-fpm
3.扩展功能包安装:
wgethttp://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.tar.gz
tar zxvf libiconv-1.13.tar.gz
cd libiconv-1.13/
./configure
make
make install
cd ../
wget http://nchc.dl.sourceforge.net/project/mcrypt/Libmcrypt/Production/libmcrypt-2.5.7.tar.gz
tar zxvf libmcrypt-2.5.7.tar.gz
cd libmcrypt-2.5.7/
./configure
make
make install
/sbin/ldconfig
cd libltdl/
./configure --enable-ltdl-install
make
make install
cd ../../
wgethttp://ncu.dl.sourceforge.net/project/mcrypt/MCrypt/2.6.8/mcrypt-2.6.8.tar.gz
tar zxvf mcrypt-2.6.8.tar.gz
cd mcrypt-2.6.8/
/sbin/ldconfig
./configure
make
make install
cd ../
wget http://nchc.dl.sourceforge.net/project/mhash/mhash/0.9.9.9/mhash-0.9.9.9.tar.gz
tar zxvf mhash-0.9.9.9.tar.gz
cd mhash-0.9.9.9
./configure
make
make install
./configure -with-mhash=[dir] [--other-configuration-directives]
make
make install
cd ..
wget http://ncu.dl.sourceforge.net/project/eaccelerator/eaccelerator/eAccelerator%200.9.6.1/eaccelerator-0.9.6.1.tar.bz2
tar jxvf eaccelerator-0.9.6.1.tar.bz2
cd eaccelerator-0.9.6.1/
phpize
./configure --enable-eaccelerator=shared--with-php-config=/usr/bin/php-config
make
make install
cd ../
wget http://pecl.php.net/get/imagick-3.1.1.tgz
tar zxvf imagick-3.1.1.tgz
cd imagick-3.1.1
phpize
./configure --with-http_stub_status_module --with-http_ssl_module
make && make install
cd ../
zabbix安装:
rpm -Uvh http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-release-2.2- 1.el6.noarch.rpm
yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent zabbix-java- gateway
php_value date.timezone Asia/Chongqing
mysql> CREATE DATABASE zabbix CHARACTER SET UTF8;
mysql> GRANT ALL PRIVILEGES on zabbix.* to 'zabbix'@'localhost' IDENTIFIED BY 'SECRET_PASSWORD';
mysql> FLUSH PRIVILEGES;
mysql> quit
# mysql -u zabbix -p zabbix < /usr/share/doc/zabbix-server-mysql- 2.2.2/create/schema.sql
# mysql -u zabbix -p zabbix < /usr/share/doc/zabbix-server-mysql-2.2.2/create/images.sql
# mysql -u zabbix -p zabbix < /usr/share/doc/zabbix-server-mysql-2.2.2/create/data.sql
配置:p
1.nginx配置:
vi /etc/nginx/fastcgi_params /etc/nginx/fastcgi_params 添加一行fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
vi /etc/nginx/conf.d/default.conf 修改网站目录及php支持
2.根据对应zabbix提示修改php配置vi /etc/php.ini
max_execution_time = 300
date.timezone = Asia/Chongqing