<?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>ChenTaoqian&#039;s Blog &#187; Linux</title>
	<atom:link href="http://www.chentaoqian.com/archives/category/compute/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://www.chentaoqian.com</link>
	<description>主机,企业邮箱,域名,空间,服务器,Java,Oracle,PHP,Linux,JS,MySQL,Apache</description>
	<lastBuildDate>Wed, 30 Nov 2011 14:35:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Linux在安全模式下修改initrd文件</title>
		<link>http://www.chentaoqian.com/archives/247</link>
		<comments>http://www.chentaoqian.com/archives/247#comments</comments>
		<pubDate>Tue, 16 Jun 2009 06:16:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[初始化]]></category>
		<category><![CDATA[安全模式]]></category>

		<guid isPermaLink="false">http://www.chentaoqian.com/?p=247</guid>
		<description><![CDATA[    我在Redhat Enterprise 5里安装了Java环境，设置了环境变量，结果环境变量设置出错了，重启Linux后无法登录，安全模式下提示如下信息：

bash:dircolors:command not found   
bash:/software/jdk1.6.0_14/lib.tools.jar: 没有那个文件或目录   
bash:/software/jdk1.6.0_14/bin: is a directory

我那个郁闷啊，刚学Linux就碰到系统初始化失败，咋整呢？网上搜！搜了一圈总算是找到一篇文章，在这里记录一下。
在安全模式下修改initrd文件：

由于LVM逻辑卷名嵌入在initrd文件，所以一旦更改vgname，那么会影响到系统的启动。这里采取进入linux rescue模式下手动修改initrd
 
1.用第一张安装盘启动，输入linux rescue
 
2.启动后在网络处选择no，在mount系统时候选择skip
 
3.创建/tmp/boot，/tmp/initrd两个目录
 
4.挂载你的boot目录，可以用fdisk -l来找到boot分区，如下




Disk /dev/sda: 320.0 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 38913 312464250 8e Linux LVM




mount /dev/sda1 /tmp/boot
5.切换当前目录至/tmp/initrd下，执行如下命令解压initrd文件到/tmp/initrd目录
gzip -cd /tmp/boot/initrd-xxxxxxxxx.img &#124; cpio -imd [...]]]></description>
		<wfw:commentRss>http://www.chentaoqian.com/archives/247/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux安装后一些注意点</title>
		<link>http://www.chentaoqian.com/archives/35</link>
		<comments>http://www.chentaoqian.com/archives/35#comments</comments>
		<pubDate>Wed, 03 Jun 2009 13:49:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.chentaoqian.com/?p=35</guid>
		<description><![CDATA[Linux安装后并不像Windows一样可以放心使用，为了让Linux系统能有较强的生命力，需要做一些修改。]]></description>
		<wfw:commentRss>http://www.chentaoqian.com/archives/35/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在linux上搭建Java WEB开发环境</title>
		<link>http://www.chentaoqian.com/archives/22</link>
		<comments>http://www.chentaoqian.com/archives/22#comments</comments>
		<pubDate>Tue, 02 Jun 2009 10:39:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://www.chentaoqian.com/?p=22</guid>
		<description><![CDATA[最近开始学Linux系统，其实也是因需要而学 哈哈。首先想到的就是在Linux上搭建WEB开发环境，我搭建的是Tomcat6+MySQL5.1+JDK1.6。下面就来讲一下我的搭建过程。
一、准备工作：
我的Linux系统是Redhat Enterprise 5；
Tomcat是apache-tomcat-6.0.18.tar.gz；
MySQL是MySQL-server-community-5.1.34-0.rhel5.i386.rpm和MySQL-client-community-5.1.34-0.rhel5.i386.rpm，因为我用的是Redhat，所以系统带有RPM程序，其实下载非RPM版（即Linux通用版也一样可以用，只是安装时的命令不一样，JDK我就是下的通用版）；
JDK是jdk-6u14-linux-i586.bin；
这些文件我都是存储在software目录中，自己建的一个目录，mkdir /software。
二、开始安装
1.安装Java
先到/software目录下，cd /software。
1.1 删除Redhat Enterprise 5 自带的JDK
打开终端输入#rpm -qa &#124; grep gcj ，其显示内容有：
java-1.4.2-gci-compat&#8230; (后面什么忘了，有这个显示说明安装有JDK1.4.2)
再输入#rpm -e –nodeps java-1.4.2-gci-compat&#8230; (该命令卸载JDK1.4.2)
安装自己的JDK前必须删除Redhat Enterprise 5 自带的JDK，不然系统使用的还是原来的JDK。
1.2开始安装自己的JDK，修改安装包为可执行：
# chmod a+x jdk-6u14-linux-i586.bin
1.2安装
# ./jdk-6u14-linux-i586.bin，接下来我们看到的应该是安装协议，一直回车继续直到提示“Done”，说明安装完成，此时你会在/software目录下看到jdk1.6.0_14的目录，这就是Java的目录。
1.3设置环境变量
# vi /etc/profile.d/java.sh，这样作的目的是让所有的用户用到。用vi命令进入编辑器后，输入以下内容：
JAVA_HOME=/softeware/jdk1.6.0_14
CLASSPATH=.:＄JAVA_HOME/lib/tools.jar
PATH=＄JAVA_HOME/bin:＄PATH
export JAVA_HOME
export CLASSPATH
export PATH
写好后，用Esc退出编辑模式，进入命令模式，然后输入“:wq”保存退出。
这里说明一下，Linux是用冒号“:”做分隔符，而Windows是用分号“;”。在每行结束不用加分号或其它符号，不然Linux无法完整识别该配置文件(我就因画蛇添足，每行末尾加一分号吃了亏)。在“=”两边不能有空格，否则Linux也不识别。
2.安装Tomcat
还是在/software目录下
2.1解压Tomcat包
tar -zxvf apache-tomcat-6.0.18.tar.gz，此时在/software目录下会产生一个apache-tomcat-6.0.18目录。
2.2配置Tomcat内存使用量
vi /software/apache-tomcat-6.0.18/bin/catalina.sh 加入配置 JAVA_OPTS=&#8217;-Xms128m -Xmx512m&#8217; ，内存使用大小范围可根据你的需要和实际情况而定，具体位置可以放在下面的地方:

2.3 Tomcat的启动与关闭
启动：# /software/apache-tomcat-6.0.18/bin/ catalina.sh run或者/software/apache-tomcat-6.0.18/bin/startup.sh
关闭：# /software/apache-tomcat-6.0.18/bin/catalina.sh stop或者/software/apache-tomcat-6.0.18/bin/shutdown.sh
3.安装MySQL
3.1 安装
安装Server：# rpm -ivh &#8211;nodeps MySQL-server-community-5.1.34-0.rhel5.i386.rpm
安装Client：# rpm -ivh &#8211;nodeps MySQL-server-community-5.1.34-0.rhel5.i386.rpm
注意：命令中 &#8211;nodeps 中是2个单划线&#8221;-&#8221;。
3.2 [...]]]></description>
		<wfw:commentRss>http://www.chentaoqian.com/archives/22/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>linux下rpm是什么</title>
		<link>http://www.chentaoqian.com/archives/24</link>
		<comments>http://www.chentaoqian.com/archives/24#comments</comments>
		<pubDate>Tue, 02 Jun 2009 08:13:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[rpm]]></category>

		<guid isPermaLink="false">http://www.chentaoqian.com/?p=24</guid>
		<description><![CDATA[RPM 是 Red Hat Package Manager 的缩写，本意是Red Hat 软件包管理，顾名思义是Red Hat 贡献出来的软件包管理；在Fedora 、Redhat、Mandriva、SuSE、YellowDog等主流发行版本，以及在这些版本基础上二次开发出来的发行版采用；
RPM包里面都包含什么？里面包含可执行的二进制程序，这个程序和Windows的软件包中的.exe文件类似是可执行的；RPM包中还包括程序运行时所需要的文件，这也和Windows的软件包类似，Windows的程序的运行，除了.exe文件以外，也有其它的文件；
一个RPM 包中的应用程序，有时除了自身所带的附加文件保证其正常以外，还需要其它特定版本文件，这就是软件包的依赖关系；依赖关系并不是Linux特有的，Windows操作系统中也是同样存在的；比如我们在Windows系统中运行3D游戏，在安装的时候，他可能会提示，要安装Direct 9 ；Linux和Windows原理是差不多的。
RPM文件在Linux中怎么执行呢？
命令行下 # rpm -ivh &#8211;nodeps xxx.rpm，可以通过 rpm /? 查看rpm的命令参数。
]]></description>
		<wfw:commentRss>http://www.chentaoqian.com/archives/24/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

