最近在fedora上搭建了vxworks交叉編譯環境 ,順便 也把cvs,telnet-server也安裝了一下,爲防以後忘記還是總結一下吧。
一: cvs-server的安裝
# yum install cvs
二:cvs配置文件的設定
/etc/xinetd.d/cvspserverの設定
service cvspserver
{
disable = no
port = 2401
socket_type = stream
protocol = tcp
wait = no
user = root
passenv = PATH
server = /usr/bin/cvs
env = HOME=/var/cvs
server_args = -f --allow-root=/home/icecoolcai/cvsroot pserver
# bind = 127.0.0.1
}
上面設定完成後,重啓xinetd 守護進程
# /etc/init.d/xinetd restart 或
#
/etc/init.d/service xinetd restart (推薦)
三:創建cvs repository用戶
$ su -c '/usr/sbin/adduser cvs'
service名的確認
/etc/services 中是否存在cvspserver
$ grep cvspserver /etc/services
cvspserver 2401/tcp # CVS client/server operations
cvspserver 2401/udp # CVS client/server operations
若沒有上面兩行,則追加
四: 創建cvs repository的cvs root
$ su -c 'mkdir /home/cvsroot'
$ su -c 'chown cvs /home/cvsroot'
$ su -
$ cvs -d /home/cvsroot init
這樣/home/cvsroot就被作成了。
五:創建cvs客戶端的用戶
(創建第一個用戶時,此時。passwd文件還沒生成要用 -c參數)
$ cd /home/cvsroot/CVSROOT/
$ su -c '/usr/bin/htpasswd -c passwd user1xxx'
$ su -c '/usr/bin/htpasswd passwd user2xxx'
$ su -c '/usr/bin/htpasswd passwd user3xxx'
若要指定用戶權限,可編輯passwd文件
例:指定爲cvs權限
$ su -c 'vi passwd'
[user1]:xxxxxxx:cvs
六:系統環境變量中追加(.bash_profile)
$ export CVSROOT=:pserver:<user1xxx>@192.168.0.1:/home/cvsroot
七:導入工程到cvs repository中
$ cvs login
格式:
#cvs import -m'log message' 工程名 工程vendor名 release_tag名
cvs import -m'init project' broad_com_sdk broad_com_sdk broad_com_sdk_20111008