logrotate

Alibabacloud.com offers a wide variety of articles about logrotate, easily find your logrotate information here online.

Linux system security Consolidation Fundamentals Chapter 1

following in/etc/profile:Export History_file=/var/log/history/userhistory.logreadonly prompt_command= ' {date ' +%y-%m-%d%T ##### $ (Who am I |awk "{print \$1\ "\" \$2\ "\" \ $NF} ") # # # # (Id|awk" {print \$1} ") # # # # (History 1 |{read x cmd; echo "$cmd";}) ";} >> $HISTORY _file 'Reread Source/etc/profile can take effect.Mkdir-p/var/log/history/Touch/var/log/history/userhistory.logchmod 002/var/log/history/userhistory.logChattr +a/var/log/history/userhistory.log2), the use of

Installing a Docker personal virtual machine under Linux

First, prepare an ISO file system, then load it with a virtual machine, and if you can't go to https://www.centos.org/download/ Guaranteed 64 for System kernel 3.0 or above Many ways on the internet have not been possible, but this is the author of the pro-test feasible First step: Check the kernel: uname-r Yum update is possible if the kernel is not supported Step two: Remove the old version and legacy files $ sudo yum remove docker docker-client docker-

Liunx PHP-FPM

View PHP-FPM Related InformationSee if PHP-FPM is open: Ps-ef|grep phpView PHP-FPM's location: Whereis php-fpmView the number of PHP-FPM processes: PS aux | Grep-c PHP-FPMView running Memory:/usr/bin/php-i|grep MEMView php-fpm.conf ConfigurationCat/usr/local/php/etc/php-fpm.confSee Pid=/var/run/php-fpm/php-fpm.pidTurn php-fpm on, restart, and close the first way common commandsOpen PHP-FPM:PHP-FPMRestart php-fpm:/etc/init.d/php-fpm restart or kill-usr2 ' cat/var/run/php-fpm/php-fpm.pid ' #如果/etc

CentOS using Rsyslog+mysql+loganalyzer to deploy log servers

Rsyslog Introduction: The Rsyslog service is specifically responsible for recording system log information on CentOS (earlier versions of the system use Syslog,rsyslog as the next generation of syslog), and Rsyslog consists of three parts: syslogd,klogd,logrotate SYSLOGD The log information of the main records system and network service; KLOGD mainly records the information generated by the kernel; Logrotate

Optimization and analysis of PHP-FPM process in Linux

: Dual-coreSystem: CentOS 6.3 64-bitBandwidth: Exclusive 2M 2, deployment of the application Git, SVN, Apache, Tomcat, PHP, Nginx, Mysql, JDK 3, after the optimization of the parameters The code is as follows Copy Code PM = dynamicPm.start_servers = 5Pm.min_spare_servers = 2Pm.max_spare_servers = 8 php5.3.3 after PHP-FPM process management mode PHP-FPM provides a better way to manage PHP processes, can effectively control memory and process, can smooth

In-depth analysis of Linux log files

Overview The concept of a log file is well understood, which is what time, who, where, and what has been done. A program called Syslog (an extended rsyslog for Ubuntu) is responsible for collecting the information generated by the system, and then writing them to specific places according to the rules, including files, consoles, printers, remote hosts, and so on. Because the log file record information increases gradually, need to have the program management log file, this is

PM2 Common Command Usage Introduction

PM2 and restore processes $ PM2 Generate # Generate a sample JSON configuration file $ PM2 Deploy App.json PROD Setup # Setup "prod" remote server $ pm2 Deploy App.json prod # Update "prod" remote server $ pm2 Deploy App.json prod revert 2 # revert "prod" remote server by 2 $ PM2 module:generate [name] # Generate sample module with name [name] $ pm2 Install pm2-logrotate # Install module (here a log rotation system) $ pm2 Uninstall

MongoDB log Cleanup Learn to organize

Tags: direct mysq process multiple relationship command file size grep logToday, customers are asked to provide a MONGO log cleanup solution, and the customer provides a KILL-SIGUSR1 way to record the learning and testing process as well as several other log cleanup methods.Method 1: Use Db.runcommand ({logrotate:1}) in MONGO's Shell to organize the logs:The operation is as follows:shard1:primary> Use adminSwitched to DB adminShard1:primary> Db.runcom

Parameters to be aware of in the deployment of MongoDB

the-SLOWMS option.Finally, set up a scheduled task to split (rotate) log files daily or weekly. If you use the –logpath option to start MongoDB, send a SIGUSR1 signal to the process even if it splits the log. You can also use the logrotate command to achieve the same purpose:>db.admincommand ({"LogRotate": 1})If MongoDB is not started with the--logpath option, the log cannot be split.5) Close the atime of

Web site source and database backup rotation

Tags: backupThe importance of regular backup of the source code and database of the website it is clear to us that it will be a waste of time to delete the files as the backup file increases, but it is cumbersome to be cleaned up, so it needs to be deleted automatically periodically.I think of two ways:1 Use the time stamp difference to delete periodically2 using Logrotate to delete filesThe first type of code is as follows#!/bin/bashwebdir=/usr/local

(go) The parameters to be aware of when deploying MongoDB

-SLOWMS option.Finally, set up a scheduled task to split (rotate) log files daily or weekly. If you use the –logpath option to start MongoDB, send a SIGUSR1 signal to the process even if it splits the log. You can also use the logrotate command to achieve the same purpose:>db.admincommand ({"LogRotate": 1})If MongoDB is not started with the--logpath option, the log cannot be split.5) Close the atime of the

MongoDB Master-Slave cluster

Label:First, the environment$ cat/etc/redhat-release CentOS Linux release 7.0.1406 (Core) $ uname-a linux zhaopin-2-201 3.10.0-123.el7 . x86_64 #1 SMP Mon June 12:09:22 UTC x86_64 x86_64 x86_64 gnu/linux $ mongo--version MongoDB Shell version : 3.0.6 Second, prepare1. Create a Directory$ sudo mkdir-p/data/mongodb/{data/db0,backup/db0,log/db0,conf/db0} 2. Writing the configuration file 1) Master: $ sudo vim/data/mongodb/conf/db0/mongodb.conf # base port = 27017 Maxconns = filepermissions = 07

Linux20180515 rsync syslog Screen

Tags: rsync screen logMay 15 Task10.32/10.33 rsync via service sync10.34 Linux system logs10.35 Screen ToolExtended1. Linux log File Explorer logrotate http://linux.cn/article-4126-1.html2. Xargs usage detailed http://blog.csdn.net/zhangfn2011/article/details/6776925It is not through SSH but through the service of the way to synchronize this need to open a service, CS architecture, client, server. Server to open a service, listening to a port default

Usr/bin/mysqladmin:refresh failed; Error: ' Unknown error '

Tags: mysql refresh failed unknown error DebianDebian wheezy upgrade, because of authorization errors, resulting in password changes, in the Debian safe under the MySQL can not access.I have modified the bind-address for LAN IP in/ETC/MYSQL/MY.CNFAnd then executed theGRANT all privileges on * * to ' root ' @ '% ' identified by ' 123456 ' with GRANT OPTION;Then overload the authorization table:FLUSH privileges;After the reboot, although it can be remotely linked, but Debian itself reported a MySQ

Linux System Management Preliminary (ix) System log and screen program

First, the system logSystem log is our understanding of the status of the system, service startup situation, learning to read the log is our basic skills to understand the health of the system and management.(a)/var/log/messagesVarious operations in the system will be recorded in the system log, logs stored in the/var/log/directory, the log will be automatically cut by the system's Logrotate program, that is, the log files to achieve the conditions yo

Introduction to Linux Logs basics

Common logs on Linux are:1./var/log/cron Query crontab has not been executed, whether there is a problem.2./VAR/LOG/DMESG records the information generated by the kernel detection process when it is powered on.3./var/log/lastlog records the information about the last time the system was logged on to all the accounts on the system.4./var/log/secure logs information about all account passwords that are logged into Linux.5./var/log/messages system error or important information will be logged to th

Linux system logs, screen tools

information recorded in the log. You can exit by pressing the letter "Q". Typically,/var/log/messages is the first file to be viewed when troubleshooting. Then you will certainly say, so many logs are recorded in this file, if there is a lot of services on the server is not this file will soon be written very large. Now look at the size of the log file, input command Du-sh!$, enter, see, 3.5M, much smaller than the imagination. This is because the system has a log polling mechanism that switc

Install and run IPCopV1.4.18Linux on the CF card

Install and run IPCopV1.4.18Linux on the CF card -- Linux Enterprise Application-Linux server application information. For more information, see. 1. Reference documents: http://www.ipcop.org/1.4.0/en/install/html/detail_steps.html 2. Download The mkflash script and the logrotate. conf file at the following address: Http://ipcop.cvs.sourceforge.net/?checkout=/ipcop/ipcop/tools/mkflash/mkflash? Revision = 1.6.2.17 pathrev = IPCOP_v1_4_0 Http://ipcop.c

Linux Server adventure using lighttpd

to the network card. (It also reduces the cpu usage of lighttpd, which is transferred to the kernel) You can set different parameters based on the platform. Server. network-backend = "linux-sendfile" (Linux) Freebsd: freebsd-sendfile Unix: writev If you are interested, you can also see the implementation of lighttpd on async io (aio), only lighttpd 1.5 (Linux-aio-sendfile, posix-aio, gthread-aio) In addition, core network parameters need to be modified as appropriate, You do not need to desc

Usr/bin/mysqladmin: refreshfailed; error: & amp; # x27; Unk_MySQL

Usrbinmysqladmin: refreshfailed; error: amp; # x27; Unknownerroramp; amp; # x27; after debian wheezy is upgraded, the password is changed due to an authorization error, mysql safe in debian cannot be accessed either. I have changed bind-address to the LAN ip address in/etc/mysql/my. cnf. And then executed Grant all privileges on *. * TO 'root' @ '%' identified by '000000' with grant option; Then, reload the authorization table: Flush privileges; After the restart, although remote connection i

Total Pages: 15 1 .... 11 12 13 14 15 Go to: Go

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.