• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            Khan's Notebook GCC/GNU/Linux Delphi/Window Java/Anywhere

            路漫漫,長(zhǎng)修遠(yuǎn),我們不能沒有錢
            隨筆 - 173, 文章 - 0, 評(píng)論 - 257, 引用 - 0
            數(shù)據(jù)加載中……

            CVS 服務(wù)器的安裝配置以及使用 redhat9

            CVS 服務(wù)器的安裝配置以及使用 redhat9

            作者: Khan
            時(shí)間: 2006-1-9
            環(huán)境: 服務(wù)器 Redhat 9.1? ,客戶端 :window 2000 pro

            因?yàn)橛袀€(gè)項(xiàng)目要多人合作,所以選擇了cvs, 其實(shí)有其他選擇,如subversion,但是資料少所以只有使用這個(gè)
            早上9:00 - 15:00 終于配置完了服務(wù)器端和客戶端,并建立了一個(gè)倉(cāng)庫(kù)使用,就將一些安裝使用的心得歸納
            了下來

            一 CVS服務(wù)器的安裝:
            1.查看你的操作系統(tǒng)上是否安裝了CVS:
            #> rpm -qa|grep cvs

            2.建立cvs用戶組:

            #> groupadd cvs

            3.建立cvs組的cvsroot用戶和所屬的目錄:

            #> useradd cvsroot -g cvs

            4.為cvsroot用戶添加密碼:

            #> passwd cvsroot

            5.改變 /cvsroot/ 的目錄屬性:

            #> chmod –R 770 /cvsroot

            6.改變用戶登陸身份:

            #> su cvsroot

            7.開始創(chuàng)建單個(gè)項(xiàng)目:

            #> cd /home/cvsroot
            #> mkdir smscgw
            #> mkdir smgp

            8.開始建立倉(cāng)庫(kù):
            這里我建立了兩個(gè)倉(cāng)庫(kù),用以介紹用戶名,密碼的設(shè)置方法
            cvs –d /home/cvsroot/smscgw init
            cvs –d /home/cvsroot/smgp init
            #> chmod –R 770 ./smscgw/ ./smgp/

            9.建立CVS服務(wù)啟動(dòng)文件,我們使用xinetd方式:

            #> su - root 切換到root用戶身份
            #> cd /etc/xinetd.d
            #> vi cvspserver

            service cvspserver
            {
            ? disable = no
            ? flags = REUSE
            ? socket_type = stream
            ? wait = no
            ? user = root
            ? server= /usr/bin/cvs
            ? server_args= -f --allow-root=/home/cvsroot/smscgw --allow-root=/home/cvsroot/smgp pserver
            ? log_on_failure += USERID
            }

            10.加入cvs服務(wù):

            #>vi /etc/services

            cvspserver 2401/tcp #pserver cvs service
            cvspserver 2401/udp #pserver cvs service
            11。啟動(dòng)cvs服務(wù):

            #> /etc/init.d/xinetd restart

            12.檢查cvspserver服務(wù)是否已經(jīng)啟動(dòng):

            #> netstat -l |grep cvspserver
            應(yīng)該有如下結(jié)果:

            tcp 0 0 *:cvspserver *:* LISTEN


            二.CVS服務(wù)的用戶管理:
            1.創(chuàng)建可以登陸cvs服務(wù)器的用戶名和密碼:

            #> su cvsroot
            #> vi /home/cvsroot/smscgw/CVSROOT/passwd

            trotter:*****:cvsroot
            mimi:*****:cvsroot

            #>vi /home/cvsroot/smgp/CVSROOT/passwd

            trotter:*****:cvsroot
            gary:*****:cvsroot

            這兩個(gè)文件的意思是有trotter,mimi,gary三個(gè)cvs用戶,mimi擁有smscgw的使用權(quán)限,gary擁有smgp的使用權(quán)限,trotter擁有project1和project2的使用權(quán)限。登陸后的權(quán)限是cvsroot權(quán)限。
            注意:這里的cvs用戶和系統(tǒng)用戶是不同的。

            2.*****為密碼,由以下文件生成:

            #> vi /home/cvsroot/smscgw/passwd.pl

            #!/usr/bin/perl
            srand (time());
            my $randletter = "(int (rand (26)) + (int (rand (1) + .5) % 2 ? 65 : 97))";
            my $salt = sprintf ("%c%c", eval $randletter, eval $randletter);
            my $plaintext = shift;
            my $crypttext = crypt ($plaintext, $salt);
            print "${crypttext}
            ";

            #>chmod a+x ./passwd.pl

            3.如果你想生成一個(gè)密碼是"123456",則:

            #> /cvsroot/passwd.pl "123456"

            回車即可得到加密密碼,用其替換passwd文件中的*****

            4.配置倉(cāng)庫(kù)
            以smscgw倉(cāng)庫(kù)為例
            #> cvs –d /home/cvsroot/smscgw init 這個(gè)指令執(zhí)行成功的話,會(huì)產(chǎn)生/home/cvsroot/smscgw/CVSROOT這個(gè)目錄

            編輯modules模塊文件(直接在服務(wù)器上用vi編輯,也可以用cvs客戶端將CVSROOT導(dǎo)出后,本地編輯,然后提交)
            #> vi /home/cvsroot/smscgw/CVSROOT/modules

            # Three different line formats are valid:
            #?? ?key?? ?-a??? aliases...
            #?? ?key [options] directory
            #?? ?key [options] directory files...
            #
            #????? 模塊名   [options] ?
            ?????? SMSCGW??? -a???????? smscgw3

            # 其他選項(xiàng)
            # Where "options" are composed of:
            #?? ?-i prog?? ??? ?Run "prog" on "cvs commit" from top-level of module.
            #?? ?-o prog?? ??? ?Run "prog" on "cvs checkout" of module.
            #?? ?-e prog?? ??? ?Run "prog" on "cvs export" of module.
            #?? ?-t prog?? ??? ?Run "prog" on "cvs rtag" of module.
            #?? ?-u prog?? ??? ?Run "prog" on "cvs update" of module.
            #?? ?-d dir?? ??? ?Place module in directory "dir" instead of module name.
            #?? ?-l?? ??? ?Top-level directory only -- do not recurse.
            #
            # NOTE:? If you change any of the "Run" options above, you'll have to
            # release and re-checkout any working directories of these modules.
            #
            # And "directory" is a path to a directory relative to $CVSROOT.
            #
            # The "-a" option specifies an alias.? An alias is interpreted as if
            # everything on the right of the "-a" had been typed on the command line.
            #
            # You can encode a module within a module by using the special '&'
            # character to interpose another module into the current module.? This
            # can be useful for creating a module that consists of many directories
            # spread out over the entire source repository.


            三.使用

            1.將本地工程導(dǎo)入到遠(yuǎn)程倉(cāng)庫(kù)
            以windows 下的cvs客戶端為例,我使用的是TortoiseCVS 這個(gè)軟件,一個(gè)嵌入Explorer的客戶端
            在你需要導(dǎo)入到服務(wù)器的工程目錄上點(diǎn)鼠標(biāo)右鍵,選擇 cvs-->創(chuàng)建新模塊
            選擇協(xié)議,輸入帳號(hào)密碼,端口,倉(cāng)庫(kù)文件夾,模塊名
            也可以選擇在CVSROOT輸入框中輸入:pserver:username:password@ip:port/home/cvsroot/repository/smscgw
            注意目錄結(jié)構(gòu)父目錄和子目錄最好不要重名,也就是說最好不要出現(xiàn) smscgw/smscgw這樣的目錄結(jié)構(gòu)

            輸入完以后選擇 "確定"
            成功導(dǎo)入,該文件夾會(huì)有一個(gè)綠色的小標(biāo)志,進(jìn)入該目錄,鼠標(biāo)右鍵 "CVS添加",將需要導(dǎo)入的文件添加到倉(cāng)庫(kù)

            2.將遠(yuǎn)程倉(cāng)庫(kù)導(dǎo)出到本地

            在任何一個(gè)目錄下 鼠標(biāo)右鍵 CVS取出
            輸入相應(yīng)的信息, 選擇"確定"

            posted on 2006-01-12 09:53 Khan 閱讀(1021) 評(píng)論(0)  編輯 收藏 引用 所屬分類: 周邊技術(shù)

            无码国内精品久久人妻麻豆按摩 | 无码8090精品久久一区| 老司机午夜网站国内精品久久久久久久久| 久久精品国产99久久久香蕉| 伊人久久精品无码二区麻豆| 久久精品免费一区二区三区| 怡红院日本一道日本久久| 亚洲日本va午夜中文字幕久久| 热re99久久精品国99热| 办公室久久精品| 国内精品伊人久久久久AV影院| 欧美久久天天综合香蕉伊| 精品综合久久久久久97超人| 国产亚洲精久久久久久无码77777| 99国内精品久久久久久久| 色8久久人人97超碰香蕉987| 亚洲欧美成人久久综合中文网| 久久精品国产只有精品2020| 久久久久久久久无码精品亚洲日韩 | 亚洲精品国产成人99久久| 国产精品99久久久精品无码| 国产免费福利体检区久久| 精品久久久久久无码专区| 亚洲精品tv久久久久| 精品久久久久久无码免费| 久久亚洲精品中文字幕三区| 日产精品99久久久久久| 2021国产精品午夜久久| 久久这里有精品视频| 久久涩综合| 午夜精品久久久内射近拍高清| 色综合色天天久久婷婷基地| 久久er国产精品免费观看2| 国产成人久久精品一区二区三区 | 久久久久高潮综合影院| 亚洲国产综合久久天堂 | 国产午夜精品久久久久九九电影| 久久天天躁狠狠躁夜夜躁2O2O| 久久久一本精品99久久精品66| 久久久久亚洲AV成人片| 91精品国产91久久综合|