- 浏览: 156969 次
- 性别:
- 来自: 大连->北京
文章分类
最新评论
-
netkongjian:
不错的界面控件知识,感谢分享!
界面测试 -
Tu_Bie:
赞一个。
servlet实现文件上传 -
心惶惶呀:
...
ORACLE和SQL语法区别归纳 -
ccfangle:
:idea:
我出现的原因是:标签重复了~
The content of element type "struts-config" must match 解决方案 -
zxl10059:
嗯,写的不错可以考虑自己写一个分页类page基本就可以明白是怎 ...
MySQL分页
1 、安装完 CentOS 5.3 之后,首先要保证可以上网,安装完 SSH ,并且打开。
2 、设置软件源
1 )、 CentOS 的网络源配置文件是:
/etc/yum.repos.d/ 下的 CentOS-Base.repo
本文提供其 5.3 版本的:网通,电信,第三方,163 源各一个
配置方法一般是:
① . 进入到repos.d 目录
$ cd
/etc/yum.repos.d
$ ls -l
总计 24
-rw-r--r-- 1 root root 802 2009-09-02
CentOS-Base.repo
-rw-r--r-- 1 root root 626 03-17 09:30 CentOS-Media.repo
② . 备份原来的源
$ mv CentOS-Base.repo CentOS-Base.repo.backup
③ . 用下面的内容,重新生成CentOS-Base.repo
④ .$ yum update
2 )、广泛应用的 CentOS 的软件源
① . 国内某大学源(电信网通皆可使用)
[base]
name=CentOS-5 – Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever5&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=http://ftp.sjtu.edu.cn/centos/5.3/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos6
#released updates
[update]
name=CentOS-5 – Updates
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=updates
baseurl=http://ftp.sjtu.edu.cn/centos/5.3/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#packages used/produced in the build but not released
[addons]
name=CentOS-5 – Addons
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=addons
baseurl=http://ftp.sjtu.edu.cn/centos/5.3/addons/$basearch/
② . 国内电信源
# CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS
updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever – Base
baseurl=http://centos.ustc.edu.cn/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
#released updates
[updates]
name=CentOS-$releasever – Updates
baseurl=http://centos.ustc.edu.cn/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever – Addons
baseurl=http://centos.ustc.edu.cn/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
#additional packages that may be useful
[extras]
name=CentOS-$releasever – Extras
baseurl=http://centos.ustc.edu.cn/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever – Plus
baseurl=http://centos.ustc.edu.cn/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://centos.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-5
③ . 第三方源配置
在服务器构建的过程中,我们将要用到的一些工具不存在于CentOS 中yum 的官方库中,所以需要定义yum 的非官方库文件,让一些必需的工具通过yum 也能够安装。
[root@bestcar ~]#
vi /etc/yum.repos.d/dag.repo ←
建立dag.repo
,定义非官方库,内容如下5
行:
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=1
[root@bestcar ~]# rpm –import
http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt ←
导入非官方库的GPG
或者有下面这种方式
#
设置rpmforge
源
rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*
④ .163 的源也还不错,网易网聚人的力量,确实是我们的好朋友
#
添加163
源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.save
mv /etc/yum.repos.d/CentOS-Media.repo /etc/yum.repos.d/CentOS-Media.repo.save
cp /etc/yum.repos.d/CentOS-Base.repo.save /etc/yum.repos.d/163.repo
sed -i "s/mirror.centos.org/mirrors.163.com/g"
/etc/yum.repos.d/163.repo
sed -i "s/^mirrorlist/#mirrorlist/g" /etc/yum.repos.d/163.repo
sed -i "s/^#baseurl/baseurl/g" /etc/yum.repos.d/163.repo
3 )、问题
在配置过程中,有可能会出现
GPG key retrieval failed: [Errno 14] HTTP Error 404: Not Found
这个问题,这时只要修改 repo 使所有的 gpgcheck=0 就可以了。
3 、安装版本服务器 ---CVS
1 )、检查 CVS 软件默认是否安装好了。
通过使用 rpm –qi cvs 来查看
2 )、如果没有安装,那么就需要安装
① . 软件管理器 yum 的安装方式
yum install cvs
3) 、 创建用户和用户组
root
用户下执行以下命令:
#adduser cvsbestcar
#passwd cvsbestcar 输入新密码
这里创建了 bestcar 这个用户,同时创建了 bestcar 这个用户组。
4 )、 创建 CVS 资源库的根目录
root
用户下执行:
#mkdir /bestcar
此处可改为你想要的
cvsroot
路径
#chown cvsbestcar.cvsbestcar
/bestcar
把
cvs
根目录的所属用户设置为
cvsbestcar
,所属组设为
cvsbestcar
。
5) 、 初始化 cvs 资源库
#su – cvsbestcar 切换到 cvsbestcar 这个用户
#cvs -d /bestcar init
在 / bestcar 目录下会生成 CVSROOT 这个子目录
<!-- [if gte vml 1]><v:shape id="_x0000_i1027" type="#_x0000_t75" style='width:415.5pt;height:112.5pt'> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtml1\10\clip_image003.png" o:title=""/> </v:shape><![endif]--><!-- [if !vml]--><!-- [endif]-->
6) 、 修改环境变量 CVSROOT
#exit
从 cvsbestcar 用户退回到 root 用户,只有 root 用户才有权限修改 /etc/profile
#vim /etc/profile
编辑 /etc/profile 文件,在末尾加上以下两句:
CVSROOT=/cvsroot
export CVSROOT
#source /etc/profile
更新环境变量,此时系统已经认识 $CVSROOT 这样的环境变量
#echo $CVSROOT
检查是否设置成功,如果出现自己设置的路径,表示成功。
7 )、修改服务器配置
在 /etc/xinetd.d/ 下找到 cvs 文件,修改成下面这样
service cvspserver
{
port
= 2401
socket_type
= stream
protocol
= tcp
wait
= no
user
= root
passenv
= PATH
server
= /usr/bin/cvs
env
= HOME=/bestcar
server_args
= -f --allow-root=/bestcar pserver
# bind
= 127.0.0.1
}
<!-- [if gte vml 1]><v:shape id="_x0000_i1028" type="#_x0000_t75" style='width:414.75pt;height:206.25pt'> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtml1\10\clip_image005.png" o:title=""/> </v:shape><![endif]--><!-- [if !vml]--><!-- [endif]-->
8 )、 启动 cvs 服务
# /etc/rc.d/init.d/xinetd restart 重启动 xinetd 服务,需要注意,这个服务 centos5 默认并不安装,需要定制安装一下。
# netstat -lnp|grep 2401
tcp 0 0 0.0.0.0:2401 0.0.0.0:* LISTEN xxxxxx/xinetd
则说明 cvs 服务器已经运行。
PS. 如果发现没有输出,那么就证明配置有问题,可通过如下方式:
① . 将第七步里面的disable=yes 更改成disable=no
② . #/etc/rc.d/init.d/xinetd restart
③ . 通过 chkconfig --list 查看运行状态
<!-- [if gte vml 1]><v:shape id="_x0000_i1029" type="#_x0000_t75" style='width:387pt;height:227.25pt'> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtml1\10\clip_image007.png" o:title=""/> </v:shape><![endif]--><!-- [if !vml]--><!-- [endif]-->
④ . 通过进程是看不到的,因为你的是通过 xinitd 来运行 ,也就是只有当客户端连接这个端口时 cvs 才会启动,所以通常是通过 netstat -an | less 来查看端口的状态的。
<!-- [if gte vml 1]><v:shape id="_x0000_i1026" type="#_x0000_t75" style='width:415.5pt;height:187.5pt'> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtml1\10\clip_image009.png" o:title=""/> </v:shape><![endif]--><!-- [if !vml]--><!-- [endif]-->
9 )、 注意要打开防火墙的 2401 端口,否则客户端还是连不上这个 cvs 的服务器。
10 )、 增加新用户。
用 root
#cd /
#chmod -R 775 cvsroot 让 cvsroot 组的所有成员都可以对 cvs 资源库目录的读写权限
#useradd -g cvsroot user0 创建新用户 user0 ,并且将其添加进入 cvsroot 用户组
#passwd user0 设置好密码
11 )、客户端连接
在客户端安装 CVS ,服务器端的 IP 为: 192.168.12.241 ,然后在客户端输入
cvs -d :pserver:user0@192.168.12.241/bestcar login
① . 错误提示为/bestcar /CVSROOT/config: Permission denied
自己本身的用户 user0 已经加入到组中,并且组对 /bestcar 文件可读可写
② . 错误提示为:
cvs login: CVS password file /home/wq/.cvspass does not exist - creating a new file
该问题就是在客户端登录时要在 HOME 目录下有个 .cvspass 的文件即可。因此,解决方法就是在 /home/wq/ 下 :
发表评论
-
为嘛BIOS将MBR读入0x7C00地址处(x86平台下)
2012-11-27 14:06 1722对于很多人来讲0x7C00这个地址是很神秘的,不知道这是 ... -
挖个坑,通过一个bug学习scsi~
2012-10-23 15:55 1317开始来点前期准备的知识,主要关于Linux的I/O 路线 ... -
Solaris下如何查看boot_archive以及制作定制版boot_archive
2012-10-23 15:53 879从标题可以得知,分为两步,首先是查看,继而是修改定制。 ... -
vim系列教程(1)基础操作
2011-11-27 20:49 1050总结下本人平时所使用的各种工具以及语言的快速入门教程以及 ... -
code2pdf
2011-06-29 12:10 958http://www.code2pdf.com http:/ ... -
fs/timerfd.c内核分析
2011-05-03 12:20 2805/* * fs/timerfd.c * ... -
Perl在vim下的一些基本SYNTAX设置
2010-10-09 13:58 1838perl 的语法高亮有一些 ... -
ubuntu 10.04 电子科技大学源 校园网推荐
2010-06-12 10:59 2212电子科技大学源(校园网推荐,快) deb http:// ... -
Linux环境变量设置--总结
2009-10-20 09:27 30261、引言 在 linux系统 ... -
Linux下的脚本语言--Perl和Python Intro
2009-10-15 10:26 3196到Linux下的脚本语言, ... -
Unix 哲学
2009-09-24 09:51 840Unix 哲学: 一:小即是美。 二:让程序只做好一件事 ... -
发一张我的桌面
2009-08-24 11:07 818我的Linux下的桌面,纯属娱乐.... -
Debian/Ubuntu的NFS配置
2009-08-21 17:07 1560Debian/Ubuntu的NFS配置 简介 :NFS(Net ... -
ubuntu 镜像的制作
2009-07-20 16:08 3709Ubuntu Customization Kit 简称 UCK ... -
Linux 由浅入深
2009-07-16 22:44 9071.掌握至少50个以上的常用命令。(GOT) 2.熟悉Gno ... -
Debian 安装Flash插件
2009-07-12 09:15 3713下载install_flash_player_10_linux ... -
Debian 源的设置
2009-07-11 20:57 1597Debian 源的设置 作者:Hily 原始链接:http: ... -
嵌入式Linux游戏开发一
2009-06-22 14:13 14381、引言 Linux由于其具有内核强大且稳定,易于扩展 ... -
ubuntu 9.04更新源
2009-05-06 09:33 126761.sudo gedit /etc/apt/sources.l ... -
Linux 下mysql的卸载
2009-04-15 14:41 2343前段时间安装了Mysql,但是有些问题,就想把他卸载了, ...
相关推荐
centos5.3 配置DNS详解centos5.3 配置DNS详解centos5.3 配置DNS详解centos5.3 配置DNS详解
CentOS5.3挂载NTFS CentOS5.3挂载NTFS
CentOS5.3系统CentOS5.3系统
CentOS 5.3安装Postfix+Extmail邮件服务器.pdf
Centos5.3 下安装Oracle 11g
LINUX操作系统_CentOS5.3_超详细的安装图文教程.doc
此文件由wdlinux收集,整理了centos5.3至5.8DVD版32_64位系统种子码
CentOS 5.3下安装ispCP教程CentOS 5.3下安装ispCP教程CentOS 5.3下安装ispCP教程CentOS 5.3下安装ispCP教程
阿里云服务器centos+apache+php5.3+mysql+Zend Guard Loader+memcached+ftp环境搭建笔记
CentOS5.3ISCSI配置[归纳].pdf
This Course will provide the basic tools, skills and practice to configure, secure and maintain Linux servers.
RedHat 5.3配置YUM 从centos5源与光盘源更新软件
CentOS 5.3下vsftp创建新用户
Centos5.3安装lm_sensors_cpu温度监控 Centos5.3安装lm_sensors_cpu温度监控
CentOS5.3搭建Apache2.2.4+Mysql5.1.4+PHP5.3服务器.pdf
CentOS5.3下JDK1.5的最完整安装过程。
Centos5.3安装oracle10g过程 详细
Linux bonding配置指导书(CentOS5.3).doc
centos5 cvs安装,一步一步教程,明了简单。还有用户管理说明。