關(guān)于zabbix及相關(guān)服務(wù)軟件版本:
Linux:centos 6.6
nginx:1.9.15
MySQL:5.5.49
PHP:5.5.35
一、安裝nginx:
安裝依賴包:
yum -y install gcc gcc-c++ autoconf automake zlib zlib-devel openssl openssl-devel pcre* make gd-devel libjpeg-devel libpng-devel libxml2-devel bzip2-devel libcurl-devel
創(chuàng)建用戶:
useradd nginx -s /sbin/nologin -M
下載nginx軟件包并進(jìn)入到目錄中:
wget http://nginx.org/download/nginx-1.9.15.tar.gz && tar xvf nginx-1.9.15.tar.gz && cd nginx-1.9.15
編譯:
./configure --prefix=/usr/local/product/nginx1.9.14 --user=www --group=www --with-http_ssl_module --with-http_v2_module --with-http_stub_status_module --with-pcre make && make installln -s /usr/local/product/nginx1.9.14 /usr/local/nginx ==>創(chuàng)建軟鏈接
參數(shù)解釋:
--with-http_stub_status_module:支持nginx狀態(tài)查詢--with-http_ssl_module:支持https--with-http_spdy_module:支持google的spdy,想了解請(qǐng)百度spdy,這個(gè)必須有ssl的支持--with-pcre:為了支持rewrite重寫功能,必須制定pcre
二、安裝PHP
下載PHP安裝包:
wget http://cn2.php.net/get/php-5.5.35.tar.gz/from/this/mirror
解壓并編譯:
mv mirror php-5.5.35.tar.gz && tar xvf php-5.5.35.tar.gz && cd php-5.5.35./configure --prefix=/usr/local/product/php-5.5.35 --with-config-file-path=/usr/local/product/php-5.5.35/etc --with-bz2 --with-curl --enable-ftp --enable-sockets --disable-ipv6 --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-freetype-dir=/usr/local --enable-gd-native-ttf --with-iconv-dir=/usr/local --enable-mbstring --enable-calendar --with-gettext --with-libxml-dir=/usr/local --with-zlib --with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd --with-mysql=mysqlnd --enable-dom --enable-xml --enable-fpm --with-libdir=lib64 --enable-bcmathmake && make installln -s /usr/local/product/php-5.5.35 /usr/local/phpcp php.ini-production /usr/local/php/etc/php.inicd /usr/local/php/etc/cp php-fpm.conf.default php-fpm.conf
修改php.ini參數(shù):(zabbix環(huán)境需要修改的參數(shù))
max_execution_time = 300 memory_limit = 128M post_max_size = 16M upload_max_filesize = 2M max_input_time = 300 date.timezone = PRC
三、安裝MySQL
添加mysql用戶,創(chuàng)建mysql的數(shù)據(jù)目錄:
groupadd mysqlmkdir -pv /data/mysqluseradd -r -g mysql -d /data/mysql -s /sbin/nologin mysqlchown -R mysql.mysql /data/mysql
安裝cmake及依賴:
yum install cmake gcc* ncurses-devel -y
下載MySQL安裝包:
wget http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.49.tar.gz
編譯安裝MySQL:
tar -xvf mysql-5.5.49.tar.gz && cd mysql-5.5.49cmake -DCMAKE_INSTALL_PREFIX=/usr/local/product/mysql5.5.49 -DDEFAULT_CHARSET=utf8 -DENABLED_LOCAL_INFILE=1 -DMYSQL_DATADIR=/data/mysql -DWITH_EXTRA_CHARSETS=all -DWITH_READLINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DMYSQL_TCP_PORT=3306 -DDEFAULT_COLLATION=utf8_general_cimake && make installln -s /usr/local/product/mysql5.5.49 /usr/local/mysqlchown -R mysql.mysql /usr/local/mysql
新聞熱點(diǎn)
疑難解答
圖片精選
網(wǎng)友關(guān)注