User Tools

Site Tools


opus:spring2012:asowers:hpc0part2

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?
opus/spring2012/asowers/hpc0part2.txt · Last modified: 2012/04/06 00:31 by asowers