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
分享到:
相关推荐
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...
### WebLogic Server Deployment部署问题故障排除总结 #### 一、问题描述 在部署过程中遇到的主要问题是WebLogic Server无法正确部署应用。具体表现为服务器选择的是旧版本的应用程序,而不是重新部署的新版本的...
Red Hat Enterprise Linux 6 Deployment Guide Deployment, Configuration and Administration of Red Hat Enterprise Linux 6
本书《Linux Thin Client Networks Design and Deployment》为系统管理员提供了一本快速指南,作者David Richards根据自己在佛罗里达州拉戈市担任系统管理员的经验,分享了在UNIX、Linux和瘦客户端环境下的工作知识...
linux-deployment
Deployment, configuration and administration of Red Hat Enterprise Linux 5
SUSE Linux Enterprise Server 12 SP5 自动化部署脚本,命令行版,图形化版本自动化脚本 openssl passwd -1 -stdin 生成密码 账号root/1234.com 971行出更改(此处是主机的密码$1$1rqHEpcL$B6DVO/fpXQq9DZe3g4nmH.) ...
SUSE Linux Enterprise Server 15 SP3 自动化部署脚本,命令行版,图形化版本自动化脚本 openssl passwd -1 -stdin 生成密码 账号root/1234.com 867行更改(此处是主机的密码$1$1rqHEpcL$B6DVO/fpXQq9DZe3g4nmH.) 443...
Oracle8i Parallel Server是Oracle数据库的一个重要特性,它在8.1.6版本中得到了进一步的优化和增强,旨在提供高可用性和高性能的解决方案。Oracle Parallel Server允许多个进程同时访问和处理数据库,以提高系统...
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 ...
"Small Cell Networks: Deployment, PHY Techniques and Resource Management", Cambridge University Press, New York, USA,
Linux是一套免费使用和自由传播的类Unix操作系统,由林纳斯·托瓦兹于1991年首次发布。 Linux不仅是一个强大的操作系统,也是一个庞大的技术生态系统,涵盖了从服务器到个人电脑的各种应用场景。同时,它的开源特性...
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, ...
Exchange 2010
IBM WebSphere Application Server 6.1 for Linux 安装步骤 IBM WebSphere Application Server 6.1 是一个功能强大的应用服务器,适用于 Linux 操作系统。本文将详细介绍在 Linux 平台上安装 WebSphere 6.1 的步骤...
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.
"Altiris安装配置学习教程(三)- 安装配置Deployment Server"是针对如何设置和管理Altiris Deployment Server的详细指南。Deployment Server是Altiris的核心组件,它负责执行软件分发、系统迁移、更新和维护任务。 ...