Docker Alpine Construction Nginx
1,pull a base image
As for how to pull own mirroring and build mirrors can refer to Docker hub simple use can also pull the Docker hub in this chapter of the Mirror
[Root@gitlab conf]# Docker Pull Marksugar/alpineUsing default Tag:latestLatest:pulling from Marksugar/alpine
E110a4a17941:already exists92c6475c18dd:pull CompleteDigest:sha256:5ae1b32053247f3d251fe5ee56aa817d330cb007603272985a0aab0b79a4c9b3status:downloaded newer image for Marksugar/alpine:latest
Blog is not updated for a long time, taking advantage of the mid-Autumn holiday home study installed Gitlab. This toss ah, then write a note, the next can be referred to.Basically refer to official documentation: HTTPS://GITHUB.COM/GITLABHQ/GITLABHQ/BLOB/MASTER/DOC/INSTALL/INSTALLATION.MD and then some places to pay attention to do the record.
First, installation requirements
debian**MysqlGitGitlab-shellRedisSecond, installation tutorials
1. First need to determine the account can use sudo, a
the PHP-FPM branch, it is said that the next version will be merged into the main branch of PHP. Relative SPAWN-FCGI,PHP-FPM in the CPU and memory control is better, and the former is very easy to crash, must be monitored with crontab, and PHP-FPM does not have this annoyance.
PHP5.3.3 has integrated PHP-FPM and is no longer a third party package. PHP-FPM provides a better way to manage PHP processes, can effectively control memory and process, can smooth overload PHP configuration, more than
;
4 installation configuration is simple.
First, consider the Apache/bin directory with a round-robin tool: Rotatelogs This tool is basically used to control the log by time or size, unable to control when to truncate and how to file on a daily basis.
Then consider the logrotate background service: Logrotate is a dedicated background service that rounds through the various system logs (Syslogd,mail), such
, it did not affect the online business. So manual operation CP, reproduce the problem.CP has a file that is nearly 3g, such as seeing too many I/O requests generated and the I/O system is already full load, the disk may have bottlenecks.Then the CPU load also rises to 10 (CPU load per minute) around.650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M00/89/A7/wKioL1gZWfCD_61uAAGL7nuZJOM045.jpg-wh_500x0-wm_3 -wmp_4-s_1076327921.jpg "title=" db104.jpg "alt=" Wkiol1gzwfcd_61uaagl7nuzjom045.jpg
Tags: height failed root password accept file etc CLI Flush firewall Debian wheezy upgrade, due to authorization errors, resulting in password to change, under the Debian MySQL safe also can not access. I've changed the/etc/mysql/my.cnf inside. bind-address for LAN IPand then run theGRANT All privileges on * * to ' root ' @ '% ' identified by ' 123456 ' with GRANT OPTION;Then overload the authorization table:FLUSH privileges; Then after restarting, despite being able to remotely link, Debian its
this time, notice that the time difference between 1 and 2 is present, and the entries inserted between Step1 and Step2 are lost.If you do not want to lose any entries, the last line at Ggserr.log (referring to the newly inserted row between Step1 and Step2) can be backed up again.Example:tail-500 > Ggserr.log.bkup_2For Veridata:Similar functionality is available for the Veridata Veridata.log.See note 1385983.1 for details.2. Another solution is use logrota
Session 3 of user root.Jan 07:01:01 yzllinux123 systemd:starting Session 3 of user root.Jan 07:12:33 yzllinux123 systemd-logind:removed session 1.Jan 07:12:33 yzllinux123 systemd:removed slice User slice of root.Jan 07:12:33 yzllinux123 systemd:stopping User Slice of root.Jan 07:12:40 yzllinux123 systemd:created slice User slice of root.Jan 07:12:40 yzllinux123 systemd:starting User Slice of root.Jan 07:12:40 yzllinux123 systemd:started Session 4 of user root.Jan 07:12:40 yzllinux123 systemd-lo
occurred;The service name or program name that generated the event;Specific information about the event.(4) Log rotation1. Naming rules for log filesIf the configuration file has the "Dateext" parameter, the log is added with a date, such as: log-20160101If not, the new log name is log and the old one is automatically changed to Log.12.logrotate configuration fileDaily: Log rotation cycle is dailyWeekly: Log rotation cycle is weeklyMonthly: Log rotat
Rotation of the log1. Naming rules for log filesA. If the configuration file has the "dateext" parameter, then the log will use the date as the suffix of the log file, for example: "secure-20150630". So the log files do not overlap, so you do not need to rename the log file, just to save the specified number of logs, Delete the extra log files.B. If there is no "dateext" parameter in the configuration file, the log file needs to be renamed, and when the first log rotation is made, the current "s
Installation Environment:Operating system: Ubuntu 12.4 LTS EnglishDatabase: PostgreSQLWebserver:nginxWhen it comes to 7.x, Gitlab's documentation is quite intact! This article is used as a translation and part of the FAQ.1. Install the dependency pack (1) Set the default text editorUse VIM as the default text editorsudo apt-get install-y vimsudo update-alternatives--set editor/usr/bin/vim.basic(2) Installation dependencysudo apt-get install-y build-essential zlib1g-dev libyaml-dev libssl-dev lib
Installation Environment:Operating system: Ubuntu 12.4 LTS EnglishDatabase: PostgreSQLWeb server: NginxWhen it comes to 7.x, Gitlab's documentation is quite complete! This article is used as a translation and part of the FAQ.1. Install the dependency pack (1) Set the default text editorUse VIM as the default text editorsudo apt-get install-y vimsudo update-alternatives--set editor/usr/bin/vim.basic(2) Installation dependencysudo apt-get install-y build-essential zlib1g-dev libyaml-dev libssl-dev
Changing file permissions5.3 Disk Management in Linux5.3.1 Viewing disk space usage5.3.2 Viewing the space occupied by a file or directory5.3.3 adjusting and viewing file system parameters5.3.4 Format File System5.3.5 mount/unmount file system5.3.6 Basic Disk Management5.4 Swap space management5.5 Redundant array of disks raid5.6 Example--Monitor hard disk space5.7 Summary5.8 ExercisesThe 6th Chapter Linux log System6.1 Common log files in Linux6.2 Linux Log System6.2.1 Rsyslog Log System Intro
Fail2ban-0.8.3.tar # MV fail2ban-0.8.3 Fail2ban # cd Fail2ban #/usr/local/python/bin/python setup.py Install
Move the generated executable file to/usr/bin
# mv/usr/local/python/bin/fail2ban-*/usr/bin
If there is no accident, Fai2ban also installed. All the configuration files are in the/etc/fail2ban directory. Copy source code tree files directory redhat-initd to init.d directory with from BOOT.
CP Files/redhat-initd/etc/init.d/fail2ban chmod 0755/etc/init.d/fail2ban
Finally, write a
database file. Where the/VAR/LOG/PACCT and/var/log/wtmp files increase as entries are added and modified. The problem is that these files are in a dynamically increasing state, so that they become a lot bigger. We can solve the problem by using a program called Logrotate, which reads the/etc/logrotate.conf configuration file, which tells Logrotate to read the files in the/ETC/LOGROTATE.D directory. It can
docker_transition_unconfined 1 # Location used for temporary files, such as those created by # Docker load and build operations.
Default is/var/lib/docker/tmp # Can is overriden by setting the following environment variable.
# docker_tmpdir=/var/tmp # Controls the/etc/cron.daily/docker-logrotate cron job status.
# To disable, uncomment the line below.
# logrotate=false # docker-latest daemon can be used by
\ docker-latest-logrotate \ docker-logrotate \ docker-selinux \ docker-engine-selinux \ docker-engine
To install the Docker dependency package:
$ sudo yum install -y yum-utils \ device-mapper-persistent-data \ lvm2
Add a Docker source (if the official Docker download is too slow, you can use Ali's image source: Http://mi
Nginx does not handle the scrolling problem of the log, it kicked the ball to the user. In general, you can use the Logrotate tool to accomplish this task, or you can write a variety of scripts to accomplish the same task if you wish. This article describes how to scroll the Nginx log files running in Docker (from the Internet).
Ideas
nginx the official actually gives instructions on how to scroll the log: rotating log-files in order to rotate
#切除本身日志内容并且自动生成新的以日期生成的历史文件方法一: Mongod-v--logpath/var/log/mongodb/mongos.log method Two: kill- Sigusr1{pid} Method Three: Useadmindb.runcommand ("LogRotate") #两种删除旧的日志文件, keep the log file for 7 days find/var/log/mongodb/ mongos.log.*-mtime+7-execrm-rf{}\;find/var/log/mongodb/ Mongos.log.*-mtime+7-delete method Four: vim/etc/logrotate.d/mongodb/mongod/config.log{ daily# Daily rotate7# rotation for 7 days compress# by gzip compression missingok# if the
% 1.11mb/s 0:00:00 (xfer#1, TO-CHECK=0/1)Sent bytes received 1266 bytes 2622.00 bytes/secTotal size was 1159 speedup is 0.88Also succeeded.Linux system logsThe log records every day of the system's data. So we should go to the first time to check our system log when we have a problem, there are many important logs in the Linux system.1./var/log/messages: System Total Log, a lot of information is recorded in this file. Unless a service has a separate log defined. This log will be written every da
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.