Wednesday, February 28, 2018

how to ubuntu 12.04 desktop on vmplayer 5.x

  • Root User Problem
By default, the Root account password is locked in Ubuntu.
This means that you cannot login as Root directly or use the su command to become the Root user. 
since the Root account physically exists it is still possible to run programs with root-level privileges.
This is where sudo comes in - it allows authorized users (normally "Administrative" users) to run certain programs as Root without having to know the root password.
This means that in the terminal you should use sudo for commands that require root privileges; simply prepend sudo to all the commands you would normally run as Root
  • Enable Disable Root account
To enable the Root account (i.e. set a password) use:
sudo passwd root
Re-disabling your root account
sudo passwd -dl root
  • To download packages , use aptitude
sudo aptitude install g++ 
https://help.ubuntu.com/community/RootSudo

  • how to convert .deb to .rpm package
The "alien" tool can convert rpm to deb

  • to install .deb package
sudo dpkg -i package.deb

  • to list installed packages
"dpkg --get-selections" which will give us a list of all the currently installed packages.
  •  to install source package
gunzip mysql-5.5.27-linux2.6-i686.tar.gz 
tar xfv mysql-5.5.27-linux2.6-i686.tar
  • to install mysql server
sudo aptitude install mysql-server 
sudo aptitude install mysql-workbench



  • to enable shared folder on windows 7 host



Virtual Machine settings
Folder sharing = Always Enabled

you can list shared folder under  /mnt/hgfs/ directory

how to install python on ubuntu 12.04

  • download source code from www.python.org
platform: ubuntu 12.04
Python-2.7.3.tgz

./configure
make
sudo make altinstall

it's installed under directories below
/usr/local/bin/
/usr/bin/


on the terminal type "python"

yeniceri@ubuntu:~/Desktop/Python-2.7.3$ python
Python 2.7.3 (default, Aug 30 2012, 05:57:53)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

Use quit() or Ctrl-D (i.e. EOF) to exit


first hello world code, child is born


>>> print "holla el mundo"
holla el mundo

how to install ansible centos7

Ansible on centos7

Step 1 — Installing Ansible
sudo yum install epel-release
sudo yum install ansible

Step 2 — Configuring Ansible Hosts
sudo vi /etc/ansible/hosts

by default, try to connect to remote hosts using current username.
If that user doesn't exist on the remote system

connect to servers in the "servers" group with the sammy user
sudo mkdir /etc/ansible/group_vars

create YAML-formatted files for each group
sudo nano /etc/ansible/group_vars/servers

specify configuration details for every server
/etc/ansible/group_vars/all.
Individual hosts
/etc/ansible/host_vars.



Ping all of the servers
ansible -m ping all

ansible -m ping host1
ansible -m ping host1:host2

 memory usage on our host1 machine
ansible -m shell -a 'free -m' host1

Usage: ansible <host-pattern> [options]
-m MODULE_NAME, --module-name=MODULE_NAME

Tuesday, February 20, 2018

how to install docker centos7

   $sudo yum check-update 
   $curl -fsSL https://get.docker.com/ | sh
  $ sudo usermod -aG docker myuser
  logout/login
 
 $ docker version
 Client:
 Version:       18.02.0-ce
 API version:   1.36
 Go version:    go1.9.3
 Git commit:    fc4de44
 Built: Wed Feb  7 21:14:12 2018
 OS/Arch:       linux/amd64
 Experimental:  false
 Orchestrator:  swarm

Wednesday, February 14, 2018

ansible vagrant on WSL

Assuming you already have Windows Subsystem for Linux(WSL) running on your host machine.


edition:windows 10 enterprise
version:1709
OS Build:16299.192



sudo apt-get update

sudo apt-get install python-pip git libffi-dev libssl-dev -y

sudo apt-get -f install
sudo apt-get install python-pip git libffi-dev libssl-dev -y

pip install ansible pywinr

Problem:
Collecting pywinr
  Could not find a version that satisfies the requirement pywinr (from versions: )
No matching distribution found for pywinr

cd /mnt/e/PURR/gluster_lab2/

touch test.yml
nano test.yml
ansible-playbook test.yml --connection=local

git clone https://github.com/githubfoam/ansible-vagrant-examples.git
sudo vagrant validate Vagrantfile



$ sudo vagrant up
No usable default provider could be found for your system.

Problem:
Vagrant relies on interactions with 3rd party systems, known as
"providers", to provide Vagrant with resources to run development
environments. Examples are VirtualBox, VMware, Hyper-V.

The easiest solution to this message is to install VirtualBox, which
is available for free on all major platforms.

If you believe you already have a provider available, make sure it
is properly installed and configured. You can see more details about
why a particular provider isn't working by forcing usage with
`vagrant up --provider=PROVIDER`, which should give you a more specific
error message for that particular provider.


http://docs.ansible.com/ansible/latest/intro_windows.html
https://www.jeffgeerling.com/blog/2017/using-ansible-through-windows-10s-subsystem-linux

Monday, February 12, 2018

how to download freebsd source via svn

Install subversion
  • From ports
# cd /usr/ports/devel/subversion
# make install

  • From packages
# pkg_add -r subversion

check out FreeBSD Source
if you want patches since release, you are likely wanting to do Release Engineering

Release
svn checkout http://svn.freebsd.org/base/release/11.1.0/ /usr/src

Release Engineering
svn checkout http://svn.freebsd.org/base/release/11.1.0/ /usr/src

Stable
# svn checkout http://svn.freebsd.org/base/release/11.1.0/ /usr/src

Currrent
# svn checkout http://svn.freebsd.org/base/head /usr/src

https://www.rhyous.com/2009/12/25/how-to-download-freebsd-source-using-svn/




  • This page contains documentation about the FreeBSD release engineering process.

https://www.freebsd.org/releng/index.html


how to ruby on rails on ubuntu 12.04


  • update your package repository.

sudo apt-get update

git is a simple, fast and efficient version control system
sudo apt-get install git

Curl is a simple command line utility for getting file over web protocols, based on libcurl.
sudo apt-get install curl


RVM is not strictly required
VM requires the command to be executed as login shell, so open a terminal and go to Edit -> Profile Preferences -> Title and Command and check the box that says “Run Command as a login shell“

download rvm
curl -L get.rvm.io | bash -s stable


http://blog.sudobits.com/2012/05/02/how-to-install-ruby-on-rails-in-ubuntu-12-04-lts