ï»??xml version="1.0" encoding="utf-8" standalone="yes"?>久久6免费高清热精品,91性高湖久久久久久久久_久久99,国产高清一区http://www.aygfsteel.com/jjshcc/category/53680.html桑巴葡语¾˜»è¯‘工作室是òq¿å·žå¸‚最专业葡萄牙语¾˜»è¯‘机构-www.puyufanyi.com-‹Æ¢è¿Žå¯ÀL‰¾Java,As400,Mainframe的猎头eric_cc#qq.ccom(æŠ?换成@)zh-cnFri, 29 Nov 2013 09:23:48 GMTFri, 29 Nov 2013 09:23:48 GMT60åŸÞZºŽCentOSçš„Linux基本¾|‘络配置,包括¾|‘卡eth0、DNS、Host½{?/title><link>http://www.aygfsteel.com/jjshcc/archive/2013/06/28/401063.html</link><dc:creator>Eric_jiang</dc:creator><author>Eric_jiang</author><pubDate>Fri, 28 Jun 2013 14:26:00 GMT</pubDate><guid>http://www.aygfsteel.com/jjshcc/archive/2013/06/28/401063.html</guid><wfw:comment>http://www.aygfsteel.com/jjshcc/comments/401063.html</wfw:comment><comments>http://www.aygfsteel.com/jjshcc/archive/2013/06/28/401063.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/jjshcc/comments/commentRss/401063.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/jjshcc/services/trackbacks/401063.html</trackback:ping><description><![CDATA[<h1><div><span style="font-size: 12px;">1.¾|‘卡配置</span></div><div><span style="font-size: 12px;"><br /></span></div><div><span style="font-size: 12px;">要ä‹Éä¸ÀLœºæŽ¥å…¥¾|‘络必须正确配置¾|‘卡åQŒç½‘卡配¾|®å­˜æ”‘Öœ¨/etc/sysconfig/network-script/目录中ã€?/span></div><div><span style="font-size: 12px;">目录里面存放了很多关于网¾lœé…¾|®çš„脚本åQŒå…¶ä¸­ç½‘卡配¾|®ä‹É用了ifcfg-eth0çš„åŞ式编受÷€?/span></div><div><span style="font-size: 12px;">修改指定¾|‘卡配置文äšgifcfg-eth0ã€?/span></div><div><span style="font-size: 12px;">修改¾|‘卡配置后需要重启network服务åQˆå‚ç…?åQ‰ã€?/span></div><div><span style="font-size: 12px;"><br /></span></div><div><span style="font-size: 12px;">例如:</span></div><div><span style="font-size: 12px;">/etc/sysconfig/network-scripts/ifcfg-eth0</span></div><div><span style="font-size: 12px;"># Advanced Micro Devices 79c970 [PCnet32 LANCE]</span></div><div><span style="font-size: 12px;">DEVICE=eth0 #讑֤‡åç§°</span></div><div><span style="font-size: 12px;">BOOTPROTO=static|dhcp #使用静态配¾|®è¿˜æ˜¯ä‹É用dhcp分配的ip地址</span></div><div><span style="font-size: 12px;">HWADDR=00:0C:29:26:A2:A6 #¾|‘卡的物理地址mac</span></div><div><span style="font-size: 12px;">ONBOOT=yes</span></div><div><span style="font-size: 12px;">DHCP_HOSTNAME=192.168.1.1 #dhcp地址</span></div><div><span style="font-size: 12px;">IPADDR=192.168.1.9 #¾|‘卡ip</span></div><div><span style="font-size: 12px;">NETMASK=255.255.255.0 #子网掩码</span></div><div><span style="font-size: 12px;">GATEWAY=192.168.1.1 #¾|‘å…³ip</span></div><div><span style="font-size: 12px;">BROADCAST=192.168.1.255 #òq¿æ’­ip</span></div><div><span style="font-size: 12px;"><br /></span></div><div><span style="font-size: 12px;">2.network¾|‘络配置</span></div><div><span style="font-size: 12px;">/etc/sysconfig/networkæ–‡äšg记录了一些网¾lœé…¾|®ä¿¡æ¯ã€?/span></div><div><span style="font-size: 12px;">例如(¾l“合¾|‘络攉™›†)åQ?/span></div><div><span style="font-size: 12px;">NETWORKING=YES|NO #YES表示需要配¾|®ç½‘¾lœã€?NOåQšè¡¨½CÞZ¸éœ€è¦é…¾|®ç½‘¾lœã€?/span></div><div><span style="font-size: 12px;">HOSTNAME=yezee #ä¸ÀLœºçš„全限定域名</span></div><div><span style="font-size: 12px;">GATEWAY=gw-ip #¾|‘络¾|‘关的IP地址</span></div><div><span style="font-size: 12px;">GATEWAYDEV=gw-dev #¾|‘关讑֤‡çš„名¿UŽÍ¼ˆä¾‹å¦‚eth0或IP地址åQ?/span></div><div><span style="font-size: 12px;">NISDOMAIN=dom-name #表示NISåQˆå¿UîC¿¡æ¯æœåŠ¡ï¼‰åŸŸï¼ˆå¦‚æžœæœ‰çš„è¯ï¼‰</span></div><div><span style="font-size: 12px;">FORWARD_IPV4=”NO” #配置路由器时åQŒæ˜¯å¦è{发IPV4ã€?/span></div><div><span style="font-size: 12px;">NETWORKING_IPV6=yes #ipv6¾|‘络协议</span></div><div><span style="font-size: 12px;"><br /></span></div><div><span style="font-size: 12px;">3.配置DNS</span></div><div><span style="font-size: 12px;">保存DNS配置的文件是/etc/resolv.conf</span></div><div><span style="font-size: 12px;">nameserver最多可以有3个DNS服务å™?</span></div><div><span style="font-size: 12px;">search最多可以指å®?个域å?/span></div><div><span style="font-size: 12px;"><br /></span></div><div><span style="font-size: 12px;">格式åQ?/span></div><div><span style="font-size: 12px;">domain a.yezee.org</span></div><div><span style="font-size: 12px;">search b.yezee.org c.yezee.org</span></div><div><span style="font-size: 12px;">nameserver 202.96.128.86</span></div><div><span style="font-size: 12px;">nameserver 192.168.1.1</span></div><div><span style="font-size: 12px;"><br /></span></div><div><span style="font-size: 12px;">在网上找了段关于domainå’Œsearch关键字的说明åQŒè¯´æ˜Ždomainå’Œsearch关键字的作用其实是一æ ïLš„ã€?/span></div><div><span style="font-size: 12px;"><br /></span></div><div><span style="font-size: 12px;">domain linpro.no</span></div><div><span style="font-size: 12px;">search linpro.no uio.no ifi.uio.no</span></div><div><span style="font-size: 12px;">domain function:</span></div><div><span style="font-size: 12px;">Had I typed telnet math.uio.no. with the trailing dot, the resolver would have known it was an FQDN and would have looked up math.uio.no at once, without trying to append the specified domain first. Not all applications are tolerant of the trailing dot, though, so it can’t always be specified.</span></div><div><span style="font-size: 12px;">search function:</span></div><div><span style="font-size: 12px;">When ssh gram is executed, the resolver first looks for gram.linpro.no, which does not exist; then gram.uio.no, which does not exist, either; and finally gram.ifi.uio.no, which will succeed because it does exist</span></div><div> </div><div><span style="font-size: 12px;"><br /></span></div><div><span style="font-size: 12px;">4.配置host</span></div><div><span style="font-size: 12px;"><br /></span></div><div><span style="font-size: 12px;">主要æ˜?etc/hosts配置文äšg ã€?/span></div><div><span style="font-size: 12px;">æ–‡äšg记录了IP地址和主机名的映ž®„å…³¾p»ï¼Œä½œç”¨å’ŒWindowsXp下的C:\WINDOWS\system32\drivers\etc\hostsç›æ€»¿ã€?/span></div><div><span style="font-size: 12px;">格式:</span></div><div><span style="font-size: 12px;">192.168.1.9 www.yezee.org(Hostnameä¸ÀLœºå? yezeeåQˆAlias别名åQ?/span></div><div><span style="font-size: 12px;"><br /></span></div><div><span style="font-size: 12px;">5.配置DNS解析™åºåº</span></div><div><span style="font-size: 12px;"><br /></span></div><div><span style="font-size: 12px;">/etc/host.confæ–‡äšg配置军_®šäº?etc/resolv.confå’?etc/hosts的配¾|®è§£æžé¡ºåºã€?/span></div><div><span style="font-size: 12px;"><br /></span></div><div><span style="font-size: 12px;">一般系¾lŸä¸­ä¼šåŒæ—¶å­˜åœ¨DNS域名解析和静æ€?etc/hosts配置åQ?etc/host.conf则确定这些配¾|®çš„解析™åºåºã€?/span></div><div><span style="font-size: 12px;"><br /></span></div><div><span style="font-size: 12px;">格式åQ?/span></div><div><span style="font-size: 12px;">order hosts,bind #DNS解析™åºåº</span></div><div><span style="font-size: 12px;">multi on|off #允许或禁æ­?etc/hosts配置中一个主机是否能拥有多个IP地址</span></div><div><span style="font-size: 12px;">nospoof on #¼›æ­¢(‹‚€æŸ?IP地址‹Æºéª—</span></div><div><span style="font-size: 12px;">alert on #若检查出有IP‹Æºéª—åQŒåˆ™æŠŠè­¦å‘Šä¿¡æ¯é€šè¿‡syslog记录</span></div><div><span style="font-size: 12px;"><br /></span></div><div><span style="font-size: 12px;">order关键字定义了DNS的解析顺序,先ä‹É用本机hosts表解析域名,如果不能解析åQŒå†ä½¿ç”¨æŒ‡å®šçš„DNS服务器ã€?/span></div><div><span style="font-size: 12px;"><br /></span></div><div><span style="font-size: 12px;">6.服务端口配置</span></div><div><span style="font-size: 12px;"><br /></span></div><div><span style="font-size: 12px;">配置文äšg/etc/services 记录了端口号和服务之间的端口对应关系ã€?/span></div><div><span style="font-size: 12px;">通过配置˜q™ä¸ªæ–‡äšgåQŒæœåŠ¡å™¨å’Œå®¢æˆïL«¯çš„程序便能够把服务的名字转成端口受÷€?/span></div><div><span style="font-size: 12px;"><br /></span></div><div><span style="font-size: 12px;">配置完成后,ž®±éœ€è¦ä‹É用一些命令来‹‚€æŸ¥å’Œå¯ç”¨æ–°çš„配置ã€?/span></div><div><span style="font-size: 12px;"><br /></span></div><div><span style="font-size: 12px;">7.ifconfig命ä×o</span></div><div><span style="font-size: 12px;"><br /></span></div><div><span style="font-size: 12px;">7.1 使用ifconfig命ä×o来检查网¾lœé…¾|?直接输入ifconfig回èžR卛_¯.</span></div><div><span style="font-size: 12px;">格式:ifconfig 或è€?ifconfig eth0 #查看指定¾|‘卡配置</span></div><div><span style="font-size: 12px;">昄¡¤ºå¦‚下:</span></div><div><span style="font-size: 12px;"><br /></span></div><div><span style="font-size: 12px;">7.2 使用ifconfig来激‹zÕd’Œ¼›æ­¢¾|‘卡(¾|‘络讑֤‡)</span></div><div><span style="font-size: 12px;">格式:ifconfig eth0 up|down</span></div><div><span style="font-size: 12px;">up为激‹zȝ½‘卡eth0åQ›down为禁止网卡eth0ã€?/span></div><div><span style="font-size: 12px;"><br /></span></div><div><span style="font-size: 12px;">7.3 使用ifconfig来修改网卡配¾|?/span></div><div><span style="font-size: 12px;">格式:Ifconfig eth0 192.168.1.9 netmask 255.255.255.0</span></div><div><span style="font-size: 12px;">¾|‘卡ipè¢«ä¿®æ”¹äØ“192.168.1.9åQŒå­¾|‘æŽ©ç äØ“255.255.255.0</span></div><div><span style="font-size: 12px;"><br /></span></div><div><span style="font-size: 12px;">7.4 使用ifconfig来让¾|‘卡获取dhcp动态分配的地址</span></div><div><span style="font-size: 12px;">格式:ifconfig eth0 -dynamic</span></div><div><span style="font-size: 12px;"><br /></span></div><div><span style="font-size: 12px;">8.使用/etc/rc.d/init.d/network启动和停止network服务</span></div><div><span style="font-size: 12px;"><br /></span></div><div><span style="font-size: 12px;">格式:/etc/rc.d/init.d/network</span></div><div><span style="font-size: 12px;">使用该脚本可启动、停止、重启network¾|‘络服务åQ?/span></div><div><span style="font-size: 12px;">命ä×o实际上是调用äº?etc/sysconfig/network-scritps/目录下相兌™„šæœ¬ã€?/span></div><div><span style="font-size: 12px;"><br /></span></div><div><span style="font-size: 12px;">9.更多常用CentOS‹‚€æŸ¥ç½‘¾lœçš„命ä×o:</span></div><div><span style="font-size: 12px;"><br /></span></div><div><span style="font-size: 12px;">ping www.yezee.org #ping,½Ž€å•连通性测è¯?/span></div><div><span style="font-size: 12px;">traceroute www.yezee.org #查看路由‹¹‹è¯•情况</span></div><div><span style="font-size: 12px;">netstat –t #查看tcp˜qžæŽ¥æƒ…况åQŒnetstat˜q˜æœ‰å¾ˆå¤šå¥½ç”¨çš„参敎ͼŒå…·ä½“可参考帮åŠ?/span></div><div><span style="font-size: 12px;">hostname yezee #更改ä¸ÀLœºåäØ“yezee</span></div><div><span style="font-size: 12px;">arp #查看arp¾~“å­˜</span></div><div><span style="font-size: 12px;">arp –s IP MAC #¾|‘arp¾~“存中添加ipå’Œmac映射</span></div><div><span style="font-size: 12px;">arp –d IP #从arp¾~“存中删除映ž®?/span></div></h1><img src ="http://www.aygfsteel.com/jjshcc/aggbug/401063.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/jjshcc/" target="_blank">Eric_jiang</a> 2013-06-28 22:26 <a href="http://www.aygfsteel.com/jjshcc/archive/2013/06/28/401063.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title> 制作&修改CentOS Livecdhttp://www.aygfsteel.com/jjshcc/archive/2013/06/23/400882.htmlEric_jiangEric_jiangSun, 23 Jun 2013 12:57:00 GMThttp://www.aygfsteel.com/jjshcc/archive/2013/06/23/400882.htmlhttp://www.aygfsteel.com/jjshcc/comments/400882.htmlhttp://www.aygfsteel.com/jjshcc/archive/2013/06/23/400882.html#Feedback0http://www.aygfsteel.com/jjshcc/comments/commentRss/400882.htmlhttp://www.aygfsteel.com/jjshcc/services/trackbacks/400882.html阅读全文

Eric_jiang 2013-06-23 20:57 发表评论
]]>
CentOS 6.3在qume虚拟æœÞZ¸‹çš„安è£?/title><link>http://www.aygfsteel.com/jjshcc/archive/2013/06/23/400879.html</link><dc:creator>Eric_jiang</dc:creator><author>Eric_jiang</author><pubDate>Sun, 23 Jun 2013 11:15:00 GMT</pubDate><guid>http://www.aygfsteel.com/jjshcc/archive/2013/06/23/400879.html</guid><wfw:comment>http://www.aygfsteel.com/jjshcc/comments/400879.html</wfw:comment><comments>http://www.aygfsteel.com/jjshcc/archive/2013/06/23/400879.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/jjshcc/comments/commentRss/400879.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/jjshcc/services/trackbacks/400879.html</trackback:ping><description><![CDATA[<p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">使用qume软äšg安装CentOS 6.3-86的详¾l†æ­¥éª¤ï¼š</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">步骤一åQ?/p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">win+råQ𿉓开˜qè¡ŒåQŒè¾“å…¥cmdåQŒè¿›å…¥å‘½ä»¤è¡Œæ¨¡å¼åQ?/p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><span style="font-family: 宋体; font-size: 11pt"><img style="border-bottom: medium none; border-left: medium none; width: 352px; max-width: 100%; height: 163px; border-top: medium none; border-right: medium none" alt="" src="http://img.blog.csdn.net/20130429160153830" width="407" height="224" /></span></p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">2、进入qemu的目录:</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">cd "目标文äšg夹名"</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">例:</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><img style="border-bottom: medium none; border-left: medium none; max-width: 100%; border-top: medium none; border-right: medium none" alt="" src="http://img.blog.csdn.net/20130429160244402" /></p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"></p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"> 3、ä‹É用qemu-img命ä×o创徏一个虚拟机文äšg</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">qemu-img create -f qcow centos.img 10G.</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">˜q™æ˜¯æœ€½Ž€å•çš„qemu-imgçš„ä‹É用方å¼?åQŒåˆ›å»ÞZ¸€ä¸?0Gçš„raw格式的虚拟硬盘镜åƒ?/p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">create 参数表示创徏</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">-f 参数表示创徏文äšg格式åQŒåŽè¾Òމ€å¸¦çš„子参数qcow 表示qemu镜像格式</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">linux.img为文件名¿U?/p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">4G为所创徏虚拟机文件的上限大小åQŒä¹Ÿž®±æ˜¯è™šæ‹Ÿæœºçš„¼‹¬ç›˜å¤§å°</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><img style="border-bottom: medium none; border-left: medium none; max-width: 100%; border-top: medium none; border-right: medium none" alt="" src="http://img.blog.csdn.net/20130429160335837" /></p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"> </p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">附:建立其他格式镜像的方法:</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">qemu-img.exe create -f qcow harddisk.qcow 10G</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">创徏一个QCOW格式的硬盘硬盘镜像,˜q™æ ·çš„æ ¼å¼å¯ä»¥éšä½¿ç”¨çš„空间改变镜像的大小</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">qemu-img.exe create -f qcow2 harddisk.qcow2 10G</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">创徏一个QCOW2格式的硬盘硬盘镜像,˜q™æ ·çš„æ ¼å¼å¯ä»¥ä‹É用VMå¿«ç…§</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"> </p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">转化成其他格式文件的æ–ÒŽ³•åQ?/p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">qemu-img.exe convert harddisk.img -O qcow harddisk.qcow</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">ž®†raw格式的虚拟硬盘è{æ¢äØ“qcow格式</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">qemu-img.exe convert -f raw harddisk.img -O qcow2 harddisk.qcow2</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">ž®†raw格式的虚拟硬盘è{æ¢äØ“qcow2格式</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"> ä¸‹è²åœ°å€åQ?br /></p><p style="margin: 0px; padding: 0px; widows: 2; line-height: 26px; font-family: Arial; orphans: 2;"><span style="font-size: 13px; line-height: 18px; font-family: arial;">http://mirrors.163.com/centos/6/isos/i386/</span><span style="font-size: 13px; line-height: 18px; font-family: arial; color: #cc0000;">CentOS-6.3-i386-LiveCD.iso<br /></span></p><div>http://mirrors.163.com/centos/6.4/isos/i386/CentOS-6.4-i386-minimal.iso</div> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">4、qemu.exe -L . -m 1024 -hdacentos.img -cdrom CentOS-6.3-i386-LiveCD.iso -boot d</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">注:此处的镜像文件要攑֜¨qemu的目录下</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">-m 1024 䏸™™šæ‹Ÿæœºåˆ†é…1024MB内存</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">-hda filename.img 刚才 -创徏的硬盘文ä»?/p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">-cdrom CentOS-6.3-i386-LiveCD.iso 䏸™™šæ‹Ÿæœºçš„å…‰é©×ƒ¸­æ’入光盘 CentOS-       6.3-i386-LiveCD.iso</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">-boot d 虚拟机光盘启åŠ?/p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">输入命ä×o的截图:</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"></p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"> <img style="border-bottom: medium none; border-left: medium none; max-width: 100%; border-top: medium none; border-right: medium none" alt="" src="http://img.blog.csdn.net/20130429160313260" /></p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"></p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"> 5、下面进行安装centos 6.3</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">ž®†å…‰æ ‡å®šä½åˆ°InstallåQŒæŒ‰ä¸‹å›žè½¦å¼€å§‹å®‰è£?/p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><img style="border-bottom: medium none; border-left: medium none; width: 512px; max-width: 100%; height: 372px; border-top: medium none; border-right: medium none" alt="" src="http://img.blog.csdn.net/20130429160537740" width="651" height="511" /></p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><img style="border-bottom: medium none; border-left: medium none; width: 505px; max-width: 100%; height: 265px; border-top: medium none; border-right: medium none" alt="" src="http://img.blog.csdn.net/20130429160624401" width="721" height="406" /></p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">基本ž®±æ˜¯ç‚¹ä¸‹ä¸€æ­¥çš„问题了,è®îC½é€‰å¥½è¯­è¨€å’Œæ—¶åŒºï¼Œä¸ç„¶æœ‰ç‚¹ž®éº»çƒ¦çš„</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">安装的时候还有一点就是分区的问题åQŒå¯ä»¥è‡ªè¡Œé€‰æ‹©</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"> </p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><img style="border-bottom: medium none; border-left: medium none; width: 656px; max-width: 100%; height: 462px; border-top: medium none; border-right: medium none" alt="" src="http://img.blog.csdn.net/20130429160645488" width="858" height="640" /></p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">使用所有空é—ß_¼š˜q™ä¸ªæ˜¯å¯¹æ•´ä¸ª¼‹¬ç›˜é‡Œçš„æ•°æ®éƒ½è¿›è¡Œæ¸…½Iºï¼Œè¯äh…Žé‡?/p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">替换现有的Linux:安装½E‹åºè‡ªåŠ¨è¯†åˆ«å·²æœ‰çš„Linux¾pȝ»ŸåQŒåƈ对应的将文äšg按已有的分区格式˜q›è¡Œé‡æ–°å®‰è£…</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">使用剩余½Iºé—´åQšæŒ‡¼‹¬ç›˜ä¸­è¿˜æœ‰æ²¡æœ‰è¢«åˆ†åŒºçš„æ‰‡åŒ?/p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">创徏自定义布局åQšæŒ‡è‡ªè¡Œå¯¹ç¡¬ç›˜è¿›è¡Œåˆ†åŒºæ“ä½œï¼Œå»ø™®®æ˜¯å¯¹linuxæ¯”è¾ƒç†Ÿçš„äºø™¿›è¡Œæ“ä½?/p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">6、第一‹Æ¡è¿›å…¥ç³»¾lŸçš„配置</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">比较½Ž€å•,无非是点å‡È¡®å®šå’Œè®„¡½®ç”¨æˆ·è´¦æˆ·å’Œå¯†ç ä»€ä¹ˆçš„</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"> <img style="border-bottom: medium none; border-left: medium none; width: 394px; max-width: 100%; height: 214px; border-top: medium none; border-right: medium none" alt="" src="http://img.blog.csdn.net/20130429160840968" width="855" height="484" /> </p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><img style="border-bottom: medium none; border-left: medium none; width: 412px; max-width: 100%; height: 253px; border-top: medium none; border-right: medium none" alt="" src="http://img.blog.csdn.net/20130429160923123" width="907" height="591" /></p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><img style="border-bottom: medium none; border-left: medium none; width: 410px; max-width: 100%; height: 280px; border-top: medium none; border-right: medium none" alt="" src="http://img.blog.csdn.net/20130429160957825" width="906" height="655" /></p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"></p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"> 7、登陆系¾lŸï¼š</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">登陆界面åQ?/p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><img style="border-bottom: medium none; border-left: medium none; width: 503px; max-width: 100%; height: 380px; border-top: medium none; border-right: medium none" alt="" src="http://img.blog.csdn.net/20130429161039394" width="805" height="602" /></p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">ä¸È•Œé¢ï¼š</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><img style="border-bottom: medium none; border-left: medium none; width: 541px; max-width: 100%; height: 420px; border-top: medium none; border-right: medium none" alt="" src="http://img.blog.csdn.net/20130429161119104" width="792" height="592" /></p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"> </p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">附:</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">如果每次想从文本界面启动åQŒä¸æƒ³ä»Žå›‘ÖŞ化界面启动,可以做以下的改动</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">åœ?etc/inittab中,是把id:5:initdefault: 中的5æ”¹äØ“3</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">或è€?/p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">在机器正常启动完毕ä“Q何时候,按alt+ctrl+F1~F6切换到文本模式ã€?/p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">如果想从囑ÖŞ化界面启动:</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">åœ?etc/inittab中,是把id:3:initdefault: 中的3æ”¹äØ“5</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">或者再开机的时候startx或者init 5åQŒä¹Ÿèƒ½ä»Žæ–‡æœ¬ç•Œé¢å¯åŠ¨åˆ°å›¾å½¢åŒ–ç•Œé¢</p> <p style="text-align: left; padding-bottom: 0px; widows: 2; text-transform: none; background-color: #ffffff; text-indent: 0px; margin: 0px; padding-left: 0px; letter-spacing: normal; padding-right: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; color: #000000; word-spacing: 0px; padding-top: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">按alt+ctrl+F7切换到图形模å¼?/p><img src ="http://www.aygfsteel.com/jjshcc/aggbug/400879.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/jjshcc/" target="_blank">Eric_jiang</a> 2013-06-23 19:15 <a href="http://www.aygfsteel.com/jjshcc/archive/2013/06/23/400879.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title> linux 快速登录方法u盘系¾lŸåˆ¶ä½œâ€”livecd制作isohttp://www.aygfsteel.com/jjshcc/archive/2013/06/23/400878.htmlEric_jiangEric_jiangSun, 23 Jun 2013 11:00:00 GMThttp://www.aygfsteel.com/jjshcc/archive/2013/06/23/400878.htmlhttp://www.aygfsteel.com/jjshcc/comments/400878.htmlhttp://www.aygfsteel.com/jjshcc/archive/2013/06/23/400878.html#Feedback0http://www.aygfsteel.com/jjshcc/comments/commentRss/400878.htmlhttp://www.aygfsteel.com/jjshcc/services/trackbacks/400878.html

Windows 下直接运è¡?Linuxçš„Live CD版的æ–ÒŽ³•

      一个偶然的æœÞZ¼š,我发çŽ?Live CD 版的Linux可以借助 qume在Windows下直接运è¡?æ–ÒŽ³•是下载linux-tr127 下蝲地址http://www.orsoon.com/down.asp?id=1372&downid=8å®?际上˜q™ä¸ªè½¯äšg包是由tr127 用qume˜q™ä¸ªè™šæ‹Ÿæœºåˆ¶ä½œçš„可在Windows下运行的虚拟Linux ;下蝲˜q™ä¸ªåŽ‹ç¾ƒåŒ?解压之后可单击linux.bat˜q™ä¸ªæ–‡äšg,ž®±å¯ç›´æŽ¥˜qè¡Œè™šæ‹Ÿçš„Linux;但是˜q™ä¸ªè‡ªå¸¦çš„Linux功能太有限了.下面ž®±æ˜¯å¯¹å®ƒçš„æ”¹ é€?--偷天换日.你会发现在linux-tr127˜q™ä¸ªç›®å½•下有一个isoæ–‡äšg,它就是一个linux live cd的镜像文ä»?我们可以用其它linux发行版的Live CD版本的iso镜像文äšg替换˜q™ä¸ªisoæ–‡äšg的功èƒ?来运行其它你喜欢的Linux版本,具体做法如下:
1.下蝲其它linux发行版的Live CD版本的iso镜像文äšg,˜q™æœ‰ä¸ªåœ°å€:
ftp://ftp.bioinformatics.org/pub/dnalinux/dna50p.iso
2.用文本编辑器打开linux.bat其内容如�
REM Start qemu on windows.
@ECHO OFF

START qemu.exe -L . -m 128 -cdrom dsl.iso -enable-audio -localtime -user-net

CLS
EXIT
3. ˜q™ä¸€æ­¥æˆ‘们要做的ž®±æ˜¯,把dsl.iso换成你下载的isoæ–‡äšgå?如果你下载的isoæ–‡äšg在其它盘里也没关¾p?NTFS格式的盘也行.只要把èµ\径加上就 行了,例如你的iso是c盘的TDdownload目录下的dna50p.iso那么你就用c:\TDdownload\dna50p.iso替换 dsl.iso
4.接下来就可以直接双击linux.bat˜qè¡Œä½ linuxäº?br />我试了两个版本的linux live cd 都没问题.


   ˜q™ç§æ–ÒŽ³•是我遇到的在Windows下学习Linux的最½Ž€å•çš„æ–ÒŽ³•,比用VMware ,virtual pc来虚拟Linux要方便的多的多了.省去安装,特别是对新手来说,用此æ–ÒŽ³•来学习Linux的门槛更低了.

2以下�nbsp;制作livecd的方�/span>

我说�步指5个步骤:
1). ¾pȝ»ŸçŽ¯å¢ƒå‡†å¤‡åQ?/div>
2). 安装LiveCD创徏工具åQ?/div>
3). 创徏LiveCD ISOåQ?/div>
4). 把LiveCD ISO复制到存储器中,例如DVDåQŒU盘;
5). ‹¹‹è¯•
开始之前,首先我们要了解LiveCD创徏工具是怎样工作的:
In a nutshell, the livecd-creator program    

* Sets up a file for the ext3 file system that will contain all the data comprising the live CD   
* Loopback mounts that file into the file system so there is an
installation root    
* Bind mounts certain kernel file systems (/dev, /dev/pts, /proc, /sys, /selinux) inside the installation root   
* Uses a configuration file to define the requested packages and
default configuration options. The format of this file is the same as is used for installing a system via kickstart.   
* Installs, using yum, the requested packages into the installation
using the given repositories    
* Optionally runs scripts as specified by the live CD configuration
file.    
* Relabels the entire installation root (for SELinux)    
*Creates a live CD specific initramfs that matches the installed
kernel    
* Unmounts the kernel file systems mounted inside the installation
root    
* Unmounts the installation root    
* Creates a squashfs file system containing only the ext3 file
(compression)    
* Configures the boot loader    
* Creates an iso9660 bootable CD 
½W?步,安装¾pȝ»ŸçŽ¯å¢ƒåQ?/div>
CentOS 5.2 Linux
½W?步,安装LiveCD创徏工具åQ?/div>
¾~–辑/etc/yum.repos.d/centos-livecd.repoåQŒåŠ å…¥å¦‚ä¸‹çš„å†…å®¹åQ?/span>
# Name: CentOS LiveCD repository 
[livecd] 
name = CentOS $releasever - LiveCD 
baseurl = http://www.nanotechnologies.qc.ca/propos/linux/centos-live/$basearch/live
enabled=1 
protect=0 
gpgkey = http://www.nanotechnologies.qc.ca/propos/linux/RPM-GPG-KEY-PGuay 
保存之后åQŒå°±å¯ä»¥ä½¿ç”¨yum来安装必™åȝš„LiveCD创徏工具了:
# yum install livecd-tools syslinux anaconda-runtime 
½W?步,创徏LiveCD ISOåQŒæˆ‘们需要编辑kickstart配置文äšgåQŒé™„件中有两个参考的kickstartæ–‡äšgåQ?/div>
  • centos-livecd-minimal.ks: a minimalistic LiveCD
    centos-livecd-desktop.ks: the CentOS LiveCD
    可通过到官¾|?a style="color: rgb(255,153,0); text-decoration: none" >https://projects.centos.org/trac/livecd/查看具体操作及内容下è½?/span>
  • 首先在系¾lŸä¸­åˆ›å¾LiveCD creator的工作目录:

     

    # mkdir /server/livecd 
    # cd /server/livecd

     

    把下载的ks-configure-file保存到目å½?server/livecd中,下面ž®±å¯ä»¥åˆ›å»ºliveCD ISO了:

     

    # LANG=C livecd-creator --config=centos-livecd-minimal.ks --fslabel=CentOS-5.4-minimal

     

    成功后,ž®×ƒ¼šäº§ç”Ÿä¸€ä¸ªCentOS-5.4-minimal.iso的文ä»Óž¼Ž

     

    ½W?步,把LiveCD复制到USB中:

    插入你的U盘,当系¾lŸè‡ªåЍmountä½ çš„U盘后åQŒæ£€æŸ¥ä½ çš„U按mount的位¾|?/p>

     

    # LANG=C df -h 
    Filesystem                        Size    Used Avail Use% Mounted on 
    /dev/sda7                            25G    8.5G     15G    37% / 
    /dev/sda1                            99M     18M     76M    20% /boot 
    tmpfs                                1013M         0 1013M     0% /dev/shm 
    /dev/sdb1                         982M    8.0K    982M     1% /media/usbdisk 

     

    开始复åˆÓž¼š

    # livecd-iso-to-disk CentOS-5.4-x86_64-LiveCD.iso /dev/sdb1 
    Verifying image... 
    /tmp/CentOS-5.4-x86_64-LiveCD.iso:     ad63c0a54086eb35e892d6e1292085e3 
    Fragment sums: 9e363badf4e9359c76ce8e324bdbd82847bed2dcc8e7e22ecbb2ddda2621 
    Fragment count: 20 
    Percent complete: 100.0%     Fragment[20/20] -> OK 
    100.0 
    The supported flag value is 0 
    The media check is complete, the result is: PASS. 

    It is OK to install from this media. 
    Already set up as live image.    Deleting old in fifteen seconds... 
    Copying live image to USB stick 
    Updating boot config file 
    Installing boot loader 
    USB stick set up as live image! 

     

    ½W?步,‹¹‹è¯•åQšæ’å…¥U盘,重启电脑åQŒé€‰æ‹©U盘启动.

     

    如果使用Wimdows的朋友,请参考:http://www.pendrivelinux.com/usb-centos-5-live-install-via-windows/



    ]]>CentOS安装配置JBOSS7.1 http://www.aygfsteel.com/jjshcc/archive/2013/06/23/400874.htmlEric_jiangEric_jiangSun, 23 Jun 2013 07:42:00 GMThttp://www.aygfsteel.com/jjshcc/archive/2013/06/23/400874.htmlhttp://www.aygfsteel.com/jjshcc/comments/400874.htmlhttp://www.aygfsteel.com/jjshcc/archive/2013/06/23/400874.html#Feedback0http://www.aygfsteel.com/jjshcc/comments/commentRss/400874.htmlhttp://www.aygfsteel.com/jjshcc/services/trackbacks/400874.html一、JDK安装

    1、安�/strong>
    rpm -vih jdk-7u5-linux-x64.rpm
    2、设¾|?/strong>
    理论上来说JDK装好了以后就可以正常使用了,但是ä¸ÞZº†æˆ‘们日后使用的方便,需要设¾|®ä¸€ä¸‹çŽ¯å¢ƒå˜é‡ã€?/div>
    用文本编辑器打开/etc/profile
    # vi /etc/profile
    在最后加入以下几行:
    export JAVA_HOME=/usr/java/jdk1.7.0_05
    export CLASSPATH=$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/jre/lib/rt.jar
    export PATH=$PATH:$JAVA_HOME/bin
    使设¾|®ç”Ÿæ•?/div>
    # source  /etc/profile
    3、环境变量说�/strong>
    A、环境变�/strong>
    在linux¾pȝ»Ÿä¸‹ï¼Œå¦‚æžœä½ ä¸‹è½½åÆˆå®‰è£…äº†åº”ç”¨ç¨‹åºï¼Œå¾ˆæœ‰å¯èƒ½åœ¨é”®å…¥å®ƒçš„å¿U°æ—¶å‡ºçް“command not found”的提½Cºå†…宏V€‚如果每‹Æ¡éƒ½åˆ°å®‰è£…目标文件夹内,扑ֈ°å¯æ‰§è¡Œæ–‡ä»¶æ¥˜q›è¡Œæ“ä½œž®±å¤ª¾Jçäº†ã€‚这涉及到环境变量PATH的设¾|®é—®é¢˜ï¼Œè€ŒPATH的设¾|®ä¹Ÿæ˜¯åœ¨linux下定制环境变量的一个组成部分ã€?/div>
    B、变量简�/strong>
    Linux是一个多用户的操作系¾lŸã€‚每个用æˆïL™»å½•ç³»¾lŸåŽåQŒéƒ½ä¼šæœ‰ä¸€ä¸ªä¸“用的˜qè¡ŒçŽ¯å¢ƒã€‚é€šå¸¸æ¯ä¸ªç”¨æˆ·é»˜è®¤çš„çŽ¯å¢ƒéƒ½æ˜¯ç›¸åŒçš„åQŒè¿™ä¸ªé»˜è®¤çŽ¯å¢ƒå®žé™…ä¸Šž®±æ˜¯ä¸€¾l„环境变量的定义。用户可以对自己的运行环境进行定åˆÓž¼Œå…¶æ–¹æ³•就是修改相应的¾pȝ»ŸçŽ¯å¢ƒå˜é‡ã€?/div>
    C、定制环境变�/strong>
    环境变量是和Shell紧密相关的,用户ç™Õd½•¾pȝ»ŸåŽå°±å¯åŠ¨äº†ä¸€ä¸ªShell。对于Linux来说一般是bashåQŒä½†ä¹Ÿå¯ä»¥é‡æ–°è®¾å®šæˆ–切换到其它的ShellåQˆä‹É用chsh命ä×oåQ‰ã€‚根据发行版本的情况åQŒbash有两个基本的¾pȝ»Ÿ¾U§é…¾|®æ–‡ä»Óž¼š/etc/bashrcå’?etc/profile。这些配¾|®æ–‡ä»¶åŒ…含两¾l„不同的变量åQšshell变量和环境变量。前者只是在特定的shell中固定(如bashåQ‰ï¼ŒåŽè€…在不同shell中固定。shell变量是局部的åQŒè€ŒçŽ¯å¢ƒå˜é‡æ˜¯å…¨å±€çš„ã€‚çŽ¯å¢ƒå˜é‡æ˜¯é€šè¿‡Shell命ä×o来设¾|®çš„åQŒè®¾¾|®å¥½çš„环境变量又可以被所有当前用æˆäh‰€˜qè¡Œçš„程序所使用。对于bash˜q™ä¸ªShell½E‹åºæ¥è¯´åQŒå¯ä»¥é€šè¿‡å˜é‡åæ¥è®‰K—®ç›¸åº”的环境变量,通过export来设¾|®çŽ¯å¢ƒå˜é‡ã€?/div>
    注:Linux的环境变量名¿UîC¸€èˆ¬ä‹É用大写字æ¯?/div>
    D、环境变量设¾|®å®žä¾?/strong>

    a、äñ”看环境变é‡?/strong>
    如查�PATH环境变量
    # echo $PATH
    或�/div>
    # $PATH
    b、设¾|®ä¸€ä¸ªæ–°çš„环境变é‡?/strong>
    # export MYNAME=”my name is kevin”
    # echo $MYNAME
    my name is Kevin
    c、修改已存在的环境变�/strong>
    # MYNAME=”change name to jack”
    # echo $MYNAME
    change name to jack
    d.使用env命ä×o昄¡¤ºæ‰€æœ‰çš„环境变量
    # env
    HOSTNAME=localhost.localdomain
    SHELL=/bin/bash
    TERM=xterm
    HISTSIZE=1000
    SSH_CLIENT=192.168.136.151 1740 22
    QTDIR=/usr/lib/qt-3.1
    SSH_TTY=/dev/pts/0
    ……
    e、ä‹É用set命ä×o昄¡¤ºæ‰€æœ‰æœ¬åœ°å®šä¹‰çš„Shell变量
    $ set
    BASH=/bin/bash
    BASH_ENV=/root/.bashrc
    ……
    f、ä‹É用unset命ä×o来清除环境变é‡?/strong>
    $ export TEMP_KEVIN=”kevin”     #增加一个环境变量TEMP_KEVIN
    $ env | grep TEMP_KEVIN          #查看环境变量TEMP_KEVIN是否生效åQˆå­˜åœ¨å³ç”Ÿæ•ˆåQ?/div>
    TEMP_KEVIN=kevin #证明环境变量TEMP_KEVIN已经存在
    $ unset TEMP_KEVIN            #删除环境变量TEMP_KEVIN
    $ env | grep TEMP_KEVIN       #查看环境变量TEMP_KEVIN是否被删除,没有输出昄¡¤ºåQŒè¯æ˜ŽTEMP_KEVIN被清除了ã€?/div>
    g、ä‹É用readonly命ä×o讄¡½®åªè¯»å˜é‡
    注:如果使用了readonly命ä×o的话åQŒå˜é‡å°±ä¸å¯ä»¥è¢«ä¿®æ”¹æˆ–清除了ã€?/div>
    $ export TEMP_KEVIN ="kevin"      #增加一个环境变量TEMP_KEVIN
    $ readonly TEMP_KEVIN                  #ž®†çŽ¯å¢ƒå˜é‡TEMP_KEVINè®¾äØ“åªè¯»
    $ env | grep TEMP_KEVIN          #查看环境变量TEMP_KEVIN是否生效
    TEMP_KEVIN=kevin        #证明环境变量TEMP_KEVIN已经存在
    $ unset TEMP_KEVIN          #会提½Cºæ­¤å˜é‡åªè¯»ä¸èƒ½è¢«åˆ é™?/div>
    -bash: unset: TEMP_KEVIN: cannot unset: readonly variable
    $ TEMP_KEVIN ="tom"        #修改变量å€égØ“tom会提½Cºæ­¤å˜é‡åªè¯»ä¸èƒ½è¢«ä¿®æ”?/div>
    -bash: TEMP_KEVIN: readonly variable
    h、通过修改环境变量定义文äšg来修改环境变é‡?/strong>
    需要注意的是,一般情况下仅修æ”ÒŽ™®é€šç”¨æˆïLŽ¯å¢ƒå˜é‡é…¾|®æ–‡ä»Óž¼Œé¿å…ä¿®æ”¹æ ¹ç”¨æˆïLš„环境定义文äšgåQŒå› ä¸ºé‚£æ ·å¯èƒ½ä¼šé€ æˆæ½œåœ¨çš„危险ã€?/div>
    $ cd ~                                  #到用æˆäh ¹ç›®å½•ä¸?/div>
    $ ls -a                                 #查看所有文ä»Óž¼ŒåŒ…含隐藏的文ä»?/div>
    $ vi .bash_profile                #修改用户环境变量文äšg
    例如åQ?/div>
    ¾~–辑你的PATH声明åQŒå…¶æ ¼å¼ä¸ºï¼š
    PATH=$PATH:<PATH 1>:<PATH 2>:<PATH 3>:------:<PATH N>
    你可以自己加上指定的路径åQŒä¸­é—´ç”¨å†’号隔开ã€?/div>
    环境变量更改后,在用户下‹Æ¡ç™»é™†æ—¶ç”Ÿæ•ˆã€?/div>
    如果想立åˆÈ”Ÿæ•ˆï¼Œåˆ™å¯æ‰§è¡Œä¸‹é¢çš„语句:$source .bash_profile
    需要注意的是,最好不要把当前路径”./”攑ֈ°PATH里,˜q™æ ·å¯èƒ½ä¼šå—到意想不到的æ”Õd‡»ã€?/div>
    完成后,可以通过$ echo $PATH查看当前的搜索èµ\径。这样定制后åQŒå°±å¯ä»¥é¿å…é¢‘繁的启动位于shell搜烦的èµ\径之外的½E‹åºäº†ã€?/div>
    E、学习æ€È»“

    a、Linux的变量种¾c?/strong>
    按变量的生存周期来划分,Linux变量可分ä¸ÞZ¸¤¾c»ï¼š
    1、永久的åQšéœ€è¦ä¿®æ”šw…¾|®æ–‡ä»Óž¼Œå˜é‡æ°æ€¹…生效ã€?/div>
    2、äÍæ—¶çš„åQšä‹É用export命ä×o行声明即可,变量在关闭shell时失效ã€?/div>
    b、设¾|®å˜é‡çš„三种æ–ÒŽ³•

    1、在/etc/profileæ–‡äšg中添加变量【对所有用æˆïL”Ÿæ•ˆï¼ˆæ°æ€¹…的)ã€?/strong>
    用VI在文ä»?etc/profileæ–‡äšg中增加变量,该变量将会对Linux下所有用æˆähœ‰æ•ˆï¼Œòq¶ä¸”æ˜?#8220;æ°æ€¹…çš?#8221;ã€?/div>
    例如åQšç¼–è¾?etc/profileæ–‡äšgåQŒæ·»åŠ CLASSPATH变量
    # vi /etc/profile
    export CLASSPATH=./JAVA_HOME/lib;$JAVA_HOME/jre/lib
    注:修改文äšg后要想马上生效还要运è¡? source /etc/profile不然只能在下‹Æ¡é‡˜q›æ­¤ç”¨æˆ·æ—¶ç”Ÿæ•ˆã€?/div>
    2、在用户目录下的.bash_profileæ–‡äšg中增加变量【对单一用户生效åQˆæ°¸ä¹…çš„åQ‰ã€?/strong>
    用VI在用æˆïL›®å½•下çš?bash_profileæ–‡äšg中增加变量,改变量仅会对当前用户有效åQŒåƈ且是“æ°æ€¹…çš?#8221;ã€?/div>
    例如åQšç¼–辑guok用户目录åQ?home/guokåQ‰ä¸‹çš?bash_profile
    $ vi /home/guok/.bash.profile
    æ·ÕdР如䏋内容åQ?/div>
    export CLASSPATH=./JAVA_HOME/lib;$JAVA_HOME/jre/lib
    注:修改文äšg后要想马上生效还要运è¡? source /home/guok/.bash_profile不然只能在下‹Æ¡é‡˜q›æ­¤ç”¨æˆ·æ—¶ç”Ÿæ•ˆã€?/div>
    3、直接运行export命ä×o定义变量【只对当前shellåQˆBASHåQ‰æœ‰æ•ˆï¼ˆä¸´æ—¶çš„)ã€?/strong>
    在shell的命令行下直接ä‹É用[export变量å?变量值]定义变量åQŒè¯¥å˜é‡åªåœ¨å½“前的shellåQˆBASHåQ‰æˆ–其子shellåQˆBASHåQ‰ä¸‹æ˜¯æœ‰æ•ˆçš„åQŒshell关闭了,变量也就失效了,再打开新shell时就没有˜q™ä¸ªå˜é‡åQŒéœ€è¦ä‹É用的话还需要重新定义ã€?/div>
    二、JBOSS安装

    1、安�/strong>
    安装�usr/jboss目录�/div>
    # cd /usr
    # mkdir jboss
    # cd jboss
    # tar -zxvf /root/jboss-as-7.1.1.Final.tar.gz
    2、环境配¾|?/strong>
    # vi /etc/profile
    在最后加入以下几行:
    export JBOSS_HOME=/usr/jboss/jboss-as-7.1.1.Final
    export PATH=$PATH:$JBOSS_HOME/bin
    使设¾|®ç”Ÿæ•?/div>
    # source /etc/profile
    3、启动及关闭JBoss

    a、启动JBoss

    standalone 模式åQ?/strong>
    # standalone.sh &
    # standalone.sh --server-config=standalone-ha.xml &

    dmain 模式åQ?/strong>
    # domain.sh
    # domain.sh --domain-config=domain-osgi-only.xml &

    b、关闭JBoss
    # jboss-cli.sh --connect command=/host=master:shutdown

    c、查看JBoss服务
    # ps -aux|grep jboss

    三、JBOSS配置

    1、外部访问设¾|?/strong>
    JBoss默认是只允许本地讉K—®åQŒæœ‰ž®±æ˜¯åªèƒ½é€šè¿‡127.0.0.1讉K—®åQŒéœ€è¦æ”¹$JBOSS_HOME/standalone/configuration/standalone.xmlæˆ?/span>$JBOSS_HOME/domain/configuration/domain.xmlæ–‡äšgåQŒæ ¹æ®ç›¸åº”的启动模式修改配置文äšgã€?/span>
    standaloneåQ?/span>



    2、登录管理后�/strong>
    æ·ÕdŠ ½Ž¡ç†ç”¨æˆ·
    # add-user.sh
    æ ÒŽ®æç¤ºæ“ä½œ

    3、域配置
    A、Master控制实例
    a、准�/div>
    修改$JBOSS_HOME/domain/configuration/domain.xmlæ–‡äšgåQ?/span>
            <server-group name="other-server-group" profile="full-ha">
                <jvm name="default">
                    <heap size="64m" max-size="512m"/>
                </jvm>
                <socket-binding-group ref="ha-sockets"/>
            </server-group>
    ==�
            <server-group name="other-server-group" profile="full-ha">
                <jvm name="default">
                    <heap size="64m" max-size="512m"/>
                </jvm>
                <socket-binding-group ref="full-ha-sockets"/>
            </server-group>
    原因åQšé…¾|®è¿‡½E‹ä¸­˜q™é¡¹é…ç½®ä¼šå¼•èµ·é”™è¯?/div>
    b、修æ”?JBOSS_HOME/domain/configuration/host.xmlæ–‡äšgåQ?/div>
    <interfaces>  
    <interface name="management">  
    <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>  
    </interface>  
    <interface name="public">  
    <inet-address value="${jboss.bind.address: 127.0.0.1}"/>  
    </interface>  
    <interface name="unsecure">  
    <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>  
    </interface>  
    </interfaces>
    ==�/span>
    <interfaces>  
    <interface name="management">  
    <inet-address value="${jboss.bind.address.management:192.168.0.204}"/>  
    </interface>  
    <interface name="public">  
    <inet-address value="${jboss.bind.address:192.168.0.204}"/>  
    </interface>  
    <interface name="unsecure">  
    <inet-address value="${jboss.bind.address.unsecure:192.168.0.204}"/>  
    </interface>  
    </interfaces>
    c、添加安全用�/span>
    # add-user.sh
    ç”¨æˆ·åäØ“Slava实例çš?/span>$JBOSS_HOME/domain/configuration/host.xmlæ–‡äšghost元素的name属性å€?/div>
    <host name="slave205" xmlns="urn:jboss:domain:1.2">
    A、Slave实例
    a、删é™?/span>$JBOSS_HOME/domain/configuration/domain.xmlæ–‡äšg
    b、修æ”?/span>$JBOSS_HOME/domain/configuration/host.xmlæ–‡äšgåQ?/div>
    <host name="slave205" xmlns="urn:jboss:domain:1.2">  
    <management>  
    <security-realms>  
    <security-realm name="ManagementRealm">  
    <server-identities>  
    <secret value="MTIzNDU2"/>//在Master实例中徏ç«?/span> slave205 è®‰K—®ç”¨æˆ·çš„密码的Base64¾~–码 
    </server-identities>  
    <authentication>  
    <properties path="mgmt-users.properties" relative-to="jboss.domain.config.dir"/>  
    </authentication>  
    </security-realm>  
    <security-realm name="ApplicationRealm">  
    <authentication>  
    <properties path="application-users.properties" relative-to="jboss.domain.config.dir" />  
    </authentication>  
    </security-realm>  
    </security-realms>  
    <management-interfaces>  
    <native-interface security-realm="ManagementRealm">  
    <socket interface="management" port="${jboss.management.native.port:9999}"/>  
    </native-interface>  
    </management-interfaces>  
    </management>  
    <domain-controller>  
    <remote host="192.168.0.204" port="9999" security-realm="ManagementRealm"/>  
    </domain-controller>  
    <interfaces>  
    <interface name="management">  
    <inet-address value="${jboss.bind.address.management:192.168.0.205}"/>  
    </interface>  
    <interface name="public">  
    <inet-address value="${jboss.bind.address:192.168.0.205}"/>  
    </interface>  
    <interface name="unsecure">  
    <inet-address value="${jboss.bind.address.unsecure:192.168.0.205}"/>  
    </interface>  
    </interfaces>  
    ……
    </host>


    ]]>CentOS YUM 安装 TOMCAT6http://www.aygfsteel.com/jjshcc/archive/2013/06/23/400873.htmlEric_jiangEric_jiangSun, 23 Jun 2013 07:29:00 GMThttp://www.aygfsteel.com/jjshcc/archive/2013/06/23/400873.htmlhttp://www.aygfsteel.com/jjshcc/comments/400873.htmlhttp://www.aygfsteel.com/jjshcc/archive/2013/06/23/400873.html#Feedback0http://www.aygfsteel.com/jjshcc/comments/commentRss/400873.htmlhttp://www.aygfsteel.com/jjshcc/services/trackbacks/400873.html安装tomcat6

    1yum install tomcat6 tomcat6-webapps tomcat6-admin-webapps

    启动tomcat6

    1service tomcat6 start

    停止tomcat6

    1service tomcat6 stop

    重启tomcat6

    1service tomcat6 restart

    按照以上æ–ÒŽ³•安装tomcat6默认目录åœ?usr/share/tomcat6/ä¸?/p>

    配置文äšg默认目录åœ?etc/tomcat6/ä¸?/p>

    如果讉K—®http://localhost:8080/讉K—®ä¸äº†é‚£å¤§å¤šæ˜¯é˜²ç«å¢™ç»ç”¨äº†8080端口åQŒè§£å†Ïx–¹æ³•如下:

    1iptables -A INPUT -p tcp --dport 8080 -j ACCEPT
    2iptables -A OUTPUT -p tcp --sport 8080 -j ACCEPT


    ]]>
    centOS yum 安装mysql 2011-09-0http://www.aygfsteel.com/jjshcc/archive/2013/06/23/400872.htmlEric_jiangEric_jiangSun, 23 Jun 2013 07:14:00 GMThttp://www.aygfsteel.com/jjshcc/archive/2013/06/23/400872.htmlhttp://www.aygfsteel.com/jjshcc/comments/400872.htmlhttp://www.aygfsteel.com/jjshcc/archive/2013/06/23/400872.html#Feedback0http://www.aygfsteel.com/jjshcc/comments/commentRss/400872.htmlhttp://www.aygfsteel.com/jjshcc/services/trackbacks/400872.html安装MySQL�/p>

    [root@sample ~]# yum -y install mysql-server  ← 安装MySQL
    [root@sample ~]# yum -y install php-mysql  ← 安装php-mysql

    配置MySQL

    [root@sample ~]#vim /etc/my.cnf  ← ¾~–辑MySQL的配¾|®æ–‡ä»?/p>

    [mysqld]
    datadir=/var/lib/mysql
    socket=/var/lib/mysql/mysql.sock
    # Default to using old password format for compatibility with mysql 3.x
    # clients (those using the mysqlclient10 compatibility package).
    old_passwords=1  ← 扑ֈ°˜q™ä¸€è¡Œï¼Œåœ¨è¿™ä¸€è¡Œçš„下面æ·ÕdŠ æ–°çš„è§„åˆ™åQŒè®©MySQLçš„é»˜è®¤ç¼–ç äØ“UTF-8
    default-character-set = utf8  ← æ·ÕdŠ ˜q™ä¸€è¡?/p>

    然后在配¾|®æ–‡ä»¶çš„æ–‡å°¾å¡«åŠ å¦‚ä¸‹è¯­å¥åQ?/p>

    [mysql]
    default-character-set = utf8

    启动MySQL服务

    [root@sample ~]# chkconfig mysqld on  ← 讄¡½®MySQL服务随系¾lŸå¯åŠ¨è‡ªå¯åŠ¨

    [root@sample ~]# chkconfig --list mysqld  ← ¼‹®è®¤MySQL自启åŠ?nbsp;
    mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off  ← 如果2--5为on的状态就OK

    [root@sample ~]#/etc/rc.d/init.d/mysqld start  ← 启动MySQL服务

    Initializing MySQL database:         [ OK ]
    Starting MySQL:              [ OK ]
    MySQL初始环境讑֮š

    [1]为MySQLçš„root用户讄¡½®å¯†ç 

    MySQL在刚刚被安装的时候,它的root用户是没有被讄¡½®å¯†ç çš„。首先来讄¡½®MySQLçš„root密码ã€?/p>

    [root@sample ~]# mysql -u root  ← 用root用户ç™Õd½•MySQL服务å™?/p>

    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 2 to server version: 4.1.20

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql> select user,host,password from mysql.user;  ← 查看用户信息
    +------+------------------------------+---------------+
    | user | host          | password |
    +------+------------------------------+---------------+
    | root | localhost        |       |  ← root密码为空 
    | root | sample.centospub.com  |       |  ← root密码为空
    |   | sample.centospub.com |       |
    |   | localhost       |       |
    |root | %                                 |XXX      |
    |   |                            |       |
    +------+------------------------------+---------------+

    4 rows in set (0.00 sec)

    mysql> set password for root@localhost=password('在这里填入root密码');  ← 讄¡½®root密码
    Query OK, 0 rows affected (0.01 sec)

    mysql> set password for root@'sample.centospub.com'=password('在这里填入root密码');  ← 讄¡½®root密码
    Query OK, 0 rows affected (0.01 sec)只有讄¡½®äº†è¿™ä¸ªæ‰å¯ä»¥åQŒæ‰å¯ä»¥é€šè¿‡æ•°æ®åº“来安装¾|‘址


    mysql> set password for root@'xxx'=password('xxx');  ← 讄¡½®root密码
    Query OK, 0 rows affected (0.01 sec)

    mysql> select user,host,password from mysql.user;  ← 查看用户信息
    +------+--------------------------------+--------------------------+
    | user | host          | password     |
    +------+--------------------------------+--------------------------+
    | root | localhost        | 19b68057189b027f |  ← root密码被设¾|?br style="margin: 0px; padding: 0px; font-size: 12px;" />| root | sample.centospub.com   | 19b68057189b027f |  ← root密码被设¾|?br style="margin: 0px; padding: 0px; font-size: 12px;" />|    | sample.centospub.com   |          |
    |    | localhost        |          |
    +------+--------------------------------+--------------------------+
    4 rows in set (0.01 sec)

    mysql> exit  ← 退出MySQL服务å™?br style="margin: 0px; padding: 0px; font-size: 12px;" />Bye

    然后åQŒæµ‹è¯•一下root密码有没有生效ã€?/p>

    [root@sample ~]# mysql -u root  ← 通过½Iºå¯†ç ç”¨rootç™Õd½•

    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)  ← 出现此错误信息说明密码设¾|®æˆåŠ?/p>

    [root@localhost ~]# mysql -u root -h sample.centospub.com  ← 通过½Iºå¯†ç ç”¨rootç™Õd½•

    ERROR 1045 (28000): Access denied for user 'root'@'localhost'  (using password: NO)  ← 出现此错误信息说明密码设¾|®æˆåŠ?/p>

    [root@sample ~]#mysql -u root -p  ← 通过密码用rootç™Õd½•
    Enter password:  ← 在这里输入密ç ?/p>

    Welcome to the MySQL monitor. Commands end with ; or \g.  ← ¼‹®è®¤ç”¨å¯†ç èƒ½å¤ŸæˆåŠŸç™»å½?br style="margin: 0px; padding: 0px; font-size: 12px;" />Your MySQL connection id is 5 to server version: 4.1.20

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql> exit
    Bye

    [root@sample ~]# mysql -u root -h sample.centospub.com -p  ← 通过密码用rootç™Õd½•
    Enter password:  ← 在这里输入密ç ?/p>

    Welcome to the MySQL monitor. Commands end with ; or \g.  ← ¼‹®è®¤ç”¨å¯†ç èƒ½å¤ŸæˆåŠŸç™»å½?br style="margin: 0px; padding: 0px; font-size: 12px;" />Your MySQL connection id is 6 to server version: 4.1.20

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql> exit  ← 退出MySQL服务å™?br style="margin: 0px; padding: 0px; font-size: 12px;" />Bye


    [2] 删除匿名用户

    在MySQL刚刚被安装后åQŒå­˜åœ¨ç”¨æˆ·åã€å¯†ç äØ“½Iºçš„ç”¨æˆ·ã€‚è¿™ä½¿å¾—æ•°æ®åº“æœåŠ¡å™¨æœ‰æ— éœ€å¯†ç è¢«ç™»å½•çš„å¯èƒ½æ€§ã€‚äØ“æ¶ˆé™¤éšæ‚£åQŒå°†åŒ¿åç”¨æˆ·åˆ é™¤ã€?/p>

    [root@sample ~]# mysql -u root -p  ← 通过密码用rootç™Õd½•
    Enter password:  ← 在这里输入密ç ?/p>

    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 7 to server version: 4.1.20

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql> select user,host from mysql.user;  ← 查看用户信息
    +------+----------------------------+
    | user | host         |
    +------+----------------------------+
    |   | localhost       |
    | root | localhost       |
    |   | sample.centospub.com |
    | root | sample.centospub.com  |
    +------+----------------------------+
    4 rows in set (0.02 sec)

    mysql> delete from mysql.user where user='';  ← 删除匿名用户
    Query OK, 2 rows affected (0.17 sec)

    mysql> select user,host from mysql.user;  ← 查看用户信息
    +------+----------------------------+
    | user | host         |
    +------+----------------------------+
    | root | localhost      |
    | root | sample.centospub.com |
    +------+----------------------------+
    2 rows in set (0.00 sec)

    mysql> exit  ← 退出MySQL服务å™?br style="margin: 0px; padding: 0px; font-size: 12px;" />Bye

    好了åQŒä¸‹é¢éƒ½ä¸æ˜¯å¿…须的了åQ?br style="margin: 0px; padding: 0px; font-size: 12px;" />‹¹‹è¯•MySQL


    [root@sample ~]# mysql -u root -p  ← 通过密码用rootç™Õd½•
    Enter password:  ← 在这里输入密ç ?/p>

    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 9 to server version: 4.1.20

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql> grant all privileges on test.* to centospub@localhost  identified by '在这里定义密ç ?;  ← 建立对test数据库有完全æ“?/p>

    ä½œæƒé™çš„åäØ“centospub的用æˆ?br style="margin: 0px; padding: 0px; font-size: 12px;" />Query OK, 0 rows affected (0.03 sec)

    mysql> select user from mysql.user where user='centospub';  ← ¼‹®è®¤centospub用户的存在与å?br style="margin: 0px; padding: 0px; font-size: 12px;" />+---------+
    | user  |
    +---------+
    | centospub |  ← ¼‹®è®¤centospub已经被徏ç«?br style="margin: 0px; padding: 0px; font-size: 12px;" />+---------+
    1 row in set (0.01 sec)

    mysql> exit  ← 退出MySQL服务å™?br style="margin: 0px; padding: 0px; font-size: 12px;" />Bye

    [root@sample ~]# mysql -u centospub -p  ← 用新建立的centospub用户ç™Õd½•MySQL服务å™?br style="margin: 0px; padding: 0px; font-size: 12px;" />Enter password:  ← 在这里输入密ç ?/p>

    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 10 to server version: 4.1.20

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql> create database test;  ← å»ºç«‹åäØ“test的数据库
    Query OK, 1 row affected (0.00 sec)

    mysql> show databases;  ← 查看¾pȝ»Ÿå·²å­˜åœ¨çš„æ•°æ®åº?br style="margin: 0px; padding: 0px; font-size: 12px;" />+-------------+
    | Database |
    +-------------+
    | test    |
    +-------------+
    1 row in set (0.00 sec)

    mysql> use test  ← ˜qžæŽ¥åˆ°æ•°æ®åº“
    Database changed

    mysql> create table test(num int, name varchar(50));  ← 在数据库中徏立表
    Query OK, 0 rows affected (0.03 sec)

    mysql> show tables;  ← 查看数据库中已存在的è¡?br style="margin: 0px; padding: 0px; font-size: 12px;" />+-------------------+
    | Tables_in_test |
    +-------------------+
    | test     |
    +-------------------+
    1 row in set (0.01 sec)

    mysql> insert into test values(1,'Hello World!');  ← 插入一个值到表中
    Query OK, 1 row affected (0.02 sec)

    mysql> select * from test;  ← 查看数据库中的表的信æ?br style="margin: 0px; padding: 0px; font-size: 12px;" />+------+-------------------+
    | num | name      |
    +------+-------------------+
    | 1   | Hello World!  |
    +------+-------------------+
    1 row in set (0.00 sec)

    mysql> update test set name='Hello Everyone!';  ← 更新表的信息åQŒèµ‹äºˆæ–°çš„å€?br style="margin: 0px; padding: 0px; font-size: 12px;" />Query OK, 1 row affected (0.00 sec)
    Rows matched: 1 Changed: 1 Warnings: 0

    mysql> select * from test;  ← 查看数据库中的表的信æ?br style="margin: 0px; padding: 0px; font-size: 12px;" />+------+----------------------+
    | num | name      |
    +------+----------------------+
    | 1   | Hello Everyone! |  ← ¼‹®è®¤è¢«æ›´æ–°åˆ°æ–°çš„å€?br style="margin: 0px; padding: 0px; font-size: 12px;" />+------+----------------------+
    1 row in set (0.01 sec)

    mysql> delete from test where num=1;  ← 删除表内的å€?br style="margin: 0px; padding: 0px; font-size: 12px;" />Query OK, 1 row affected (0.00 sec)

    mysql> select * from test;  ← ¼‹®è®¤åˆ é™¤¾l“æžœ
    Empty set (0.01 sec)

    mysql> drop table test;  ← 删除è¡?br style="margin: 0px; padding: 0px; font-size: 12px;" />Query OK, 0 rows affected (0.01 sec)

    mysql> show tables;  ← 查看表信æ?br style="margin: 0px; padding: 0px; font-size: 12px;" />Empty set (0.00 sec)  ← ¼‹®è®¤è¡¨å·²è¢«åˆ é™?/p>

    mysql> drop database test;  ← åˆ é™¤åäØ“test的数据库
    Query OK, 0 rows affected (0.01 sec)

    mysql> show databases;  ← 查看已存在的数据åº?br style="margin: 0px; padding: 0px; font-size: 12px;" />Empty set (0.01 sec)  ← ¼‹®è®¤test数据库已被删除(˜q™é‡Œéžroot用户的关¾p»ï¼Œçœ‹ä¸åˆ°åä¸ºmysql的数据库åQ?/p>

    mysql> exit  ← 退出MySQL服务å™?br style="margin: 0px; padding: 0px; font-size: 12px;" />Bye

    然后åQŒåˆ é™¤æµ‹è¯•用˜q‡çš„遗留用户ã€?/p>

    [root@sample ~]# mysql -u root -p  ← 通过密码用rootç™Õd½•
    Enter password:  ← 在这里输入密ç ?/p>

    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 12 to server version: 4.1.20

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql> revoke all privileges on *.* from centospub@localhost;  ← 取消centospub用户å¯ÒŽ•°æ®åº“的操作权é™?br style="margin: 0px; padding: 0px; font-size: 12px;" />Query OK, 0 rows affected (0.00 sec)

    mysql> delete from mysql.user where user='centospub' and host='localhost';  ← 删除centospub用户
    Query OK, 1 row affected (0.01 sec)

    mysql> select user from mysql.user where user='centospub';  ← 查找用户centospubåQŒç¡®è®¤å·²åˆ é™¤ä¸Žå¦
    Empty set (0.01 sec)  ← ¼‹®è®¤centospub用户已不存在

    mysql> flush privileges;  ← åˆäh–°åQŒä‹É以上操作生效
    Query OK, 0 rows affected (0.01 sec)

    mysql> exit
    Bye

     

    [root@sample ~]# /etc/rc.d/init.d/httpd restart  ← 重新启动HTTP服务
    Stopping httpd:             [ OK ]
    Starting httpd:             [ OK ]



    ]]>
    centos 5.5下配¾|®å¤šä¸ªç«™ç‚?/title><link>http://www.aygfsteel.com/jjshcc/archive/2013/06/22/400857.html</link><dc:creator>Eric_jiang</dc:creator><author>Eric_jiang</author><pubDate>Sat, 22 Jun 2013 12:19:00 GMT</pubDate><guid>http://www.aygfsteel.com/jjshcc/archive/2013/06/22/400857.html</guid><wfw:comment>http://www.aygfsteel.com/jjshcc/comments/400857.html</wfw:comment><comments>http://www.aygfsteel.com/jjshcc/archive/2013/06/22/400857.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/jjshcc/comments/commentRss/400857.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/jjshcc/services/trackbacks/400857.html</trackback:ping><description><![CDATA[<p>/etc/httpd/conf/httpd.conf ž®ùNƒ¨</p> <p>NameVirtualHost *:80<br /><VirtualHost *:80><br /><wbr><wbr><wbr>DocumentRoot /var/www/web3<br /><wbr><wbr><wbr>ServerName www.1.com<br /><wbr><wbr><wbr>#AddDefaultCharset UTF-8 <wbr><wbr><wbr>#默认¾~–码<br /></VirtualHost><br /><VirtualHost *:80><br /><wbr><wbr><wbr>DocumentRoot /var/www/web5<br /><wbr><wbr><wbr>ServerName www.2.com<br /></VirtualHost><br /><VirtualHost *:80><br /><wbr><wbr><wbr>DocumentRoot /var/www/web2<br /><wbr><wbr><wbr>ServerName www.3.com<br /></VirtualHost></p> <p>//==================<br />如果只用一个IP</p> <p>末尾æ·ÕdŠ å¦‚ä¸‹å‡ è¡ŒåQ?br />NameVirtualHost 192.168.1.110<br /><VirtualHost www.test.com><br /><wbr><wbr><wbr>ServerAdmin webmaster@test.com<br /><wbr><wbr><wbr>DocumentRoot /var/www/html<br /><wbr><wbr><wbr>ServerName www.test.com<br /></VirtualHost><br /><VirtualHost www.website1.com><br /><wbr><wbr><wbr>ServerAdmin webmaster@website1.com<br /><wbr><wbr><wbr>DocumentRoot /var/www/html/website1<br /><wbr><wbr><wbr>ServerName www.website1.com<br /></VirtualHost><br /><VirtualHost www.website2.com><br /><wbr><wbr><wbr>ServerAdmin webmaster@website2.com<br /><wbr><wbr><wbr>DocumentRoot /var/www/html/website2<br /><wbr><wbr><wbr>ServerName www.website2.com<br /></VirtualHost></p><img src ="http://www.aygfsteel.com/jjshcc/aggbug/400857.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/jjshcc/" target="_blank">Eric_jiang</a> 2013-06-22 20:19 <a href="http://www.aygfsteel.com/jjshcc/archive/2013/06/22/400857.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title> CentOS 6.0 Samba服务器配¾|?http://www.aygfsteel.com/jjshcc/archive/2013/06/16/400610.htmlEric_jiangEric_jiangSun, 16 Jun 2013 13:57:00 GMThttp://www.aygfsteel.com/jjshcc/archive/2013/06/16/400610.htmlhttp://www.aygfsteel.com/jjshcc/comments/400610.htmlhttp://www.aygfsteel.com/jjshcc/archive/2013/06/16/400610.html#Feedback0http://www.aygfsteel.com/jjshcc/comments/commentRss/400610.htmlhttp://www.aygfsteel.com/jjshcc/services/trackbacks/400610.htmlCentOS 6.0 Samba服务器配¾|?/span>

    一、安装前准备
    1、ä‹É用Samba服务器需要防火墙开放以下端å?/span>
        UDP 137 UDP 138 TCP 139 TCP 445
    #配置防火墙端�/span>
    [root@roothomes ~] vi /etc/sysconfig/iptables   
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPT
    -A INPUT -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT
    -A INPUT -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT
    #重启防火墙,使规则生�/span>
    [root@roothomes ~] /etc/rc.d/init.d/iptables restart     

    2、关闭CentOS6¾pȝ»Ÿçš?SELinux
    [root@roothomes ~] vi /etc/selinux/config
    #SELINUX=enforcing     #注释æŽ?/span>
    #SELINUXTYPE=targeted  #注释æŽ?/span>
    SELINUX=disabled       #增加
    #:wq  保存ã€?/span>
    #重启¾pȝ»Ÿ
    [root@roothomes ~] shutdown -r now  或è€?init 6

    二、安装Samba
    1、检查Samba服务包是否已安装
    [root@roothomes ~] rpm -qa | grep samba
        samba-3.5.4-68.el6.x86_64
        samba-common-3.5.4-68.el6.x86_64
        samba-client-3.5.4-68.el6.x86_64
        samba4-libs-4.0.0-23.alpha11.el6.x86_64
        samba-winbind-clients-3.5.4-68.el6.x86_64

       说明samba已经安装åQŒå¦‚果没有安装,˜qè¡Œä¸‹é¢å‘½ä×o安装 [root@roothomes ~] yum install samba 
       
    2、配¾|®samba
    [root@roothomes ~] chkconfig smb on  #讄¡½® Sambaå¼€æœø™‡ªåЍ吝åŠ?/span>
    [root@roothomes ~] service smb start      #启动Samba服务 
    [root@roothomes ~] /etc/init.d/smb restart  #重启
    [root@roothomes ~] /etc/init.d/smb stop    #停止 
    [root@roothomes ~] cp /etc/samba/smb.conf  /etc/samba/bak_smb.conf_bak  #备䆾
    [root@roothomes ~] cp /etc/samba/bak_smb.conf_bak  /etc/samba/smb.conf  #恢复
    [root@roothomes ~] vi /etc/samba/smb.conf
    [global]                           #扑ֈ°˜q™ä¸€è¡Œï¼ˆå…¨å±€è®„¡½®æ ‡ç­¾åQ‰ï¼Œåœ¨æ­¤è¡Œä¸‹é¢æ·»åŠ å¦‚ä¸‹è¡ŒåQ?/span>
        workgroup = WORKGROUP          #工作¾l„名¿U°æ”¹ä¸?Windows ¾|‘络所定义的工作组å?/span>
        server string = Samba Server   #讄¡½®samba服务器的ä¸ÀLœºåç§°
        security = user                #讄¡½®samba服务器安全çñ”åˆ«äØ“useråQŒå³ä»¥è̎号和口ä×o讉K—®
        netbios name = SambaServer     #讄¡½®Samba服务器访问别å?/span>
    #在配¾|®æ–‡ä»¶çš„æœ«å°¾æ·ÕdŠ ä»¥ä¸‹è‡ªå®šä¹‰å†…å®?/span>
    [SambaServer]                      #在Windows¾|‘上é‚Õd±…中看到的å…׃ín目录的名å­?/span>
        comment = SambaServer          #在Windows¾|‘上é‚Õd±…中看到的å…׃ín目录的备注信æ?/span>
        path = /home/SambaServer       #å…׃ín目录在系¾lŸä¸­çš„位¾|?/span>
        public = no                    #不公开目录
        writable = yes                 #å…׃ín目录可以è¯Õd†™
        valid users=SambaServer        #只允许SambaServer用户讉K—®
    #保存配置

    3、添加访问linuxå…׃ín目录的è̎号SambaServer
       ç”¨æˆ·å®¶ç›®å½•äØ“/home/SambaServer, 用户ç™Õd½•¾lˆç«¯è®¾äØ“/bin/false(即ä‹É之不能登录系¾l?
    [root@roothomes ~] mkdir -p /home/SambaServer #建立SambaServeræ–‡äšgå¤?/span>
    [root@roothomes ~] cd /home/SambaServer
    [root@roothomes ~] touch  samba.txt   #创徏‹¹‹è¯•æ–‡äšgsamba.txt
    [root@roothomes ~] useradd SambaServer -d /home/SambaServer -s /bin/false
    [root@roothomes ~] chown SambaServer:SambaServer /home/SambaServer -R

    4、将用户SambaServeræ·ÕdŠ å…¥åˆ°Samba用户数据库,òq¶è®¾¾|®ç™»å½•共享目录的密码为:123456
    [root@roothomes ~] smbpasswd -a SambaServer
       New SMB password:  输入该用æˆïL”¨äºŽç™»å½•Samba的密ç ?/span>
       Retype new SMB password:  再次¼‹®è®¤è¾“入该密ç ?/span>
       Added user SambaServer.
    #备注:˜q™é‡Œè®„¡½®çš„密码是SambaServer用户ç™Õd½•该机的Sambaå…׃ín的密码,非登陆OS的密ç ?
    5、重启Samba服务�/span>
    [root@roothomes ~] /etc/init.d/smb restart
    6、浏览共享信�/span>
    在Windows客户端输å…?\\ip  或è€?\\SambaServer  #服务器别å?/span>
       回èžR之后åQŒä¼šè·›_‡ºæ¥ç™»å½•框åQŒè¾“å…¥è̎号SambaServer ,密码123456 , 卛_¯è®‰K—®å…׃ín目录

    è‡Ïx­¤åQŒCentOS 6.0 linux samba服务器配¾|®å®Œæˆã€?/span>

    可以ç™Õd½•samba服务器,但是没有权限讉K—®linux下的å…׃ín目录

    1、确保linux下防火墙关闭或者是开攑օ±äº«ç›®å½•权é™?nbsp; iptalbes -F
    2、确保samba服务器配¾|®æ–‡ä»¶smb.conf讄¡½®æ²¡æœ‰é—®é¢˜åQŒå¯¾|‘上查阅资料看配¾|®åŠžæ³?br />3、确保setlinux关闭åQŒå¯ä»¥ç”¨setenforce 0命ä×o执行ã€?默认的,SELinux¼›æ­¢¾|‘络上对Samba服务器上的共享目录进行写操作åQŒå³ä½¿ä½ åœ¨smb.confä¸­å…è®æ€º†˜q™é¡¹æ“ä½œã€?/p>

    ˜q™ä¸¤ä¸ªå‘½ä»¤å¿…™åÀL‰§è¡Œå•ŠåQ?/div>
       iptables -F
       setenforce 0åQ?/div>
    问题åQ?/span>
    如果无法讉K—®å…׃ín目录的内容,è¯ähŠŠé˜²ç«å¢™åœæ­¢ï¼›
    [root@roothomes ~] service iptables stop
     


    ]]> Ö÷Õ¾Ö©Öë³ØÄ£°å£º Îå·å| ½òÄÏÇø| ½¹×÷ÊÐ| ²ßÀÕÏØ| ÀÖ²ýÊÐ| Ö£ÖÝÊÐ| ÉÂÎ÷Ê¡| ÓñÁÖÊÐ| ¼ªÊ×ÊÐ| ÑâÉ½ÏØ| ¼ÎÒåÏØ| ÄϺÍÏØ| ÈêÖÝÊÐ| ³¤¸ðÊÐ| ¾®ÑÐÏØ| ÐÂÒ°ÏØ| ¹ã·áÏØ| ÈéɽÊÐ| ÁÙ¸ßÏØ| ÓÀ´ºÏØ| ¹þ¶û±õÊÐ| ¸ß°²ÊÐ| °¢À­ÉÆ×óÆì| ÄϰÄÏØ| Õű±ÏØ| ¾ÞÒ°ÏØ| ·ÊÏçÏØ| Í­´¨ÊÐ| Íû¶¼ÏØ| ÇÕÖÝÊÐ| Ïã¸Û | ¸ßÓÊÊÐ| ãòÎ÷ÏØ| ĵµ¤½­ÊÐ| èë´¨ÏØ| ´óÓ¢ÏØ| ¾¸Ô¶ÏØ| ·öËçÏØ| µÂ¸ñÏØ| »ýʯɽ| ̨¶«ÊÐ|