??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲一区二区三区色,欧美性一区二区,亚洲国产视频一区http://www.aygfsteel.com/miaoyachun/category/50700.htmlzh-cnWed, 23 Mar 2016 02:40:14 GMTWed, 23 Mar 2016 02:40:14 GMT60Install mongodb on Centos 7http://www.aygfsteel.com/miaoyachun/archive/2016/03/23/429773.htmlMilo的v?/dc:creator>Milo的v?/author>Wed, 23 Mar 2016 02:14:00 GMThttp://www.aygfsteel.com/miaoyachun/archive/2016/03/23/429773.htmlhttp://www.aygfsteel.com/miaoyachun/comments/429773.htmlhttp://www.aygfsteel.com/miaoyachun/archive/2016/03/23/429773.html#Feedback0http://www.aygfsteel.com/miaoyachun/comments/commentRss/429773.htmlhttp://www.aygfsteel.com/miaoyachun/services/trackbacks/429773.html
https://docs.mongodb.org/manual/tutorial/install-mongodb-on-red-hat/



]]>
shell中的冒号http://www.aygfsteel.com/miaoyachun/archive/2015/11/09/428094.htmlMilo的v?/dc:creator>Milo的v?/author>Mon, 09 Nov 2015 07:11:00 GMThttp://www.aygfsteel.com/miaoyachun/archive/2015/11/09/428094.htmlhttp://www.aygfsteel.com/miaoyachun/comments/428094.htmlhttp://www.aygfsteel.com/miaoyachun/archive/2015/11/09/428094.html#Feedback0http://www.aygfsteel.com/miaoyachun/comments/commentRss/428094.htmlhttp://www.aygfsteel.com/miaoyachun/services/trackbacks/428094.html
http://codingstandards.iteye.com/blog/1160298


]]>
Solution of wireless link "PCI unknown" on Centos 7.1 http://www.aygfsteel.com/miaoyachun/archive/2015/09/17/427366.htmlMilo的v?/dc:creator>Milo的v?/author>Thu, 17 Sep 2015 02:41:00 GMThttp://www.aygfsteel.com/miaoyachun/archive/2015/09/17/427366.htmlhttp://www.aygfsteel.com/miaoyachun/comments/427366.htmlhttp://www.aygfsteel.com/miaoyachun/archive/2015/09/17/427366.html#Feedback0http://www.aygfsteel.com/miaoyachun/comments/commentRss/427366.htmlhttp://www.aygfsteel.com/miaoyachun/services/trackbacks/427366.html
Googled many pages, most of them introduced how to scan wifi links by command line tool "iw", i tried all steps supplied by the pages but was blocked at the last step to get dynamical ipaddress by dhclient command "sudo dhclient wlp3s0 -v". The dhclient always complain "NO DHCPOFFERS received." (I doubted there should be some tricky to play with dhclient but which i am not faimiar with.. sad.. )

But i think there would be some extending tool for NetworkManager to manager wifi, then i google "NetworkManager wifi", i got "NetwrokManager-wifi plugin" from link https://www.centos.org/forums/viewtopic.php?f=47&t=52810

After following steps , i finally make wifi work well on centos 7.1

  • yum install NetworkManager-wifi
  • reboot machine (i tried logout and login, not work) 

Problem is NetworkManager-wifi is not installed by default on centos 7.1, (would it be my mistake when install OS? strange..)



]]>
solution for axis2c-src-1.6.0 build failure on 64 bit ubuntu14.04shttp://www.aygfsteel.com/miaoyachun/archive/2015/08/21/426927.htmlMilo的v?/dc:creator>Milo的v?/author>Fri, 21 Aug 2015 03:00:00 GMThttp://www.aygfsteel.com/miaoyachun/archive/2015/08/21/426927.htmlhttp://www.aygfsteel.com/miaoyachun/comments/426927.htmlhttp://www.aygfsteel.com/miaoyachun/archive/2015/08/21/426927.html#Feedback0http://www.aygfsteel.com/miaoyachun/comments/commentRss/426927.htmlhttp://www.aygfsteel.com/miaoyachun/services/trackbacks/426927.htmlTwo compile issues i got:

One issue is:
    uuid_gen_unix.c: In function 'axutil_uuid_gen_v1':uuid_gen_unix.c:62:20: error: variable 'tv' set but not used [-Werror=unused-but-set-variable]     struct timeval tv;                    ^cc1: all warnings being treated as errors    


Solution is remove "-Werror" in all configure scripts
find -type f -name configure -exec sed -i '/CFLAGS/s/-Werror//g' {} \;
Another issue is:
/usr/bin/ld: test.o: undefined reference to symbol 'axiom_xml_reader_free'
/usr/local/axis2c/lib/libaxis2_parser.so
.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 
1 exit status
make
[4]: *** [test] Error 1
make
[4]: Leaving directory `/home/miaoyachun/softwares/test/axis2c-src-1.6.0/neethi/test'

As suggested in https://code.google.com/p/staff/issues/detail?id=198, the solution is disable neethi/test in following files:
  • neethi/configure, remove all "test/Makefile"
  • neethi/Makefile.am, update "SUBDIRS = src test" with "SUBDIRS = src"
  • neethi/Makefile.in, update "SUBDIRS = src test" with "SUBDIRS = src"

Finally, you could run "make; sudo make install"" successfully. Last thing should be paid attention to is you may need copy all head files of neethi/include into /usr/local/axis2c/include/axis2-1.6.0/ which needed when you compile customized web service.

Enjoining it!!



]]>
axis2/c的hello.c~译不过的原?/title><link>http://www.aygfsteel.com/miaoyachun/archive/2015/08/18/426870.html</link><dc:creator>Milo的v?/dc:creator><author>Milo的v?/author><pubDate>Tue, 18 Aug 2015 09:59:00 GMT</pubDate><guid>http://www.aygfsteel.com/miaoyachun/archive/2015/08/18/426870.html</guid><wfw:comment>http://www.aygfsteel.com/miaoyachun/comments/426870.html</wfw:comment><comments>http://www.aygfsteel.com/miaoyachun/archive/2015/08/18/426870.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/miaoyachun/comments/commentRss/426870.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/miaoyachun/services/trackbacks/426870.html</trackback:ping><description><![CDATA[<div>http://axis.apache.org/axis2/c/core/docs/axis2c_manual.html#client_api 的hello.c client ~译命o(h)在我的ubuntu 12.04s上L报错<br /><div style="background-color: #eeeeee; font-size: 13px; border: 1px solid #cccccc; padding: 4px 5px 4px 4px; width: 98%; word-break: break-all;"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #000000; ">gcc -o hello -I$AXIS2C_HOME/include/axis2-</span><span style="color: #000000; ">1.6.0</span><span style="color: #000000; ">/ -L$AXIS2C_HOME/lib -laxutil -laxis2_axiom -laxis2_parser -laxis2_engine -lpthread -laxis2_http_sender -laxis2_http_receiver -ldl -Wl</span><span style="color: #000000; ">,</span><span style="color: #000000; ">--rpath -Wl</span><span style="color: #000000; ">,</span><span style="color: #000000; ">$AXIS2C_HOME/lib hello.c<br />/tmp/ccCYikFh.o: In function `main':<br />hello.c:(.text+0x57): undefined reference to `axutil_env_create_all'<br />hello.c:(.text+0x68): undefined reference to `axis2_options_create'<br />hello.c:(.text+0x93): undefined reference to `axutil_strcmp'<br />hello.c:(.text+0xeb): undefined reference to `axis2_endpoint_ref_create'<br />hello.c:(.text+0x102): undefined reference to `axis2_options_set_to'<br />hello.c:(.text+0x13d): undefined reference to `axis2_svc_client_create'<br />hello.c:(.text+0x168): undefined reference to `axutil_error_get_message'<br />hello.c:(.text+0x193): undefined reference to `axutil_log_impl_log_error'<br />hello.c:(.text+0x1b1): undefined reference to `axis2_svc_client_set_options'<br />hello.c:(.text+0x1d6): undefined reference to `axis2_svc_client_send_receive'<br />hello.c:(.text+0x21d): undefined reference to `axiom_node_free_tree'<br />hello.c:(.text+0x238): undefined reference to `axutil_error_get_message'<br />hello.c:(.text+0x266): undefined reference to `axutil_log_impl_log_error'<br />hello.c:(.text+0x28d): undefined reference to `axis2_svc_client_free'<br />hello.c:(.text+0x2a8): undefined reference to `axutil_env_free'<br />/tmp/ccCYikFh.o: In function `build_om_request':<br />hello.c:(.text+0x2ed): undefined reference to `axiom_element_create'<br />hello.c:(.text+0x307): undefined reference to `axiom_element_set_text'<br />/tmp/ccCYikFh.o: In function `process_om_response':<br />hello.c:(.text+0x337): undefined reference to `axiom_node_get_first_child'<br />hello.c:(.text+0x351): undefined reference to `axiom_node_get_node_type'<br />hello.c:(.text+0x367): undefined reference to `axiom_node_get_data_element'<br />hello.c:(.text+0x381): undefined reference to `axiom_text_get_value'<br />hello.c:(.text+0x396): undefined reference to `axiom_text_get_value'<br />collect2: error: ld returned </span><span style="color: #000000; ">1</span><span style="color: #000000;"> exit status<br /></span></div></div>仔细查了gcc命o(h)Q头文gQ库文g的\径都是对的,最后跟同事讨论才发现hello.c的位|的问题。。如果hello.c的位|放C依赖库的右面 ׃(x)报类似错误。但是官方的例子应该是测试过的,怎么?x)有q个问题? N我的ubuntu 12.04的gcc比较严格Q?br /><br />修正后的gcc命o(h)如下<br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #000000; ">gcc -o hello hello.c  -I$AXIS2C_HOME/include/axis2-</span><span style="color: #000000; ">1.6.0</span><span style="color: #000000; ">/ -L$AXIS2C_HOME/lib -laxutil -laxis2_axiom -laxis2_parser -laxis2_engine -lpthread -laxis2_http_sender -laxis2_http_receiver -ldl -Wl</span><span style="color: #000000; ">,</span><span style="color: #000000; ">--rpath -Wl</span><span style="color: #000000; ">,</span><span style="color: #000000;">$AXIS2C_HOME/lib <br /></span></div><img src ="http://www.aygfsteel.com/miaoyachun/aggbug/426870.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/miaoyachun/" target="_blank">Milo的v?/a> 2015-08-18 17:59 <a href="http://www.aygfsteel.com/miaoyachun/archive/2015/08/18/426870.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ubuntu不重启不重新d让limit.conf文g修改立刻生效的方?/title><link>http://www.aygfsteel.com/miaoyachun/archive/2015/08/13/426774.html</link><dc:creator>Milo的v?/dc:creator><author>Milo的v?/author><pubDate>Thu, 13 Aug 2015 09:58:00 GMT</pubDate><guid>http://www.aygfsteel.com/miaoyachun/archive/2015/08/13/426774.html</guid><wfw:comment>http://www.aygfsteel.com/miaoyachun/comments/426774.html</wfw:comment><comments>http://www.aygfsteel.com/miaoyachun/archive/2015/08/13/426774.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/miaoyachun/comments/commentRss/426774.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/miaoyachun/services/trackbacks/426774.html</trackback:ping><description><![CDATA[ubuntu 12.04s每次修改limit.conf文g后,要想让所有的后ssession都能看到修改Q一般要么重启系l,要么reloginpȝ。下面介l一个不退出terminalp修改立刻生效的方?br /><div>1. 修改/etc/pam.d/sudoQ添加下面行到文件末?<br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #000000; ">session    required   pam_limits.so <br /></span></div>2. 修改 /etc/security/limits.conf, 比如<br /><div style="background-color: #eeeeee; font-size: 13px; border: 1px solid #cccccc; padding: 4px 5px 4px 4px; width: 98%; word-break: break-all;"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #000000; ">root soft nofile </span><span style="color: #000000; ">65535</span><span style="color: #000000; "><br />root hard nofile </span><span style="color: #000000; ">65535</span><span style="color: #000000; "><br /></span></div>3. 执行sudo -i -u root 模拟d初始?br /><br />另外发现centos 6pȝ/etc/pam.d/sudo已经默认enable pam_limits.so了,直接2Q?可以了?<br /><br />当然如果用ssh重新d下可能来的更快。。因?etc/pam.d/sshd默认enable了pam_limits.so, 多输入个密码而已<br /><br /></div><img src ="http://www.aygfsteel.com/miaoyachun/aggbug/426774.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/miaoyachun/" target="_blank">Milo的v?/a> 2015-08-13 17:58 <a href="http://www.aygfsteel.com/miaoyachun/archive/2015/08/13/426774.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Ubuntu上重启ibus输入?/title><link>http://www.aygfsteel.com/miaoyachun/archive/2015/06/17/425748.html</link><dc:creator>Milo的v?/dc:creator><author>Milo的v?/author><pubDate>Wed, 17 Jun 2015 05:45:00 GMT</pubDate><guid>http://www.aygfsteel.com/miaoyachun/archive/2015/06/17/425748.html</guid><wfw:comment>http://www.aygfsteel.com/miaoyachun/comments/425748.html</wfw:comment><comments>http://www.aygfsteel.com/miaoyachun/archive/2015/06/17/425748.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/miaoyachun/comments/commentRss/425748.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/miaoyachun/services/trackbacks/425748.html</trackback:ping><description><![CDATA[<div><span>ubuntu上ibusl常出现不能输入中文的情况,用下面命令可以(f)时解决问?br /></span><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #000000; ">ibus-daemon -r &</span></div></div><img src ="http://www.aygfsteel.com/miaoyachun/aggbug/425748.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/miaoyachun/" target="_blank">Milo的v?/a> 2015-06-17 13:45 <a href="http://www.aygfsteel.com/miaoyachun/archive/2015/06/17/425748.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Latency在Request/Reponse场景的定?/title><link>http://www.aygfsteel.com/miaoyachun/archive/2014/07/01/415342.html</link><dc:creator>Milo的v?/dc:creator><author>Milo的v?/author><pubDate>Tue, 01 Jul 2014 06:10:00 GMT</pubDate><guid>http://www.aygfsteel.com/miaoyachun/archive/2014/07/01/415342.html</guid><wfw:comment>http://www.aygfsteel.com/miaoyachun/comments/415342.html</wfw:comment><comments>http://www.aygfsteel.com/miaoyachun/archive/2014/07/01/415342.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/miaoyachun/comments/commentRss/415342.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/miaoyachun/services/trackbacks/415342.html</trackback:ping><description><![CDATA[<div> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">latency = client send request time + network trans time (->)+ server receive request time+ reponse time + server send reponse time+ network trans time (<-)+ client receive reponse time<br /><br />latency = first byte out, last byte in time</p></div><img src ="http://www.aygfsteel.com/miaoyachun/aggbug/415342.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/miaoyachun/" target="_blank">Milo的v?/a> 2014-07-01 14:10 <a href="http://www.aygfsteel.com/miaoyachun/archive/2014/07/01/415342.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ubuntu 12.04的chkconfig替代? sysv-rc-confhttp://www.aygfsteel.com/miaoyachun/archive/2013/12/24/407973.htmlMilo的v?/dc:creator>Milo的v?/author>Tue, 24 Dec 2013 06:54:00 GMThttp://www.aygfsteel.com/miaoyachun/archive/2013/12/24/407973.htmlhttp://www.aygfsteel.com/miaoyachun/comments/407973.htmlhttp://www.aygfsteel.com/miaoyachun/archive/2013/12/24/407973.html#Feedback0http://www.aygfsteel.com/miaoyachun/comments/commentRss/407973.htmlhttp://www.aygfsteel.com/miaoyachun/services/trackbacks/407973.html

]]>
关于arp_ignorehttp://www.aygfsteel.com/miaoyachun/archive/2012/11/27/392078.htmlMilo的v?/dc:creator>Milo的v?/author>Tue, 27 Nov 2012 09:16:00 GMThttp://www.aygfsteel.com/miaoyachun/archive/2012/11/27/392078.htmlhttp://www.aygfsteel.com/miaoyachun/comments/392078.htmlhttp://www.aygfsteel.com/miaoyachun/archive/2012/11/27/392078.html#Feedback0http://www.aygfsteel.com/miaoyachun/comments/commentRss/392078.htmlhttp://www.aygfsteel.com/miaoyachun/services/trackbacks/392078.htmlW一印象是arp的问题。Google了下得到了确认,有个相关的kernal参数:
arp_ignore - INTEGER
Define different modes for sending replies in response to
received ARP requests that resolve local target IP addresses:
0 - (default): reply for any local target IP address, configured
on any interface
1 - reply only if the target IP address is local address
configured on the incoming interface
2 - reply only if the target IP address is local address
configured on the incoming interface and both with the
sender's IP address are part from same subnet on this interface
3 - do not reply for local addresses configured with scope host,
only resolutions for global and link addresses are replied
4-7 - reserved
8 - do not reply for all local addresses
默认?Q解册个问题需要配|ؓ(f)1

临时配置?br />
sysctl -w net.ipv4.conf.all.arp_ignore=1

持久配置
sysctl -w net.ipv4.conf.all.arp_ignore=1
echo 'net.ipv4.conf.all.arp_ignore
=1' >> /etc/sysctl.conf

q个弄好可以重启network服务来确保其他机器更新arp cacheQ如果不方便重启networkQ自己手动敲arping命o(h)Q比?br />
arping -q -A -c 1 -I eth1 10.197.24.177
q个命o(h)是在 /etc/sysconfig/network-scripts/ifup-eth里看到的

如果机器比较?yu),也可以直接用arp -d 来删除相关的cacheQ徏议上面的那种发广播的方式?img src ="http://www.aygfsteel.com/miaoyachun/aggbug/392078.html" width = "1" height = "1" />

]]>
linux盘raid相关http://www.aygfsteel.com/miaoyachun/archive/2012/11/07/390939.htmlMilo的v?/dc:creator>Milo的v?/author>Wed, 07 Nov 2012 05:23:00 GMThttp://www.aygfsteel.com/miaoyachun/archive/2012/11/07/390939.htmlhttp://www.aygfsteel.com/miaoyachun/comments/390939.htmlhttp://www.aygfsteel.com/miaoyachun/archive/2012/11/07/390939.html#Feedback0http://www.aygfsteel.com/miaoyachun/comments/commentRss/390939.htmlhttp://www.aygfsteel.com/miaoyachun/services/trackbacks/390939.html磁盘相关信?nbsp;  
    smartctl -a /dev/sda
(smartctl工具来自smartmontools, 可以apt-get install smartmontools来安?

所有raid讑֤
    mdadm -Ds

具体raid讑֤信息
    mdadm -D /dev/md0

创徏raid讑֤
   mdadm --create --verbose /dev/md0 --level=raid0 --raid-devices=8 /dev/sdd /dev/sdc /dev/sdf /dev/sde /dev/sdg /dev/sdh /dev/sdi /dev/sdj

停止raid讑֤
    mdadm -S /dev/md0

格式化raid讑֤
    mkfs -t xfs -f /dev/md0

挂蝲raid讑֤
   mount -t xfs /dev/md0 /raid

切换raid模式的步?br />
    1. umount if mounted : umount /raid
    2. stop raid device:  mdadm -S /dev/md0
    3. create raid: mdadm --create ...
    4. update /etc/mdadm.conf with output of 'mdadm -Ds', 用来开动组raid
    5. update /etc/fstab, 如果需要开动mount

Ref:
http://francs3.blog.163.com/blog/static/40576727201212145744783/
http://hi.baidu.com/powersaven/item/1da2dc147a8be2e25f53b19e


]]>
Ubuntu上的alternativeshttp://www.aygfsteel.com/miaoyachun/archive/2012/10/26/390260.htmlMilo的v?/dc:creator>Milo的v?/author>Fri, 26 Oct 2012 05:31:00 GMThttp://www.aygfsteel.com/miaoyachun/archive/2012/10/26/390260.htmlhttp://www.aygfsteel.com/miaoyachun/comments/390260.htmlhttp://www.aygfsteel.com/miaoyachun/archive/2012/10/26/390260.html#Feedback0http://www.aygfsteel.com/miaoyachun/comments/commentRss/390260.htmlhttp://www.aygfsteel.com/miaoyachun/services/trackbacks/390260.html关于alternatives的用?br />

alternatives --install /usr/bin/java java /opt/jdk1
.5.0_22/bin/java 15000
alternatives --install /usr/bin/javac javac /opt/jdk1
.5.0_22/bin/javac 15000
alternatives --config java
alternatives --config javac
最q切换桌面环境到ubuntu, 发现alternativesq个工具改名?update-alternatives
用法q是一L(fng)。?br />

]]>
用JNI从C传递结构体到JAVAhttp://www.aygfsteel.com/miaoyachun/archive/2012/10/12/389473.htmlMilo的v?/dc:creator>Milo的v?/author>Fri, 12 Oct 2012 08:40:00 GMThttp://www.aygfsteel.com/miaoyachun/archive/2012/10/12/389473.htmlhttp://www.aygfsteel.com/miaoyachun/comments/389473.htmlhttp://www.aygfsteel.com/miaoyachun/archive/2012/10/12/389473.html#Feedback0http://www.aygfsteel.com/miaoyachun/comments/commentRss/389473.htmlhttp://www.aygfsteel.com/miaoyachun/services/trackbacks/389473.html 直接上C的实?br />
typedef struct Foo {
    
int len;
    
char name[100];
} Foo_t;

JNIEXPORT jint JNICALL
Java_TestJNI_foo(JNIEnv 
*env, jobject obj, jobject fooObj) {

    Foo_t 
* bar = malloc(sizeof(Foo_t));
    jclass clazz;
    jfieldID fid;

    
//init the bar data of C
    strcpy(bar->name, "Yachun Miao");
    bar
->len = strlen(bar->name);

    
// mapping bar of C to foo
    clazz = (*env)->GetObjectClass(env, fooObj);
    
if (0 == clazz) {
        printf(
"GetObjectClass returned 0\n");
        
return (-1);
    }
    fid 
= (*env)->GetFieldID(env, clazz, "len""I");
    (
*env)->SetLongField(env, fooObj, fid, bar->len);

    fid 
= (*env)->GetFieldID(env, clazz, "name""Ljava/lang/String;");
    jstring name 
= (*env)->NewStringUTF(env, bar->name);
    (
*env)->SetObjectField(env, fooObj, fid, name);

    free(bar);
    
return 0;
}

对应的Java调用
public class Foo {
    
protected int len;
    
protected String name;
}


    
private static native int foo(Foo fooObj);

    
public static void main(String args[]) {
        System.loadLibrary(
"mylib");

        Foo foo 
= new Foo();
        foo(foo);
        System.out.println(foo.name);
        System.out.println(foo.len);

    }

参考链?br />
http://www.steveolyo.com/JNI/JNI.html#CSTRCJ
http://docs.oracle.com/javase/6/docs/technotes/guides/jni/spec/types.html



]]>
打通Citrix Xenapp与Citrix receiver之间的clipboardhttp://www.aygfsteel.com/miaoyachun/archive/2012/09/10/387402.htmlMilo的v?/dc:creator>Milo的v?/author>Mon, 10 Sep 2012 07:55:00 GMThttp://www.aygfsteel.com/miaoyachun/archive/2012/09/10/387402.htmlhttp://www.aygfsteel.com/miaoyachun/comments/387402.htmlhttp://www.aygfsteel.com/miaoyachun/archive/2012/09/10/387402.html#Feedback1http://www.aygfsteel.com/miaoyachun/comments/commentRss/387402.htmlhttp://www.aygfsteel.com/miaoyachun/services/trackbacks/387402.html
qx要用恶心的citrix Xenapp & citrix receiver 工作环境Q装完后发现client端不能复制内容到server端,q样?x)对工作造成很大的困扰?br />偶然发现citrix receiver的进E上有个-file的选项Q会(x)指定个(f)旉|文Ӟ里面提及(qing)
ClipboardAllowed=off
于是grep下这个关键字Q发现~/ICAClient/linuxx86/config/All_Regions.ini 也有个类似的
ClipboardAllowed=*
改ؓ(f)
ClipboardAllowed=true
然后重新开Xenapp session之后发现已经可以黏脓(chung)了?br />
按照q个思\Q用windows的同事用如下的方式打通两端clipboard
1. 打开pȝ注册表编辑器
2. 定位HKEY_CURRENT_USER\Software\Citrix\ICA Client\Engine\Lockdown Profiles\All Regions\Lockdown\Virtual Channels\Clipboard
3. 修改ClipboardAllowed?
4. 注销当前用户Q或?dng)R要)

如果Xenapp server上用vnc viewer之类的XclientQ如果想打通到vnc server的clipboardQ还需要在vnc server所在linuxL开启以下进E?br />
vncconfig -nowin &
q个有点不理解,但确实可行。待真相。?br />


]]>
Ubuntu12.4上的skype不能输入中文http://www.aygfsteel.com/miaoyachun/archive/2012/09/04/386978.htmlMilo的v?/dc:creator>Milo的v?/author>Tue, 04 Sep 2012 09:12:00 GMThttp://www.aygfsteel.com/miaoyachun/archive/2012/09/04/386978.htmlhttp://www.aygfsteel.com/miaoyachun/comments/386978.htmlhttp://www.aygfsteel.com/miaoyachun/archive/2012/09/04/386978.html#Feedback0http://www.aygfsteel.com/miaoyachun/comments/commentRss/386978.htmlhttp://www.aygfsteel.com/miaoyachun/services/trackbacks/386978.html
miaoyachun@ymiao:~$ /usr/lib/i386-linux-gnu/ibus/ibus-x11 --kill-daemon
^Z
[1]+  Stopped                 /usr/lib/i386-linux-gnu/ibus/ibus-x11 --kill-daemon
miaoyachun@ymiao:~$ bg
[1]+ /usr/lib/i386-linux-gnu/ibus/ibus-x11 --kill-daemon &
miaoyachun@ymiao:~$
然后可以了。?img src ="http://www.aygfsteel.com/miaoyachun/aggbug/386978.html" width = "1" height = "1" />

]]>
Ubuntu12.4如何讄firefox为系l默认浏览器http://www.aygfsteel.com/miaoyachun/archive/2012/08/20/385822.htmlMilo的v?/dc:creator>Milo的v?/author>Mon, 20 Aug 2012 03:28:00 GMThttp://www.aygfsteel.com/miaoyachun/archive/2012/08/20/385822.htmlhttp://www.aygfsteel.com/miaoyachun/comments/385822.htmlhttp://www.aygfsteel.com/miaoyachun/archive/2012/08/20/385822.html#Feedback0http://www.aygfsteel.com/miaoyachun/comments/commentRss/385822.htmlhttp://www.aygfsteel.com/miaoyachun/services/trackbacks/385822.html 今天发现ubunto12.4没有默认的浏览器Q导致所有的链接打开的时候从用gedit。google上找C解决Ҏ(gu):
~辑以下内容Q?br />
[Desktop Entry]
Version
=14.0
Name
=Mozilla Firefox Web Browser
Comment
=Browse the World Wide Web
GenericName
=Web Browser
Keywords
=Internet;WWW;Browser;Web;Explorer
Exec=/opt/firefox/firefox %u
Terminal
=false
X-MultipleArgs
=false
Type
=Application
Icon
=firefox
Categories
=GNOME;GTK;Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;
StartupNotify=true
Actions
=NewWindow;
到文件~/.local/share/applications/firefox.desktop, q保存退出?br />执行Q?br />
update-desktop-database ~/.local/share/applications/

配好以后"System Settings -> Detail -> Default Applications -> Web" list里就?x)有firefox了?br />
Ref: http://askubuntu.com/questions/166455/how-do-i-make-luakit-my-default-browser

]]>
eclim LocateFile not work if "invpaste" enabled in .vimrchttp://www.aygfsteel.com/miaoyachun/archive/2012/08/06/384914.htmlMilo的v?/dc:creator>Milo的v?/author>Mon, 06 Aug 2012 06:56:00 GMThttp://www.aygfsteel.com/miaoyachun/archive/2012/08/06/384914.htmlhttp://www.aygfsteel.com/miaoyachun/comments/384914.htmlhttp://www.aygfsteel.com/miaoyachun/archive/2012/08/06/384914.html#Feedback0http://www.aygfsteel.com/miaoyachun/comments/commentRss/384914.htmlhttp://www.aygfsteel.com/miaoyachun/services/trackbacks/384914.htmlSolution is disable it by
" set invpaste


]]>
PHP curl CURLOPT_SSL_VERIFYPEERhttp://www.aygfsteel.com/miaoyachun/archive/2012/07/17/383328.htmlMilo的v?/dc:creator>Milo的v?/author>Tue, 17 Jul 2012 09:39:00 GMThttp://www.aygfsteel.com/miaoyachun/archive/2012/07/17/383328.htmlhttp://www.aygfsteel.com/miaoyachun/comments/383328.htmlhttp://www.aygfsteel.com/miaoyachun/archive/2012/07/17/383328.html#Feedback0http://www.aygfsteel.com/miaoyachun/comments/commentRss/383328.htmlhttp://www.aygfsteel.com/miaoyachun/services/trackbacks/383328.html
ref: http://curl.haxx.se/docs/sslcerts.html

]]>
gprof call graph & memcachedhttp://www.aygfsteel.com/miaoyachun/archive/2012/07/16/383245.htmlMilo的v?/dc:creator>Milo的v?/author>Mon, 16 Jul 2012 10:03:00 GMThttp://www.aygfsteel.com/miaoyachun/archive/2012/07/16/383245.htmlhttp://www.aygfsteel.com/miaoyachun/comments/383245.htmlhttp://www.aygfsteel.com/miaoyachun/archive/2012/07/16/383245.html#Feedback0http://www.aygfsteel.com/miaoyachun/comments/commentRss/383245.htmlhttp://www.aygfsteel.com/miaoyachun/services/trackbacks/383245.htmlassume gprof and gprof2dot.py, graphviz be installed.


1. checkout memcached src code from git server
2. sh autogen.sh & ./configure
3. modify Makefile about CFLAGS, append option '-pg', after that do make
4. run memcached & do some actions by telnet
5. terminate memcached process, a gmon.out file will be generated.
6. gprof memcached gmon.out | /usr/bin/gprof2dot.py -n0 -e0 -c bw | dot -Tpng -o memcached_callgraph.png


]]>
scriptlets of RPMhttp://www.aygfsteel.com/miaoyachun/archive/2012/07/06/382364.htmlMilo的v?/dc:creator>Milo的v?/author>Fri, 06 Jul 2012 05:41:00 GMThttp://www.aygfsteel.com/miaoyachun/archive/2012/07/06/382364.htmlhttp://www.aygfsteel.com/miaoyachun/comments/382364.htmlhttp://www.aygfsteel.com/miaoyachun/archive/2012/07/06/382364.html#Feedback0http://www.aygfsteel.com/miaoyachun/comments/commentRss/382364.htmlhttp://www.aygfsteel.com/miaoyachun/services/trackbacks/382364.html
The scriptlets also take an argument, passed into them by the controlling rpmbuild process. This argument, accessed via $1 is the number of packages of this name which will be left on the system when the action completes, except for %pretrans and %posttrans which are always run with $1 as 0 (%pretrans and %posttrans are available in rpm 4.4 and later). So for the common case of install, upgrade, and uninstall we have:


install upgrade uninstall
 %pretrans $1 == 0 $1 == 0 (N/A)
 %pre $1 == 1 $1 == 2 (N/A)
 %post $1 == 1 $1 == 2 (N/A)
 %preun (N/A) $1 == 1 $1 == 0
 %postun (N/A) $1 == 1 $1 == 0
 %posttrans $1 == 0 $1 == 0 (N/A)

Scriptlets ordering

The scriptlets in %pre and %post are respectively run before and after a package is installed.
The scriptlets %preun and %postun are run before and after a package is uninstalled. The
scriptlets %pretrans and %posttrans are run at start and end of a transaction.

On upgrade
, the scripts are run in the following order:

     %pretrans of new package
     %pre of new package
    (package install)
     %post of new package
     %triggerin of other packages (set off by installing new package)
     %triggerin of new package (if any are true)
     %triggerun of old package (if it's set off by uninstalling the old package)
     %triggerun of other packages (set off by uninstalling old package)
     %preun of old package
    (removal of old package)
     %postun of old package
     %triggerpostun of old package (if it's set off by uninstalling the old package)
     %triggerpostun of other packages (if they're setu off by uninstalling the old package)
     %posttrans of new package

For detail, will ref:
http://fedoraproject.org/wiki/Packaging:ScriptletSnippets



]]>
Linux logrotatehttp://www.aygfsteel.com/miaoyachun/archive/2012/06/26/381520.htmlMilo的v?/dc:creator>Milo的v?/author>Tue, 26 Jun 2012 08:07:00 GMThttp://www.aygfsteel.com/miaoyachun/archive/2012/06/26/381520.htmlhttp://www.aygfsteel.com/miaoyachun/comments/381520.htmlhttp://www.aygfsteel.com/miaoyachun/archive/2012/06/26/381520.html#Feedback0http://www.aygfsteel.com/miaoyachun/comments/commentRss/381520.htmlhttp://www.aygfsteel.com/miaoyachun/services/trackbacks/381520.html

2. 命o(h)行选项

选项-d 用来打开debug模式
选项-v 用来打开verbose模式
选项-f 用来打开强制选项Q会(x)强制发生log rotate即不满x?br />
debug模式跟verbose的区别就? debug模式是dry-run版本的verbose模式Q一般用来调试新加的logroate配置文g, 比如Q?br />
 /usr/sbin/logrotate /etc/logrotate.d/NEWCONFIG -df
 /usr/sbin/logrotate /etc/logrotate.d/NEWCONFIG -vf


]]>
Perlvarhttp://www.aygfsteel.com/miaoyachun/archive/2012/06/21/381274.htmlMilo的v?/dc:creator>Milo的v?/author>Thu, 21 Jun 2012 09:10:00 GMThttp://www.aygfsteel.com/miaoyachun/archive/2012/06/21/381274.htmlhttp://www.aygfsteel.com/miaoyachun/comments/381274.htmlhttp://www.aygfsteel.com/miaoyachun/archive/2012/06/21/381274.html#Feedback0http://www.aygfsteel.com/miaoyachun/comments/commentRss/381274.htmlhttp://www.aygfsteel.com/miaoyachun/services/trackbacks/381274.htmlPerl里面的predefined vars
perlvar


用perldoc perlvar 可以l合实例来了解更详细的信息?br />
下面针对$@写了个perl alarm的例?br />
#!/usr/bin/perl

my $timeout = 5;

$SIG{ALRM} = sub {
    
die "alarm\n";
};

eval {
    
alarm $timeout;
    
sleep(6);
    
alarm 0;
};

if ($@) {
    
print "timeout\n";
}
else {
    
print "not timeout\n";
}





]]>
split file to pieces and restore under linuxhttp://www.aygfsteel.com/miaoyachun/archive/2012/05/30/379574.htmlMilo的v?/dc:creator>Milo的v?/author>Wed, 30 May 2012 09:38:00 GMThttp://www.aygfsteel.com/miaoyachun/archive/2012/05/30/379574.htmlhttp://www.aygfsteel.com/miaoyachun/comments/379574.htmlhttp://www.aygfsteel.com/miaoyachun/archive/2012/05/30/379574.html#Feedback0http://www.aygfsteel.com/miaoyachun/comments/commentRss/379574.htmlhttp://www.aygfsteel.com/miaoyachun/services/trackbacks/379574.htmlSometime mailbox disallows u upload file exceed some limitation. you can split it before upload. here is one example:

create test file
touch file1 file2;
echo 1 > file1;
echo 2 > file2;
tar zvcf old.tar.gz file1 file2;

split file to segment with size as u wished
split -b 50 old.tar.gz;

restore file from segments
cat xa* > new.tar.gz;

verify the restore
md5sum old.tar.gz new.tar.gz

Generally, the check result should be same.




]]>
About cannot core dump after setuid on linux serverhttp://www.aygfsteel.com/miaoyachun/archive/2012/05/30/379560.htmlMilo的v?/dc:creator>Milo的v?/author>Wed, 30 May 2012 07:32:00 GMThttp://www.aygfsteel.com/miaoyachun/archive/2012/05/30/379560.htmlhttp://www.aygfsteel.com/miaoyachun/comments/379560.htmlhttp://www.aygfsteel.com/miaoyachun/archive/2012/05/30/379560.html#Feedback0http://www.aygfsteel.com/miaoyachun/comments/commentRss/379560.htmlhttp://www.aygfsteel.com/miaoyachun/services/trackbacks/379560.html
In many cases, binaries can no longer dump core after calling setuid(). 
Under Linux it is possible to re-enable this with a system call.

e.g.

+#ifdef __linux__
+#include <sys/prctl.h>
+#endif
+
 #ifdef HAVE_purify
 
#define IF_PURIFY(A,B) (A)
 
#else
@@ 
-1362,6 +1366,10 @@
     sql_perror(
"setuid");
     unireg_abort(
1);
   }
+#ifdef __linux__
+  /* inform kernel that process is dumpable */
+  prctl(PR_SET_DUMPABLE,1,0,0,0);
+#endif /* __linux__ */
 
#endif
Manual of prctl
       PR_SET_DUMPABLE
              (Since Linux 
2.4) Set the state of the flag determining whether core dumps are produced for this process  upon  delivery  of  a
              signal  whose  default  behaviour  is  to  produce a core dump.  (Normally this flag is set for a process by default
, but it is
              cleared when a set-user-ID or set-group-ID program is executed and also by various system calls that  manipulate  process  UIDs
              and  GIDs).  In kernels up to and including 
2.6.12, arg2 must be either 0 (process is not dumpable) or 1 (process is dumpable).
              Since kernel 
2.6.13, the value 2 is also permitted; this causes any binary which normally would not  be  dumped  to  be  dumped
              readable by root only.  (See also the description of /proc/sys/fs/suid_dumpable in proc(5).)


Ref: http://bugs.mysql.com/bug.php?id=21723
Some files about linux core dump:
/proc/sys/fs/suid_dumpable
/etc/profile
/etc/security/limits.conf
/proc/sys/kernel/core_pattern



]]>
Use ssh-copy-id avoid inputing passwordhttp://www.aygfsteel.com/miaoyachun/archive/2012/05/11/377877.htmlMilo的v?/dc:creator>Milo的v?/author>Fri, 11 May 2012 01:58:00 GMThttp://www.aygfsteel.com/miaoyachun/archive/2012/05/11/377877.htmlhttp://www.aygfsteel.com/miaoyachun/comments/377877.htmlhttp://www.aygfsteel.com/miaoyachun/archive/2012/05/11/377877.html#Feedback0http://www.aygfsteel.com/miaoyachun/comments/commentRss/377877.htmlhttp://www.aygfsteel.com/miaoyachun/services/trackbacks/377877.htmlssh-copy-id 避免ssh输入密码的用法:(x)

[root@hengtiandesk118 .ssh]# ssh-copy-id -i id_rsa.pub 10.1.186.51
10
Warning: Permanently added '
10.1.186.51' (RSA) to the list of known hosts.
root@
10.1.186.51's password: 
Now try logging into the machine
, with "ssh '10.1.186.51'", and check in:

  .ssh/authorized_keys

to make sure we haven't added extra keys that you weren't expecting.

[root@hengtiandesk118 .ssh]# ssh 10.1.186.51
Last login: Thu May 
10 18:33:55 2012 from 10.5.4.201
[root@xen186v01 ~]#

q个脚本只要装了openssh-clients可以用了?br />
以前都是手动复制_脓(chung)?..


]]>
几个ssh道用法http://www.aygfsteel.com/miaoyachun/archive/2012/05/09/377721.htmlMilo的v?/dc:creator>Milo的v?/author>Wed, 09 May 2012 09:13:00 GMThttp://www.aygfsteel.com/miaoyachun/archive/2012/05/09/377721.htmlhttp://www.aygfsteel.com/miaoyachun/comments/377721.htmlhttp://www.aygfsteel.com/miaoyachun/archive/2012/05/09/377721.html#Feedback0http://www.aygfsteel.com/miaoyachun/comments/commentRss/377721.htmlhttp://www.aygfsteel.com/miaoyachun/services/trackbacks/377721.html
1. remote file copy
[root@xen74v01 ~]# cat test.pl
#!/usr/bin/perl
print 
"eth0.74"=~/(\w+)/;
print "\n";
[root@xen74v01 ~]# cat test.pl | ssh 10.1.74.76 'cat - > /tmp/test.pl'

拯文gӞ如果文g很大Q又不想影响|络IO可以用pv工具q行量控制
pv -L10m test.pl | ssh 10.1.74.76 'cat - > /tmp/test.pl'
q里pv的行cat比较cMQ但是支持IO量控制Q这里设|?0M/s.

2. local script remote execute
[root@xen74v01 ~]# cat test.pl
#!/usr/bin/perl
print 
"eth0.74"=~/(\w+)/;
print "\n";
[root@xen74v01 ~]# perl test.pl
eth0
[root@xen74v01 ~]# cat test.pl | ssh 10.1.74.76 'perl'
eth0
[root@xen74v01 ~]# ssh 10.1.74.76 'perl' < test.pl
eth0

q样׃用把脚本拯到远端去执行?br />
参考:(x)
http://linux.icydog.net/ssh/piping.php
http://www.ivarch.com/programs/quickref/pv.shtml
http://www.mysqlperformanceblog.com/2009/05/20/hint-throttling-xtrabackup/


]]>
Notes for SNMPhttp://www.aygfsteel.com/miaoyachun/archive/2012/05/07/377541.htmlMilo的v?/dc:creator>Milo的v?/author>Mon, 07 May 2012 08:57:00 GMThttp://www.aygfsteel.com/miaoyachun/archive/2012/05/07/377541.htmlhttp://www.aygfsteel.com/miaoyachun/comments/377541.htmlhttp://www.aygfsteel.com/miaoyachun/archive/2012/05/07/377541.html#Feedback0http://www.aygfsteel.com/miaoyachun/comments/commentRss/377541.htmlhttp://www.aygfsteel.com/miaoyachun/services/trackbacks/377541.html1. Tutorial
http://net-snmp.sourceforge.net/wiki/index.php/Tutorials

2. Config & start agent
 snmpconf

3. snmpwalk example
 snmpwalk -v2c -c public 10.1.74.51

4. check MIB modules
 snmptranslate -Dinit_mib .1.3 2>&1 |grep MIBDIR

5. extending MIB Module
http://net-snmp.sourceforge.net/wiki/index.php/TUT:Writing_a_MIB_Module
    a. download net-snmp src code
    b. MIB definition
    c. mib2c (in net-snmp-perl)
    d. make & make install
    e. edit snmpd conf & restart agent
    f. snmpwalk to verify


]]>
Use iozone to test file system performance http://www.aygfsteel.com/miaoyachun/archive/2012/04/26/376660.htmlMilo的v?/dc:creator>Milo的v?/author>Thu, 26 Apr 2012 02:49:00 GMThttp://www.aygfsteel.com/miaoyachun/archive/2012/04/26/376660.htmlhttp://www.aygfsteel.com/miaoyachun/comments/376660.htmlhttp://www.aygfsteel.com/miaoyachun/archive/2012/04/26/376660.html#Feedback0http://www.aygfsteel.com/miaoyachun/comments/commentRss/376660.htmlhttp://www.aygfsteel.com/miaoyachun/services/trackbacks/376660.html
http://www.iozone.org/

安装
先确保rpmforge repository源已l安装。具体参考:(x)
http://www.aygfsteel.com/miaoyachun/archive/
2012/02/03/369319.html

然后直接yum安装

 yum install iozone


iozone  -i 0 -r 32 -s 2097152
        Iozone: Performance Test of File I/O
                Version $Revision: 
3.394 $
                Compiled for 
64 bit mode.
                Build: linux 

        Contributors:William Norcott
, Don Capps, Isom Crawford, Kirby Collins
                     Al Slater
, Scott Rhine, Mike Wisner, Ken Goss
                     Steve Landherr
, Brad Smith, Mark Kelly, Dr. Alain CYR,
                     Randy Dunlap
, Mark Montague, Dan Million, Gavin Brebner,
                     Jean-Marc Zucconi
, Jeff Blomberg, Benny Halevy, Dave Boone,
                     Erik Habbinga
, Kris Strecker, Walter Wong, Joshua Root,
                     Fabrice Bacchella
, Zhenghua Xue, Qin Li, Darren Sawyer.
                     Ben England.

        Run began: Wed Apr 
25 19:36:55 2012

        Record Size 
32 KB
        File size set to 
2097152 KB
        Command line used: iozone -i 
0 -r 32 -s 2097152
        Output is in Kbytes/sec
        Time Resolution 
= 0.000001 seconds.
        Processor cache size set to 
1024 Kbytes.
        Processor cache line size set to 
32 bytes.
        File stride size set to 
17 * record size.
                                                            random  random    bkwd   record   stride                                   
              KB  reclen   write rewrite    read    reread    read   write    read  rewrite     read   fwrite frewrite   fread  freread
         
2097152      32  844758 2001670                                                                                            

iozone test complete.


]]>
Maven + PHP + Jettyhttp://www.aygfsteel.com/miaoyachun/archive/2012/04/11/373804.htmlMilo的v?/dc:creator>Milo的v?/author>Wed, 11 Apr 2012 06:32:00 GMThttp://www.aygfsteel.com/miaoyachun/archive/2012/04/11/373804.htmlhttp://www.aygfsteel.com/miaoyachun/comments/373804.htmlhttp://www.aygfsteel.com/miaoyachun/archive/2012/04/11/373804.html#Feedback0http://www.aygfsteel.com/miaoyachun/comments/commentRss/373804.htmlhttp://www.aygfsteel.com/miaoyachun/services/trackbacks/373804.htmlhttp://www.owengriffin.com/posts/2010/04/22/Writing_PHP_applications_with_Maven_and_Jetty.html
实验了下Q是可以的。不q用的maven3

]]>
Play VNC with 6 Stepshttp://www.aygfsteel.com/miaoyachun/archive/2012/03/20/372257.htmlMilo的v?/dc:creator>Milo的v?/author>Tue, 20 Mar 2012 03:06:00 GMThttp://www.aygfsteel.com/miaoyachun/archive/2012/03/20/372257.htmlhttp://www.aygfsteel.com/miaoyachun/comments/372257.htmlhttp://www.aygfsteel.com/miaoyachun/archive/2012/03/20/372257.html#Feedback0http://www.aygfsteel.com/miaoyachun/comments/commentRss/372257.htmlhttp://www.aygfsteel.com/miaoyachun/services/trackbacks/372257.html
1. install vncserver
sudo yum install vnc-server

2. set password for login user
  
vncpasswd
3. start one server to generate setting file ~/.vnc/xstartup
 
vncserver :1
4. edit ~/.vnc/xstartup as suggestion of comments to uncomment two lines:
  unset SESSION_MANAGER
  
exec /etc/X11/xinit/xinitrc

5. restart the server
 vncserver -kill :1
 vncserver -geometry 1200x900 -depth 16 :1
宽屏的话
 vncserver -geometry 1366x768 -depth 16 :1, 如果不顺?可以微调Q我当前的最?jng)_辨率?br />
 vncserver -geometry 1346x680 -depth 16 :1

6. access by vncviewer
 vncviewer SERVER_IP:5901

Ref: VNC How TO



]]>
վ֩ģ壺 ƽȪ| | ͨ| | | | ƽ| ƺ| ʯɽ| ԫ| | | | մ| | ԫ| °| ʡ| | | | | Դ| մ| | | | ͷ| | | | | ³| ԰| ̶| ͨ| Ӫɽ| ԭ| µ| | |