<?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>深蓝的blog &#187; linux</title>
	<atom:link href="http://www.lanxinbase.com/?feed=rss2&#038;tag=linux" rel="self" type="application/rss+xml" />
	<link>http://www.lanxinbase.com</link>
	<description>记录日常生活</description>
	<lastBuildDate>Sat, 18 Apr 2026 07:10:07 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.2.3</generator>
	<item>
		<title>linux查看线程数方法</title>
		<link>http://www.lanxinbase.com/?p=2847</link>
		<comments>http://www.lanxinbase.com/?p=2847#comments</comments>
		<pubDate>Mon, 25 Sep 2023 09:05:29 +0000</pubDate>
		<dc:creator><![CDATA[Alan]]></dc:creator>
				<category><![CDATA[2.运维相关]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ps]]></category>
		<category><![CDATA[pstree]]></category>
		<category><![CDATA[top]]></category>
		<category><![CDATA[线程]]></category>

		<guid isPermaLink="false">http://www.lanxinbase.com/?p=2847</guid>
		<description><![CDATA[1、cat /proc/${pid}/status 2、pstree -p ${pid} 3、top -p $ [&#8230;]]]></description>
		<wfw:commentRss>http://www.lanxinbase.com/?feed=rss2&#038;p=2847</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>linux命令du查看目录和文件大小</title>
		<link>http://www.lanxinbase.com/?p=2403</link>
		<comments>http://www.lanxinbase.com/?p=2403#comments</comments>
		<pubDate>Fri, 30 Aug 2019 01:19:32 +0000</pubDate>
		<dc:creator><![CDATA[Alan]]></dc:creator>
				<category><![CDATA[2.运维相关]]></category>
		<category><![CDATA[du]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.lanxinbase.com/?p=2403</guid>
		<description><![CDATA[du -ah &#8211;max-depth=1 这个是我想要的结果 a表示显示目录下所有的文件和文件夹（不 [&#8230;]]]></description>
		<wfw:commentRss>http://www.lanxinbase.com/?feed=rss2&#038;p=2403</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux加载磁盘并分区</title>
		<link>http://www.lanxinbase.com/?p=2158</link>
		<comments>http://www.lanxinbase.com/?p=2158#comments</comments>
		<pubDate>Mon, 08 Apr 2019 02:44:32 +0000</pubDate>
		<dc:creator><![CDATA[Alan]]></dc:creator>
				<category><![CDATA[2.运维相关]]></category>
		<category><![CDATA[fdisk]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.lanxinbase.com/?p=2158</guid>
		<description><![CDATA[disk fdisk [选项] &#60;disk&#62; 改变分区表 fdisk [选项] –l &#60;di [&#8230;]]]></description>
		<wfw:commentRss>http://www.lanxinbase.com/?feed=rss2&#038;p=2158</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nginx支持socket转发</title>
		<link>http://www.lanxinbase.com/?p=1787</link>
		<comments>http://www.lanxinbase.com/?p=1787#comments</comments>
		<pubDate>Fri, 24 Nov 2017 02:01:35 +0000</pubDate>
		<dc:creator><![CDATA[Alan]]></dc:creator>
				<category><![CDATA[2.运维相关]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[ngx_stream_core_module]]></category>
		<category><![CDATA[Socket]]></category>

		<guid isPermaLink="false">http://www.lanxinbase.com/?p=1787</guid>
		<description><![CDATA[有个接口是通过socket通信，对端服务器访问存在IP限制，只好通过跳板机，因为它具备访问对端服务器的权限。nginx1.9开始支持tcp层的转发，通过stream实现的，而socket也是基于tcp通信。

一.实现过程：

1.安装nginx，stream模块默认不安装的，需要手动添加参数：–with-stream，官方下载地址：download，根据自己系统版本选择nginx1.9或以上版本。

2.nginx.conf 配置，参考说明：ngx_stream_core_module

nginx.conf

user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
.................
}

# tcp层转发的配置文件夹

include /etc/nginx/tcp.d/*.conf;
请注意，stream配置不能放到http内，即不能放到/etc/nginx/conf.d/，因为stream是通过tcp层转发，而不是http转发。

如配置在http内，启动nginx会报如下错误：

nginx: [emerg] "server" directive is not allowed here
3.在tcp.d下新建个bss_num_30001.conf文件，内容如下：]]></description>
		<wfw:commentRss>http://www.lanxinbase.com/?feed=rss2&#038;p=1787</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>linux、CentOS使用fdisk进行分区扩展</title>
		<link>http://www.lanxinbase.com/?p=894</link>
		<comments>http://www.lanxinbase.com/?p=894#comments</comments>
		<pubDate>Wed, 02 Mar 2016 03:53:27 +0000</pubDate>
		<dc:creator><![CDATA[Alan]]></dc:creator>
				<category><![CDATA[2.运维相关]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[fdisk]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[分区]]></category>

		<guid isPermaLink="false">http://www.lanxinbase.com/?p=894</guid>
		<description><![CDATA[1、什么是分区？
    分区是将一个硬盘驱动器分成若干个逻辑驱动器，分区是把硬盘连续的区块当做一个独立的磁硬使用。分区表是一个硬盘分区的索引,分区的信息都会写进分区表。
2、为什么要有多个分区？

防止数据丢失：如果系统只有一个分区，那么这个分区损坏，用户将会丢失所的有数据。
增加磁盘空间使用效率：可以用不同的区块大小来格式化分区，如果有很多1K的文件，而硬盘分区区块大小为4K，那么每存储一个文件将会浪费3K空间。这时我们需要取这些文件大小的平均值进行区块大小的划分。
数据激增到极限不会引起系统挂起：将用户数据和系统数据分开，可以避免用户数据填满整个硬盘，引起的系挂起。]]></description>
		<wfw:commentRss>http://www.lanxinbase.com/?feed=rss2&#038;p=894</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux系统下如何查看及修改文件读写权限</title>
		<link>http://www.lanxinbase.com/?p=806</link>
		<comments>http://www.lanxinbase.com/?p=806#comments</comments>
		<pubDate>Thu, 29 Oct 2015 03:01:40 +0000</pubDate>
		<dc:creator><![CDATA[Alan]]></dc:creator>
				<category><![CDATA[2.运维相关]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[权限]]></category>

		<guid isPermaLink="false">http://www.lanxinbase.com/?p=806</guid>
		<description><![CDATA[查看文件权限的语句：
　　在终端输入:
ls -l xxx.xxx （xxx.xxx是文件名）

　　那么就会出现相类似的信息，主要都是这些：
-rw-rw-r--

　　一共有10位数

　　其中： 最前面那个 - 代表的是类型

　　中间那三个 rw- 代表的是所有者（user）

　　然后那三个 rw- 代表的是组群（group）

　　最后那三个 r-- 代表的是其他人（other）

　　然后我再解释一下后面那9位数：

　　r 表示文件可以被读（read）

　　w 表示文件可以被写（write）

　　x 表示文件可以被执行（如果它是程序的话）]]></description>
		<wfw:commentRss>http://www.lanxinbase.com/?feed=rss2&#038;p=806</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux 的cp命令</title>
		<link>http://www.lanxinbase.com/?p=744</link>
		<comments>http://www.lanxinbase.com/?p=744#comments</comments>
		<pubDate>Thu, 27 Aug 2015 03:08:01 +0000</pubDate>
		<dc:creator><![CDATA[Alan]]></dc:creator>
				<category><![CDATA[2.运维相关]]></category>
		<category><![CDATA[cp]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://blog.lanxinbase.com/?p=744</guid>
		<description><![CDATA[功能: 复制文件或目录
说明: cp指令用于复制文件或目录，如同时指定两个以上的文件或目录，且最后的目的地是一个已经存在的目录，则它会把前面指定的所有文件或目录复制到此目录中。若同时指定多个文件或目录，而最后的目的地并非一个已存在的目录，则会出现错误信息
参数:
     -a 或 --archive     此参数的效果和同时指定"-dpR"参数相同
     -b 或 --backup      删除、覆盖目的文件先备份，备份的文件或目录亦建立为符号链接，并指向源文件或目录链接的源文件或目录。假如没有加上这个参数，在复制过程中若遇到符号链接，则会直接复制源文件或目录]]></description>
		<wfw:commentRss>http://www.lanxinbase.com/?feed=rss2&#038;p=744</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux对于大日志包进行分割的N种方法</title>
		<link>http://www.lanxinbase.com/?p=700</link>
		<comments>http://www.lanxinbase.com/?p=700#comments</comments>
		<pubDate>Thu, 27 Aug 2015 02:01:40 +0000</pubDate>
		<dc:creator><![CDATA[Alan]]></dc:creator>
				<category><![CDATA[2.运维相关]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[日志]]></category>

		<guid isPermaLink="false">http://blog.lanxinbase.com/?p=700</guid>
		<description><![CDATA[前言： 
   网站一个主要域名的日志包，解压缩之后有10多个G，当日志分析系统处理此日志包时，需要的分析时间过长，而且如分析过程中出错，要清空数据后再分析，所以需要将日志进行分割成多个日志包，通过多个日志分析系统并发分析，本文主要记录一下我测试的分割过程。]]></description>
		<wfw:commentRss>http://www.lanxinbase.com/?feed=rss2&#038;p=700</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>解决&#8221;mysql-bin.000001&#8243;占用超大空间的问题</title>
		<link>http://www.lanxinbase.com/?p=698</link>
		<comments>http://www.lanxinbase.com/?p=698#comments</comments>
		<pubDate>Thu, 27 Aug 2015 02:01:04 +0000</pubDate>
		<dc:creator><![CDATA[Alan]]></dc:creator>
				<category><![CDATA[2.运维相关]]></category>
		<category><![CDATA[3.数据库相关]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Mysql]]></category>
		<category><![CDATA[mysql-bin]]></category>

		<guid isPermaLink="false">http://blog.lanxinbase.com/?p=698</guid>
		<description><![CDATA[用ports安装了mysql以后，过一段时间发现/var空间不足了，查一下，会发现是mysql-bin.000001、mysql-bin.000002等文件占用了空间，那么这些文件是干吗的？这是数据库的操作日志，例如UPDATE一个表，或者DELETE一些数据，即使该语句没有匹配的数据，这个命令也会存储到日志文件中，还包括每个语句执行的时间，也会记录进去的。]]></description>
		<wfw:commentRss>http://www.lanxinbase.com/?feed=rss2&#038;p=698</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>查看修改Linux时区和时间</title>
		<link>http://www.lanxinbase.com/?p=675</link>
		<comments>http://www.lanxinbase.com/?p=675#comments</comments>
		<pubDate>Thu, 27 Aug 2015 01:52:02 +0000</pubDate>
		<dc:creator><![CDATA[Alan]]></dc:creator>
				<category><![CDATA[2.运维相关]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[时区]]></category>
		<category><![CDATA[时间]]></category>

		<guid isPermaLink="false">http://blog.lanxinbase.com/?p=675</guid>
		<description><![CDATA[查看/修改Linux时区和时间
　　一、时区
　　1. 查看当前时区
　　date -R
　　2. 修改设置时区
　　方法(1)
　　tzselect
　　方法(2) 仅限于RedHat Linux 和 CentOS
　　timeconfig
　　方法(3) 适用于Debian
　　dpkg-reconfigure tzdata
　　3. 复制相应的时区文件，替换系统时区文件；或者创建链接文件
　　cp /usr/share/zoneinfo/$主时区/$次时区 /etc/localtime
　　在中国可以使用：
　　cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime]]></description>
		<wfw:commentRss>http://www.lanxinbase.com/?feed=rss2&#038;p=675</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
