Table of Contents

Part 2

Entries

Entry 5: March 8, 2012

Today we're sitting in class talking about Diablo 3 and warcraft. Maybe we'll get some work done someday! =D

Entry 6: March 10, 2012

Today I setup a SAMAB server on my PogoPlug headless server. This means to date this $50 box has become:

  1. programing box
  2. Web Server
  3. CLI app box I.E. ttytter-twitter Alpine-gmail Lynx-'super-light' Web browser
  4. SFTP server for living in the cloud
  5. A secure gateway for internal access into my network

And now it's a SMB server/client for windows hosts!

Best $50 ever.

Entry 7: March 19, 2012

Today we're planing to setup our ip cams for the plants.

Entry 8: March Day, 2012

This is a sample format for a dated entry. Please substitute the actual date for “Month Day, Year”, and duplicate the level 4 heading to make additional entries.

As an aid, feel free to use the following questions to help you generate content for your entries:

Remember that 4 is just the minimum number of entries. Feel free to have more.

Keywords

hpc0 Keywords

hpc0 LAMP server

Definition

Linux, Apache Mysql and PHP server

Demonstration
  • Unordered List Iteminstall Apache: apt-get install apache2
  • install Mysql: apt-get install mysql-server
  • install PHP: apt-get install php5 php-pear php5-suhosin AND apt-get install php5-mysql so mysql and php play nice like they should.
  • Once your system or VM is configured with these programs you can establish a database and begin serving web pages!

The default location for your web server is /var/www/index.html

hpc0 SAMBA server

Definition

SAMBA is an SMB/CIFS client/server for Linux and UNIX boxes. SAMBA will often been seen as the default sharing method for local Linux nodes in a windows dominated network.

Demonstration

I installed SAMBA on my headless PogoServer that runs arch Linux; I'll show you the outout:

[andrew@alarm ~]$ sudo pacman -S samba
warning: samba-3.6.3-2 is up to date -- reinstalling
resolving dependencies...
looking for inter-conflicts...

Targets (1): samba-3.6.3-2

Total Installed Size:   54.29 MiB
Net Upgrade Size:       0.00 MiB

Proceed with installation? [Y/n] y
(1/1) checking package integrity                                                                                   [####################################################################] 100%
(1/1) loading package files                                                                                        [####################################################################] 100%
(1/1) checking for file conflicts                                                                                  [####################################################################] 100%
(1/1) checking available disk space                                                                                [####################################################################] 100%
(1/1) upgrading samba                                                                                              [####################################################################] 100%

[andrew@alarm ~]$ cd /etc/samba
[andrew@alarm samba]$ ls
private  smb.conf.default
[andrew@alarm samba]$ sudo touch smb.conf
[andrew@alarm samba]$ cp /etc/samba/smb.conf.default /etc/samba/smb.conf
[andrew@alarm samba]$ sudo rc.d start samba
:: Starting Samba Server                                                                                                                                                               [DONE] 

[andrew@alarm samba]$ sudo pdbedit -a -u Andrew
new password:
retype new password:
Unix username:        Andrew
NT username:          
Account Flags:        [U          ]
User SID:             S-1-5-21-605549301-1251446114-1201287368-1000
Primary Group SID:    S-1-5-21-605549301-1251446114-1201287368-513
Full Name:            
Home Directory:       \\alarm\andrew
HomeDir Drive:        
Logon Script:         
Profile Path:         \\alarm\andrew\profile
Domain:               ALARM
Account desc:         
Workstations:         
Munged dial:          
Logon time:           0
Logoff time:          never
Kickoff time:         never
Password last set:    Sat, 10 Mar 2012 08:56:30 CST
Password can change:  Sat, 10 Mar 2012 08:56:30 CST
Password must change: never
Last bad password   : 0
Bad password count  : 0
Logon hours         : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
[andrew@alarm samba]$   

You can now share the files of your Linux user with windows clients!

hpc0 Extraction fun with .tar.gz .tar.bz2 and .tar

We can't always rely on package managers to do our dirty work when installing new software or programs…

Definition

Sometimes when you're installing something new you need to extract it from a tar ball before working with it.

Demonstration

For .tar.gz one must simply enter:

tar xvfz "the archive"

In the case of a .tar just remove the z. it should look like this:

tar xvf "the the archive"

For a .tar.bz2:

tar xvfj "the archive"

Then enter the directory the untar has produced. You should be greeted by a bunch of files including the make and install files.

hpc0 Make

Definition

Make is a tool to recompile programs for installation.

Demonstration

Here are some make options I find useful:

  • You can tell make to run in another directory using -C
  • -f to pick the file you'd like to make
  • -i will allow you to ignore errors whilst making things.

hpc0 ssh port forwarding

Definition

ssh port forwarding allows you to access port on a remote network via ssh.

Demonstration

Shown below is opening port 25565 on 10.80.3.34 through lab46

Last login: Thu Apr  5 13:42:57 on ttys002
 __      __          ___                                        
/\ \  __/\ \        /\_ \                                       
\ \ \/\ \ \ \     __\//\ \     ___    ___     ___ ___      __   
 \ \ \ \ \ \ \  /'__`\\ \ \   /'___\ / __`\ /' __` __`\  /'__`\ 
  \ \ \_/ \_\ \/\  __/ \_\ \_/\ \__//\ \L\ \/\ \/\ \/\ \/\  __/ 
   \ `\___x___/\ \____\/\____\ \____\ \____/\ \_\ \_\ \_\ \____\
    '\/__//__/  \/____/\/____/\/____/\/___/  \/_/\/_/\/_/\/____/
                                                                
                                                                                                   
 ______              __                             
/\  _  \            /\ \                            
\ \ \L\ \    ___    \_\ \  _ __    __   __  __  __  
 \ \  __ \ /' _ `\  /'_` \/\`'__\/'__`\/\ \/\ \/\ \ 
  \ \ \/\ \/\ \/\ \/\ \L\ \ \ \//\  __/\ \ \_/ \_/ \
   \ \_\ \_\ \_\ \_\ \___,_\ \_\\ \____\\ \___x___/'
    \/_/\/_/\/_/\/_/\/__,_ /\/_/ \/____/ \/__//__/  
                                                    
                                                    

ldhcp-213:~ asow123$  ssh -g -L 25565:vm34.student.lab:25565 asowers@lab46.corning-cc.edu
asowers@lab46.corning-cc.edu's password: 
 __         _     _ _   __   . . . . . . . . . . . . . . . . . . . . . . . . .
|  |   __ _| |__ / | |_/ /   . Basic System Usage:  Type 'usage' at prompt   .
|  |__/ _` | '_ \\_  _/ _ \  . Events and News:     Type 'news' at prompt    .
|_____\__,_|_.__/  |_|\___/  . Broken E-mail?       Type 'fixmail' at prompt .
---------------------------  . Check Lab46 Mail:    Type 'alpine' at prompt  .
c o r n i n g - c c . e d u  . . . . . . . . . . . . . . . . . . . . . . . . .

 Lab46 is the Computer & Information Science Department's Student Development
 Server for Computer-related coursework, projects, and exploration.  For more
 information, please check out:
  .. .  .    .        .                .                .        .    .  . ..
 .  Lab46 Web Page:       http://lab46.corning-cc.edu/                       .
 .  Lab46 Help Form:      http://lab46.corning-cc.edu/help_request           .
 .  Help E-mail:          haas@corning-cc.edu or wedge@lab46.corning-cc.edu  .
  .. .  .    .        .                .                .        .    .  . ..
      _        
  .-./*)       
_/___/   `.    
  U U      'You can check the current directory by typing 'pwd'.'
You have old mail.
Last login: Thu Apr  5 12:54:01 2012 from 172.16.198.128
lab46:~$ 

hpc0 Window manager forwarding

You can forward an entire window manager via you ssh session onto X11

Definition

On a remote system you may need more then a terminal for specific applications that demand graphics. All one needs to do is forward their Window manager via their secure shell!

Demonstration

Just grab a package manager of your choice and go to town! I'm going to use Xfce4 in my example:

[root@PogoLab ~]# pacman -S xfce4
:: There are 17 members in group xfce4:
:: Repository extra
   1) exo  2) garcon  3) gtk2-xfce-engine  4) gtk3-xfce-engine  5) terminal  6) thunar  7) tumbler  8) xfce-utils  9) xfce4-appfinder  10) xfce4-mixer  11) xfce4-panel
   12) xfce4-session  13) xfce4-settings  14) xfconf  15) xfdesktop  16) xfwm4  17) xfwm4-themes

Enter a selection (default=all): 
resolving dependencies...
looking for inter-conflicts...

Targets (21): libxfce4ui-4.8.1-1  libxfce4util-4.8.2-1  vte-0.28.2-3  xorg-xinit-1.3.2-1  exo-0.6.2-3  garcon-0.1.11-1  gtk2-xfce-engine-2.99.2-1  gtk3-xfce-engine-2.99.2-1
              terminal-0.4.8-1  thunar-1.2.3-5  tumbler-0.1.24-1  xfce-utils-4.8.3-1  xfce4-appfinder-4.8.0-2  xfce4-mixer-4.8.0-2  xfce4-panel-4.8.6-1  xfce4-session-4.8.3-1
              xfce4-settings-4.8.3-2  xfconf-4.8.1-1  xfdesktop-4.8.3-2  xfwm4-4.8.3-1  xfwm4-themes-4.6.0-2

Total Installed Size:   71.22 MiB

Proceed with installation? [Y/n] y
(21/21) checking package integrity                                                                          [################################################################] 100%
(21/21) loading package files                                                                               [################################################################] 100%
(21/21) checking for file conflicts                                                                         [################################################################] 100%
( 1/21) installing libxfce4util                                                                             [################################################################] 100%
( 2/21) installing exo                                                                                      [################################################################] 100%
Optional dependencies for exo
    perl-uri: for mail-compose helper script
( 3/21) installing garcon                                                                                   [################################################################] 100%
( 4/21) installing gtk2-xfce-engine                                                                         [################################################################] 100%
( 5/21) installing gtk3-xfce-engine                                                                         [################################################################] 100%
( 6/21) installing vte                                                                                      [################################################################] 100%
( 7/21) installing terminal                                                                                 [################################################################] 100%
( 8/21) installing xfconf                                                                                   [################################################################] 100%
( 9/21) installing libxfce4ui                                                                               [################################################################] 100%
Optional dependencies for libxfce4ui
    glade: for using the included glade module
(10/21) installing thunar                                                                                   [################################################################] 100%
Optional dependencies for thunar
    gvfs: for trash support, mounting with udisk and remote filesystems
    polkit-gnome: for mounting internal partitions (needs root password)
    xfce4-panel: for trash applet
    tumbler: for thumbnail previews
    thunar-volman: manages removable devices
    thunar-archive-plugin: create and deflate archives
    thunar-media-tags-plugin: view/edit id3/ogg tags
(11/21) installing tumbler                                                                                  [################################################################] 100%
Optional dependencies for tumbler
    ffmpegthumbnailer: for video thumbnails
    gstreamer0.10: for video thumbnails
    poppler-glib: for PDF thumbnails
    libgsf: for ODF thumbnails
    libopenraw: for RAW thumbnails
    freetype2: for font thumbnails
(12/21) installing xorg-xinit                                                                               [################################################################] 100%
Optional dependencies for xorg-xinit
    xorg-twm
    xterm
(13/21) installing xfce-utils                                                                               [################################################################] 100%
NOTE
----
 ==> xfce can run on top of a framebuffer. However, for most users it is
 ==> best to install xorg as an x-server. Please install either xorg-xinit
 ==> as minimal environment or the xorg meta package.
 pacman -S xorg-xinit
      -- or --
 pacman -S xorg
Optional dependencies for xfce-utils
    perl:	for migration scripts
    xscreensaver: for locking screen with xflock4
    gnome-screensaver: for locking screen with xflock4
    xlockmore: for locking screen with xflock4
(14/21) installing xfce4-appfinder                                                                          [################################################################] 100%
(15/21) installing xfce4-panel                                                                              [################################################################] 100%
(16/21) installing xfce4-mixer                                                                              [################################################################] 100%
Optional dependencies for xfce4-mixer
    gstreamer0.10-base-plugins: to support basic audio hardware
    gstreamer0.10-good-plugins: well supported hardware
    gstreamer0.10-bad-plugins: not so well supported hardware
    gstreamer0.10-ugly-plugins: might contain questionable license hardware
(17/21) installing xfce4-session                                                                            [################################################################] 100%
Optional dependencies for xfce4-session
    fortune-mod: for xfce4-tips
(18/21) installing xfce4-settings                                                                           [################################################################] 100%
Optional dependencies for xfce4-settings
    libcanberra: for sound control
(19/21) installing xfdesktop                                                                                [################################################################] 100%
Optional dependencies for xfdesktop
    xfce4-panel: panel menu plugin
(20/21) installing xfwm4                                                                                    [################################################################] 100%
(21/21) installing xfwm4-themes                                                                             [################################################################] 100%


[root@PogoLab ~]# sudo xfce4-panel

You should then be greeted by a lovely xfce panel interface to launch applications from.

hpc0 Keyword 15

Identification of chosen keyword (unless you update the section heading above).

Definition

Definition (in your own words) of the chosen keyword.

Demonstration

Demonstration of the chosen keyword.

If you wish to aid your definition with a code sample, you can do so by using a wiki code block, an example follows:

/*
 * Sample code block
 */
#include <stdio.h>
 
int main()
{
    return(0);
}

Alternatively (or additionally), if you want to demonstrate something on the command-line, you can do so as follows:

lab46:~$ cd src
lab46:~/src$ gcc -o hello hello.c
lab46:~/src$ ./hello
Hello, World!
lab46:~/src$ 

hpc0 Keyword 16

Identification of chosen keyword (unless you update the section heading above).

Definition

Definition (in your own words) of the chosen keyword.

Demonstration

Demonstration of the chosen keyword.

If you wish to aid your definition with a code sample, you can do so by using a wiki code block, an example follows:

/*
 * Sample code block
 */
#include <stdio.h>
 
int main()
{
    return(0);
}

Alternatively (or additionally), if you want to demonstrate something on the command-line, you can do so as follows:

lab46:~$ cd src
lab46:~/src$ gcc -o hello hello.c
lab46:~/src$ ./hello
Hello, World!
lab46:~/src$ 

hpc0 Objective

hpc0 Objective

State the course objective

Definition

In your own words, define what that objective entails.

Method

State the method you will use for measuring successful academic/intellectual achievement of this objective.

Measurement

Follow your method and obtain a measurement. Document the results here.

Analysis

Reflect upon your results of the measurement to ascertain your achievement of the particular course objective.

  • How did you do?
  • Is there room for improvement?
  • Could the measurement process be enhanced to be more effective?
  • Do you think this enhancement would be efficient to employ?
  • Could the course objective be altered to be more applicable? How would you alter it?

Experiments

Experiment 4

Question

Can I forward an entire window manager via X11?

Resources

PogoPlug, GIYF

Hypothesis

I believe you can forward an entire window manager via X11 and SSH

Experiment

AirAndrew:~ asow123$ ssh -X andrew@67.241.242.136
andrew@67.241.242.136's password: 
Last login: Tue Apr 10 09:31:12 2012 from 50.42.61.239
 __      __          ___                                          ______          
/\ \  __/\ \        /\_ \                                        /\__  _\         
\ \ \/\ \ \ \     __\//\ \     ___    ___     ___ ___      __    \/_/\ \/   ___   
 \ \ \ \ \ \ \  /'__`\\ \ \   /'___\ / __`\ /' __` __`\  /'__`\     \ \ \  / __`\ 
  \ \ \_/ \_\ \/\  __/ \_\ \_/\ \__//\ \L\ \/\ \/\ \/\ \/\  __/      \ \ \/\ \L\ \
   \ `\___x___/\ \____\/\____\ \____\ \____/\ \_\ \_\ \_\ \____\      \ \_\ \____/
    '\/__//__/  \/____/\/____/\/____/\/___/  \/_/\/_/\/_/\/____/       \/_/\/___/ 
                                                                                  
                                                                                  
 ____                        __                __       __     
/\  _`\                     /\ \              /\ \     /\ \    
\ \ \L\ \___      __     ___\ \ \         __  \ \ \____\ \ \   
 \ \ ,__/ __`\  /'_ `\  / __`\ \ \  __  /'__`\ \ \ '__`\\ \ \  
  \ \ \/\ \L\ \/\ \L\ \/\ \L\ \ \ \L\ \/\ \L\.\_\ \ \L\ \\ \_\ 
   \ \_\ \____/\ \____ \ \____/\ \____/\ \__/.\_\\ \_,__/ \/\_\
    \/_/\/___/  \/___L\ \/___/  \/___/  \/__/\/_/ \/___/   \/_/
                  /\____/                                      
                  \_/__/        



[andrew@PogoLab ~]$ sudo xfce4-panel
Password: 

Data

Xfce then began to load atop my local machine.

Analysis

My hypothesis was correct, the window manager is a lot like a user application and therefor can be forwarded via the network.

Conclusions

This could be especially useful for remote configuration and administration.

Experiment 5

Question

What is the question you'd like to pose for experimentation? State it here.

Resources

Collect information and resources (such as URLs of web resources), and comment on knowledge obtained that you think will provide useful background information to aid in performing the experiment.

Hypothesis

Based on what you've read with respect to your original posed question, what do you think will be the result of your experiment (ie an educated guess based on the facts known). This is done before actually performing the experiment.

State your rationale.

Experiment

How are you going to test your hypothesis? What is the structure of your experiment?

Data

Perform your experiment, and collect/document the results here.

Analysis

Based on the data collected:

Conclusions

What can you ascertain based on the experiment performed and data collected? Document your findings here; make a statement as to any discoveries you've made.

Retest 2

Perform the following steps:

State Experiment

Whose existing experiment are you going to retest? Provide the URL, note the author, and restate their question.

Resources

Evaluate their resources and commentary. Answer the following questions:

Hypothesis

State their experiment's hypothesis. Answer the following questions:

Experiment

Follow the steps given to recreate the original experiment. Answer the following questions:

Data

Publish the data you have gained from your performing of the experiment here.

Analysis

Answer the following:

Conclusions

Answer the following: