<?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>Li Yue [学习笔记] &#187; linux</title>
	<atom:link href="http://www.liyue.org/tech/archives/category/tech/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://www.liyue.org/tech</link>
	<description>技术笔记</description>
	<lastBuildDate>Sun, 18 Jul 2010 02:14:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>系统备份之定期清理日志文件</title>
		<link>http://www.liyue.org/tech/archives/186</link>
		<comments>http://www.liyue.org/tech/archives/186#comments</comments>
		<pubDate>Fri, 06 Nov 2009 09:21:16 +0000</pubDate>
		<dc:creator>李悦</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.liyue.org/tech/?p=186</guid>
		<description><![CDATA[一、前言 　　系统备份会定期产生备份文件，日积月累，早期的备份应该删除。设定每周清理一下备份文件，只保留最近7天的数据。可以根据文件的时间检索并删除。适用于系统管理中的数据备份文件和日志文件的管理。 二、SHELL脚本 find /var/web/apache/logs -type f -ctime +7 -exec rm {} \; 这个脚本会将指定目录及其子目录的所有符合条件的文件删除，没有提示。 三、加入计划任务 将上述命令写入一shell脚本back.sh 赋予可执行权限chmod 755 back.sh 编辑计划任务： #crontab -u user -e 0 2 * * 0 /home/back.sh back.sh脚本会在每周日凌晨２点执行。 有关crontab的详细命令参见相关资料，有很多。 这里只简要说明下，计划任务前５位用数字表示依次是： 分：（０——５９） 小时：（１——２３） 日：（１——３１） 月：（１——１２） 星期：（０——６，０为星期日）]]></description>
		<wfw:commentRss>http://www.liyue.org/tech/archives/186/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>umask来设定创建文件的默认权限</title>
		<link>http://www.liyue.org/tech/archives/164</link>
		<comments>http://www.liyue.org/tech/archives/164#comments</comments>
		<pubDate>Wed, 25 Feb 2009 03:25:28 +0000</pubDate>
		<dc:creator>李悦</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://www.liyue.org/tech/?p=164</guid>
		<description><![CDATA[　　linux下用户创建文件、文件夹都会有一个默认权限，系统默认文件夹权限是755，文件权限是644这个默认权限是可以设定的，就是通过umask，通过在shell下运行umask命令来看看当前的umask数值是多少，例如文件夹默认权限是755，他的umask数值为022。 　　这个数值表示的是什么意思，又如何来计算出想要的umask值。umask是在下面的配置文件中设定/etc/profile（全局设置），$ [HOME]/.bash_profile或者$ [HOME]/.profile（当前用户的设置，操作系统版本不同，文件名会不同）。在配置文件中加入一行umask 022即可。 　　umask值的计算方法，是通过权限的补码得来。例如文件夹权限755，文件夹的umask各位数值最大可以到7，各位数的补码就是022；而文件权限最大只能到6，因为系统不允许新建文件拥有执行权限。 　　umask值与文件、目录权限对照表： umask　文件　目录 —————————— 0 　　　6 　　　7 1 　　　6　　　 6 2 　　　4 　　　5 3　　　 4 　　　4 4　　　 2　　　 3 5 　　　2　　　 2 6 　　　0　　　 1 7 　　　0　　　 0]]></description>
		<wfw:commentRss>http://www.liyue.org/tech/archives/164/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>apache日志的cronolog轮循</title>
		<link>http://www.liyue.org/tech/archives/102</link>
		<comments>http://www.liyue.org/tech/archives/102#comments</comments>
		<pubDate>Tue, 09 Dec 2008 15:08:27 +0000</pubDate>
		<dc:creator>李悦</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[系统]]></category>
		<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://www.liyue.org/tech/?p=102</guid>
		<description><![CDATA[　　将apache日志按年月日目录分类存放，便于日志分析系统分析。使用cronolog来完成，有windows和linux的版本。Linux安装，解压缩后执行 　　#./configure 　　#./make 　　#./make install 　　在httpd.conf配置使用cronolog，在每个虚拟主机中，加入 　　 CustomLog &#34;&#124;/usr/local/sbin/cronolog /var/logs/%Y/%m/%Y%m%d_access.log&#34; combined 　　ErrorLog &#34;&#124;/usr/local/sbin/cronolog /var/logs/%Y/%m/%Y%m%d_error.log&#34; 　　Windows下cronolog安装，解压缩后，将cronolog.exe文件放到apache安装目录的bin下。配置httpd.conf TransferLog &#34;&#124;D:/Apache/bin/cronolog.exe D:/Apache/logs/%Y/%m/%d/access.log&#34; ErrorLog &#34;&#124;D:/Apache/bin/cronolog.exe D:/Apache/logs/%Y/%m/%d/access.log&#34;]]></description>
		<wfw:commentRss>http://www.liyue.org/tech/archives/102/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>apache2.2.9/tomcat5.5.16整合</title>
		<link>http://www.liyue.org/tech/archives/62</link>
		<comments>http://www.liyue.org/tech/archives/62#comments</comments>
		<pubDate>Wed, 24 Sep 2008 04:06:13 +0000</pubDate>
		<dc:creator>李悦</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://www.liyue.org/tech/?p=62</guid>
		<description><![CDATA[　　1、Apache2.2.9的安装只用了一个配置命令： 　　　　./configure &#8211;prefix=/usr/local/apache &#8211;enable-rewrite=shared 　　2、Tomcat5.5.16二进制方式，解压。 　　3、安装jakarta-tomcat-connectors-jk2-src-current.tar.gz 　　　　下载地址：http://archive.apache.org/dist/jakarta/tomcat-connectors/jk2/source/ 　　　　解压后，进入到jakarta-tomcat-connectors-jk2-2.0.4-src/jk/native2目录 　　　　执行./configure &#8211;with-apxs2=/usr/local/apache/bin/apxs 　　　　　　make 　　　　拷贝mod_jk2.so文件，到apache的modules目录。 　　　　cp jakarta-tomcat-connectors-jk2-2.0.4-src/jk/build/jk2/apache2/mod_jk2.so 　　　　　　/usr/local/apache/modules/ 　　4、配置apache配置文件： 　　　　编辑httpd.conf 　　　　Listen 10.10.10.197:80下面添加一行，加载mod_jk2.so. 　　　　LoadModule jk2_module modules/mod_jk2.so 　　　　找到下面一行，并且去掉注释符号#，加载虚拟主机配置文件 　　　　Include conf/extra/httpd-vhosts.conf 　　5、配置虚拟主机： 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 &#60;VirtualHost *&#62; ServerAdmin web@domain.com DocumentRoot &#34;/usr/local/tomcat/webapps&#34; #需要转给tomcat处理的文件名，如*.jsp，这里是*.*所有文件处理转给tomcat &#60;Location ~ &#34;/*.*&#34;&#62; JkUriSet [...]]]></description>
		<wfw:commentRss>http://www.liyue.org/tech/archives/62/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LAMP的部署经历</title>
		<link>http://www.liyue.org/tech/archives/35</link>
		<comments>http://www.liyue.org/tech/archives/35#comments</comments>
		<pubDate>Sun, 10 Aug 2008 01:26:54 +0000</pubDate>
		<dc:creator>李悦</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[系统]]></category>
		<category><![CDATA[lamp]]></category>

		<guid isPermaLink="false">http://www.liyue.org/tech/?p=35</guid>
		<description><![CDATA[　　此次安装的版本比较低，适用于某个老系统的环境要求。费了一些周折，网络上提供的资料准确性有限，很杂乱。需要自己的实践和研究总结一些方法。 　　环境：Redhat AS5,Apache1.3.9,PHP4.1.2,Mysql4.1,ZendOptimizer-2.5.7 　　其他软件：zlib-1.2.3.tar.gz（后面会提及） 一、MySQL数据库 1、第一次用二进制方式安装，直接解压，初始化数据库出错，启动也失败过，后来采用源码安装包安装，避免麻烦。 源码安装： 1 2 3 4 5 6 7 8 9 10 11 12 groupadd mysql  /*创建mysql用户组*/ useradd -g mysql mysql /*创建用户*/ tar zxvf mysql-4.1.tar.gz    /*解压缩*/ cd mysql-4.1 ./configure --prefix=/usr/local/mysql /*指定mysql安装路径*/ make /*时间会比较长*/ make install /*安装完毕*/ cp support-files/my-large.cnf /etc/my.cnf    /*复制配置文件改名为my.cnf，如果提示覆盖按Y确定*/ cd /usr/local/mysql bin/mysql_install_db --user=mysql    /*必须以mysql用户初始化数据库*/ chown -R mysql:mysql /usr/local/mysql  /*更改mysql目录所有者权限，否则会导致启动失败*/ bin/mysqld_safe --user=mysql [...]]]></description>
		<wfw:commentRss>http://www.liyue.org/tech/archives/35/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
