Showing posts with label Operating System. Show all posts
Showing posts with label Operating System. Show all posts

Monday, July 25, 2011

Basic UNIX commands

  • man - manual/help
  • pwd - print working/current directory
  • ls - list files
  • ls -l - lists files in 'long format', which contains lots of useful information, e.g. the exact size of the file, who owns the file and who has the right to look at it, and when it was last modified
  • cd - change directory
  • mkdir [dir] - creates dir
  • rmdir [dir] - removes dir
  • more [options] file(s) - Display contents of files
  • less [options] file(s) - Display contents of files
    Useful commands while viewing a file with 'more' or 'less':
    • <spacebar> - scroll forward one page
    • ^b (control-b) - scroll backward one page
    • /<text> - search for string
    • n - find next occurence of string
    • N - find previous occurence of string (search for string in opposite direction)*
    • g - go to the beginning of the file*
    • G - go to the end of the file*
    • v - edit the current file with 'vi'*
    • :n - go to the next file*
    • :p - go to the previous file*
    • q - quit
    *works in 'less', not 'more'
  • grep [options] <pattern> [files] - search inside files for the given pattern
    Useful options:
    • -i - ignore case
    • -r or -R - search files in directories/subdirectories recursively
    • -v - nvert match: select non-matching lines
  • tail [options] [filenames] - show tail/end of file
  • tail -f temp.log - follow/monitor the file, display the last 10 lines of temp.log and append new lines to the display as new lines are added to temp.log
  • vi filename - edit the file
    Modes:
    • command mode - letters of the keyboard will be interpreted as commands
    • insert mode - letters of the keyboard will type or edit text
    Useful commands:
    • x - deletes the character the cursor is under
    • dd - deletes the line the cursor is on
    • a - append after the cursor
    • i - insert before the cursor
    • ESC - non edit mode
    • :wq - saves the current changes and exits vi
    • :w - saves the current changes but does not exit vi
    • :q - exits vi without saving any change

References:
http://claymore.rfmh.org/public/computer_resources/unix_commands.html
http://mally.stanford.edu/~sr/computing/basic-unix.html
http://cmgm.stanford.edu/classes/unix/vi.html
http://en.wikipedia.org
http://www.ccsf.edu/Pub/Fac/vi.html

Sunday, March 6, 2011

Deployment

  1. Create the package for full release
    1. Check out the Project in Eclipse
      1. Open SVN Repositories. Click Window->Open Perspective->SVN Repository Browser
      2. Assuming that you already have Repository Location set up, find the project in the trunk or branches
      3. Right click project then click Show History to ensure that it has the latest change/fix needed
      4. Tag or make a branch out of the project. Right click project then click New->Tag or Branch
      5. Right click newly created tag/branch then click Show History to ensure that the it has the latest change/fix needed
      6. Check out the newly created tag or branch. Right click project the click Check Out

    2. Build the package
      1. In the console, go to emea-pom of the checked out project
      2. Type
        mvn clean package –DemeaVersion=${currentversion}
      3. After a successful build, go to the emea-release project and copy the whole target folder in a different directory.

  2. Generate the config files/folders of the package
    1. Create a config folder inside the target folder or where the jar is located
    2. Create folders dev, sit, uat and prod inside config folder
    3. Open you FTP Client (e.g. FileZilla) and copy the config files to the newly created folders
      • DEV
      • SIT
      • UAT
      • PROD
    4. Update the ini file with the changes from project and change the VERSION property

  3. Deploy DEV using the exploded jar
    1. In FileZilla, upload/add target/classes/versions to /ams/domains/ACCTSVCS102/versions
    2. In FileZilla, copy target/config/dev to/ams/domains/ACCTSVCS102/versions/config
    3. On DEV WEBLOGIC, stop and delete previously deployed ear
    4. Open Putty and login to DEV (ehdeapp10v.uk.jpmorgan.com)
    5. Point latest to latest deployed version

      1. Go to /ams/domains/ACCTSVCS102/versions/biz-rules
      2. Type rm latest
      3. Type ln -s {newversionFolder} latest
      4. Do step 1-3 to config & emea folders as well

    6. On DEV WEBLOGIC, deploy new ear and start
    7. Delete temporary files

      1. Go to /ams/domains/ACCTSVCS102/scripts and type stop_all.sh
      2. Go to /ams/domains/ACCTSVCS102/servers/admACCTSVCS
      3. Delete tmp folder. Type rm -rf {folderName}
      4. Go to /ams/domains/ACCTSVCS102/servers/mngACCTSVCS
      5. Delete tmp & stage folder
      6. Go to /ams/domains/ACCTSVCS102/scripts and type start_all.sh

    8. Check server: DEV

  4. Copy package(jar) and config files to SIT (ehdeapp10v.uk.jpmorgan.com), /home/eis_dev/a_pfdv01/AMSNA

  5. Create JIRA

  6. Finish!