2012年12月26日星期三

project myself

start to initial this project and track all the changes and happens.

sub projects had been divided.

project apartment
project money
project module
project reading
project learning
project photos

2012年10月23日星期二

NFS on redhat

     When we found the server with mount protocol has problem, the nfs server side, it has rpcinfo -p, the mountd port actually we are using 808/850 with tcp/udp port.
    The workaround is that we modify /etc/services with specific port number, such as mountd 3333/tcp, mountd 3333/udp. then restart the nfs and portmap service.

2012年8月21日星期二

Attitude


Attitude matters too
When you see the right thing, do it — this may look like more work in the short term, but it's the path of least effort in the long run. If you don't know what the right thing is, do the minimum necessary to get the job done, at least until you figure out what the right thing is.
To do the Unix philosophy right, you have to be loyal to excellence. You have to believe that software design is a craft worth all the intelligence, creativity, and passion you can muster. Otherwise you won't look past the easy, stereotyped ways of approaching design and implementation; you'll rush into coding when you should be thinking. Otherwise you'll carelessly complicate when you should be relentlessly simplifying — and then you'll wonder why your code bloats and debugging is so hard.
To do the Unix philosophy right, you have to value your own time enough never to waste it. If someone has already solved a problem once, don't let pride or politics suck you into solving it a second time rather than re-using. And never work harder than you have to; work smarter instead, and save the extra effort for when you need it. Lean on your tools and automate everything you can.
Software design and implementation should be a joyous art, a kind of high-level play. If this attitude seems preposterous or vaguely embarrassing to you, stop and think; ask yourself what you've forgotten. Why do you design software instead of doing something else to make money or pass the time? You must have thought software was worthy of your passion once....
To do the Unix philosophy right, you need to have (or recover) that attitude. You need to care. You need to play. You need to be willing to explore.
We hope you'll bring this attitude to the rest of this book. Or, at least, that this book will help you rediscover it.

2012年4月12日星期四

nexus configuration


nexus是个很好的maven仓库管理器,官方网站为http://nexus.sonatype.org/
安装nexus到tomcat:
1) 下载nexus-webapp-1.6.0.war
2) 解压nexus-webapp-1.6.0.war到tomcat安装目录下的webapps子目录下,并更名为"nexus"
3) 修改nexus的工作目录:编辑文件“webapps/nexus/WEB-INF/plexus.properties”,修改nexus-work的值为希望的工作目录,默认为nexus-work=${user.home}/sonatype-work/nexus,其中${user.home}为你当前用户的工作目录。
4) 配置maven使用nexus:编辑文件“ ${user.home}/.m2/settings.xml”,修改为如下配置:

 
   
     
      nexus
      *
      http://localhost:8081/nexus/content/groups/public
   

 

 
   
      nexus
     
     
     
       
          central
          http://central
          true
          true
       

     

    
       
          central
          http://central
          true
          true
       

     

   

 

 
   
    nexus
 

其中“http://localhost:8081/nexus”的访问路径,视你的实际部署情况可能端口并不一样,注意修改。
5) 启动tomcat,通过http://localhost:8081/nexus即可访问nexus的界面,默认的管理员帐号为admin,密码为admin123。

如何将自己项目的jar发布到nexus仓库:
1) 编辑文件“ ${user.home}/.m2/settings.xml”,增加如下配置:

......
   
    nexus-releases 
    admin 
    **** 
 
 
   
    nexus-snapshots 
    admin 
    **** 
 

......

其中username为nexus的管理员帐号,password为对应的访问密码。
2) 配置项目的POM.xml文件,增加如下配置:

......
  
  
      
       nexus-releases 
       public 
       http://localhost:8081/nexus/content/repositories/releases
    
 
      
       nexus-snapshots 
       Snapshots 
       http://localhost:8081/nexus/content/repositories/snapshots
    

  

......

其中“http://localhost:8081/nexus”视实际的部署情况修改,id的值要与${user.home}/.m2/settings.xml的配置一致。
3) 进入项目目录执行mvn deploy就可将构件发布到nexus服务器中。


转载自http://rongjih.blog.163.com/blog/static/33574461201042102046529/

2012年1月31日星期二

solaris publisher

#mkdir /pkg
#mkdir /repo
#cat sol-11-1111-repo-full.iso-a sol-11-1111-repo-full.iso-b > sol-11-1111-repo-full.iso
#vi /etc/rc3.d/S99mountpkg
#!/bin/sh
mount -F hsfs /pkg/sol-11-1111-repo-full.iso /repo
#pkg unset-publisher solaris (if you set solaris as mirror directly, that will caused problem, they need connection directly to the original one)
#pkg set-publisher -g  file:///repo/repo -P solaris
#pkg publisher
PUBLISHER                             TYPE     STATUS   URI
solaris                               origin   online   file:///repo/repo/
#pkg update