zabbix-3.2.3+php-5.6.29+percona-server-5.6.29-76.2+nginx-1.10.2(CentOS6.5)

來源:互聯網
上載者:User

標籤:hup   ...   pos   sas   put   libtool   flv   ipv6   call   

一、安裝percona-server-5.6.29-76.21、先安裝依賴包yum -y install gcc gcc-c++ autoconf automake openssl openssl-devel zlib zlib-devel ncurses-devel libtool-ltdl-devel bison-devel bison 2、安裝cmake,編譯percona用cd /usr/local/src && tar xf cmake-3.7.2.tar.gz && cd cmake-3.7.2 ./configure && make && make install 3、安裝percona-servercd /usr/local/src && tar xf percona-server-5.6.29-76.2.tar.gz && cd percona-server-5.6.29-76.2 /usr/local/bin/cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql/ -DMYSQL_DATADIR=/usr/local/mysql/data/ -DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.sock -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_MYISAM_STORAGE_ENGINE=1 -DENABLED_LOCAL_INFILE=1 -DMYSQL_TCP_PORT=3306 -DWITH_EXTRA_CHARSETS:STRING=utf8,gbk -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_DEBUG=0 -DWITH_EDITLINE:STRING=bundled -DWITH_SSL=yes -DSYSCONFDIR=/usr/local/mysql/ -DENABLE_DOWNLOADS=1 && make && make install useradd -r mysql && chown -R mysql. /usr/local/mysql /usr/local/mysql/scripts/mysql_install_db --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data/ --defaults-file=/usr/local/mysql/ --user=mysql && ln -s /usr/local/mysql/bin/mysqlbinlog  /usr/bin/mysqlbinlog && ln -s /usr/local/mysql/bin/mysql /usr/bin/mysql cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld && chmod a+x /etc/init.d/mysqld && chkconfig --add mysqld && chkconfig mysqld on vim /usr/local/mysql/my.cnf[client]port = 3306socket = /usr/local/mysql/mysql.sock[mysqld]innodb_buffer_pool_size = 3276Mlog-bin=mysql-binbasedir = /usr/local/mysqldatadir = /usr/local/mysql/datajoin_buffer_size = 128Msort_buffer_size = 2Mread_rnd_buffer_size = 2Mskip-name-resolvemax_connections = 1000pid-file=/usr/local/mysql/mysqld.pidsql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES /etc/init.d/mysqld start /usr/local/mysql/bin/mysql_secure_installation 二、安裝phpyum -y install libxml2-devel libjpeg-devel freetype-devel libpng-devel gd-devel curl-devel libxslt-devel openldap openldap-devel libmcrypt libmcrypt-devel \cp -frp /usr/lib64/libldap* /usr/lib/ && cd /usr/local/src/ && tar xf php-5.6.29.tar.gz && cd php-5.6.29 ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc/  --with-mysql --with-mysqli --with-pdo-mysql --enable-mysqlnd --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-fpm  --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --with-gettext --enable-sockets --with-ldap --with-ldap-sasl --with-xmlrpc  --enable-soap --enable-ftp --enable-opcache=no && make && make install cp php.ini-production /usr/local/php/etc/php.ini && cd /usr/local/php/etc/ && cp php-fpm.conf.default php-fpm.conf vim /usr/local/php/etc/php.inimax_execution_time = 300max_input_time = 300memory_limit = 128Mpost_max_size = 32Mdate.timezone = Asia/Shanghaialways_populate_raw_post_data = -1 cp /usr/local/src/php-5.6.29/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm chmod a+x /etc/init.d/php-fpm && chkconfig --add php-fpm && chkconfig php-fpm on && /etc/init.d/php-fpm start 三、安裝nginxyum -y install pcre pcre-devel && useradd -r -s /sbin/nologin www cd /usr/local/src/ && tar xf nginx-1.10.2.tar.gz && cd nginx-1.10.2 ./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_flv_module --with-http_gzip_static_module --with-cc-opt=-O3 --with-stream && make && make install vim /usr/local/nginx/conf/nginx.confuser  www;location / {            root   /var/www/html;            index  index.php index.html index.htm;        }location ~ \.php$ {            root           /var/www/html;            fastcgi_pass   127.0.0.1:9000;            fastcgi_index  index.php;            fastcgi_param  SCRIPT_FILENAME  /var/www/html$fastcgi_script_name;            include        fastcgi_params;        } 加入開機啟動vim /etc/init.d/nginx#!/bin/bash# nginx Startup script for the Nginx HTTP Server# it is v.0.0.2 version.# chkconfig: 35 85 15# description: Nginx is a high-performance web and proxy server.#              It has a lot of features, but it‘s not for everyone.# processname: nginx# pidfile: /var/run/nginx.pid# config: /usr/local/nginx/conf/nginx.conf #nginx程式路徑nginxd=/usr/local/nginx/sbin/nginx #nginx設定檔路徑nginx_config=/usr/local/nginx/conf/nginx.conf #nginx pid檔案的路徑,可以在nginx的設定檔中找到nginx_pid=/var/run/nginx.pidRETVAL=0prog="nginx"# Source function library.. /etc/rc.d/init.d/functions# Source networking configuration.. /etc/sysconfig/network# Check that networking is up.[ ${NETWORKING} = "no" ] && exit 0[ -x $nginxd ] || exit 0# Start nginx daemons functions.start() {if [ -e $nginx_pid ];then   echo "nginx already running...."   exit 1fi   echo -n $"Starting $prog: "   daemon $nginxd -c ${nginx_config}   RETVAL=$?   echo   [ $RETVAL = 0 ] && touch /var/lock/subsys/nginx   return $RETVAL}# Stop nginx daemons functions.stop() {        echo -n $"Stopping $prog: "        killproc $nginxd        RETVAL=$?        echo        [ $RETVAL = 0 ] && rm -f /var/lock/subsys/nginx /var/run/nginx.pid}# reload nginx service functions.reload() {    echo -n $"Reloading $prog: "    #kill -HUP `cat ${nginx_pid}`    killproc $nginxd -HUP    RETVAL=$?    echo}# See how we were called.case "$1" instart)        start        ;;stop)        stop        ;;reload)        reload        ;;restart)        stop        start        ;;status)        status $prog        RETVAL=$?        ;;*)        echo $"Usage: $prog {start|stop|restart|reload|status|help}"        exit 1esacexit $RETVAL chmod a+x /etc/init.d/nginx && chkconfig --add nginx && chkconfig nginx on 四、安裝zabbixuseradd -r -s /sbin/nologin zabbix && mkdir -p /var/www/html/zabbix && cd /usr/local/src/ && tar xf zabbix-3.2.3.tar.gz && cd zabbix-3.2.3 yum -y install net-snmp-devel mysql -uroot -pmysqlcreate database zabbix character set utf8 collate utf8_bin;grant all privileges on zabbix.* to ‘zabbix‘@‘127.0.0.1‘ identified by ‘zabbix‘;quit; cd /usr/local/src/zabbix-3.2.3/database/mysql/mysql -uzabbix -pzabbix zabbix < schema.sqlmysql -uzabbix -pzabbix zabbix < images.sqlmysql -uzabbix -pzabbix zabbix < data.sql cd /usr/local/src/zabbix-3.2.3 && ./configure --prefix=/usr/local/zabbix --enable-server --enable-agent --with-mysql==/usr/local/mysql/bin/mysql_config --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2 && make && make install vim /usr/local/zabbix/etc/zabbix_server.confDBName=zabbixDBUser=zabbixDBPassword=zabbix vim /usr/local/zabbix/etc/zabbix_agentd.confServer={zabbix server ip}Hostname={agent hostname} echo "/usr/local/mysql/lib/" >> /etc/ld.so.conf && ldconfig /usr/local/zabbix/sbin/zabbix_server && /usr/local/zabbix/sbin/zabbix_agentd cp -a /usr/local/src/zabbix-3.2.3/frontends/php /var/www/html/zabbix/ cd /var/www/html/zabbix/conf && cp zabbix.conf.php.example zabbix.conf.php vim zabbix.conf.php<?php// Zabbix GUI configuration file.global $DB; $DB[‘TYPE‘]                     = ‘MYSQL‘;$DB[‘SERVER‘]                   = ‘127.0.0.1‘;$DB[‘PORT‘]                     = ‘0‘;$DB[‘DATABASE‘]                 = ‘zabbix‘;$DB[‘USER‘]                     = ‘zabbix‘;$DB[‘PASSWORD‘]                 = ‘zabbix‘;// Schema name. Used for IBM DB2 and PostgreSQL.$DB[‘SCHEMA‘]                   = ‘‘; $ZBX_SERVER                     = ‘localhost‘;$ZBX_SERVER_PORT                = ‘10051‘;$ZBX_SERVER_NAME                = ‘‘; $IMAGE_FORMAT_DEFAULT   = IMAGE_FORMAT_PNG; http://<server_ip_or_name>/zabbixMake sure that all software prerequisites are met.        

zabbix-3.2.3+php-5.6.29+percona-server-5.6.29-76.2+nginx-1.10.2(CentOS6.5)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.