<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    貝貝爸爸的程序人生

    關注Seam、BPM
    posts - 23, comments - 10, trackbacks - 0, articles - 32
      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

    2011年5月27日

    今天興致來了,說要在家搞搞平臺的東西,nnd,竟然遇到了莫名其妙的mysql亂碼問題,其實不是mysql的問題,是jdbc數據源的鏈接沒有指明字符集的問題,記下來備用:<datasource jta="false" jndi-name="java:jboss/datasources/MySqlDS" pool-name="bdp" enabled="true" use-java-context="true" use-ccm="true">
                        <connection-url>jdbc:mysql://localhost:3306/bdp-dev?useUnicode=true&amp;characterEncoding=utf8</connection-url>
                        <driver>com.mysql</driver>
                        <pool>
                            <min-pool-size>10</min-pool-size>
                            <max-pool-size>100</max-pool-size>
                            <prefill>true</prefill>
                            <use-strict-min>false</use-strict-min>
                            <flush-strategy>FailingConnectionOnly</flush-strategy>
                        </pool>
                        <security>
                            <user-name>root</user-name>
                        </security>
                        <statement>
                            <prepared-statement-cache-size>32</prepared-statement-cache-size>
                            <share-prepared-statements>true</share-prepared-statements>
                        </statement>
                    </datasource>

    posted @ 2012-05-19 01:40 貝貝爸爸 閱讀(769) | 評論 (0)編輯 收藏

    今天在處理zTree的時候,無意間遇到一個很好的插件,可以將array對象轉換為json對象,真的很好用哦,呵呵。
    var thing = {plugin: 'jquery-json', version: 2.3};

    var encoded = $.toJSON( thing );
    // '{"plugin":"jquery-json","version":2.3}'
    var name = $.evalJSON( encoded ).plugin;
    // "jquery-json"
    var version = $.evalJSON(encoded).version;
    // 2.3
    像上面那樣用就行了,很容易進行請求間的參數傳遞。
    項目地址為:http://code.google.com/p/jquery-json/

    posted @ 2012-05-10 13:45 貝貝爸爸 閱讀(1076) | 評論 (1)編輯 收藏

     cat /tmp/id_rsa.john.pub >> ~/.ssh/authorized_keys

    posted @ 2012-04-26 14:45 貝貝爸爸 閱讀(390) | 評論 (0)編輯 收藏

    nnd,今天搞了快2個小時,總是無法解決ldap支持的其他屬性返回問題,因為之前配置的是3.3.5版本,現在最新的版本是3.4.11,原來的配置竟然無法使用了,原來是因為增加服務:
    <bean id="serviceRegistryDao" class="org.jasig.cas.services.InMemoryServiceRegistryDaoImpl">
    導致無法返回principal的其他屬性到客戶端,其實象這樣配置即可:<bean id="attributeRepository"
      class="org.jasig.services.persondir.support.ldap.LdapPersonAttributeDao">
      <property name="contextSource" ref="contextSource" />
      <property name="baseDN" value="ou=users,${ldap.basePath}" />
      <property name="requireAllQueryAttributes" value="true" />
      <!--
      Attribute mapping beetween principal (key) and LDAP (value) names
      used to perform the LDAP search.  By default, multiple search criteria
      are ANDed together.  Set the queryType property to change to OR.
      
    -->
      <property name="queryAttributeMapping">
        <map>
          <entry key="username" value="uid" />
        </map>
      </property>
     
      <property name="resultAttributeMapping">
        <map>
        <!-- Mapping beetween LDAP entry attributes (key) and Principal's (value) -->
        <entry key="name" value="userName"/>
        <entry key="uid" value="userId"/>
        </map>
      </property>
    </bean>

        <bean id="serviceRegistryDao" class="org.jasig.cas.services.InMemoryServiceRegistryDaoImpl">
            <property name="registeredServices">
                <list>
                    <bean class="org.jasig.cas.services.RegisteredServiceImpl">
                        <property name="id" value="0" />
                        <property name="name" value="HTTP" />
                        <property name="description" value="Only Allows HTTP Urls" />
                        <property name="serviceId" value="http://**" />
                        <property name="evaluationOrder" value="10000001" />
                        <property name="ignoreAttributes" value="true" />
                    </bean>
                                    ………………
                            </list>
                    </property>
            </bean>
    如上所示,其中注冊的服務registeredServices
    默認是不允許返回其他屬性到客戶端的?。。。。?,真的是很坑爹啊,不過,配置一下ignoreAttributes即可,也可以指定allowedAttributes
    如下:
    <property name="allowedAttributes">
        <list>
                <value><!-- your attribute key --></value>
        </list>
    </property>

    posted @ 2012-04-25 23:12 貝貝爸爸 閱讀(1329) | 評論 (0)編輯 收藏


    cat /boot/grub2/grub.cfg |grep Fedora
    grub2-set-default "Fedora Linux, with Linux 3.1.0-5.fc16.i686"
    grub2-editenv list
    grub2-mkconfig -o /boot/grub2/grub.cfg

    posted @ 2012-04-20 08:50 貝貝爸爸 閱讀(372) | 評論 (0)編輯 收藏

    #
    contrib / completion / git-completion.bash

    #
     Source the git bash completion file
    if [ -f ~/.git-completion.bash ]; then
        source ~/.git-completion.bash
        GIT_PS1_SHOWDIRTYSTATE=true
        PS1='[\u@\h:\W $(__git_ps1 "(%s)")]$ '
    fi

    posted @ 2012-04-04 09:26 貝貝爸爸 閱讀(847) | 評論 (0)編輯 收藏

    http://www.secondpersonplural.ca/jqgriddocs/index.htm

    posted @ 2012-03-29 05:05 貝貝爸爸 閱讀(195) | 評論 (0)編輯 收藏

    http://junv.sinaapp.com/1955.html

    posted @ 2012-03-21 17:22 貝貝爸爸 閱讀(280) | 評論 (0)編輯 收藏

    http://www.navicat.com/en/download/download.html
    NAVJ-W56S-3YUU-MVHV



    posted @ 2012-03-19 17:25 貝貝爸爸 閱讀(322) | 評論 (0)編輯 收藏

    今天調試了一天,所有的步驟都正確,可最后到了web下載,卻總是404錯誤,好心zzq網友幫著一起定位和解決問題,可依然沒有找到原因,偶爾的一個google搜索,發現是因為沒有sudo啟動nginx。。。。
    真tmd扯淡了。

    posted @ 2012-03-18 20:13 貝貝爸爸 閱讀(361) | 評論 (0)編輯 收藏

    https://gist.github.com/2066974

    posted @ 2012-03-18 08:26 貝貝爸爸 閱讀(258) | 評論 (0)編輯 收藏

    系統環境
    CentOS6.2
    #step 1. download libevent https://github.com/downloads/libevent/libevent/libevent-2.0.17-stable.tar.gz
    $ ./configure
    $ make
    $ make verify   # (optional)
    $ sudo make install
    $ln -s /usr/local/lib/libevent-2.0.so.5 /usr/lib64/libevent-2.0.so.5
    #step 2. download FastDFS source package and unpack it,
    $ ./make.sh
    $ ./make.sh install
    #step 3. edit/modify the config file of tracker and storage
    #step 3.1.
    $ vim /etc/fdfs/tracker.conf
    ## base_path=??
    ## reserved_storage_space = 1GB
    #step 3.2
    $ vim /etc/fdfs/storage.conf
    ## base_path=/home/yuan/fastdfs/storage
    ## path(disk or mount point) count, default value is 1
    ## store_path_count=1
    ## store_path#, based 0, if store_path0 not exists, it's value is base_path
    ## the paths must be exist
    ## store_path0=/home/yuan/fastdfs0
    ## tracker_server=host:port
    #step 4 cp the start shell into /etc/init.d
    $ cd FastDFS
    $ cp init.d/fdfs_trackerd /etc/init.d
    $ cp init.d/fdfs_storaged /etc/init.d
    #step 5 mkdir the trackerd base path and storaged base path
    $ mkdir /home/yuan/fastdfs
    $ mkdir /home/yuan/fastdfs0
    #step 6 start trackerd service
    $/sbin/service fdfs_trackerd start
    ###$/sbin/service fdfs_trackerd status
    ###$fdfs_trackerd (pid 11441) is running...
    #step 7 start storaged service
    $/sbin/service fdfs_storaged start
    ###$/sbin/service fdfs_storaged status
    ###$fdfs_storaged (pid 11553) is running...
    #step 8. run test program
    #step 8.1. vim /etc/fdfs/client.conf
    ###base_path=/home/yuan/fastdfs
    ###tracker_server=192.168.0.197:22122
    #step 8.2 run test program
    $/usr/local/bin/fdfs_test /etc/fdfs/client.conf upload /usr/include/stdlib.h
    #step 9 monitor fdfs
    $/usr/local/bin/fdfs_monitor /etc/fdfs/client.conf

    posted @ 2012-03-17 16:38 貝貝爸爸 閱讀(764) | 評論 (0)編輯 收藏

    可能后面會遇到同一臺服務器,安裝多個jboss實例的問題,那顯然的問題可能就是端口沖突問題,怎么辦?
    1、修改各個配置文件的端口配置
    2、最簡單的方法是,啟動是指明端口綁定步長,例如:-Djboss.socket.binding.port-offset=100

    posted @ 2012-03-04 20:40 貝貝爸爸 閱讀(463) | 評論 (0)編輯 收藏

    mvn deploy:deploy-file -Dfile=target/web-3.1.0-SNAPSHOT-api.jar -Durl=http://repo.yongtai.com.cn/nexus/content/repositories/snapshots/ -DrepositoryId=nexus-snapshots -DpomFile=pom.xml -Dpackaging=jar -Dclassifier=api

    posted @ 2012-02-22 12:02 貝貝爸爸 閱讀(224) | 評論 (0)編輯 收藏

    今天又在centos下折騰呢,呵呵,不過這次的環境是mac下安裝centos的虛擬機,mac環境和linux環境還是很大區別,至少無法安裝我想要的FastDFS環境,著實有點無法接受,所以只能安裝虛擬機了。
    ssh centos后,主要安裝遇到了如下問題:
    1、gcc-c++沒有安裝,會導致安裝pcre的時候,報c++編譯器沒找到,直接安裝:yum install gcc-c++即可
    2、zlib包無法找到,安裝:yum install zlib-devel即可
    3、error while loading shared libraries: libpcre.so.1:[root@bogon nginx-1.0.12]# ldd $(which /usr/local/nginx/sbin/nginx)
        linux-vdso.so.1 =>  (0x00007fff7e9db000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fe4629d0000)
        libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007fe462799000)
        libpcre.so.1 => not found//確實沒找到
        libz.so.1 => /lib64/libz.so.1 (0x00007fe462582000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fe4621e1000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fe462bfa000)
        libfreebl3.so => /lib64/libfreebl3.so (0x00007fe461f7e000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007fe461d7a000)
    [root@bogon nginx-1.0.12]# cd /lib64/

    [root@bogon lib64]# ln -s libpcre.so.0.0.1 libpcre.so.1
    [root@bogon lib64]# ldd $(which /usr/local/nginx/sbin/nginx)
        linux-vdso.so.1 =>  (0x00007fff4d7ff000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fb06f13e000)
        libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007fb06ef07000)
        libpcre.so.1 => /lib64/libpcre.so.1 (0x00007fb06ecda000)
        libz.so.1 => /lib64/libz.so.1 (0x00007fb06eac4000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fb06e723000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fb06f368000)
        libfreebl3.so => /lib64/libfreebl3.so (0x00007fb06e4c0000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007fb06e2bc000)

    posted @ 2012-02-19 07:49 貝貝爸爸 閱讀(2103) | 評論 (0)編輯 收藏

    這篇文章獻給天下兒童的父母。
         老農民的智慧和知識分子的尷尬:
        很多沒有上過學的老農民培養出了優秀的孩子,不少有知識、高學歷的城里人卻把孩子管出諸多毛病,甚至培養出問題孩子,為什么?老農民沒知識但有智慧,城里人有知識但沒智慧。(知識不等于智慧。)
        智慧的老農民三句話就培養出了好孩子:
        第一句話:“孩子,爸媽沒本事,你要靠自己了。”不包辦,把責任還給孩子,讓孩子擁有了責任心。
        第二句話:“孩子,做事先做人,一定不能做傷害別人的事情。”講德行,告訴孩子做人的標準。
        第三句話:“孩子,撒開手闖吧,實在不行,回家來還有口飯吃。”無私的愛,無盡的愛!
        看看一些城里人怎么把孩子教育出問題的:
        第一句話:“寶貝,你 好好學習就行了,其他的事情爸爸媽媽來辦!”剝奪了孩子負責任的權利,培養出了沒有責任心的孩子。
        第二句話:“寶貝,出去不能吃虧,別人打你一定要還手!”基本的做人準則都沒有教對,可能培養出“缺德”的孩子。
        第三句話:“我告訴你,你要是再不好好學習,長大沒飯吃別來找我!”有條件的愛,根本不是真愛。
        只要擁有智慧,每一位家長都能把孩子培養成才,而智慧與知識和學歷并不相關!

    posted @ 2011-08-06 22:47 貝貝爸爸 閱讀(271) | 評論 (0)編輯 收藏

    原文A successful Git branching model
    In this post I present the development model that I’ve introduced for all of my projects (both at work and private) about a year ago, and which has turned out to be very successful. I’ve been meaning to write about it for a while now, but I’ve never really found the time to do so thoroughly, until now. I won’t talk about any of the projects’ details, merely about the branching strategy and release management.
    這篇文章,將介紹所有一年前我工作中或者個人項目的開發模型,這個模型已經被證明是十分有用的(successfull)。我老早就想寫一些關于這個模型的文章,但是總是抽不出時間。在這篇文章中,我將不會介紹項目的詳細情況,僅僅對分支的策略和發布管理作一個介紹。

    It focuses around Git as the tool for the versioning of all of our source code.
    我們將圍繞這使用Git作為所有項目源碼的版本控制工具。
    • 為何選擇GIT?
    For a thorough discussion on the pros and cons of Git compared to centralized source code control systems, see the web. There are plenty of flame wars going on there. As a developer, I prefer Git above all other tools around today. Git really changed the way developers think of merging and branching. From the classic CVS/Subversion world I came from, merging/branching has always been considered a bit scary (“beware of merge conflicts, they bite you!”) and something you only do every once in a while.
    關于Git作為集中的源碼控制系統的優缺點,可以查看一下鏈接,關于這個話題,有激烈的爭論。作為一個開發者,與其他版本控制工具相比,我更喜歡Git,Git真正的改變了開發者關于合并和分支的思考(think)。我曾經也用過CVS、svn,分支和合并,真的很讓人頭疼(合并時產生的沖突),因此,有時你每次只能做一會工作(個人理解:因為svn這種版本控制庫只有一個服務倉庫,涉及公共資源,只能鎖定編輯)

    But with Git, these actions are extremely cheap and simple, and they are considered one of the core parts of your daily workflow, really. For example, in CVS/Subversion books, branching and merging is first discussed in the later chapters (for advanced users), while in every Git book, it’s already covered in chapter 3 (basics).
    但是對于Git來說,做這樣的工作(分支、合并),太簡單!它真的可以作為你日常工作流程中最核心的部分。例如,在有關CVS/svn的書籍中,分支和合并要放到最后一章才會闡述(針對高級用戶),然后在Git相關的書籍中,首先就先跟你闡述分支和合并(第3章)。

    Enough about the tools, let’s head onto the development model. The model that I’m going to present here is essentially no more than a set of procedures that every team member has to follow in order to come to a managed software development process.
    關于這個工具的介紹,我們不再贅述,現在我們回到開發模式的話題上來。這個模型,基本上和每個開發團隊管理軟件開發流程是類似的。
    • 分布而集中
    The repository setup that we use and that works well with this branching model, is that with a central “truth” repo. Note that this repo is only considered to be the central one (since Git is a DVCS, there is no such thing as a central repo at a technical level). We will refer to this repo as origin, since this name is familiar to all Git users.
    我們使用這個分支模型很好工作的倉庫,是真正意義上的中央倉庫。這個倉庫是唯一的中央倉庫(因為Git本身就是分布式版本控制系統DVCS,所以這沒有技術問題)。我們稱這樣一個中央倉庫為origin,所有Git用戶都知道origin這個名稱。
    Each developer pulls and pushes to origin. But besides the centralized push-pull relationships, each developer may also pull changes from other peers to form sub teams. For example, this might be useful to work together with two or more developers on a big new feature, before pushing the work in progress to origin prematurely. In the figure above, there are subteams of Alice and Bob, Alice and David, and Clair and David.
    每個開發者,都可以從origin獲得(pull)資源,同時也能推送(push)到origin。除此之外,每個開發者可以從其他開發者那里獲得資源,以此組建自己的一個小組。例如,當我們要開發一個大的新功能時,我們將和其他人一起協作,在提交到中央倉庫origin之前,我們需要小組內部能夠互相協作,這將是十分有用的。上圖中,Alice和Bob是一個小組,同時Alice和David是一個小組,Clair和David又是一個小組。
    Technically, this means nothing more than that Alice has defined a Git remote, named bob, pointing to Bob’s repository, and vice versa.
    從技術實現上講,這無非是在Alice的項目里,定義了一個指向Bot的遠程鏈接而已(git remote add bob git@bobserver bob.git),反之也是一樣,如此簡單??!
    • 主要的分支
    At the core, the development model is greatly inspired by existing models out there. The central repo holds two main branches with an infinite lifetime:
    中央倉庫有2個主要的分支,這些分支將一直存在:
      • master
      • develop
    The master branch at origin should be familiar to every Git user. Parallel to the master branch, another branch exists called develop.
    中央倉庫的master分支已經為所有Git用戶熟知,與master分支并行的另外一個分支,我們稱之為develop。
    We consider origin/master to be the main branch where the source code of HEAD always reflects a production-ready state.
    我們稱origin/master為主要分支,因為分支的HEAD指向的源碼總是反映了一個可以發布的產品狀態(production-ready)。

    We consider origin/develop to be the main branch where the source code of HEAD always reflects a state with the latest delivered development changes for the next release. Some would call this the “integration branch”. This is where any automatic nightly builds are built from.
    我們稱origin/develop為主要分支,因為分支的HEAD指向的源碼,總是反映了下次發布前最新提交的開發代碼。有些人稱之為“集成分支”(integration barnch),因為我們的每晚自動構建都是基于此分支進行的。(例如hudson,可以做自動構建工作)。
    When the source code in the develop branch reaches a stable point and is ready to be released, all of the changes should be merged back into master somehow and then tagged with a release number. How this is done in detail will be discussed further on.
    當develop分支的源碼穩定并且準備發布,所有的改變應該合并(merge)到master分支,同時做一個發布版本的標簽(tag),我們將在后面討論這個細節。
    Therefore, each time when changes are merged back into master, this is a new production release by definition. We tend to be very strict at this, so that theoretically, we could use a Git hook script to automatically build and roll-out our software to our production servers everytime there was a commit on master.
    因此,當每一次將所有更改合并回master時,將會產生一個新的可以發布的產品狀態。我們往往對于這個操作的控制是比較嚴格的,每當往master分支提交時,我們可以使用Git的hook來自動構建和轉出到產品服務器上。
    • 輔助分支

    posted @ 2011-07-06 12:34 貝貝爸爸 閱讀(535) | 評論 (0)編輯 收藏

    首先,需要配置mail-service.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- $Id: mail-service.xml 62350 2007-04-15 16:50:12Z dimitris@jboss.org $ -->
    <server>

      
    <!-- ==================================================================== -->
      
    <!-- Mail Connection Factory                                              -->
      
    <!-- ==================================================================== -->

      
    <mbean code="org.jboss.mail.MailService"
             name
    ="jboss:service=Mail">
        
    <attribute name="JNDIName">java:/Mail</attribute>
        
    <attribute name="User">bpm</attribute>
        
    <attribute name="Password">*****</attribute>
        
    <attribute name="Configuration">
          
    <!-- A test configuration -->
          
    <configuration>
            
    <!-- Change to your mail server prototocol -->
            
    <property name="mail.store.protocol" value="pop3"/>
            
    <property name="mail.transport.protocol" value="smtp"/>

            
    <!-- Change to the user who will receive mail  -->
            
    <property name="mail.user" value="bpm"/>
            
    <property name="mail.smtp.auth" value="true"/>

            
    <!-- Change to the mail server  -->
            
    <property name="mail.pop3.host" value="**pop3服務器地址**"/>

            
    <!-- Change to the SMTP gateway server -->
            
    <property name="mail.smtp.host" value="***smtp服務器地址***"/>
            
            
    <!-- The mail server port -->
            
    <property name="mail.smtp.port" value="25"/>
            
            
    <!-- Change to the address mail will be from  -->
            
    <property name="mail.from" value="bpm@eontime.com.cn"/>

            
    <!-- Enable debugging output from the javamail classes -->
            
    <property name="mail.debug" value="false"/>
          
    </configuration>
        
    </attribute>
        
    <depends>jboss:service=Naming</depends>
      
    </mbean>

    </server>

    其次新建一個jsp頁面mail2.jsp,作為測試
    <%@page contentType="text/html"%>
    <%@ page import="javax.mail.*,javax.mail.internet.*, javax.activation.*, javax.naming.InitialContext" %> 
    <h3>Test JbsssMail DB</h3> 
    <%
    String toAddress
    =request.getParameter("MailTo");
    String fromAddress
    =request.getParameter("MailFrom");
    String subject
    =request.getParameter("MailSubject");
    String content
    =request.getParameter("MailContent");
    InitialContext ctx 
    = new InitialContext(); 
    Session sessions 
    = (Session) ctx.lookup("java:/Mail");
    if(toAddress!=null &&!toAddress.equals("")){ 
    try{
     MimeMessage msg 
    = new MimeMessage(sessions);
     msg.setFrom(
    new InternetAddress(fromAddress));
     msg.setRecipients(javax.mail.Message.RecipientType.TO,toAddress);
     msg.setSubject(subject);
     msg.setSentDate(
    new java.util.Date());
     Multipart multipt 
    = new MimeMultipart();
     MimeBodyPart msgbody 
    = new MimeBodyPart();
     msgbody.setContent(content,
    "text/plain");
     multipt.addBodyPart(msgbody);
     msg.setContent(multipt);
     Transport.send(msg);
     System.out.println(
    "SendMail OK!");
    }
    catch(MessagingException e)
    {
     e.printStackTrace();
    }
    }
    %> 
    <HTML>
    <BODY BGCOLOR="white">
    <form METHOD="POST" ACTION="mail2.jsp">
     
    <table CELLSPACING="0" CELLPADDING="3" BORDER="1" WIDTH="474">
        
    <tr>
          
    <td width="150"><div align="left">From :</small></td>
          
    <td width="324"><input TYPE="TEXT" name="MailFrom" value=""></td>
        
    </tr>
        
    <tr>
          
    <td width="150"><div align="left">To :</small></td>
          
    <td width="324"><input TYPE="TEXT" name="MailTo" value=""></td>
        
    </tr>
        
    <tr>
          
    <td width="150"><div align="left">Subject :</small></td>
          
    <td width="324"><input TYPE="TEXT" name="MailSubject" value=""></td>
        
    </tr>
        
    <tr>
          
    <td width="150"><div align="left">Content :</small></td>
          
    <td width="324"><TEXTAREA cols=50 name="MailContent" rows=8></TEXTAREA></td>
        
    </tr>
        
    <tr>
          
    <td></td>
          
    <td colspan="2" width="474"><input TYPE="Submit"></td>
        
    </tr>
     
    </table>
    </form>
    </BODY>
    </HTML>

    posted @ 2011-06-25 22:44 貝貝爸爸 閱讀(469) | 評論 (0)編輯 收藏

    git的分支處理模型,真的很爽,但關于如何對git的分支進行管理?最近有網友給我提到了git flow,呵呵,按照我的理解,應該是git的一個最佳實踐吧,原文A successful Git branching model對git的分支模型作了闡述,以下我對該文章進行自己的翻譯和理解,聊以日后學習,首先先看一下下面這個圖:
    git flow將git的分支主要分為2類:主要分支和支持分支
    • 主要分支
      • master:永遠處在產品可以發布(production ready)狀態
      • develop: 當前最新的開發狀態
    • 支持分支
      • Feature branches: 開發新的功能,從develop分支出來,完成開發、測試后,merge回develop。
      • Release branches: 準備發布版本的分支,該分支只修復bug,完成后,merge回develop和master。
      • Hotfix branches: 來不及等待下個版本的發布,但又要馬上修復bug的情況,從master分支出來,完成開發、測試后,merge回master和develop。

    posted @ 2011-05-31 09:44 貝貝爸爸 閱讀(678) | 評論 (1)編輯 收藏

    由于最近在做的oryx-editor使用的是posgresql8.3.15,不能自動的使用yum install安裝了,因為現在源里面的版本是8.1,無法滿足項目要求,特安裝了postgresql8.3.15,只能源碼編譯安裝了。
    ----------------------------

    1、下載postgresql最新版:http://www.postgresql.org/ftp/source/

    wget http://wwwmaster.postgresql.org/redir/391/f/source/v8.3.15/postgresql-8.3.15.tar.gz

    2、解壓文件:
    tar zxvf postgresql-8.3.7.tar.gz
    cd postgresql-8.3.7

    3、配置:
    ./configure --prefix=/usr/local/pgsql

    4、編譯:
    make

    5、安裝:
    make install

    6、創建用戶組和用戶:
    groupadd postgres
    useradd -g postgres postgres

    7、創建數據庫庫文件存儲目錄、給postgres賦予權限:
    mkdir /usr/local/pgsql/data
    cd /usr/local/pgsql
    chown postgres.postgres data

    8、初始化數據庫目錄:
    切換用戶
       su - postgresql

    初始化數據
       /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data

    啟動數據庫
       /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data

    9、配置監聽地址和端口:
    vi /usr/local/pgsql/data/postgresql.conf
    取消以下兩行的注釋
       listen_addresses = '*'

       port = 5432

    10、允許遠程連接:
    vi /usr/local/pgsql/data/pg_hba.conf
    添加
       host all all 192.168.1.0/24 trust 

       每項的具體意思在配置文件中有詳細說明
    配置iptables讓遠程主機能訪問:
       vi /etc/sysconfig
       添加
          -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5432 -j ACCEPT
       service iptables restart

    11、讓postgresql數據庫隨系統啟動而啟動:
    將啟動腳本拷貝到/etc/init.d/目錄下,具體執行如下命令:
    cd /etc/rc.d/init.d
    cp (第一步解壓的安裝文件目錄)/postgresql-8.3.7/contrib/start-scripts/linux postgresql
    chmod +x postgresql
    vi postgresql
       prefix=/usr/local/pgsql
       PGDATA="/usr/local/pgsql/data"
       PGUSER=postgres
       PGLOG="/var/log/pgsql.log"

       chkconfig --add postgresql
    啟動數據庫:
       service postgresql start

    配置完畢 。

    posted @ 2011-05-27 23:00 貝貝爸爸 閱讀(660) | 評論 (0)編輯 收藏

    主站蜘蛛池模板: 搡女人免费视频大全| 亚洲性日韩精品一区二区三区 | 免费av欧美国产在钱| 在线亚洲精品视频| 亚洲A∨无码无在线观看| 99在线视频免费观看视频| 美女视频黄a视频全免费网站一区 美女视频黄a视频全免费网站色 | 精选影视免费在线 | 91亚洲自偷手机在线观看| 午夜无遮挡羞羞漫画免费| 黄色网址免费在线观看| 亚洲大尺码专区影院| 亚洲中文字幕视频国产| 午夜福利不卡片在线播放免费| 日韩在线视精品在亚洲| 亚洲综合色丁香麻豆| 亚洲欧洲精品成人久久曰影片| 曰批全过程免费视频网址 | 好爽…又高潮了免费毛片| 两个人看的www免费视频| 亚洲精品无码专区| 亚洲av女电影网| 免费在线黄色网址| 精品久久久久成人码免费动漫 | 亚洲AV无码一区二区大桥未久 | 老司机午夜精品视频在线观看免费 | 亚洲熟妇AV乱码在线观看| 亚洲免费人成在线视频观看| 影音先锋在线免费观看| 免费A级毛片无码视频| 一区二区免费电影| 亚洲日韩国产二区无码| 久久亚洲AV无码精品色午夜麻豆 | 国产男女猛烈无遮挡免费网站| 先锋影音资源片午夜在线观看视频免费播放 | 亚洲色成人四虎在线观看| 久久精品亚洲综合专区| 亚洲日韩精品无码专区网站| 成熟女人特级毛片www免费| 四虎国产精品永久免费网址 | 亚洲av中文无码|