系统版本:CentOS release 6.6 (Final)
1.puppet安装
#安装puppet官方源 rpm -ivh https://yum.puppetlabs.com/puppetlabs-release-el-6.noarch.rpm #导入GPG秘钥 rpm --import https://yum.puppetlabs.com/RPM-GPG-KEY-puppetlabs #安装ruby yum install ruby ruby-libs ruby-shadow #安装puppet yum install puppet puppet-server facter
2.版本控制工具安装配置
#apache下载与安装 wget tar zxf httpd-2.2.27.tar.gz cd httpd-2.2.27 ./configure --prefix=/usr/local/apache2 --with-included-apr --enable-so --enable-deflate=shared --enable-expires=shared --enable-rewrite=shared --enable-static-support --disable-userdir --enable-dav --enable-dav-fs make &&make install #SVN安装 tar zxf sqlite-autoconf-3080803.tar.gz cd sqlite-autoconf-3080803 ./configure &&make &&make install tar zxf neon-0.30.1.tar.gz cd neon-0.30.1 ./configure &&make &&make install tar zxf subversion-1.7.19.tar.gz cd subversion-1.7.19 ./configure --with-neon &&make &&make install #apache配置 vim /usr/local/apache2/conf/httpd.conf LoadModule dav_svn_module modules/mod_dav_svn.so LoadModule authz_svn_module modules/mod_authz_svn.so User puppet Group puppet <Location /svn> order allow,deny allow from all dav svn svnparentpath /data1/svn svnlistparentpath on svnautoversioning on authtype basic authname "subversion repository" authuserfile /usr/local/apache2/conf/authfile require valid-user </Location> #创建认证用户 /usr/local/apache2/bin/htpasswd -c /usr/local/apache2/conf/authfile USERNAME /usr/local/apache2/bin/apachectl restart
之后使用浏览器访问"http://IP/svn"输入用户密码,如果登录成功表示成功安装了apache+svn.
3.DNS安装
#安装 tar zxf dnsmasq-2.45.tar.gz cd dnsmasq-2.45 make &&make install cp dnsmasq.conf.example /etc/dnsmasq.conf #DNSmasq配置 vim /etc/dnsmasq.conf user = dnsmasq #启动用户 group = dnsmasq #启动组号 interface=eth2 #绑定网络接口 listen-address=1.1.1.111 #绑定IP resolv-file=/etc/resolv.conf #域名解析文件 addn-hosts=/etc/hosts #域名解析文件 #域名解析文件 echo "1.1.1.111 master01.puppet.com" >> /etc/hosts #启动dnsmasq /usr/local/sbin/dnsmasq #可以查到端口表示启动成功 netstat -tunlp |grep :53 tcp 0 0 0.0.0.0:53 0.0.0.0:* LISTEN tcp 0 0 :::53 :::* LISTEN
之后把dnsmasq的ip写入agent的resolv.conf中,就可以实现域名与ip的映射了
时间: 2024-11-05 22:03:07