The puppet path is:/etc/puppet
Software version: Gitweb-1.7.1-3.el6_4.1.noarch
Git-1.7.1-3.el6_4.1.x86_64
Fcgi-2.4.0-12.el6.x86_64
Spawn-fcgi-1.6.3-1.el6.x86_64
Nginx version:nginx/1.6.2
lighttpd/1.4.35 (SSL)-a light and fast webserver
First, build puppet git Warehouse
1. Enter the Puppet directory
#cd/etc/puppet
2. Initialize and add files to Repository
#git Init
#git Add *
3. Submit to Repository
#git commit-m "Init puppet commit"
4. Clone a bare git repository and add a bare repository, equivalent to/etc/puppet adding a branch.
#mkdir-P/data/git
#git Clone--bare/etc/puppet/data/git/puppet.git
5. Associating Remote libraries
# git remote add-t master origin/data/git/puppet.git
6. Clone Branch, in the home directory named puppet-king
# CD ~
# git Clone/data/git/puppet.git puppet-king
second, using Git Manage Warehouses
Then the above introduction, a brief introduction and then use GIT to manage the warehouse.
#cd puppet-king
#vim MANIFESTS/NODES.PP # #创建节点文件
#git Add manifests/nodes.pp # #添回nodes. PP to Warehouse
#git commit-m "Adding nodes.pp by King" # #提交nodes. pp
# git Push # #提交分支
#cd/etc/puppet # #进入/etc/puppet/Directory
# git Pull # #同步仓库
Third, Gitweb Management puppet Code
Lighttpd version
#yum Install Gitweb lighttpd
#cat/etc/gitweb.conf
$projectroot = "/etc/puppet"
#cd/etc/puppet
#git Instaweb
This opens a HTTPD service on port 1234, which is as simple as displaying the page in the browser. When you close the service, simply add the--stop option after the original command.
Access via http://ip:1234
Nginx version
Reference official Https://wiki.archlinux.org/index.php/gitweb#Nginx
Installing Fcgiwrap
#git Clone Https://github.com/gnosek/fcgiwrap.git
CD Fcgiwrap
#autoreconf-I.
#./configure
Make
#make Install
#yum install–y nginx spwan-fcgi gitweb
Because it is necessary to put the/etc/puppet into the gitweb, so the Gitweb directory needs to be placed in the/etc/puppet directory
# tree/etc/puppet/gitweb/
/etc/puppet/gitweb/
├──error.log
├──gitweb.cgi
├──gitweb.css
├──gitweb.js
├──httpd.conf
└──tmp
Modifying the Gitweb configuration file
# cat/etc/gitweb.conf
$projectroot = "/etc/puppet"
Modifying the spwan-fcgi configuration
# cat/etc/sysconfig/spawn-fcgi
# You must set some working options before the "spawn-fcgi" service would work.
# If SOCKET points to a file and then this file was cleaned up by the init script.
#
# See SPAWN-FCGI (1) for all possible options.
#
# Example:
#SOCKET =/var/run/php-fcgi.sock
#OPTIONS = "-u apache-g apache-s $SOCKET-S-M 0600-c 32-f 1-p/var/run/spawn-fcgi.pid--/usr/bin/php-cgi"
Fcgi_socket=/var/run/fcgiwrap.socket
Fcgi_program=/usr/local/sbin/fcgiwrap
Fcgi_user=nginx
Fcgi_group=nginx
Fcgi_extra_options= "-M 0700"
Options= "-u $FCGI _user-g $FCGI _group-s $FCGI _socket-s $FCGI _extra_options-f 1-p/var/run/spawn-fcgi.pid--$FCGI _prog RAM "
# cat/usr/local/nginx/conf/vhosts/git.conf
server {
Listen 8150;
Error_log/data/logs/nginx/git.error.log;
Access_log/data/logs/nginx/git.access.log;
Root/etc/puppet;
location/gitweb/{
Index gitweb.cgi;
Include Fastcgi_params;
gzip off;
Fastcgi_param gitweb_config/etc/gitweb.conf;
if ($uri ~ "/gitweb/gitweb.cgi") {
Fastcgi_pass Unix:/var/run/fcgiwrap.socket;
}
}
}
Bottom of form
Manage puppet configuration with Gitweb (Nginx version +lighttpd)