3 月 302015
 

安装RPM软件源

http://repoforge.org/use/

查看服务监听端口

[root@localhost ~]# netstat -ltnp |grep 667
tcp 0 0 0.0.0.0:667 0.0.0.0:* LISTEN 28906/darkstat
tcp 0 0 :::667 :::* LISTEN 28906/darkstat

查看软件包路径

[root@localhost ~]# rpm -lq darkstat
/usr/sbin/darkstat
/usr/share/doc/darkstat-3.0.717
/usr/share/doc/darkstat-3.0.717/AUTHORS
/usr/share/doc/darkstat-3.0.717/COPYING.GPL
/usr/share/doc/darkstat-3.0.717/INSTALL
/usr/share/doc/darkstat-3.0.717/LICENSE
/usr/share/doc/darkstat-3.0.717/NEWS
/usr/share/doc/darkstat-3.0.717/README
/usr/share/doc/darkstat-3.0.717/export-format.txt
/usr/share/man/man8/darkstat.8.gz

查看运行进程

[root@localhost ~]# ps aux |grep darkstat
root 18827 0.0 0.0 103244 868 pts/0 S+ 01:26 0:00 grep darkstat
nobody 28906 0.0 0.2 18404 4572 ? Ss Mar25 4:45 darkstat -i eth0
nobody 28907 0.0 0.0 19168 928 ? Ss Mar25 0:00 darkstat -i eth0
[root@localhost ~]#

查看包信息

[root@localhost ~]# yum info darkstat
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.ustc.edu.cn
 * epel: mirror01.idc.hinet.net
 * extras: centos.ustc.edu.cn
 * rpmforge: ftp.riken.jp
 * updates: centos.ustc.edu.cn
Installed Packages
Name : darkstat
Arch : x86_64
Version : 3.0.717
Release : 1.el6.rf
Size : 343 k
Repo : installed
From repo : rpmforge
Summary : Network traffic analyzer
URL : http://dmr.ath.cx/net/darkstat/
License : GPL
Description : darkstat is a network traffic analyzer. It's basically a packet
 : sniffer which runs as a background process on a cable/DSL router
 : and gathers all sorts of useless but interesting statistics.

[root@localhost ~]#

darkstat-traffice-monitor-01

3 月 272015
 

使用脚本快速安装MariaDB YUM源仓库配置文件

https://mariadb.com/kb/en/mariadb-package-repository-setup-and-usage/

[root@ip-172-31-33-11 ~]# curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash
[info] Repository file successfully written to /etc/yum.repos.d/mariadb.repo
[info] Adding trusted package signing keys...
[info] Successfully added trusted package signing keys
[root@ip-172-31-33-11 ~]# ls /etc/yum.repos.d/
CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-fasttrack.repo CentOS-Sources.repo mariadb.repo
[root@ip-172-31-33-11 ~]# cat /etc/yum.repos.d/mariadb.repo 
[mariadb-main]
name = MariaDB Server
baseurl = https://downloads.mariadb.com/MariaDB/mariadb-10.4/yum/rhel/$releasever/$basearch
gpgkey = file:///etc/pki/rpm-gpg/MariaDB-Server-GPG-KEY
gpgcheck = 1
enabled = 1


[mariadb-maxscale]
# To use the latest stable release of MaxScale, use "latest" as the version
# To use the latest beta (or stable if no current beta) release of MaxScale, use "beta" as the version
name = MariaDB MaxScale
baseurl = https://downloads.mariadb.com/MaxScale/2.4/centos/$releasever/$basearch
gpgkey = file:///etc/pki/rpm-gpg/MariaDB-MaxScale-GPG-KEY
gpgcheck = 1
enabled = 1

[mariadb-tools]
name = MariaDB Tools
baseurl = https://downloads.mariadb.com/Tools/rhel/$releasever/$basearch
gpgkey = file:///etc/pki/rpm-gpg/MariaDB-Enterprise-GPG-KEY
gpgcheck = 1
enabled = 1
[root@ip-172-31-33-11 ~]#

查看版本信息

[root@ip-172-31-33-11 ~]# yum info MariaDB-server
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: d36uatko69830t.cloudfront.net
 * extras: d36uatko69830t.cloudfront.net
 * updates: d36uatko69830t.cloudfront.net
Available Packages
Name        : MariaDB-server
Arch        : x86_64
Version     : 10.4.12
Release     : 1.el7.centos
Size        : 26 M
Repo        : mariadb-main/7/x86_64
Summary     : MariaDB: a very fast and robust SQL database server
URL         : http://mariadb.org
License     : GPLv2
Description : MariaDB: a very fast and robust SQL database server
            : 
            : It is GPL v2 licensed, which means you can use the it free of charge under the
            : conditions of the GNU General Public License Version 2 (http://www.gnu.org/licenses/).
            : 
            : MariaDB documentation can be found at https://mariadb.com/kb
            : MariaDB bug reports should be submitted through https://jira.mariadb.org

Name        : mariadb-server
Arch        : x86_64
Epoch       : 1
Version     : 5.5.64
Release     : 1.el7
Size        : 11 M
Repo        : base/7/x86_64
Summary     : The MariaDB server and related files
URL         : http://mariadb.org
License     : GPLv2 with exceptions and LGPLv2 and BSD
Description : MariaDB is a multi-user, multi-threaded SQL database server. It is a
            : client/server implementation consisting of a server daemon (mysqld)
            : and many different client programs and libraries. This package contains
            : the MariaDB server and some accompanying files and directories.
            : MariaDB is a community developed branch of MySQL.

[root@ip-172-31-33-11 ~]#

查看galera复制引擎的版本信息

[root@ip-172-31-33-11 ~]# yum info galera-4
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: d36uatko69830t.cloudfront.net
 * extras: d36uatko69830t.cloudfront.net
 * updates: d36uatko69830t.cloudfront.net
Available Packages
Name        : galera-4
Arch        : x86_64
Version     : 26.4.3
Release     : 1.rhel7.el7.centos
Size        : 9.3 M
Repo        : mariadb-main/7/x86_64
Summary     : Galera: a synchronous multi-master wsrep provider (replication engine)
URL         : http://www.codership.com/
License     : GPL-2.0
Description : Galera is a fast synchronous multimaster wsrep provider (replication engine)
            : for transactional databases and similar applications. For more information
            : about wsrep API see http://launchpad.net/wsrep. For a description of Galera
            : replication engine see http://www.codership.com.
            : 
            : Copyright 2007-2014 Codership Oy. All rights reserved. Use is subject to license terms under GPLv2
            : license.
            : 
            : This software comes with ABSOLUTELY NO WARRANTY. This is free software,
            : and you are welcome to modify and redistribute it under the GPLv2 license.

[root@ip-172-31-33-11 ~]#

安装MariaDB数据库服务及依赖软件包

[root@server1 ~]# yum -y install MariaDB-server MariaDB-client
[root@server2 ~]# yum -y install MariaDB-server MariaDB-client
[root@server3 ~]# yum -y install MariaDB-server MariaDB-client

查看依赖

启动服务

[root@server1 ~]# systemctl enable mariadb
Created symlink from /etc/systemd/system/mysql.service to /usr/lib/systemd/system/mariadb.service.
Created symlink from /etc/systemd/system/mysqld.service to /usr/lib/systemd/system/mariadb.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
[root@server1 ~]# systemctl start mariadb
[root@server1 ~]#

[root@server2 ~]# systemctl enable mariadb
Created symlink from /etc/systemd/system/mysql.service to /usr/lib/systemd/system/mariadb.service.
Created symlink from /etc/systemd/system/mysqld.service to /usr/lib/systemd/system/mariadb.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
[root@server2 ~]# systemctl start mariadb
[root@server2 ~]#

[root@server3 ~]# systemctl enable mariadb
Created symlink from /etc/systemd/system/mysql.service to /usr/lib/systemd/system/mariadb.service.
Created symlink from /etc/systemd/system/mysqld.service to /usr/lib/systemd/system/mariadb.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
[root@server3 ~]# systemctl start mariadb
[root@server3 ~]#

安装同步软件rsync

[root@server1 ~]# yum -y install rsync

查看rsync版本信息

[root@server1 ~]# yum info rsync
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: d36uatko69830t.cloudfront.net
 * extras: d36uatko69830t.cloudfront.net
 * updates: d36uatko69830t.cloudfront.net
Installed Packages
Name        : rsync
Arch        : x86_64
Version     : 3.1.2
Release     : 6.el7_6.1
Size        : 815 k
Repo        : installed
From repo   : base
Summary     : A program for synchronizing files over a network
URL         : http://rsync.samba.org/
License     : GPLv3+
Description : Rsync uses a reliable algorithm to bring remote and host files into
            : sync very quickly. Rsync is fast because it just sends the differences
            : in the files over the network instead of sending the complete
            : files. Rsync is often used as a very powerful mirroring process or
            : just as a more capable replacement for the rcp command. A technical
            : report which describes the rsync algorithm is included in this
            : package.

[root@server1 ~]#

编辑集群配置文件

server1

[root@server1 ~]# vi /etc/my.cnf.d/galera.cnf
[mysqld]
binlog_format=ROW
default-storage-engine=innodb
innodb_autoinc_lock_mode=2
bind-address=0.0.0.0

# Galera Provider Configuration
wsrep_on=ON
wsrep_provider=/usr/lib64/galera-4/libgalera_smm.so

# Galera Cluster Configuration
wsrep_cluster_name="test_cluster"
wsrep_cluster_address="gcomm://172.31.46.167,172.31.33.251,172.31.46.43"

# Galera Synchronization Configuration
wsrep_sst_method=rsync

# Galera Node Configuration
wsrep_node_address="172.31.46.167"
wsrep_node_name="server01"

server2

[root@server2 ~]# vi /etc/my.cnf.d/galera.cnf
[mysqld]
binlog_format=ROW
default-storage-engine=innodb
innodb_autoinc_lock_mode=2
bind-address=0.0.0.0

# Galera Provider Configuration
wsrep_on=ON
wsrep_provider=/usr/lib64/galera-4/libgalera_smm.so

# Galera Cluster Configuration
wsrep_cluster_name="test_cluster"
wsrep_cluster_address="gcomm://172.31.46.167,172.31.33.251,172.31.46.43"

# Galera Synchronization Configuration
wsrep_sst_method=rsync

# Galera Node Configuration
wsrep_node_address="172.31.33.251"
wsrep_node_name="server02"

server3

[root@server3 ~]# vi /etc/my.cnf.d/galera.cnf
[mysqld]
binlog_format=ROW
default-storage-engine=innodb
innodb_autoinc_lock_mode=2
bind-address=0.0.0.0

# Galera Provider Configuration
wsrep_on=ON
wsrep_provider=/usr/lib64/galera-4/libgalera_smm.so

# Galera Cluster Configuration
wsrep_cluster_name="test_cluster"
wsrep_cluster_address="gcomm://172.31.46.167,172.31.33.251,172.31.46.43"

# Galera Synchronization Configuration
wsrep_sst_method=rsync

# Galera Node Configuration
wsrep_node_address="172.31.46.43"
wsrep_node_name="server03"
停止所有节点的MariaDB服务
[root@server3 ~]# systemctl stop mariadb 
[root@server2 ~]# systemctl stop mariadb 
[root@server1 ~]# systemctl stop mariadb

启动的一个节点

[root@server1 ~]# galera_new_cluster 
[root@server1 ~]# mysql -u root -p -e "SHOW STATUS LIKE 'wsrep_cluster_size'"
Enter password: 
+--------------------+-------+
| Variable_name      | Value |
+--------------------+-------+
| wsrep_cluster_size | 1     |
+--------------------+-------+
[root@server1 ~]#

启动第二个节点

[root@server2 ~]# systemctl start mariadb
[root@server2 ~]# mysql -u root -p -e "SHOW STATUS LIKE 'wsrep_cluster_size'"
Enter password: 
+--------------------+-------+
| Variable_name      | Value |
+--------------------+-------+
| wsrep_cluster_size | 2     |
+--------------------+-------+
[root@server2 ~]#

启动第三个节点

[root@server3 ~]# systemctl start mariadb
[root@server3 ~]# mysql -u root -p -e "SHOW STATUS LIKE 'wsrep_cluster_size'"
Enter password: 
+--------------------+-------+
| Variable_name      | Value |
+--------------------+-------+
| wsrep_cluster_size | 3     |
+--------------------+-------+
[root@server3 ~]# 
3 月 242015
 

安装

[root@localhost ~]# yum -y install yum-utils

下载

[root@localhost ~]# yumdownloader rp-pppoe libpcap ppp
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.pubyun.com
 * extras: mirrors.btte.net
 * updates: centosx4.centos.org
rp-pppoe-3.10-11.el6.x86_64.rpm | 97 kB 00:00
libpcap-1.4.0-1.20130826git2dbcaa1.el6.x86_64.rpm | 130 kB 00:00
libpcap-1.4.0-1.20130826git2dbcaa1.el6.i686.rpm | 130 kB 00:00
ppp-2.4.5-5.el6.x86_64.rpm | 323 kB 00:00
[root@localhost ~]# ls
anaconda-ks.cfg
install.log
install.log.syslog
libpcap-1.4.0-1.20130826git2dbcaa1.el6.i686.rpm
libpcap-1.4.0-1.20130826git2dbcaa1.el6.x86_64.rpm
ppp-2.4.5-5.el6.x86_64.rpm
rp-pppoe-3.10-11.el6.x86_64.rpm
[root@localhost ~]# 
3 月 232015
 

阿里云香港节点到美国硅谷节点

[root@iZ620ub9b34Z ~]# tracepath 198.11.179.238
 1?: [LOCALHOST] pmtu 1500
 1: 58.96.171.248 (58.96.171.248) 7.233ms
 1: 58.96.171.248 (58.96.171.248) 3.091ms
 2: 10.88.16.13 (10.88.16.13) 1.018ms
 3: 58.96.160.210 (58.96.160.210) 0.773ms
 4: 80.77.0.197 (80.77.0.197) 1.408ms asymm 8
 5: 10.55.208.158 (10.55.208.158) 83.488ms asymm 6
 6: xe-0-1-0-7.r04.sttlwa01.us.bb.gin.ntt.net (128.241.1.209) 216.947ms asymm 9
 7: so-2-2-0.0.pjr01.wad001.flagtel.com (85.95.25.37) 52.048ms asymm 9
 8: ae-3.r23.snjsca04.us.bb.gin.ntt.net (129.250.3.124) 182.331ms asymm 9
 9: xe-0-1-0-10.r04.lsanca03.us.bb.gin.ntt.net (198.172.90.221) 186.902ms asymm 8
 10: ae-6.r21.lsanca03.us.bb.gin.ntt.net (129.250.5.69) 186.672ms asymm 9
 11: xe-0-0-0-30.r05.plalca01.us.ce.gin.ntt.net (129.250.197.38) 187.560ms asymm 9
 12: 198.11.128.181 (198.11.128.181) 185.627ms asymm 10
 13: ae-4.r05.plalca01.us.bb.gin.ntt.net (129.250.5.32) 149.500ms asymm 11
 14: 198.11.179.238 (198.11.179.238) 178.624ms reached
 Resume: pmtu 1500 hops 14 back 50
 [root@iZ620ub9b34Z ~]#

深圳电信100M拨号光纤

[root@localhost ~]# tracepath 198.11.179.238
 1: 192.168.150.73 (192.168.150.73) 0.251ms pmtu 1500
 1: 192.168.150.1 (192.168.150.1) 0.832ms
 1: 192.168.150.1 (192.168.150.1) 0.792ms
 2: 192.168.150.1 (192.168.150.1) 1.073ms pmtu 1492
 2: 1.0.40.59.broad.sz.gd.dynamic.163data.com.cn (59.40.0.1) 2.026ms
 3: 113.106.38.157 (113.106.38.157) 3.980ms
 4: 219.133.30.234 (219.133.30.234) 2.481ms asymm 5
 5: 183.56.65.2 (183.56.65.2) 8.229ms
 6: 202.97.33.230 (202.97.33.230) 6.494ms asymm 7
 7: 202.97.60.206 (202.97.60.206) 6.735ms
 8: 202.97.58.130 (202.97.58.130) 271.240ms
 9: 203.14.186.38 (203.14.186.38) 251.500ms asymm 11
 10: 218.30.43.18 (218.30.43.18) 184.121ms asymm 11
 11: 198.11.128.125 (198.11.128.125) 201.388ms asymm 12
 12: 198.11.128.189 (198.11.128.189) 188.146ms asymm 13
 13: 10.107.64.133 (10.107.64.133) 184.789ms asymm 14
 14: 198.11.179.238 (198.11.179.238) 200.295ms reached
 Resume: pmtu 1492 hops 14 back 51
 [root@localhost ~]#
3 月 212015
 

Smokeping的master/slave配置

从多个位置和网络检测同一主机位置的网络

安装smokeping及相关依赖软件包

确认master上共享密钥配置文件的权限和内容
[root@localhost ~]# cd /opt/smokeping/etc/
[root@localhost etc]# ll smokeping_secrets.dist
-rw——-. 1 apache root 59 Mar 20 03:49 smokeping_secrets.dist
[root@localhost etc]# cat smokeping_secrets.dist
host1:mysercert
host2:yoursercert
boomer:lkasdf93uhhfdfddf
[root@localhost etc]#

编辑slave共享密钥配置文件
[root@localhost ~]# cd /opt/smokeping/etc/
[root@localhost etc]# vi smokeping_secrets.dist
lkasdf93uhhfdfddf
Slave以Debug方式启动
[root@localhost etc]# /opt/smokeping/bin/smokeping –master-url=http://192.168.150.79/smokeping/smokeping.cgi –cache-dir=/opt/smokeping/cache/ –shared-secret=/opt/smokeping/etc/smokeping_secrets.dist –slave-name=boomer –logfile=/opt/smokeping/slave.log –debug-daemon
Sent data to Server and got new config in response.
Note: logging to syslog as local0/info.
Daemonizing /opt/smokeping/bin/smokeping …
[root@localhost etc]#

Slave正常工作后的日志输出
Fri Mar 20 09:22:10 2015 – FPing: Executing /usr/sbin/fping -C 20 -q -B1 -r1 -i10 www.baidu.com
Fri Mar 20 09:22:29 2015 – FPing: Got fping output: ‘www.baidu.com : 26.36 26.28 25.46 25.71 25.84 25.29 25.20 25.00 24.92 25.96 25.19 25.48 24.71 25.67 26.62 25.13 25.11 24.79 24.90 25.69’
Fri Mar 20 09:22:29 2015 – Sent data to Server. Server said OK
Fri Mar 20 09:22:29 2015 – FPing: Sleeping 41 seconds.

smokeping-example-graph-01 smokeping-example-graph-02 smokeping-example-graph-03 smokeping-example-graph-04

3 月 192015
 

下载软件源
http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
http://mirrors.zju.edu.cn/epel/6/i386/epel-release-6-8.noarch.rpm
[root@localhost ~]# yum -y install http://mirrors.zju.edu.cn/epel/6/i386/epel-release-6-8.noarch.rpm
[root@localhost ~]# yum -y install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
[root@localhost ~]# yum makecache

安装smokeping依赖软件包
[root@localhost ~]# yum -y install mod_fcgid httpd httpd-devel rrdtool fping wget curl bind-utils gcc make
[root@localhost ~]# yum -y install perl perl-Net-Telnet perl-Net-DNS perl-LDAP perl-libwww-perl perl-RadiusPerl perl-IO-Socket-SSL perl-Socket6 perl-CGI-SpeedyCGI perl-FCGI perl-RRD-Simple perl-ExtUtils-MakeMaker

解压缩并安装
[root@localhost ~]# mkdir -p /opt/smokeping/{data,var,cache}
[root@localhost ~]# wget http://oss.oetiker.ch/smokeping/pub/smokeping-2.6.11.tar.gz
[root@localhost ~]# tar xzf smokeping-2.6.11.tar.gz
[root@localhost ~]# cd smokeping-2.6.11/setup/
[root@localhost setup]# ./build-perl-modules.sh
[root@localhost setup]# cp -r ../thirdparty/ /opt/smokeping/
[root@localhost setup]# cd ..
[root@localhost smokeping-2.6.11]# ./configure –prefix=/opt/smokeping
[root@localhost smokeping-2.6.11]# make install

安装启动脚本
[root@localhost smokeping-2.6.11]# wget http://new.wedebugyou.com/static/smokeping_start_stop.txt
[root@localhost smokeping-2.6.11]# mv smokeping_start_stop.txt /etc/init.d/smokeping
[root@localhost smokeping-2.6.11]# chmod 755 /etc/init.d/smokeping

更改文件权限并修改主配置文件
[root@localhost smokeping-2.6.11]# cd /opt/smokeping/etc/
[root@localhost etc]# ll smokeping_secrets.dist
-rw-r–r–. 1 root root 59 Mar 20 03:49 smokeping_secrets.dist
[root@localhost etc]# chmod 600 smokeping_secrets.dist
[root@localhost etc]#
[root@localhost etc]# cp config.dist config
[root@localhost etc]# vi config

#cgiurl = http://some.url/smokeping.cgi
cgiurl = http://192.168.150.79/smokeping/smokeping.cgi

#host = james.address
host = www.baidu.com

修改权限允许Apache读写操作
[root@localhost etc]# cd ..
[root@localhost smokeping]# ln -s /opt/smokeping/cache /opt/smokeping/htdocs/cache
[root@localhost smokeping]# chown -R apache cache
[root@localhost smokeping]# chown -R apache data

增加Apache配置文件
[root@localhost smokeping]# cd /etc/httpd/conf.d/
[root@localhost conf.d]# vi smokeping.conf
ScriptAlias /smokeping/smokeping.cgi /opt/smokeping/htdocs/smokeping.fcgi.dist
Alias /smokeping /opt/smokeping/htdocs

<Directory “/opt/smokeping/htdocs”>
Options FollowSymLinks
</Directory>

启动Smokeping服务器和Apache服务器
[root@localhost ~]# service smokeping start
Starting SMOKEPING: Note: logging to syslog as local0/info.
Daemonizing /opt/smokeping/bin/smokeping …
[ OK ]
[root@localhost ~]#
[root@localhost ~]# service httpd start

错误分析:权限
修改为600仅限所有者操作,修改所有者为apache允许Slave通过API操作
[root@localhost ~]# chkconfig –add smokeping
[root@localhost ~]# service smokeping start
Starting SMOKEPING: ERROR: /opt/smokeping/bin/../etc/config, line 112: File ‘/opt/smokeping/etc/smokeping_secrets.dist’ is world-readable or writable, refusing it
[FAILED]
[root@localhost ~]#
错误分析:权限
slave在master缩略图中不显示的问题
[root@localhost ~]# ll /opt/smokeping/data/Test/
total 23360
-rw-r–r–. 1 root root 2986808 Mar 20 07:19 Baidu~boomer.rrd
-rw-r–r–. 1 root root 2986808 Mar 20 08:15 Baidu.rrd
-rw-r–r–. 1 root root 2986808 Mar 20 08:15 FtiaoCT.rrd
-rw-r–r–. 1 root root 2986808 Mar 20 08:15 FtiaoCU.rrd
-rw-r–r–. 1 root root 2986808 Mar 20 04:06 James~boomer.rrd
-rw-r–r–. 1 root root 2986808 Mar 20 06:43 James.rrd
-rw-r–r–. 1 root root 2986808 Mar 20 04:06 James~slave2.rrd
-rw-r–r–. 1 root root 2986808 Mar 20 08:15 Sina.rrd
[root@localhost ~]# chown -R apache /opt/smokeping/data/

3 月 192015
 

mariadb-out-of-memory-error-01 mariadb-out-of-memory-error-02

[root@linuxcache ~]# journalctl -u mariadb
-- Logs begin at Thu 2015-02-19 14:49:37 CST, end at Thu 2015-03-19 06:23:37 CST. --
Mar 02 10:54:59 linuxcache.com mysqld_safe[22408]: /usr/bin/mysqld_safe: line 182: 22567 Killed nohup /usr/libexec/mysqld --basedir=/usr --datadir=/var
Mar 02 10:55:04 linuxcache.com mysqld_safe[22408]: 150302 10:55:04 mysqld_safe Number of processes running now: 0
Mar 02 10:55:04 linuxcache.com mysqld_safe[22408]: 150302 10:55:04 mysqld_safe mysqld restarted
Mar 02 10:55:05 linuxcache.com mysqld_safe[22408]: /usr/bin/mysqld_safe: line 189: /usr/bin/sed: Cannot allocate memory
Mar 02 10:55:09 linuxcache.com mysqld_safe[22408]: /usr/bin/mysqld_safe: eval: line 182: syntax error near unexpected token `2'
Mar 02 10:55:09 linuxcache.com mysqld_safe[22408]: /usr/bin/mysqld_safe: eval: line 182: `nohup /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-di
Mar 02 10:55:09 linuxcache.com systemd[1]: mariadb.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Mar 02 10:55:09 linuxcache.com systemd[1]: Unit mariadb.service entered failed state.
Mar 09 15:08:16 linuxcache.com systemd[1]: Starting MariaDB database server...
Mar 09 15:08:16 linuxcache.com mysqld_safe[30588]: 150309 15:08:16 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
Mar 09 15:08:16 linuxcache.com mysqld_safe[30588]: 150309 15:08:16 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Mar 09 15:08:19 linuxcache.com systemd[1]: Started MariaDB database server.
Mar 16 23:46:11 linuxcache.com mysqld_safe[30588]: /usr/bin/mysqld_safe: line 182: 30747 Killed nohup /usr/libexec/mysqld --basedir=/usr --datadir=/var
Mar 16 23:46:20 linuxcache.com mysqld_safe[30588]: ps: error while loading shared libraries: libc.so.6: cannot map zero-fill pages: Cannot allocate memory
Mar 16 23:46:25 linuxcache.com mysqld_safe[30588]: 150316 23:46:25 mysqld_safe Number of processes running now: 0
Mar 16 23:46:44 linuxcache.com mysqld_safe[30588]: 150316 23:46:44 mysqld_safe mysqld restarted
Mar 16 23:46:53 linuxcache.com mysqld_safe[30588]: /usr/bin/mysqld_safe: line 182: 2432 Killed nohup /usr/libexec/mysqld --basedir=/usr --datadir=/var
Mar 16 23:46:53 linuxcache.com mysqld_safe[30588]: 150316 23:46:53 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
Mar 17 12:49:24 linuxcache.com systemd[1]: Starting MariaDB database server...
Mar 17 12:49:24 linuxcache.com mysqld_safe[3489]: 150317 12:49:24 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
Mar 17 12:49:24 linuxcache.com mysqld_safe[3489]: 150317 12:49:24 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Mar 17 12:49:26 linuxcache.com systemd[1]: Started MariaDB database server.
Mar 17 17:17:34 linuxcache.com mysqld_safe[3489]: /usr/bin/mysqld_safe: line 182: 3648 Killed nohup /usr/libexec/mysqld --basedir=/usr --datadir=/var/
Mar 17 17:17:36 linuxcache.com mysqld_safe[3489]: 150317 17:17:36 mysqld_safe Number of processes running now: 0
Mar 17 17:17:36 linuxcache.com mysqld_safe[3489]: 150317 17:17:36 mysqld_safe mysqld restarted
Mar 17 17:17:37 linuxcache.com mysqld_safe[3489]: 150317 17:17:37 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
Mar 17 18:20:02 linuxcache.com systemd[1]: Starting MariaDB database server...
Mar 17 18:20:02 linuxcache.com mysqld_safe[5586]: 150317 18:20:02 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
Mar 17 18:20:02 linuxcache.com mysqld_safe[5586]: 150317 18:20:02 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Mar 17 18:20:04 linuxcache.com systemd[1]: Started MariaDB database server.
Mar 19 06:23:10 linuxcache.com mysqld_safe[5586]: /usr/bin/mysqld_safe: line 182: 5745 Killed nohup /usr/libexec/mysqld --basedir=/usr --datadir=/var/
Mar 19 06:23:29 linuxcache.com mysqld_safe[5586]: 150319 06:23:29 mysqld_safe Number of processes running now: 0
Mar 19 06:23:29 linuxcache.com mysqld_safe[5586]: 150319 06:23:29 mysqld_safe mysqld restarted
Mar 19 06:23:31 linuxcache.com mysqld_safe[5586]: /usr/bin/mysqld_safe: line 182: 11197 Killed nohup /usr/libexec/mysqld --basedir=/usr --datadir=/var/
Mar 19 06:23:31 linuxcache.com mysqld_safe[5586]: 150319 06:23:31 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
[root@linuxcache ~]# systemctl start mariadb