准备离线装机包
# 安装yum-utils
# yum-utils是管理repository及扩展包的工具,包含一系列yum工具,我们需要使用yumdownloader来下载cobbler相关的依赖包
yum install -y yum-utils
使用yumdownlader下载cobbler及相关产品的依赖包
yumdownloader --resolve --destdir=/tmp/offline-cobbler/ cobbler cobbler-web dhcp httpd tftp xinetd pykickstart debmirror
安装createrepo
yum -y install createrepo
创建yum仓库文件
cd /tmp/offline-cobbler/
createrepo .
打包cobbler离线安装文件
cd /tmp
tar -zcvf offline-cobbler.tar.gz offline-cobbler/
tar xvf offline-cobbler.tar.gz -C /tmp/
mkdir /etc/yum.repos.d/bak
mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/bak
# 挂载本地iso镜像,需要本地yum源不然安装的时候会少依赖
# 先使用u盘传一个iso镜像最好与本机系统版本一致
# 具体挂载位置看你上传的镜像位置,虚拟机操作是/dev/sr0
$ mount /dev/sr0 /mnt
$ vi /etc/yum.repos.d/cobbler.repo
[cobbler]
name=cobbler local repo
baseurl=file:///tmp/offline-cobbler/
gpgcheck=0
enalbed=1
# 本机镜像源
$ vi /etc/yum.repos.d/Centos.repo
[centos]
name=centos
baseurl=file:///mnt/
gpgcheck=0
enalbed=1
yum clean all
yum makecache
# 关闭selinux和防火墙
# -i 直接修改文件
# s 查找替换
# g 完成所有匹配值的替换
$ sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
$ setenforce 0
$ systemctl disable firewalld.service
$ systemctl stop firewalld.service
# 安装cobbler
$ yum install cobbler -y
# 移除cobbler yum源之后安装
rm -f /etc/yum.repos.d/cobbler.repo
yum install dhcp httpd -y
$ systemctl enable httpd.service tftp.socket cobblerd.service
$ systemctl start httpd.service tftp.socket cobblerd.service
$ cobbler check
The following are potential configuration items that you may want to fix:
1 : The 'server' field in /etc/cobbler/settings must be set to something other than localhost, or kickstarting features will not work. This should be a resolvable hostname or IP for the boot server as reachable by all machines that will use it.
2 : For PXE to be functional, the 'next_server' field in /etc/cobbler/settings must be set to something other than 127.0.0.1, and should match the IP of the boot server on the PXE network.
3 : SELinux is enabled. Please review the following wiki page for details on ensuring cobbler works correctly in your SELinux environment:
https://github.com/cobbler/cobbler/wiki/Selinux
4 : change 'disable' to 'no' in /etc/xinetd.d/tftp
5 : Some network boot-loaders are missing from /var/lib/cobbler/loaders, you may run 'cobbler get-loaders' to download them, or, if you only want to handle x86/x86_64 netbooting, you may ensure that you have installed a *recent* version of the syslinux package installed and can ignore this message entirely. Files in this directory, should you want to support all architectures, should include pxelinux.0, menu.c32, elilo.efi, and yaboot. The 'cobbler get-loaders' command is the easiest way to resolve these requirements.
6 : enable and start rsyncd.service with systemctl
7 : debmirror package is not installed, it will be required to manage debian deployments and repositories
8 : ksvalidator was not found, install pykickstart
9 : The default password used by the sample templates for newly installed machines (default_password_crypted in /etc/cobbler/settings) is still set to 'cobbler' and should be changed, try: "openssl passwd -1 -salt 'random-phrase-here' 'your-password-here'" to generate new one
10 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them
Restart cobblerd and then run 'cobbler sync' to apply changes.
解释:
1、/etc/cobbler/settings中的“server”字段必须设置为localhost以外的地址,否则kickstarting特性将不起作用。其应该是一个可解析的主机名或IP,所有机器都可达的地址。
2、为了使PXE正常工作,必须将/etc/cobbler/settings中的“next_server”字段设置为除127.0.0.1之外的其他字段,并且应该与PXE网络上的引导服务器的IP匹配。
3、SELinux已启用。请查看下面的Wiki页面以确保在您的SELinux环境下cobbler可以正确工作;
4、 在/etc/xinetd.d/tftp文件中将 'disable' 设置为 'no';
Xinetd:即extended internet daemon,是新一代的网络守护进程服务程序,又叫超级Internet服务器,常用来管理多种轻量级Internet服务。Xinetd提供类似于inetd+tcp_wrapper的功能,但是更加强大和安全。
5、一些网络引导加载程序在/var/lib/cobblerZ/loaders中丢失,您可以运行“cobbler get-loaders”来下载它们,如果您只想处理x86/x86_64 网络引导,确保您已经安装了最近的syslinux包,安装后可以忽略此消息。如果希望支持所有体系结构,则此目录中的文件应该包括pxelinux.0(预启动linux引导程序)、menu.c32(显示菜单界面引导程序)、elilo.efi(ELILO 是一种基于 EFI 开发的 boot loader)和yaboot(Macintosh的引导程序)。“cobbler get-loaders”命令是解决这些需求最简单的方法。
6、使用systemctl命令开启rsyncd.service服务(rsync(remote [rɪˈmoʊt] sync [sɪŋk])是linux系统下的数据镜像备份工具)并设置开机自启
7、debmirror包没有安装,它用来管理Debian系统的部署和存储库
8、ksvalidator (validator [ˈvælədeɪtər]验证器)没有发现,要安装pykickstart
9、新安装的机器的默认密码设置为cobbler,你可以使用"openssl passwd -1 -salt 'random phrase-here' 'your-password-here'"得到新得密码
10、fencing([ˈfensɪŋ] 击剑/(用栅栏、篱笆或围栏)围住) tools 没有找到,它被用来电源管理功能(可选),安装cman或者fence-agents 来使用
按步骤修复即可,基本想搞离线安装的肯定都会接下来的操作,我这边就不写了.
我想为Heroku构建一个Rails3应用程序。他们使用Postgres作为他们的数据库,所以我通过MacPorts安装了postgres9.0。现在我需要一个postgresgem并且共识是出于性能原因你想要pggem。但是我对我得到的错误感到非常困惑当我尝试在rvm下通过geminstall安装pg时。我已经非常明确地指定了所有postgres目录的位置可以找到但仍然无法完成安装:$envARCHFLAGS='-archx86_64'geminstallpg--\--with-pg-config=/opt/local/var/db/postgresql90/defaultdb/po
我打算为ruby脚本创建一个安装程序,但我希望能够确保机器安装了RVM。有没有一种方法可以完全离线安装RVM并且不引人注目(通过不引人注目,就像创建一个可以做所有事情的脚本而不是要求用户向他们的bash_profile或bashrc添加一些东西)我不是要脚本本身,只是一个关于如何走这条路的快速指针(如果可能的话)。我们还研究了这个很有帮助的问题:RVM-isthereawayforsimpleofflineinstall?但有点误导,因为答案只向我们展示了如何离线在RVM中安装ruby。我们需要能够离线安装RVM本身,并查看脚本https://raw.github.com/wayn
我有一个奇怪的问题:我在rvm上安装了rubyonrails。一切正常,我可以创建项目。但是在我输入“railsnew”时重新启动后,我有“程序'rails'当前未安装。”。SystemUbuntu12.04ruby-v"1.9.3p194"gemlistactionmailer(3.2.5)actionpack(3.2.5)activemodel(3.2.5)activerecord(3.2.5)activeresource(3.2.5)activesupport(3.2.5)arel(3.0.2)builder(3.0.0)bundler(1.1.4)coffee-rails(
我刚刚为fedora安装了emacs。我想用emacs编写ruby。为ruby提供代码提示、代码完成类型功能所需的工具、扩展是什么? 最佳答案 ruby-mode已经包含在Emacs23之后的版本中。不过,它也可以通过ELPA获得。您可能感兴趣的其他一些事情是集成RVM、feature-mode(Cucumber)、rspec-mode、ruby-electric、inf-ruby、rinari(用于Rails)等。这是我当前用于Ruby开发的Emacs配置:https://github.com/citizen428/emacs
我正在尝试在我的centos服务器上安装therubyracer,但遇到了麻烦。$geminstalltherubyracerBuildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingtherubyracer:ERROR:Failedtobuildgemnativeextension./usr/local/rvm/rubies/ruby-1.9.3-p125/bin/rubyextconf.rbcheckingformain()in-lpthread...yescheckingforv8.h...no***e
我的最终目标是安装当前版本的RubyonRails。我在OSXMountainLion上运行。到目前为止,这是我的过程:已安装的RVM$\curl-Lhttps://get.rvm.io|bash-sstable检查已知(我假设已批准)安装$rvmlistknown我看到当前的稳定版本可用[ruby-]2.0.0[-p247]输入命令安装$rvminstall2.0.0-p247注意:我也试过这些安装命令$rvminstallruby-2.0.0-p247$rvminstallruby=2.0.0-p247我很快就无处可去了。结果:$rvminstall2.0.0-p247Search
我实际上是在尝试使用RVM在我的OSX10.7.5上更新ruby,并在输入以下命令后:rvminstallruby我得到了以下回复:Searchingforbinaryrubies,thismighttakesometime.Checkingrequirementsforosx.Installingrequirementsforosx.Updatingsystem.......Errorrunning'requirements_osx_brew_update_systemruby-2.0.0-p247',pleaseread/Users/username/.rvm/log/138121
由于fast-stemmer的问题,我很难安装我想要的任何rubygem。我把我得到的错误放在下面。Buildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingfast-stemmer:ERROR:Failedtobuildgemnativeextension./System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/rubyextconf.rbcreatingMakefilemake"DESTDIR="cleanmake"DESTDIR=
当我尝试安装Ruby时遇到此错误。我试过查看this和this但无济于事➜~brewinstallrubyWarning:YouareusingOSX10.12.Wedonotprovidesupportforthispre-releaseversion.Youmayencounterbuildfailuresorotherbreakages.Pleasecreatepull-requestsinsteadoffilingissues.==>Installingdependenciesforruby:readline,libyaml,makedepend==>Installingrub
当我执行>rvminstall1.9.2时一切顺利。然后我做>rvmuse1.9.2也很顺利。但是当涉及到ruby-v时..sam@sjones:~$rvminstall1.9.2/home/sam/.rvm/rubies/ruby-1.9.2-p136,thismaytakeawhiledependingonyourcpu(s)...ruby-1.9.2-p136-#fetchingruby-1.9.2-p136-#downloadingruby-1.9.2-p136,thismaytakeawhiledependingonyourconnection...%Total%Rece