Bo's blog

Thursday, February 24, 2011

setup GIT with apache

Fire up the Apache httpd.conf file – add the following lines at the end:

# Configure Apache to listen for named virtual hosts on port 80
NameVirtualHost *:80

# Include the configuration file for our git http hosting
Include "d:\git\conf\git_httpd.conf"

Now create a new document called – d:\git\conf\git_httpd.conf – and make it look something like this:

# HTTP settings for using Apache with MSysGit on Windows
# Based on Jeremy Skinner's notes at http://www.jeremyskinner.co.uk/2010/07/31/hosting-a-git-server-under-apache-on-windows/



# Set this to the root folder containing your Git repositories.
SetEnv GIT_PROJECT_ROOT D:/Git/

# Set this to export all projects by default (by default,
# git will only publish those repositories that contain a
# file named “git-daemon-export-ok”
SetEnv GIT_HTTP_EXPORT_ALL

# Route specific URLS matching this regular expression to the git http server.
ScriptAliasMatch "(?x)^/git/(.*/(HEAD | info/refs | \
objects/(info/[^/]+ | [0-9a-f]{2}/[0-9a-f]{38} | pack/pack-[0-9a-f]{40}\.(pack|idx)) | \
git-(upload|receive)-pack))$" \
"C:/Program Files (x86)/git/libexec/git-core/git-http-backend.exe/$1"

# The canonical DNS hostname that you want to use for your git server
ServerName my_git_server

# Any other DNS aliases that point to your git server
ServerAlias my_git_server my_git_server.mydomain.com my_git_server.my_intranet.local

# The root folder for non-GIT-hosted documents (e.g. phpgit or some other Web front end)
DocumentRoot "D:\gitserver\htdocs\"

# This section is duplicated from the Collabnet SVN LDAP authentication
AuthType Basic
AuthName "Spotlight GIT Repository"
AuthBasicProvider csvn-file-users ldap-users
Require valid-user



Check your configuration by running httpd.exe from the command line, like so:

C:\Program Files\Subversion\bin>httpd.exe -f "c:\program files\Subversion\data\conf\httpd.conf" –t
Syntax OK

and if all looks good, go into services.msc and restart the Apache

Finally, I followed Jeremy’s instructions to get GitPhp running, but then replaced it with a different project – also called GitPhp – from http://www.xiphux.com/programming/gitphp/, which provides a full repository browser, revision history, etc.

All I had to do to get GitPHP running was to copy the gitphp.conf.php.example file to gitphp.conf.php, and then tweak the following settings:

/* The root folder of my Git repositories */
$gitphp_conf['projectroot'] = 'D:\git';

/* On 64-bit Windows, C:\Program Files (x86) ends up as C:\Progra~2\ so these need to be configured manually */
$gitphp_conf['gitbin'] = "C:\Progra~2\Git\bin\git.exe";
$gitphp_conf['diffbin'] = "C:\Progra~2\Git\bin\diff.exe";

Job done.

http://toroid.org/ams/git-central-repo-howto
http://www.redmine.org/projects/redmine/wiki/HowTo_to_handle_SVN_repositories_creation_and_access_control_with_Redmine

Tuesday, February 15, 2011

install weblogic silently

Silent installer option: -mode=silent -silent_xml=./silent.xml

<domain-template-descriptor>
<input-fields>
<data-value name="BEAHOME" value="/opt/bea/WLP@@VERSION@@"/>
<data-value name="USER_INSTALL_DIR" value="/opt/bea/WLP@@VERSION@@/weblogic@@MAJOR_VERSION@@"/>
<data-value name="INSTALL_NODE_MANAGER_SERVICE" value="no"/>
<data-value name="COMPONENT_PATHS" value="WebLogic Portal/Portal Server|WebLogic Portal/WebLogic Workshop Portal Extension"/>
</input-fields>
</domain-template-descriptor>