Software reference: Difference between revisions

From Bitpost wiki
No edit summary
No edit summary
Line 9: Line 9:
[[Linux software raid]]
[[Linux software raid]]


<!--
===========================================================================================================================================================================================================================================================================================
-->
{| class="mw-collapsible mw-collapsed wikitable"
! OS installation
|-
|
{| class="wikitable"
! [[Ubuntu 15.10 setup]]
|}
{| class="mw-collapsible mw-collapsed wikitable"
! Ubuntu repo management
|-
| To see what repos Ubuntu is currently using:
cat /etc/apt/sources.list
|}
{| class="mw-collapsible mw-collapsed wikitable"
! Set up a new Pi in 10 minutes
|-
| The BEST thing to do is to copy the MicroSD from Carambola (marked with a black 'O'):
* open a terminal so we can watch the MicroSD /dev/sd{#} assignments
sudo tail -f /var/log/syslog
* take the carambola MicroSD card out of the Pi and put it into an Anker hub (gets less hot than the small MicroSD sleeves - and it WILL get hot!)
* put another new MicroSD card into another Anker hub
* open another terminal
dcfldd bs=4M if=/dev/sd{Letter of carambola} of=/dev/sd{Letter of new card}
* They will get HOT... I don't know how to make sure they don't get TOO hot yet... cross your fingers I guess...
* Drop the new card into the new Pi, boot, change /etc/hostname and reboot
|}
{| class="wikitable"
! [[Raspberry Pi Raspbian setup]]
|}
[[Update gentoo kernel]]
{| class="mw-collapsible mw-collapsed wikitable"
! OpenELEC multi-boot install
|-
| The easiest way is to add a new drive just for OpenElec and install OpenElec to it with the installer.  But if you want to SHARE ONE DRIVE with other boots, DO NOT DO THAT :-) Do this instead:
* On an existing refind-booted system, set up two new ext4 partitions
** one about 2GB in size, labeled [SYSTEM], and marked as bootable
** the other with 10GB or more, labeled [STORAGE]
** [http://wiki.openelec.tv/index.php/Manual_Installation prep the drives] (no journal, ssd trim)
* download openelec and mount; there are a couple ways:
** get the img and install to a thumb
** get the img and mount (see below)
* Set up OE drives to mount in other OSes to /openelec-system and /openelec-storage
/dev/disk/by-label/SYSTEM  /openelec-system  ext4 noatime 0 0
/dev/disk/by-label/STORAGE /openelec-storage ext4 noatime 0 0
* copy target/KERNEL and target/SYSTEM to SYSTEM
cp OpenELEC_img/target/KERNEL /openelec-system/
cp OpenELEC_img/target/SYSTEM /openelec-system/
* set up UEFI boot
** subl /boot/efi/EFI/refind/refind.conf (and add this block)
# MDM Trying this, from: http://openelec.tv/forum/64-installation/70783-how-to-efi-booting-openelec-on-new-pc-s-nuc-s
# Only I had to change BOOT to SYSTEM.  and quiet to debugging.
menuentry OpenELEC {
  icon EFI/refind/icons/os_openelec.png
  volume SYSTEM
  ostype Linux
  loader KERNEL
#   options "boot=LABEL=SYSTEM disk=LABEL=STORAGE debugging"
  options "boot=LABEL=SYSTEM disk=LABEL=STORAGE quiet"
}
* I THINK you need one or more of these too, not sure!
cp target/boot/bootx64.efi /openelec-system/BOOT
cp target/boot/bootx64.efi /boot/efi/EFI/ubuntu/
cp target/boot/bootx64.efi /boot/efi/EFI/ubuntu/
|}
{| class="mw-collapsible mw-collapsed wikitable"
! OpenELEC boot from thumb
|-
| NOTE: I have the image already on a white stick with red lettering... anyway...
* Get the latest dev version (stable didn't work for me although this may change)
* [http://wiki.openelec.tv/index.php/HOW-TO:Installing_OpenELEC/Creating_The_Install_Key dd it onto a thumb]
* reboot and select to boot to the thumb in BIOS
* when the boot: line comes up, type "live" to get run a live Kodi rather than run the crufty old installer
|}
{| class="mw-collapsible mw-collapsed wikitable"
! Windows 10 new setup
|-
|
* [http://gnuwin32.sourceforge.net/packages/grep.htm Grep for Windows]
* Create sublime symbolic links to preferences, typically here:
C:\Users\Michael\AppData\Roaming\Sublime Text 3\Packages\User
* etc.
|}
|}
<!--
===========================================================================================================================================================================================================================================================================================
-->
{| class="mw-collapsible mw-collapsed wikitable"
! Cloud and AWS tasks
|-
|
{| class="mw-collapsible mw-collapsed wikitable"
! AWS clone
|-
|
# create a snapshot of an instance
# create an instance of a snapshot
Example...
    instances -> pa-jenkins-win-test -> right-click, Create Image ->
        {
            name: pa-jenkins-win-test,
            AMI ID: ami-57cadc3d
        }
    This creates a new "AMI Image"- WARNING: The source machine will be rebooted!
    monitoring it, waiting for it to be ready... ready.  man that took a while. 
    Select AMI -> rightclick -> Launch...
        instance type: t2.medium (same as original; 2 vCPUs, 4GB mem)
        config: SELECT THE SAME SUBNET (us-east-1d) so on the same LAN and can ping each other; (all other defaults)
        storage: (default)
        tag instance: { name: "pa-jenkins-win-test-older" }
        security: select existing { "pa-shared immed_inno_group raleigh-windows-dev" } (as per Brad, previously - note that "raleigh" is no longer available)
        LAUNCH
        ---
        select an existing key pair or create a new pair
            let's use the existing ones since this is a shared resource
            2014Dec25_air.pem (it's in my docs repo)
        ----
        monitor it, wait for it to be created...
        because it was cloned from a machine that had the password changed, you can't use the existing key to regenerate
        i didn't realize it was changed??
        anyway, it should be the exact same way to connect to test, but with a diff ip/hostname (*-older)
        yep.  switched IP to 172.30.3.208 and it's good to go!
|}
{| class="mw-collapsible mw-collapsed wikitable"
! Expand AWS storage
|-
|
    stop instance
    in instance details, right-click the block device link (typically /dev/sd1)
    click the EBS ID
    snapshot the volume, wait for it to get to "complete"
    right-click snapshot, create volume
        use the same availability zone: us-east-1d
    on the volume created screen, click to show the volume
        vol-b88c3c45
    get the orig volume:
        vol-5af8f0a0
        https://console.aws.amazon.com/ec2/v2/home?region=us-east-1#Volumes:search=vol-5af8f0a0;sort=size
    type this into volume filter to see them both:
        vol-b88c3c45|vol-5af8f0a0
    make note of the attachment info for the old 30GB drive:
        Attachment information
        i-ad45941d (pa-jenkins-win-test):/dev/sda1 (attached)
    detach the volume!  holy cow. 
        i thought about restarting the instance and shutting it down first...
        but i think stopping it already did that!  MOVE ON   
    right click new volume, "attach volume"
        start typing instance name (pa-jenkins-win-test worked)
        CHANGE TEH SELECTED DRIVE NAME (xsdf or something) to the original!  /dev/sda1
        geez that's scary, wonder if it will work...
        YEP!!!  AW#ESOMENWESSSS##$$
    type "disk management", right-click the 30gb image, select Extend
    DONE!!!
|}
|}
{| class="mw-collapsible mw-collapsed wikitable"
{| class="mw-collapsible mw-collapsed wikitable"
! Ubuntu set up networking
! Ubuntu set up networking

Revision as of 12:46, 14 April 2016

Mediawiki - Wordpress - Phabricator

CodeLite - Eclipse - Sublime - Scite - Emacs

LibreOffice - Gimp - i3

Chromium - Firefox - IceWeasel

Linux software raid

OS installation
Ubuntu 15.10 setup
Ubuntu repo management
To see what repos Ubuntu is currently using:
cat /etc/apt/sources.list
Set up a new Pi in 10 minutes
The BEST thing to do is to copy the MicroSD from Carambola (marked with a black 'O'):
  • open a terminal so we can watch the MicroSD /dev/sd{#} assignments
sudo tail -f /var/log/syslog
  • take the carambola MicroSD card out of the Pi and put it into an Anker hub (gets less hot than the small MicroSD sleeves - and it WILL get hot!)
  • put another new MicroSD card into another Anker hub
  • open another terminal
dcfldd bs=4M if=/dev/sd{Letter of carambola} of=/dev/sd{Letter of new card}
  • They will get HOT... I don't know how to make sure they don't get TOO hot yet... cross your fingers I guess...
  • Drop the new card into the new Pi, boot, change /etc/hostname and reboot
Raspberry Pi Raspbian setup

Update gentoo kernel

OpenELEC multi-boot install
The easiest way is to add a new drive just for OpenElec and install OpenElec to it with the installer. But if you want to SHARE ONE DRIVE with other boots, DO NOT DO THAT :-) Do this instead:
  • On an existing refind-booted system, set up two new ext4 partitions
    • one about 2GB in size, labeled [SYSTEM], and marked as bootable
    • the other with 10GB or more, labeled [STORAGE]
    • prep the drives (no journal, ssd trim)
  • download openelec and mount; there are a couple ways:
    • get the img and install to a thumb
    • get the img and mount (see below)
  • Set up OE drives to mount in other OSes to /openelec-system and /openelec-storage
/dev/disk/by-label/SYSTEM  /openelec-system  ext4 noatime 0 0
/dev/disk/by-label/STORAGE /openelec-storage ext4 noatime 0 0
  • copy target/KERNEL and target/SYSTEM to SYSTEM
cp OpenELEC_img/target/KERNEL /openelec-system/
cp OpenELEC_img/target/SYSTEM /openelec-system/
  • set up UEFI boot
    • subl /boot/efi/EFI/refind/refind.conf (and add this block)
# MDM Trying this, from: http://openelec.tv/forum/64-installation/70783-how-to-efi-booting-openelec-on-new-pc-s-nuc-s
# Only I had to change BOOT to SYSTEM.  and quiet to debugging.
menuentry OpenELEC {
	  icon EFI/refind/icons/os_openelec.png
	  volume SYSTEM
	  ostype Linux
	  loader KERNEL
#	  options "boot=LABEL=SYSTEM disk=LABEL=STORAGE debugging"
	  options "boot=LABEL=SYSTEM disk=LABEL=STORAGE quiet"
}
  • I THINK you need one or more of these too, not sure!
cp target/boot/bootx64.efi /openelec-system/BOOT
cp target/boot/bootx64.efi /boot/efi/EFI/ubuntu/
cp target/boot/bootx64.efi /boot/efi/EFI/ubuntu/
OpenELEC boot from thumb
NOTE: I have the image already on a white stick with red lettering... anyway...
  • Get the latest dev version (stable didn't work for me although this may change)
  • dd it onto a thumb
  • reboot and select to boot to the thumb in BIOS
  • when the boot: line comes up, type "live" to get run a live Kodi rather than run the crufty old installer
Windows 10 new setup
C:\Users\Michael\AppData\Roaming\Sublime Text 3\Packages\User
  • etc.
Cloud and AWS tasks
AWS clone
  1. create a snapshot of an instance
  2. create an instance of a snapshot

Example...

   instances -> pa-jenkins-win-test -> right-click, Create Image -> 
       { 
           name: pa-jenkins-win-test, 
           AMI ID: ami-57cadc3d
       }
   This creates a new "AMI Image"- WARNING: The source machine will be rebooted!
   monitoring it, waiting for it to be ready... ready.  man that took a while.  
   Select AMI -> rightclick -> Launch...
       instance type: t2.medium (same as original; 2 vCPUs, 4GB mem)
       config: SELECT THE SAME SUBNET (us-east-1d) so on the same LAN and can ping each other; (all other defaults)
       storage: (default)
       tag instance: { name: "pa-jenkins-win-test-older" }
       security: select existing { "pa-shared immed_inno_group raleigh-windows-dev" } (as per Brad, previously - note that "raleigh" is no longer available) 
       LAUNCH
       ---
       select an existing key pair or create a new pair
           let's use the existing ones since this is a shared resource
           2014Dec25_air.pem (it's in my docs repo)
       ----
       monitor it, wait for it to be created...
       because it was cloned from a machine that had the password changed, you can't use the existing key to regenerate
       i didn't realize it was changed??
       anyway, it should be the exact same way to connect to test, but with a diff ip/hostname (*-older)
       yep.  switched IP to 172.30.3.208 and it's good to go!
Expand AWS storage
   stop instance
   in instance details, right-click the block device link (typically /dev/sd1)
   click the EBS ID
   snapshot the volume, wait for it to get to "complete"
   right-click snapshot, create volume
       use the same availability zone: us-east-1d
   on the volume created screen, click to show the volume
       vol-b88c3c45
   get the orig volume:
       vol-5af8f0a0
       https://console.aws.amazon.com/ec2/v2/home?region=us-east-1#Volumes:search=vol-5af8f0a0;sort=size
   type this into volume filter to see them both:
       vol-b88c3c45|vol-5af8f0a0
   make note of the attachment info for the old 30GB drive:
       Attachment information
       i-ad45941d (pa-jenkins-win-test):/dev/sda1 (attached)
   detach the volume!  holy cow.  
       i thought about restarting the instance and shutting it down first...
       but i think stopping it already did that!  MOVE ON    
   right click new volume, "attach volume"
       start typing instance name (pa-jenkins-win-test worked)
       CHANGE TEH SELECTED DRIVE NAME (xsdf or something) to the original!  /dev/sda1
       geez that's scary, wonder if it will work...
       YEP!!!  AW#ESOMENWESSSS##$$
   type "disk management", right-click the 30gb image, select Extend
   DONE!!!
Ubuntu set up networking
Install NetworkManager, as the wpagui UI sucks
  • sudo apt-get install network-manager-gnome
  • YOU MUST remove interfaces from /etc/network/interfaces so wpa gives them up to nm-applet
  • add nm-applet to startup if needed - i don't think it is needed as it seems to start up automatically now - try rebooting first
Ubuntu install Sublime
Sublime editor seems way better than anything else out there on linux:
  • sudo add-apt-repository ppa:webupd8team/sublime-text-3
  • sudo apt-get update
  • sudo apt-get install sublime-text-installer
  • git config --global core.editor "subl -n -w" # to use sublime with -n(ew window) and -w(ait for exit)
Ubuntu install Node.js
Install Node.js using the "Node.js Version Manager" nvm details
  • find the latest nvm version
  • curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash
  • source ~/.profile
  • nvm ls-remote
  • nvm install ##### # (latest version, eg 5.8.0)
  • MDM I don't need this do I? I'm not running express... npm install -g express # to set the package manager to use a globally shared location
  • nvm alias default stable
  • (update .bashrc to configure node on even non-interactive shells - see another for example)
    • also: nvm use 4.2.1; node -v; nvm ls; nvm alias default 0.11.13; nvm use default
    • also: You can create an .nvmrc file containing version number in the project root directory and it will default to that version
Ubuntu install Java
Install Oracle JDK 8 (9 is scheduled for release in 2016)
su -
add-apt-repository ppa:webupd8team/java
apt-get update
apt-get install oracle-java8-installer
apt-get install oracle-java8-set-default
    • ctrl-D (back to user)
update-alternatives --config java # make note of path
update-alternatives --config javac # make note of path
sudo subl /etc/environment
JAVA_HOME="/usr/lib/jvm/java-8-oracle/jre/bin/java" # actually, use the path from above, of course