<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>centos &#8211; moneyslow.com</title>
	<atom:link href="https://moneyslow.com/tag/centos/feed" rel="self" type="application/rss+xml" />
	<link>https://moneyslow.com</link>
	<description>making money with technology</description>
	<lastBuildDate>Thu, 12 Sep 2024 13:18:25 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.5</generator>
	<item>
		<title>CentOS 7,8: How to Enable开启IP Forwarding</title>
		<link>https://moneyslow.com/centos-78-how-to-enable%e5%bc%80%e5%90%afip-forwarding.html</link>
		
		<dc:creator><![CDATA[moneyslow]]></dc:creator>
		<pubDate>Thu, 12 Sep 2024 13:18:25 +0000</pubDate>
				<category><![CDATA[newest]]></category>
		<category><![CDATA[centos]]></category>
		<guid isPermaLink="false">https://moneyslow.com/?p=19068</guid>

					<description><![CDATA[centos开启ip转发]]></description>
		
		
		
			</item>
		<item>
		<title>Centos7如何修改主机名</title>
		<link>https://moneyslow.com/centos7%e5%a6%82%e4%bd%95%e4%bf%ae%e6%94%b9%e4%b8%bb%e6%9c%ba%e5%90%8d.html</link>
		
		<dc:creator><![CDATA[moneyslow]]></dc:creator>
		<pubDate>Fri, 25 Nov 2022 07:24:56 +0000</pubDate>
				<category><![CDATA[newest]]></category>
		<category><![CDATA[centos]]></category>
		<guid isPermaLink="false">https://moneyslow.com/?p=15599</guid>

					<description><![CDATA[同时需要把/etc/hosts文件里的主机名也修改一下,127.0.0.1 那行，新主机名放到这行最后]]></description>
		
		
		
			</item>
		<item>
		<title>CentOS升级软件时不升级内核</title>
		<link>https://moneyslow.com/centos%e5%8d%87%e7%ba%a7%e8%bd%af%e4%bb%b6%e6%97%b6%e4%b8%8d%e5%8d%87%e7%ba%a7%e5%86%85%e6%a0%b8.html</link>
		
		<dc:creator><![CDATA[moneyslow]]></dc:creator>
		<pubDate>Mon, 17 Oct 2022 05:44:17 +0000</pubDate>
				<category><![CDATA[newest]]></category>
		<category><![CDATA[centos]]></category>
		<guid isPermaLink="false">https://moneyslow.com/?p=15511</guid>

					<description><![CDATA[CentOS升级软件时不升级内核]]></description>
		
		
		
			</item>
		<item>
		<title>Centos日志时区差8小时UTC改为CST</title>
		<link>https://moneyslow.com/centos%e6%97%a5%e5%bf%97%e6%97%b6%e5%8c%ba%e5%b7%ae8%e5%b0%8f%e6%97%b6utc%e6%94%b9%e4%b8%bacst.html</link>
		
		<dc:creator><![CDATA[moneyslow]]></dc:creator>
		<pubDate>Fri, 09 Jul 2021 01:21:30 +0000</pubDate>
				<category><![CDATA[newest]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[linux时区]]></category>
		<guid isPermaLink="false">https://moneyslow.com/?p=13673</guid>

					<description><![CDATA[[root@zhzl tinyproxy]# date Fri Jul 9 01:12:23 UTC 2021 [root@zhzl tinyproxy]# timedatectl Local time: Fri 2021-07-09 01:13:15 UTC Universal time: Fri 2021-07-09 01:13:15 UTC RTC time: Fri 2021-07-09 01:13:15 Time zone: UTC (UTC, +0000) NTP enabled: yes NTP synchronized: yes RTC in local TZ: no DST active: n/a [root@zhzl tinyproxy]# ls -l /etc/localtime lrwxrwxrwx. 1 [&#8230;]]]></description>
		
		
		
			</item>
		<item>
		<title>在Linux Centos7下，如何定时对日志文件进行切割？</title>
		<link>https://moneyslow.com/%e5%9c%a8linux-centos7%e4%b8%8b%ef%bc%8c%e5%a6%82%e4%bd%95%e5%ae%9a%e6%97%b6%e5%af%b9%e6%97%a5%e5%bf%97%e6%96%87%e4%bb%b6%e8%bf%9b%e8%a1%8c%e5%88%87%e5%89%b2%ef%bc%9f.html</link>
		
		<dc:creator><![CDATA[moneyslow]]></dc:creator>
		<pubDate>Thu, 03 Jun 2021 07:24:39 +0000</pubDate>
				<category><![CDATA[newest]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[centos7]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[logrotate日志切割]]></category>
		<guid isPermaLink="false">https://moneyslow.com/?p=13280</guid>

					<description><![CDATA[使用logrotate通用方法来切割日志：(1).logrotate的配置文件logrotate配置文件主要在两个地方：/etc/logrotate.conf以及/etc/logrotate.d/下的明细配置文件。其中/etc/logrotate.conf文件是主配置文件，/etc/logrotate.d/下的明细配置文件都会被读入/etc/logrotate.conf进行执行，所以请注意这里还涉及到了公有变量和私有变量。 logrotate的执行是由crond服务来调用的，其脚本是/etc/cron.daily/logrotate，每天自动执行。我们可以看一下脚本具体内容： [root@moneyslow.com ~]# cat /etc/cron.daily/logrotate#!/bin/sh/usr/sbin/logrotate -s /var/lib/logrotate/logrotate.status /etc/logrotate.confEXITVALUE=$?if [ $EXITVALUE != 0 ]; then/usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"fiexit 0简单的说明：/usr/sbin/logrotate工具调用了/var/lib/logrotate/logrotate.status和/etc/logrotate.conf两个文件。然后将执行的结果（就是那个$?，成功为0，不成功为非0）进行判断，非0时执行/usr/bin/logger命令。最后退出。看完定时计划任务，我们再来看主配置文件/etc/logrotate.conf（也就是公有变量）。具体内容如下：[root@moneyslow.com ~]# grep -vE "^$&#124;^#" /etc/logrotate.conf weekly　　//每周一次rotate（翻译是旋转，其实就是切割）rotate 4　　//保留4份切割文件，多余删除，不计算新建日志文件create　　//结束后创建一个新的空白日志文件dateext　　//用日期作为切切割文件的后缀include /etc/logrotate.d　　//将/etc/logrotate.d目录下的文件都加载进来（全都执行）/var/log/wtmp {　　//仅针对/var/log/wtmp文件monthly　　//每月执行一次create 0664 root utmp　　//结束后创建新的空白日志，权限0664，所有者root，所属组utmpminsize 1M　　//切割文件最少需要1M，否则不执行rotate 1　　//保留1份，多余删除，不计算新建日志文件}/var/log/btmp {　　//仅针对/var/log/btmpmissingok　　//丢失不报错monthly　　//每月执行一次create 0600 root utmp　　//结束后创建新的空白日志，权限0600，所有者root，所属组utmprotate 1　　//保留1份，多余删除，不计算新建日志文件}配置文件参数说明：missingok　　日志切割期间产生错误将被忽略（如果日志丢失，不报错继续切割）daily、weekly、monthly、yearly　　每天、每周、每月、每年执行create MODE OWNER GROUP　　切割后指定创建新的空白文件的属性nocreate　　不建立新的日志文件rotate N　　保留N份，多余删除，不计算新建日志文件dateext　　用当前日期作为后缀命名格式（默认年月日）dateformat .%s　　配合dateext使用，紧跟在下一行出现，定义切割后的文件名，只支持%Y，%m，%d，%ssize/minsize　　达到指定大小才会切割，默认单位bytes，还可以是KB和MBcompress　　切割结束后，归档并使用gzip格式压缩nocompress　　解除compress参数delaycompress　　总是与compress参数一起使用，指示logrotate不要将最近的归档压缩，压缩将在下一次切割进行。nodelaycompress　　解除delaycompress参数ifempty　　即使日志为空，也执行切割notifempty　　如果日志为空，切割不执行prerotate/endscript　　在所有其他指令之前执行prerotate和endscript之间的命令。postrotate/endscript　　在所有其他指令完成后，postrotate和endscript之间的命令将被执行。sharescripts　　所有日志切割后统一执行一次脚本，如果没有配置该参数，则每个日志切割后都会执行一次脚本。errors ADDRESS　　切割时的错误信息发送到指定的Emial地址mail ADDRESS　　切割日志发送到指定的Email地址nomail　　切割日志不发送邮件olddir DIRECTORY　　切割后的日志文件放入指定目录，必须与当前日志处在同一文件系统noolddir　　切割后的日志文件与当前文件放在同一目录下copytruncate　　用于还在打开中的日志文件，把当前日志备份并截断；先拷贝后清空，可能丢失部分日志nocopytruncate　　备份日志文件，但不截断。(2).查看上次切割日志时间/var/lib/logrotate/logrotate.status中默认记录logrotate上次切割日志文件的时间 [root@moneyslow.com logrotate]# cat /var/lib/logrotate/logrotate.statuslogrotate state [&#8230;]]]></description>
		
		
		
			</item>
		<item>
		<title>IPv6添加iptables防火墙</title>
		<link>https://moneyslow.com/ipv6%e6%b7%bb%e5%8a%a0iptables%e9%98%b2%e7%81%ab%e5%a2%99.html</link>
		
		<dc:creator><![CDATA[moneyslow]]></dc:creator>
		<pubDate>Thu, 29 Apr 2021 04:06:03 +0000</pubDate>
				<category><![CDATA[newest]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[ipv6]]></category>
		<guid isPermaLink="false">https://moneyslow.com/?p=13099</guid>

					<description><![CDATA[iptables是一种流行的实用程序，允许系统管理员配置Linux内核防火墙提供的表以及它存储的链和规则。它是用于IPv4流量的最常见且使用最广泛的Linux防火墙，它具有一个称为ip6tables的版本，用于ipv6流量。两种版本都需要单独配置。在本文中，我将介绍如何在Ubuntu 16.04系统中配置ip6tables。请注意，需要具备iptables，防火墙策略和IPv6的基本知识。 系统中的IPv6在配置ip6tables之前，请确保您的系统支持IPv6。要检查，请键入以下命令： [root@ss-0-4-centos ~]# cat /proc/net/if_inet6fe80000000000000505400fffe5e97dc 02 40 20 80 eth000000000000000000000000000000001 01 80 10 80 lo24024e00101369000000932ea9852d0c 02 80 00 80 eth0 如何文件为空，则可以尝试通过modprobe ipv6加载IPv6模块。 在新安装的Ubuntu服务器中，默认情况下防火墙链为空。要查看链和规则，IPv6的防火墙状态可以这样看：[root@VM-0-4-centos ~]# ip6tables -L -nChain INPUT (policy ACCEPT)target prot opt source destination Chain FORWARD (policy ACCEPT)target prot opt source destination Chain OUTPUT (policy ACCEPT)target prot opt source destination 所有链（INPUT，FORWARD，OUTPUT）都是空的，并且链的默认策略设置为ACCEPT。 只查看链的命令：ip6tables -S [&#8230;]]]></description>
		
		
		
			</item>
		<item>
		<title>Gitlab如何安装gitlab-runner？</title>
		<link>https://moneyslow.com/gitlab%e5%a6%82%e4%bd%95%e5%ae%89%e8%a3%85gitlab-runner%ef%bc%9f.html</link>
		
		<dc:creator><![CDATA[moneyslow]]></dc:creator>
		<pubDate>Wed, 21 Apr 2021 07:20:02 +0000</pubDate>
				<category><![CDATA[newest]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[Gitlab如何安装gitlab-runner]]></category>
		<guid isPermaLink="false">https://moneyslow.com/?p=13068</guid>

					<description><![CDATA[安装gitlab 的runner]]></description>
		
		
		
			</item>
		<item>
		<title>centos7和CentOS8 rc.local 开机不自动执行的解决方法</title>
		<link>https://moneyslow.com/centos7%e5%92%8ccentos8-rc-local-%e5%bc%80%e6%9c%ba%e4%b8%8d%e8%87%aa%e5%8a%a8%e6%89%a7%e8%a1%8c%e7%9a%84%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95.html</link>
		
		<dc:creator><![CDATA[moneyslow]]></dc:creator>
		<pubDate>Mon, 12 Apr 2021 03:17:42 +0000</pubDate>
				<category><![CDATA[newest]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[centos7和CentOS8 rc.local 开机不自动执行的解决方法]]></category>
		<guid isPermaLink="false">https://moneyslow.com/?p=13052</guid>

					<description><![CDATA[CentOS 运维过程中 在 /etc/rc.d/rc.local 写入开机需要运行的命令，是在CentOS5-CentOS6 中常见做法。但是在CentOS7中，却出现了 rc.local 中命令，系统启动后却不执行的情况。 原因分析 rc.local 是 Sysvinit技术用于CentOS5-6的"init"进程在启动过程中最后执行的任务。但是众所周知，CentOS7和CentOS8 是使用了Systemd技术启动，开机不会运行init进程。为了兼容，CentOS 7 官方提供的方法是默认提供了一个名为“rc-local” 的 systemd 服务，负责系统启动后执行 rc.local 中的命令。但是有一个前提: /etc/rc.d/rc.local 必须是可执行（默认是不可执行的）。 解决方案 “激活” systemd 的"rc-local" 服务 (1) 在 /etc/rc.d/rc.local 写入你需要执行的linux命令 # vim /etc/rc.d/rc.local #!/bin/bash # Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure # that this script will be executed during [&#8230;]]]></description>
		
		
		
			</item>
		<item>
		<title>Centos8中启用EPEL库</title>
		<link>https://moneyslow.com/centos8%e4%b8%ad%e5%90%af%e7%94%a8epel%e5%ba%93.html</link>
		
		<dc:creator><![CDATA[moneyslow]]></dc:creator>
		<pubDate>Mon, 22 Feb 2021 07:11:02 +0000</pubDate>
				<category><![CDATA[newest]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[Centos8中启用EPEL库]]></category>
		<guid isPermaLink="false">https://moneyslow.com/?p=12751</guid>

					<description><![CDATA[安装配置包 EPEL8在RHEL 8 / CentOS 8上启用存储库非常简单：我们需要做的就是下载并安装包含存储库文件的配置包。 我们可以使用dnf软件包管理器直接执行操作： $ sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm 我们只是使用dnf与install子命令，并提供https的URL，在运行命令后，显示并提示我们确认要安装该软件包： =================================================== Package Arch Version Repository Size =================================================== Installing: epel-release noarch 8-5.el8 @commandline 21 k Transaction Summary =================================================== Install 1 Package Total size: 21 k Installed size: 30 k Is this ok [y/N]: y 如果我们通过键入“ y”并按Enter确认，则将安装该软件包。 要查看这些文件的安装位置，我们可以运行以下命令： sudo rpm -ql epel-release 在上面的命令中，该-q选项是--query的缩写，-l而是--list的缩写，用于列出软件包中包含的文件。上面的命令产生以下输出： /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 [&#8230;]]]></description>
		
		
		
			</item>
	</channel>
</rss>
