标签:one 过程 编译安装 load bmc efault etc 组件 gui
yum -y install createrepo #下载依赖关系命令 createrepo rpm #生成依赖关系 vim /etc/yum.repos.d/cccc.repo #创建yum源指定安装包 [rpm] name=rpm baseurl=file:///root/rpm/ gpgcheck=0 enabled=1 yum -y install pcre pcre-devel zlib-devel libaio libaio-devel libxml2 libxml2-devel bzip2-devel openssl openssl-devel net-snmp-devel net-snmp curl-devel gd gcc gcc-c++ make libjpeg-devel libpng-devel libcurl-devel perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker mysql-devel net-snmp-utils #如果下一步出现问题,请注释掉yum配置文件里的本地光盘源 yum -y install libvpx-devel gd-devel
useradd -s /sbin/nologin -M www tar xf nginx-1.10.2.tar.gz -C /usr/src/ cd /usr/src/nginx-1.10.2/ ./configure --prefix=/usr/local/nginx --user=www --group=www --with-http_stub_status_module --with-http_ssl_module && make && make install ln -s /usr/local/nginx/sbin/* /usr/local/sbin/ cd /usr/local/nginx/conf/ egrep -v "^$|#" nginx.conf.default > nginx.conf vim nginx.conf worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; server { listen 80; server_name localhost; location / { root html; index index.php index.html index.htm; } location = /nginx-status { stub_status on; access_log off; } 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; } } } nginx -t nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
tar xf mysql-5.5.32-linux2.6-x86_64.tar.gz -C /usr/local/ cd /usr/local/ mv mysql-5.5.32-linux2.6-x86_64 mysql cd mysql/ /bin/cp support-files/my-small.cnf /etc/my.cnf useradd -s /sbin/nologin -M mysql chown -R mysql.mysql data /usr/local/mysql/scripts/mysql_install_db --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql cp support-files/mysql.server /etc/init.d/mysqld chmod +x /etc/init.d/mysqld /etc/init.d/mysqld start Starting MySQL.. SUCCESS!
tar xf libmcrypt-2.5.8.tar.gz -C /usr/src/ cd /usr/src/libmcrypt-2.5.8/ ./configure && make && make install
tar xf GD-2.18.tar.gz -C /usr/src/ cd /usr/src/GD-2.18/ perl Makefile.PL make && make install
tar xf php-5.6.30.tar.gz -C /usr/src/ cd /usr/src/php-5.6.30/ ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-bz2 --with-curl --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-bcmath make && make install cp php.ini-development /usr/local/php/etc/php.ini vim /usr/local/php/etc/php.ini 372 max_execution_time = 300 382 max_input_time = 300 393 memory_limit = 256M 660 post_max_size = 32M 702 always_populate_raw_post_data = -1 820 upload_max_filesize = 16M 936 date.timezone =Asia/Shanghai cd /usr/local/php/etc/ cp php-fpm.conf.default php-fpm.conf vim php-fpm.conf 149 user = www 150 group = www
useradd zabbix -s /sbin/nologin -M tar xf zabbix-3.2.4.tar.gz -C /usr/src/ cd /usr/src/zabbix-3.2.4/ ./configure --prefix=/usr/local/zabbix --with-mysql --with-net-snmp --with-libcurl --enable-server --enable-agent --enable-proxy --with-libxml2 make && make install #由于zabbix启动脚本路径默认指向的是/usr/local/sbin路径,因此,需要提前建立软连接: ln -s /usr/local/zabbix/sbin/* /usr/local/sbin/ ln -s /usr/local/zabbix/bin/* /usr/local/bin/
Zabbix服务器和mysql安装到一台服务器上,首先需要手动创建zabbix数据库,操作如下: mysqladmin -uroot password ‘123123‘ mysql -uroot -p123123 -e ‘create database zabbix character set utf8;‘ mysql -uroot -p123123 -e "grant all privileges on zabbix.* to zabbix@‘localhost‘ identified by ‘123123‘;" mysql -uroot -p123123 -e ‘flush privileges;‘ #如下数据的导入顺序不可以错 mysql -uzabbix -p123123 zabbix < /usr/src/zabbix-3.2.4/database/mysql/schema.sql mysql -uzabbix -p123123 zabbix < /usr/src/zabbix-3.2.4/database/mysql/images.sql mysql -uzabbix -p123123 zabbix < /usr/src/zabbix-3.2.4/database/mysql/data.sql
cp -rp /usr/src/zabbix-3.2.4/frontends/php /usr/local/nginx/html/zabbix cd /usr/local/nginx/html/ chown -R www.www zabbix ll -d zabbix/ drwxr-xr-x. 13 www www 4096 Feb 27 2017 zabbix/
/usr/local/nginx/sbin/nginx netstat -antup | grep nginx tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 8439/nginx /usr/local/php/sbin/php-fpm netstat -antup | grep php-fpm tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 8522/php-fpm
在浏览器输入:IP/zabbix
标签:one 过程 编译安装 load bmc efault etc 组件 gui
原文地址:https://www.cnblogs.com/ywrj/p/9551324.html