@ladislavGazo
gazo@seges.sk
# change host records vim /etc/hosts vim /etc/hostname # optionally reboot reboot # to refresh repo list sudo apt-get update # to install updates sudo apt-get upgrade sudo apt-get install tmux mc
http://www.andrewault.net/2010/05/17/securing-an-ubuntu-server/ sudo sysctl -w net.ipv4.conf.all.accept_source_route=0 sudo sysctl -w net.ipv4.conf.default.accept_source_route=0 sudo aptitude -y install denyhosts sudo aptitude -y install tiger sudo aptitude -y install psad sudo chkrootkit
knife cookbook create hyperic
cd hyperic
vim recipes/default.rb
kitchen init
gem install test-kitchen --pre
gem install berkshelf
gem install kitchen-vagrant
/chef-repo/cookbooks/hyperic/.kitchen/kitchen-vagrant/default-ubuntu-1204$ vagrant ssh
vim .kitchen.yml
kitchen test
vagrant plugin install vagrant-cachier
directory "/tmp/folder" do
owner "root"
group "root"
mode 0755
action :create
end
user "hyperic" do
supports :manage_home => true
home "/home/#{hyperic_user}"
shell "/bin/bash"
action :create
end
remote_file "hyperic_bundle" do
path hyperic_src
owner hyperic_user
source node['hyperic']['agent']['bundle_url']
mode 00644
end
template "/etc/init.d/#{service_name}" do
action :create_if_missing
owner "root"
mode 00700
source "hyperic-agent.erb"
variables(
:service_name => service_name,
:agentdir => hyperic_agentdir,
:user => hyperic_user,
:java_home => java_home
)
end
service service_name do pattern "agent-#{hyperic_version}"
action [ :enable, :start ]
end
bash "extract_tcc" do cwd ::File.dirname(tcc_down_path)
code <<-EOH
chown -R #{node.tcc.user}:#{node.tcc.group} #{node.tcc.location}
EOH
end