“化鲲为鹏,我有话说”如何用鲲鹏弹性云服务器部署《ZABBIX 监控系统》
【摘要】 安装 PHP 环境--------------后续补图!yum install php -yyum install apr-devel.aarch64 apr-util-devel.aarch64 pcre-devel.aarch64 -y修改 PHP 参数以安装 ZABBIX 的安装需求sed -i "s/;date.timezone =/date.timezone = Asia/Shan...
安装 PHP 环境--------------后续补图!
yum install php -y
yum install apr-devel.aarch64 apr-util-devel.aarch64 pcre-devel.aarch64 -y
rpm -qa |grep cmake
yum install bison* ncurses*
yum install -y bzip2 wget
yum install gcc gcc-c++ make cmake libaio-devel openssl-devel zlib-devel ncurses-devel bison -y
yum install -y ntpdate mailx dos2unix vim zcat wget net-snmp-utils gcc gcc-c++ autoconf httpd libxml* mysql mysql-server httpd-manual mod_ssl mod_perl mod_auth_mysql mysql-connector-odbc mysql-devel libdbi-dbd-mysql net-snmp-devel curl-devel unixODBC-devel OpenIPMI-devel java-devel fping
wget http://dl.wdlinux.cn/lanmp_laster.tar.gz
tar zxvf lanmp_laster.tar.gz
sh lanmp.sh
wget -c http://mirrors.linuxeye.com/oneinstack-full.tar.gz && tar xzf oneinstack-full.tar.gz && ./oneinstack/install.sh --apache_option 1 --apache_mpm_option 1 --apache_mode_option 1 --php_option 7 --phpmyadmin --db_option 2 --dbinstallmethod 1 --dbrootpwd oneinstack --pureftpd --redis --memcached --iptables --reboot
上面几行总结下这么多期的实践真理:安装依赖组件,一般后续安装编绎环境都能正常成功,鲲鹏主机网络很不稳定,建议18:30后实践
修改 PHP 参数以安装 ZABBIX 的安装需求
sed -i "s/;date.timezone =/date.timezone = Asia/Shanghai/g" /etc/php.ini
sed -i "s#`grep max_execution_time /etc/php.ini`#max_execution_time = 300#g" /etc/php.ini
sed -i "s#`grep post_max_size /etc/php.ini`#post_max_size = 32M#g" /etc/php.ini
sed -i "s#`grep max_input_time = /etc/php.ini`#max_input_time = 300#g" /etc/php.ini
sed -i "s#`grep memory_limit /etc/php.ini`#memory_limit = 128M#g" /etc/php.ini
启动 MYSQL 服务
service mysqld start
chkconfig mysqld on
创建库及授权
mysql -uroot -e "create database zabbix character set utf8;"
mysql -uroot -e "grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';"
mysql -uroot -e "flush privileges;"
创建 ZABBIX 用户及组
groupadd zabbix -g 201
useradd -g zabbix -u 201 -m -s /sbin/nologin zabbix
ZABBIX 相关组件安装部署
安装 ZABBIX 源
rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/6/x86_64/zabbix-release-3.2-1.el6.noarch.rpm
ll /etc/yum.repos.d/zabbix.repo
创建下载目录下载相关软件包
mkdir /software && cd /software
wget -c --timeout=10 http://repo.zabbix.com/zabbix/3.2/rhel/6/x86_64/deprecated/zabbix-server-mysql-3.2.7-1.el6.x86_64.rpm
wget -c --timeout=10 http://repo.zabbix.com/zabbix/3.2/rhel/6/x86_64/deprecated/zabbix-web-3.2.7-1.el6.noarch.rpm
wget -c --timeout=10 http://repo.zabbix.com/zabbix/3.2/rhel/6/x86_64/deprecated/zabbix-web-mysql-3.2.7-1.el6.noarch.rpm
wget -c --timeout=10 http://repo.zabbix.com/zabbix/3.2/rhel/6/x86_64/zabbix-agent-3.2.7-1.el6.x86_64.rpm
安装 ZABBIX 相关组件
yum localinstall -y zabbix-server-mysql* zabbix-web-mysql* zabbix-agent zabbix-web*
导入数据库
cd /usr/share/doc/zabbix-server-mysql-3.2.7
zcat create.sql.gz | mysql -uroot zabbix
设置 MYSQL 密码
mysqladmin -uroot password "mysqladmin"
拷贝网页文件
cd /usr/share/
cp -r ./zabbix/ /var/www/html/zabbix
修改配置文件
echo "DBPassword=zabbix" >> /etc/zabbix/zabbix_server.conf
启动相关服务
service httpd start
service zabbix-server start
service zabbix-agent start
chkconfig httpd on
chkconfig mysqld on
chkconfig php-fpm on
chkconfig zabbix-server on
chkconfig zabbix-agent on
【版权声明】本文为华为云社区用户原创内容,未经允许不得转载,如需转载请自行联系原作者进行授权。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)