Linux Server Deployment(I)cvs and iptables
1. prepare the users and groups
>add user luohua
>passwd luohua
>vi /etc/passwd
change the id and group to 0
luohua:x:0:0::/home/luohua:/bin/bash
it is not a good way to do so. So I change the right.
>groupadd groupname
>usermod -g groupname luohua
check the user group
>groups luohua
change the relations of the directory to one person
>chown luohua:groupname software -R
>chown luohua:groupname tmp -R
>chown luohua:groupname tools -R
change the relations of the directory to a group
>chgrp -R groupname software
>chgrp -R groupname tmp
>chgrp -R groupname tools
chang the rights of the directory, make all group member xwr
>chmod -R g+xwr software
>chmod -R g+xwr tmp
>chmod -R g+xwr tools
-R directories and its sub directories
g members in the same group
x execute
r read
w write
2. Install cvs in our system
verify that we have installed cvs already
>rpm -q cvs
cvs-1.11.17-11.e14
find the install location of the bin file
>which cvs
/usr/bin/cvs
we can download the software from here http://www.cvshome.org/
create the cvs group and user
>groupadd cvs
>adduser cvsroot
>passwd cvsroot
>usermod -g cvs cvsroot
create the cvsroot
>mkdir /opt/cvsroot
>chown cvsroot.cvs /opt/cvsroot
>chmod -R g+xwr cvsroot
initial CVS
>su cvsroot
>cvs -d /opt/cvsroot init
return to the last user root
>exit
modify the enrionment
>vi /etc/profile
CVSROOT=/opt/cvsroot
export CVSROOT
>. /etc/profile
start the cvs server
>vi /etc/xinetd.d/cvspserver
# default: on
# description: The cvs server sessions;
service cvspserver
{
port = 2401
socket_type = stream
protocol = tcp
wait = no
user = root
passenv = PATH
server = /usr/bin/cvs
server_args = -f --allow-root=/opt/cvsroot pserver
disable = no
}
check all the configuration
>man xinetd.conf
>chmod 644 cvspserver
>/etc/rc.d/init.d/xinetd restart
check the server is running
>netstat -lnp|grep 2401
>netstat -l |grep cvspserver
3. Manage the CVS
create files passwd, readers, writers
>cd /opt/cvsroot/CVSROOT
>vi passwd
luohua:xxxxxx:cvsroot
create the password
>vi /opt/cvsroot/passwdgen.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}\n";
>chmod 777 passwdgen.pl
>./passwdgen.pl "mypasswod"
insert my username in readers and writers
>vi readers
>vi writers
add the user luohua, for example, to the cvs group
>usermod -g cvs luohua
4. cvs client command
login and use the system
>export CVSROOT=:pserver:username@ip:/cvspath
>cvs login
import the project
>cvs import -m "comments" -ko path1/path2/project_name vendor_tag release_tag
check out the project
>cvs checkout path1/project_name
5. Problem shooting
my iptables is running.
>/etc/init.d/iptables status
>vi /etc/sysconfig/iptables
add one line to the configuration
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 2401 -j ACCEPT
error message:
cvs [server aborted]: "import" requires write access to the repository
solution:
if the user name is in writers, remove it in readers
references:
http://www.linux520.net/file/2010091436.html
http://hi.baidu.com/luohuazju/blog/item/c94690e92887813ab80e2d86.html
http://www.cnblogs.com/markjiao/archive/2005/09/20/240190.aspx
http://blog.csdn.net/leonpard/archive/2005/01/22/264247.aspx
http://bbs.scmlife.com/thread-1767-1-1.html
分享到:
相关推荐
实战集锦_WebLogic Server Deployment部署问题故障排除总结
sources and is widely used as a Linux server. This book will help you to better configure and manage Linux servers in varying scenarios and business requirements. Starting with installing CentOS, this...
Linux Thin Client Networks Design and Deployment,operator system
Red Hat Enterprise Linux 6 Deployment Guide Deployment, Configuration and Administration of Red Hat Enterprise Linux 6
Deployment, configuration and administration of Red Hat Enterprise Linux 5
Oracle8i Parallel Server Administration, Deployment, and Performance Release 2 (8.1.6)
SUSE Linux Enterprise Server 12 SP5 自动化部署脚本,命令行版,图形化版本自动化脚本 openssl passwd -1 -stdin 生成密码 账号root/1234.com 971行出更改(此处是主机的密码$1$1rqHEpcL$B6DVO/fpXQq9DZe3g4nmH.) ...
WebSphere Application Server Network Deployment 7 集群安装部署步骤。
"Small Cell Networks: Deployment, PHY Techniques and Resource Management", Cambridge University Press, New York, USA,
AndServer is a Web server of Android, support for the deployment of static website, dynamic website, support dynamic interface (Equivalent to Servelt of java ). 中文文档 Features Dynamic website ...
We start by introducing Continuous Integration (CI), deployment, and delivery as well as providing an overview of the tools used in CI. You'll then create a web app and see how Git can be used in a CI...
The Ubuntu Server Edition, also called Ubuntu Server, offers support for several common configurations, and also simplifies common Linux server deployment processes. With this book as their guide, ...
N1™ Provisioning Server 3.1 Blades Edition Deployment and Troubleshooting
从 WAIK for Windows 7 中提取的 WIM 镜像部署服务与管理工具 (DISM),包括 x86 和 amd64 版本 │ ├─amd64 │ CompatProvider.dll │ Dism.exe │ DismCore.dll │ DismCorePS.dll │ DismProv.dll ...
Design and Deployment of Small Cell Networks ISBN-10 书号: 1107056713 ISBN-13 书号: 9781107056718 Edition 版本: 1 出版日期: 2016-03-09 pages 页数: (521) This comprehensive resource covers everything ...
Continuous Deployment with Gerrit and Jenkins
This resource provides detailed guidance on how to design and deploy directory services, including upgrading and restructuring domains, as well as designing and deploying directory services, and more.
SUSE Linux Enterprise Server 15 SP3 自动化部署脚本,命令行版,图形化版本自动化脚本 openssl passwd -1 -stdin 生成密码 账号root/1234.com 867行更改(此处是主机的密码$1$1rqHEpcL$B6DVO/fpXQq9DZe3g4nmH.) 443...
Oracle Clusterware Administration and Deployment Guide, 11g Release 2 (11.2)