- 浏览: 450739 次
- 性别:
- 来自: 上海
-
文章分类
最新评论
-
Luob.:
楼主 你这个问题怎么搞定的
奇异的 Spring WebApplicationContext 自动关闭 -
u013202238:
...
PDF和Java技术(PDFBox) -
u013202238:
...
PDF和Java技术(PDFBox) -
yuan1225:
您好请问 Discuz论坛的系统设置在哪里,登陆后台后没有 ...
Discuz!论坛通行证与JSP网站的整合 -
美妙人生:
,好,太好了,只是还是不太理解!
Discuz!论坛通行证与JSP网站的整合
Contents[hide] |
[edit] Introduction
If you've ever had some sort of programming project where you didn't want to turn your code into a disorganized soup of text files, you probably have had the idea of setting up a CVS server. While I will not explain what CVS "is" (you can read all about it here), what I will try to do here is tell you how to set up a CVS server from start to finish. A more modern orientated program which does virtually the same is Subversion also known as svn. For the gentoo-wiki enty click here
Remark, that this HOWTO describes how to access a CVS using the pserver protocol. This protocol is insecure, as it transfers passwords in plain text. A more secure approach is to access CVS via SSH with public key authorization.
[edit] Installation
# USE="server" emerge cvs # emerge cvsd
That took care of the installation part. You have a nice and operable CVS client ("cvs"), and the CVS daemon that will be running on your system in order to make it a functional CVS server. CVS must be built with the "server" USE flag or else CVSD will not work properly. Whenever someone attempts to connect, you will get this error:
cvs [login aborted]: unrecognized auth response from <host> cvs: unrecognized option `--allow-root=/root'
[edit] Create a CVS Jailroot
Now, you have to decide where you would like to place your CVS jailroot. This jailroot is a directory where the CVS repository will be held, and other things like configuration, (encrypted) CVS user passwords, etc. A good location to put your jailroot in is /var/lib/cvsd, which hereafter will be the meaning of "jailroot" in this document.
Let us set it up the CVS jailroot:
# mkdir /var/lib/cvsd # cvs -d /var/lib/cvsd/root init # cvsd-buildroot /var/lib/cvsd # cd /var/lib/cvsd # mkdir -p var/lock
Now our CVS jailroot is done. Our next task is to configure cvsd to run properly, and here is how it's done:
Fire up your favourite editor (I like nano, very Gentoo-ish. And yes, still as root!):
# nano -w /etc/cvsd/cvsd.conf
Here is what you have to look for in the config and modify accordingly so the lines you modify look like this (Note - just modify the lines that look like the ones in the box to say exactly what they say in the box; do not make your whole file look like that! Also, make sure that the whole file ends in a newline):
File: /etc/cvsd/cvsd.conf |
RootJail /var/lib/cvsd Uid cvsd Gid cvsd Listen * 2401 # or whatever port you'd like it to listen on, up to you Repos /root |
When you're done modifying, press CTRL+O, then <ENTER>, and finally CTRL+X to quit nano.
[edit] Add Users
There is one more thing you need to set up - users. CVS obviously has to have users, otherwise you will never know who is responsible for the various source files! So here it is:
# cvsd-passwd /var/lib/cvsd/root YOUR_USER_HERE
You will be prompted for a password, where I'm sure you know what to do. If you are extra-clever, you might realize that making the user name "anonymous" and not entering a password (just pressing ENTER will do) will create an anonymous CVS user. Woohoo!
- NOTE: To create a user that has only read rights follow the next steps:
# touch /var/lib/cvsd/root/CVSROOT/readers # chown cvsd:cvsd /var/lib/cvsd/root/CVSROOT/readers # nano /var/lib/cvsd/root/CVSROOT/readers
Add the users you just created to this file, each user seperated by a new line. Do not forget to put a new line after the last user. This setting only allows readers to the repository, to allow writers, create a file writers on same path.
- If a user is in the readers file the user is only allowed to read, regardless of whether or not they are in the writers file. If the user is in the writers file and not the readers file they can both read and write.
Example:
File: /var/lib/cvsd/root/CVSROOT/readers |
guest anonymous john |
[edit] Apply Correct Permissions
Once you're done setting up your various users, there are three more things to do:
- Change the permissions/ownership of your cvs directory
- Restart cvsd
- Add cvsd to your runlevel (if you want to)
1. Changing permissions and ownership. As root:
# cd /var/lib # chown -R cvsd:cvsd cvsd # chmod -R 775 /var/lib/cvsd/root
2. (Re)starting cvsd, your CVS daemon. As root:
# /etc/init.d/cvsd restart
3. If you'd like to, we can set it up so your CVS daemon starts up whenever your system does:
# rc-update add cvsd default
And now you are done. Read up on how to use the CVS client ("man cvs"), and keep your code organized.
- Kirill Zorin.
[edit] Quick local test
[edit] Common method
1. Set your CVSROOT environment var (:pserver:<username>@<host>:/cvsdirectory)
# CVSROOT=:pserver:YOUR_USER_HERE:PASSWORD@localhost:/root; export CVSROOT
2. Login
# cvs login
3. Import/Checkout something (See below)
4. Logout
# cvs logout
[edit] Import/Checkout something
1. (Optional) Import your first project into cvs
# cvs import -m 'Example01 project' example01 vendor start
Note:
Make sure your cvs user name is in /var/lib/cvsd/root/CVSROOT/writers and not in "CVSROOT/readers".
example01 is the name of the project,vendor is the vendor tag (can be anything) start is the release tag (can be anything which identifies the release)
all 3 fields must be included
Also note that this command will import everything in your current working directory, so if you wanted to import all the files in ~/example1/, you should cd into that directory, then execute the cvs import command. When you check out the files later, cvs will create a directory with the same name as the project to keep things neat.
2. (Optional) Checkout your first project from cvs
# cvs -d myExmp01 co -A example01
[edit] Tips and Tricks
Delete all CVS Folders:
# find ./* -type d | grep CVS | sed "s/^/rm -rf /" | sh
This variation will handle properly folders with spaces in their names and will handle hidden folders.
find -type d | grep CVS | sed "s/^/rm -rf \"/"|sed "s/$/\"/" | sh
[edit] Finally
Don't forget to route the port 2401 into your firewall
[edit] Potential Errors
The cvsd-1.0.2 build has a problem running the cvsd-buildroot command in which it does not copy all the libraries that are needed for the server to run correctly. If you are experiencing this error
cvs [login aborted]: reading from server: Connection reset by peer
Then use the following commands to fix this problem.
# cp /lib/ld-* /path/to/cvsdir/lib/ # cp /lib/libdl.so.2 /path/to/cvsdir/lib/ # cp /lib/ld.so.1 /path/to/cvsdir/lib/
(note: with the above setup /path/to/cvsdir/lib/ is /var/lib/cvs/lib/)
Related Bug Report: Bug 87124
Related Forum Discussion: CVSD help
[edit] SSH Mode
[edit] Access on a local server
You can very easily use cvsd in the more secure ssh mode if you already have sshd set up. You may want to skip the step where you create pserver users:
# cvsd-passwd /var/lib/cvsd/root YOUR_USER_HERE
If you already did that, you can reverse it by simply editing the file CVSROOT/passwd so that it is blank. This disables the pserver mode.
To give users on your server access to the cvs repository, issue the following commands:
# chmod -R 775 /var/lib/cvsd/root # gpasswd -a USERNAME cvsd
Repeat the second line for each user who needs access to cvs. Now any user that can access your server via ssh who also belongs to the cvsd group can access the cvs repository by setting CVSROOT as follows:
# CVSROOT=:ext:YOUR_USER_HERE@YOUR_HOST_NAME:/var/lib/cvsd/root; export CVSROOT
If your client is not running a recent Gentoo version, you may also have to set CVS_RSH as follows:
# CVS_RSH=ssh;export CVS_RSH
[edit] Access through a gateway
In theory you can define CVS_RSH to be any valid command which gives you a remote command interpreter. Namely as long as this scheme works, then CVS can use this particular CVS_RSH as a means to perform the neccesary tasks:
# $CVS_RSH YOUR_USER_HERE@YOUR_HOST_NAME SOME_COMMAND
Now suppose your cvs server is on a machine called INTERNAL, and you have to login to an ssh gateway machine called GATEWAY first. Then you can define CVS_RSH:
# export CVS_RSH=gateway_ssh
Now fireup your favorite editor, put these lines in your gateway_ssh file:
# #!/bin/sh ssh -t user@gateway ssh "$@"
Now let's save it in a directory which is in your $PATH, and conduct a basic test:
# gateway_ssh YOUR_USER_HERE@INTERNAL ls
You should see a list of files on INTERNAL.
Now edit your CVSROOT variable:
# export CVSROOT=":ext:INTERNAL:/var/lib/cvsd/root"
And you should be able to use cvs from your home computer now!
[edit] Combining pserver and SSH Mode
It is possible to use pserver mode and ssh mode at the same time. Just setup your server to use pserver. Create all pserver users with
# cvsd-passwd /var/lib/cvsd/root YOUR_USER_HERE
and setup ssh like above:
# chmod -R 775 /var/lib/cvsd/root # gpasswd -a USERNAME cvsd
Please note that the path to the repository is different for pserver and ssh.
# CVSROOT=:pserver:YOUR_USER_HERE@YOUR_HOST_NAME:/root; export CVSROOT #pserver
# CVSROOT=:ext:YOUR_USER_HERE@YOUR_HOST_NAME:/var/lib/cvsd/root; export CVSROOT #ssh
发表评论
-
jquery 操作checkbox的例子(全选,反选,获取选取值)
2009-05-21 17:17 5322jquery 操作checkbox的例子(全选,反选,获取选取 ... -
struts2 捕获404错误
2008-11-28 22:04 5274当访问一个不存在页面时,一般显示404错误,这是一个很不友好的 ... -
mysql alter 语句用法,添加、修改、删除字段等
2008-11-06 12:15 1628mysql alter 语句用法,添加、修改、删除字段等 / ... -
mysql数据库自动定期备份的脚本
2008-07-30 15:51 2113说明: 保留每天备份的数据是件不太现实的事,做好的做 ... -
CVS的日常使用
2008-07-22 16:50 1504一个项目的首次导入 cvs ... -
Advanced SiteMesh
2008-07-14 11:40 1199假设你打算结合多种技 ... -
Discuz! 数据库结构参考(下)
2008-06-30 09:40 3170Discuz! 数据库结构参考 ... -
Discuz! 数据库结构参考(上)
2008-06-30 09:39 2077Discuz! 数据库结构参考(上) cdb_access-- ... -
mysql 外鍵約束
2008-06-24 10:43 37611. 什么是参照完整性? ... -
mysql4.1以上版本连接时出现Client does not support authentic
2008-06-18 14:05 1295mysql4.1以上版本连接时出现Client does no ... -
Linux下两个不同版本Mysql的安装实战
2008-06-17 12:42 2840http://www.iteye.com/topic/2039 ... -
查看文本文件的编码格式
2008-06-13 17:16 3871Ubuntu enca命令可以用来查看文件的编码格式 安装 ... -
redhat9上用rpm包方式升级gcc3.2到gcc3.4
2008-06-11 09:50 4360刚刚安了个redhat9,发现gcc是3.2版本的,看到有文章 ... -
PHP+apache+mysql编程中乱码问题的解决
2008-06-10 17:20 2274作者: 乐道 2007-11 ... -
修改firefox 3的语言界面
2008-05-14 10:20 4791进入http://releases.mozilla.org/p ... -
Apache虚拟主机设置
2008-04-16 16:50 1905简介:这里说的虚拟主 ... -
Discuz!论坛通行证与JSP网站的整合
2008-04-11 16:43 5858最近做有关JSP与DISCUZ整合,搞了好久,还是搞不定,后来 ... -
PDF和Java技术(PDFBox)
2008-04-10 17:06 14839原文标题:Making PDFs Port ... -
Discuz 通行证的制作方法和详细说明
2008-04-09 17:42 2393通行证是个大题目,说白了也就是如何维护客户的会话,在php中所 ... -
使用Lucene2.3构建搜索引擎
2008-04-03 20:06 2664Lucene不是一个完整的全文索引应用,而是是一个用Java写 ...
相关推荐
How to configure syntax highlighting to highlight different file types automatically Project Settings Advanced Project Features - Using the UltraEdit/UEStudio project settings dialog Scripting ...
It contains information about where to fetch the source, what patches to apply and how, and how the package should be installed on the system. This allows automated tools to fetch, build and install ...
4.4. How to write your own keymap table 5. Using Bochs 5.1. Command line arguments 5.2. Search order for the configuration file 5.3. The configuration interface 'textconfig' 5.3.1. The start menu ...
consultants the possiblity to show how easy it would be to gain unauthorized access from remote to a system. THIS TOOL IS FOR LEGAL PURPOSES ONLY! There are already several login hacker tools ...
Rocky Linux 8.10内核包
内容概要:本文档详细介绍了如何在Simulink中设计一个满足特定规格的音频带ADC(模数转换器)。首先选择了三阶单环多位量化Σ-Δ调制器作为设计方案,因为这种结构能在音频带宽内提供高噪声整形效果,并且多位量化可以降低量化噪声。接着,文档展示了具体的Simulink建模步骤,包括创建模型、添加各个组件如积分器、量化器、DAC反馈以及连接它们。此外,还进行了参数设计与计算,特别是过采样率和信噪比的估算,并引入了动态元件匹配技术来减少DAC的非线性误差。性能验证部分则通过理想和非理想的仿真实验评估了系统的稳定性和各项指标,最终证明所设计的ADC能够达到预期的技术标准。 适用人群:电子工程专业学生、从事数据转换器研究或开发的技术人员。 使用场景及目标:适用于希望深入了解Σ-Δ调制器的工作原理及其在音频带ADC应用中的具体实现方法的人群。目标是掌握如何利用MATLAB/Simulink工具进行复杂电路的设计与仿真。 其他说明:文中提供了详细的Matlab代码片段用于指导读者完成整个设计流程,同时附带了一些辅助函数帮助分析仿真结果。
内容概要:该题库专为研究生入学考试计算机组成原理科目设计,涵盖名校考研真题、经典教材课后习题、章节题库和模拟试题四大核心模块。名校考研真题精选多所知名高校的计算机组成原理科目及计算机联考真题,并提供详尽解析,帮助考生把握考研命题趋势与难度。经典教材课后习题包括白中英《计算机组成原理》(第5版)和唐朔飞《计算机组成原理》(第2版)的全部课后习题解答,这两部教材被众多名校列为考研指定参考书目。章节题库精选代表性考题,注重基础知识与重难点内容,帮助考生全面掌握考试大纲要求的知识点。模拟试题依据历年考研真题命题规律和热门考点,精心编制两套全真模拟试题,并附标准答案,帮助考生检验学习成果,评估应试能力。 适用人群:计划参加研究生入学考试并报考计算机组成原理科目的考生,尤其是需要系统复习和强化训练的学生。 使用场景及目标:①通过研读名校考研真题,考生可以准确把握考研命题趋势与难度,有效评估复习成效;②通过经典教材课后习题的练习,考生可以巩固基础知识,掌握解题技巧;③通过章节题库的系统练习,考生可以全面掌握考试大纲要求的各个知识点,为备考打下坚实基础;④通过模拟试题的测试,考生可以检验学习成果,评估应试能力,为正式考试做好充分准备。 其他说明:该题库不仅提供详细的题目解析,还涵盖了计算机组成原理的各个方面,包括计算机系统概述、数据表示与运算、存储器分层、指令系统、中央处理器、总线系统和输入输出系统等。考生在使用过程中应结合理论学习与实践操作,注重理解与应用,以提高应试能力和专业知识水平。
__UNI__DB9970A__20250328141034.apk.1
rust for minio
国网台区终端最新规范
资源内项目源码是来自个人的毕业设计,代码都测试ok,包含源码、数据集、可视化页面和部署说明,可产生核心指标曲线图、混淆矩阵、F1分数曲线、精确率-召回率曲线、验证集预测结果、标签分布图。都是运行成功后才上传资源,毕设答辩评审绝对信服的保底85分以上,放心下载使用,拿来就能用。包含源码、数据集、可视化页面和部署说明一站式服务,拿来就能用的绝对好资源!!! 项目备注 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用! 2、本项目适合计算机相关专业(如计科、人工智能、通信工程、自动化、电子信息等)的在校学生、老师或者企业员工下载学习,也适合小白学习进阶,当然也可作为毕设项目、课程设计、大作业、项目初期立项演示等。 3、如果基础还行,也可在此代码基础上进行修改,以实现其他功能,也可用于毕设、课设、作业等。 下载后请首先打开README.txt文件,仅供学习参考, 切勿用于商业用途。
一个简单的机器学习代码示例,使用的是经典的鸢尾花(Iris)数据集,通过 Scikit-learn 库实现了一个简单的分类模型。这个代码可以帮助你入门机器学习中的分类任务。
pyqt离线包,pyqt-tools离线包
资源内项目源码是来自个人的毕业设计,代码都测试ok,包含源码、数据集、可视化页面和部署说明,可产生核心指标曲线图、混淆矩阵、F1分数曲线、精确率-召回率曲线、验证集预测结果、标签分布图。都是运行成功后才上传资源,毕设答辩评审绝对信服的保底85分以上,放心下载使用,拿来就能用。包含源码、数据集、可视化页面和部署说明一站式服务,拿来就能用的绝对好资源!!! 项目备注 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用! 2、本项目适合计算机相关专业(如计科、人工智能、通信工程、自动化、电子信息等)的在校学生、老师或者企业员工下载学习,也适合小白学习进阶,当然也可作为毕设项目、课程设计、大作业、项目初期立项演示等。 3、如果基础还行,也可在此代码基础上进行修改,以实现其他功能,也可用于毕设、课设、作业等。 下载后请首先打开README.txt文件,仅供学习参考, 切勿用于商业用途。
SQL常用日期和时间函数整理及在sqlserver测试示例 主要包括 1.查询当前日期GETDATE 2.日期时间加减函数DATEADD 3 返回两个日期中指定的日期部分之间的差值DATEDIFF 4.日期格式转换CONVERT(VARCHAR(10),GETDATE(),120) 5.返回指定日期的年份数值 6.返回指定日期的月份数值 7.返回指定日期的天数数值
GSDML-V2.3-Turck-BL20_E_GW_EN-20160524-010300.xml
T_CPCIF 0225-2022 多聚甲醛.docx
《基于YOLOv8的智能仓储货物堆码倾斜预警系统》(包含源码、可视化界面、完整数据集、部署教程)简单部署即可运行。功能完善、操作简单,适合毕设或课程设计
蚕豆脱壳机设计.zip
台区终端电科院送检文档