记录关于Devops运维,虚拟化容器云计算,数据库,网络安全等各方面问题。
Table of Contents Steps for a Fresh Installation of MySQL Installing Additional MySQL Products and Components Upgrading MySQL with the MySQL Yum Repository Replacing a Native Third-Party Distribution of MySQLSteps for a Fresh Installation of MySQLNote The following instructions assume that MySQL is not already installed on your system using a third-party-distributed RPM package; if that is not the case, follow the instructions given in Replacing a Native Third-Party Distribution of MySQL.Adding the MySQL Yum Repository First, add the MySQL Yum repository to your system's repository list. Follow these steps: Go to the download page for MySQL Yum repository at http://dev.mysql.com/downloads/repo/yum/. Select and download the release package for your platform. ...
把原来的yum源卸载掉# rpm -qa | grep yum | xargs rpm -e –-nodeps 添加并安装下载的yum的rpm包 wget http://mirrors.163.com/centos/6.8/os/x86_64/Packages/python-urlgrabber-3.9.1-11.el6.noarch.rpm# rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm # rpm -Uvh python-urlgrabber-3.9.1-11.el6.noarch.rpm # rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm# rpm -ivh yum-3.2.29-40.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm[注]:最后这两个包必须同时安装,因两个是相互依赖关系。 添加163的yum源# cd/etc/yum.repos.d/# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo 修改CentOS6-Base-163.repo#CentOS-Base.repo## The mirrorsystem uses the connecting IP address of the client and the# update statusof each mirror to pick mirrors that are updated to and# geographicallyclose to the client. You should use thisfor CentOS updates# unless you aremanually picking other mirrors.## If the mirrorlist=does not work for ...
Rsync+sersync环境:centos 7 or centos 7.1 x64前言:一、为什么要用Rsync+sersync架构?1、sersync是基于Inotify开发的,类似于Inotify-tools的工具2、sersync可以记录下被监听目录中发生变化的(包括增加、删除、修改)具体某一个文件或某一个目录的名字,然后使用rsync同步的时候,只同步发生变化的这个文件或者这个目录。二、Rsync+Inotify-tools与Rsync+sersync这两种架构有什么区别?1、Rsync+Inotify-tools(1):Inotify-tools只能记录下被监听的目录发生了变化(包括增加、删除、修改),并没有把具体是哪个文件或者哪个目录发生了变化记录下来;(2):rsync在同步的时候,并不知道具体是哪个文件或者哪个目录发生了变化,每次都是对整个目录进行同步,当数据量很大时,整个目录同步非常耗时(rsync要对整个目录遍历查找对比文件),因此,效率很低。2、Rsync+sersync(1):sersync可以记录下被监听目录中发生变化的(包括增加、删除、修改)具体某一个文件或某一个目录的名字;(2):rsync在同步的时候,只同步发生变化的这个文件或者这个目录(每次发生变化的数据相对整个同步目录数据来说是很小的,rsync在遍历查找比对文件时,速度很快),因此,效率很...
现实中,服务器可能会因为各种原因而crash掉,从而造成数据丢失或者服务的暂时不可用。为了提高服务的可用性以及数据的安全性,就需要对数据进行备份,以便数据恢复或者服务的动态切换(将访问请求动态重定向到备份服务器)。常见的备份方法是定时的rsync任务或者远程拷贝。但这种方式,如果定时的间隔较大,那么服务器宕掉后,还是会丢失部分数据,动态切换的服务也不是宕机前的最新状态。为了支持实时数据同步,Linux 2.6.13 内核中新引入文件系统变化通知机制inotify,一旦对文件系统有改动,就会触发相关事件任务。通过结合rsync,inotify能够很好地完成实时同步任务。主服务器:1.1.1.1 备份服务器:0.0.0.0配置步骤:1. 主服务器,备份服务器上安装rsync:sudo yum install rsync
2. 主服务器上安装inotify-tools:sudo yum install inotify-tools
3. 备份服务器上添加配置文件/etc/rsyncd.confreadonly=no
chroot=no
uid=root
gid=root
hosts allow=1.1.1.1
hosts deny=0.0.0.0/32
max connections=10
log file=/var/log/rsyncd.log
pid file=/var/run/rsyncd.pid
lock file=/var/run/rsync.lock
auth users=tongbu
secrets file=/etc/rsync.pass
[websit...
varnish对静态多的网站缓存效果好,对动态多的网站会有各种问题,也有可能出现张冠李戴,登陆退不出的问题,动态多的网站不推荐使用Centos 6.6/7最小化安装先导入第三方源wget http://www.atomicorp.com/installers/atomic #下载,首先使用默认yum源安装wget命令 yum install wgetsh ./atomic #安装yum clean all #清除当前yum缓存yum makecache #缓存yum源中的软件包信息yum repolist #列出yum源中可用的软件包yum check-update #更新yum软件包Install Varnishyum install varnish
Enable Varnish on Rebootchkconfig varnish on
Change Apache Listen Port to 8080vim /etc/httpd/conf/httpd.conf
Listen 80
##change to
Listen 8080
Configure Varnishvim /etc/sysconfig/varnish
VARNISH_LISTEN_PORT=6081
##change to
VARNISH_LISTEN_PORT=80
Configure Varnish Backendvim /etc/varnish/default.vcl
backend default {
.host = "127.0.0.1";
.port = "80";
}
##change to
backend default {
.host = "127.0.0.1";
.port = "8080";
}
Restart A...
1.RHEL/CentOS 7# yum install gcc gcc-c++ make openssl-devel curl wget net-snmp net-snmp-utils net-snmp-libs net-snmp-devel gnutls gnutls-devel libxml2 libxml2-develStep 2: Install MariaDB Database and Library# yum install mariadb-server mariadb-client mariadb-devel [On RHEL/CentOS 7Set MySQL root Password# mysql_secure_installationStep 3: Install Apache Web Server and PHP# yum install httpd php php-mysql php-gd pgp-cli php-xml php-bcmath php-mbstring mod_ssl openssl [On RHEL/CentOS 7]
5. Next, you need to tune PHP interpreter and adjust some values in order to run Zabbix Server. So, open Apachephp.ini configuration file for editing by issuing the following command:# nano /etc/php.ini [On RHEL/CentOS 7]post_max_size = 16M
max_execution_time = 300
max_input_time = 300
date.timezone = Continent/City
always_populate_raw_post_data = -1
# systemctl restart httpd.service [On RHEL/CentOS 7]
Step 4: Download, Compile and Install Zabbix Serverrpm -ivh http://repo.zabbix.com/za...
#!/bin/bash## 0、配置无人值守的安装,定义安装过程中需要用到的一些信息#mysql_root_pw=root_pwmysql_zabbix_pw=zabbix_pwDBPassword=$mysql_zabbix_pwCacheSize=256MZBX_SERVER_NAME=My-Zabbix-Server## 1、配置yum源#cat /etc/redhat-release |grep -i centos |grep '7.[[:digit:]]' >/dev/nullif [[ $? != 0 ]] then echo -e "不支持的操作系统,该脚本只适用于CentOS 7.x x86_64 操作系统" exit 1firpm -i --force http://mirrors.aliyun.com/zabbix/zabbix/3.0/rhel/7/x86_64/$(curl -s http://mirrors.aliyun.com/zabbix/zabbix/3.0/rhel/7/x86_64/ |grep release |awk -F '>|<' '{print $3}') &>/dev/nullsed -i 's@repo.zabbix.com@mirrors.aliyun.com/zabbix@' /etc/yum.repos.d/zabbix.repo## 2、使用yum安装Zabbix及必备软件#yum install -y httpd mariadb-server php gd php-bcmath php-ctype php-xml php-xmlreader php-xmlwriter php-session php-mbstring php-gettext php-ldap OpenIPMI libssh2 fping libcurl libxml2...
中文支持: zabbix实际是有中文语言的,我们可以通过修改web端源文件来开启中文语言。 修改你的 locales . inc . php 这个文件 'zh_CN' => ['name' => _('Chinese (zh_CN)'), 'display' => true], #也就是把false改为true 然后点击zabbix监控网页端右上角人头头像修改为中文语言即可。 更换语言后,图形会出现乱码,我们做如下修改即可。 修改你的defines.inc.php 这个文件 #修改第93行
define('ZBX_FONT_NAME', 'msyh');
#修改第45行改为
define('ZBX_GRAPH_FONT_NAME', 'msyh') 然后下载微软雅黑字体,改名为msyh传入/home/www/zabbix/fonts 目录下即可。 我这里安装的是zabbix 3.2最新版,发现原来使用的字体是/usr/share/fonts/dejavu/DejaVuSans.ttf 我使用的 Centos7.2系统,这里就将此字体备份下,换成了win2003系统中的simkai.ttf, 当然可以换成其它的字体。
对MySQL的监控不够详细。本文继续探讨对MySQL的详细监控,包括MySQL实例,MySQL主从复制和MySQL存储引擎等。 本文使用的MySQL版本是5.5 本文使用的模板主要通过FROMDUAL提供的模板更改而成,FROMDUAL官方使用Perl语言编写采集脚本然后通过zabbix trapper的方式推送数据到zabbix server。我觉得FROMDUAL官方提供的配置方式繁琐,并且我对Perl语言又不熟悉,于是阅读官方的Perl脚本后,生出想要重新用Shell语言来实现的想法。模板中的item名称有变更,其他的大体和FROMDUAL官方的模板相同。 show global status; 查看全局状态 show global variables; 查看全局变量设置 mysqladmin MySQL管理工具 show master status; 查看Master状态 show slave status; 查看Slave状态 show binary logs; 查看二进制日志文件 show engine innodb status\G 查看InnoDB存储引擎状态 show engine myisam status\G 查看MyISAM存储引擎状态 还有通过查看information_schema 这个数...
SQL> startupORA-01081: 无法启动已在运行的 ORACLE - 请首先关闭它SQL> startupORA-01081: 无法启动已在运行的 ORACLE - 请首先关闭它SQL> shutdown abortORACLE 例程已经关闭。SQL> startupORACLE 例程已经启动。Total System Global Area 612368384 bytesFixed Size 1250428 bytesVariable Size 306187140 bytesDatabase Buffers 297795584 bytesRedo Buffers 7135232 bytes数据库装载完毕。ORA-16038: 日志 1 序列号 77 无法归档ORA-19809: 超出了恢复文件数的限制ORA-00312: 联机日志 1 线程 1:'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO01.LOG'查看报警文件,如下信息:ORA-19815: WARNING: db_recovery_file_dest_size of 2147483648 bytes is 100.00% used, and has 0 remaining bytes availableSQL>...
最新评论