pam_tally2 –user<user name> –reset
Author: rdircio
Spin
Spin!!!
Build a “.box” file from an existing vagrant vm
If you want to package an existing vm to use it later as a clone, just run
# vagrant package
This will build a “.box” file of your vm, which you could put in a webserver to use it whenever you need to create another vagrant vm.
Run vagrant vms with vm console enabled
If you want to use the virtualbox console for your vagrant vms, you need to enable that feature in the “Vagrantfile” settings file, just add these lines
config.vm.provider "virtualbox" do |v| v.customize ["modifyvm", :id, "--vrde","on"] v.customize ["modifyvm", :id, "--vrdeport","3389-4000"] end
Vagrant
install virtualbox and vagrant first, then create a working directory
# mkdir /opt/vagrant # cd /opt/vagrant/
Initialize the environment in the directory, in this case we’ll download a ubuntu precise vm
# vagrant box add precise32 http://files.vagrantup.com/precise32.box # vagrant box list
Edit Vagrantfile and make sure the vm points to “precise32” instead of “base”:
config.vm.box = "precise32"
Start the vm
# vagrant init # vagrant up
Connect to the vm
# vagrant ssh
Additional…
for a centos6.5 you can find a vm here:
# vagrant box add centos65 http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.5-i386_chef-provisionerless.box
Ansible
Install it in the master node
# apt-get install ansible
add a section to /etc/ansible/hosts
[slaves] d510 d610
Ping them (make sure you have ssh keys setup in authorized_keys)
# ansible -m ping -u root all d510 | success >> { "changed": false, "ping": "pong" } d610 | success >> { "changed": false, "ping": "pong" }
A first play file using apt to install some packages in the “slaves”
--- - name : first play hosts: slaves user: root tasks: # - name: install gcc # apt: pkg=gcc state=present # - name: install nginx # apt: pkg=nginx state=present - name: install findx copy: src=/usr/bin/findx dest=/usr/bin/findx owner=root group=root mode=755 - name: install common packages action: apt pkg={{item}} state=installed with_items: - motion - nginx
Running it…
# ansible-playbook play.yml PLAY [first play] ************************************************************* GATHERING FACTS *************************************************************** ok: [d510] ok: [d610] TASK: [install findx] ********************************************************* ok: [d610] ok: [d510] TASK: [install common packages] *********************************************** ok: [d610] => (item=motion,nginx) ok: [d510] => (item=motion,nginx) PLAY RECAP ******************************************************************** d510 : ok=3 changed=0 unreachable=0 failed=0 d610 : ok=3 changed=0 unreachable=0 failed=0
github
# git --work-tree=uExplorer add . # git remote add origin https://github.com/rdircio/uExplorer.git # git pull https://github.com/rdircio/uExplorer.git # git push -u origin master
search for available packages using apt
# apt-cache search xsane
Create minecraft server in linux
Make sure you have the latest java from oracle
# java -version java version "1.8.0_25" Java(TM) SE Runtime Environment (build 1.8.0_25-b17) Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
Make a diretory for the server# mkdir /opt/minecraftDownload minecraft jar
# cd /opt/minecraft && wget https://s3.amazonaws.com/Minecraft.Download/versions/1.8.1/minecraft_server.1.8.1.jarRun the server for the first time, it will create its settings file and ask you to accept the eula
# java -Xms32M -Xmx512M -jar /opt/minecraft/minecraft_server.1.8.1.jar noguiQuit by issuing ctrl-c and then edit eula.txt,set eula=true
Set your admin user in ops.json[ { "uuid": "093953b0-ee80-4a0c-a00e-5f13a1a69f25", "name": "CDDO", "level": 4 } ]You can get your user's uuid in http://minecraft-techworld.com/uuid-lookup-tool
Typical Puppet manifest file
class test_class { file { "/tmp/testfile": content => "Puppet installation, successful\n", ensure => present, mode => 644, owner => root, group => root } file { '/media/HDS': ensure => directory, mode => 644, owner => root, group => root } file { '/media/HDS/MP3': ensure => directory, mode => 644, owner => root, group => root } fstab { "mp3": source => '//192.168.1.250/MP3', dest => '/media/HDS/MP3', type => 'cifs', opts => 'username=rdircio,password=whatever,iocharset=utf8,sec=ntlm' } file { '/media/HDS/VIDEO': ensure => directory, mode => 644, owner => root, group => root } fstab { "video": source => '//192.168.1.250/VIDEO', dest => '/media/HDS/VIDEO', type => 'cifs', opts => 'username=rdircio,password=whatever,iocharset=utf8,sec=ntlm' } file { '/media/HDS/DOCUMENTS': ensure => directory, mode => 644, owner => root, group => root } fstab { "documents": source => '//192.168.1.250/DOCUMENTS', dest => '/media/HDS/DOCUMENTS', type => 'cifs', opts => 'username=rdircio,password=whatever,iocharset=utf8,sec=ntlm' } file { '/media/HDS/pictures': ensure => directory, mode => 644, owner => root, group => root } fstab { "pictures": source => '//192.168.1.250/pictures', dest => '/media/HDS/pictures', type => 'cifs', opts => 'username=rdircio,password=whatever,iocharset=utf8,sec=ntlm' } file { '/media/HDS/SW': ensure => directory, mode => 644, owner => root, group => root } fstab { "sw": source => '//192.168.1.250/SW', dest => '/media/HDS/SW', type => 'cifs', opts => 'username=rdircio,password=whatever,iocharset=utf8,sec=ntlm' } } node "aspireone.lan" { } # tell puppet on which client to run the class node "d510.lan" { include test_class } node "d610.lan" { include test_class }