Skip to content

Instantly share code, notes, and snippets.

# Install gcc44 package and update-alternatives (in chkconfig)
yum -y install gcc44 gcc44-c++
# Fixed in dep-selector-gecode 1.0.1
# Check if gcc is already a link
# if [ ! -L /usr/bin/gcc ]; then mv /usr/bin/gcc /usr/bin/gcc41; fi
# if [ ! -L /usr/bin/g++ ]; then mv /usr/bin/g++ /usr/bin/g++41; fi
# Install update-alteratives links for gcc41 and gcc44
# update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc41 60 --slave /usr/bin/g++ g++ /usr/bin/g++41
# update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc44 40 --slave /usr/bin/g++ g++ /usr/bin/g++44
@atomic-penguin
atomic-penguin / chef-solr-installer-error-ruby-1.8.x
Created May 11, 2011 17:55
rhel-chef-solr-installer-fileutils
root@chef# chef-solr-installer
Configuration setting amqp_pass is unknown and will be ignored
Configuration setting solr_heap_size is unknown and will be ignored
Configuration setting log_location is unknown and will be ignored
Configuration setting solr_url is unknown and will be ignored
Creating Solr Home Directory
mkdir -p /srv/chef/solr/home
/usr/lib64/ruby/gems/1.8/gems/chef-solr-0.10.0/lib/chef/solr/solr_installer.rb:335:in `mkdir_p': uninitialized constant Chef::SolrInstaller::FileUtils (NameError)
from /usr/lib64/ruby/gems/1.8/gems/chef-solr-0.10.0/lib/chef/solr/solr_installer.rb:309:in `create_solr_home'
@atomic-penguin
atomic-penguin / gist:967719
Created May 12, 2011 00:51
the-lazy-mans-guide-to-installing-chef-client-0.10.sh
wget -O /tmp/chef-jit http://osl.marshall.edu/chef/chef-jit-installer-0.10.0.noarch.run && bash /tmp/chef-jit
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@git.example.com:/var/git/chef.git
[branch "master"]
remote = origin
+search(:users, "action:remove") do |rm_user|
+ user rm_user['id'] do
+ action :remove
+ end
+end
sysadmin_group = Array.new
-search(:users, 'groups:sysadmin') do |u|
+search(:users, 'groups:sysadmin NOT action:remove') do |u|
users_manage "sysadmin" do
data_bag "users"
search_group "sysadmin"
group_name "sysadmin"
group_id 2000
end
# ---- ntp.conf ----
# Created by Weasel (ESX Installer)
# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery
restrict 127.0.0.1
server time.marshall.edu
{
"id":"nfsserver.example.com",
"role":"file_server",
"path":"/exports",
"hosts":"10.0.0.0/8",
"options":["ro",
"no_root_squash"
]
}
#!/bin/bash
find /Users -mindepth 1 -mtime +1 -exec rm -rf {} \;
@atomic-penguin
atomic-penguin / chef-client-error.txt
Created July 18, 2011 19:42
OpsChef Windows CB debug information
[Mon, 18 Jul 2011 15:43:40 -0400] INFO: *** Chef 0.10.2 ***
[Mon, 18 Jul 2011 15:43:50 -0400] INFO: Run List is [recipe[clamwin]]
[Mon, 18 Jul 2011 15:43:50 -0400] INFO: Run List expands to [clamwin]
[Mon, 18 Jul 2011 15:43:50 -0400] INFO: Starting Chef Run for wolfe21-chefwin.marshall.edu
[Mon, 18 Jul 2011 15:43:50 -0400] INFO: Loading cookbooks [clamwin, windows]
[Mon, 18 Jul 2011 15:43:50 -0400] INFO: Processing windows_package[ClamWin Free Antivirus 0.97.1] action install (clamwin::default line /chef/cache/cookbooks/clamwin/recipes/default.rb)
[Mon, 18 Jul 2011 15:43:51 -0400] ERROR: windows_package[ClamWin Free Antivirus 0.97.1] (clamwin::default line /chef/cache/cookbooks/clamwin/recipes/default.rb) has had an error
[Mon, 18 Jul 2011 15:43:51 -0400] ERROR: Running exception handlers
[Mon, 18 Jul 2011 15:43:51 -0400] FATAL: Saving node information to c:/chef/cache/failed-run-data.json
[Mon, 18 Jul 2011 15:43:51 -0400] ERROR: Exception handlers complete