240 likes | 398 Views
System Administration Basics on the Linux/Oracle Platform. CE6 or Vista 4 / Mike Cooling cooling@csus.edu California State University, Sacramento July 11, 2007. System Administration Basics (CE6 / Vista4). About Your Speaker: Over 30 years computing experience at CSUS
E N D
System Administration Basics on the Linux/Oracle Platform CE6 or Vista 4 / Mike Cooling cooling@csus.edu California State University, Sacramento July 11, 2007
System Administration Basics (CE6 / Vista4) About Your Speaker: • Over 30 years computing experience at CSUS • Worked with unix over 20 years • Worked with Redhat linux over 7 years since V5.2 • Worked with WebCT over 7 years since V1.3
System Administration Basics (CE6 / Vista4) • Test Environment • Disk Filesystems • Backups • System Management • Integration ▼ See references for URL to obtain samples. (whenever the red triangle appears)
1. Importance of Test Environment Make all changes in test environment 1st (tailoring web pages, setting changes, hotfixes, service packs) • Let support staff see changes first hand and document them • Test vendor releases before users see them (OS, BB/WebCT, Weblogic, or Oracle). • Make mistakes, find installation bugs before they cause down time. • Obtain exact timing for installs to determine downtime needs
2. Disk Filesystems • Database Server • Oracle table spaces Control files, system space, temp space, etc. • Oracle archived redo logs Used for transaction recovery between backups. These can consume space quickly during peak times. • WebCT table spaces • Rman (database) backup files (Oracle Recovery MANager)
2. Disk Filesystems • Application Server / Managed Nodes • WebCT filesystem WebCT software, Weblogic software, log files. (ie. bea813 / bea920 directory) • Section Backups (command line) Unix .BAK files
2. Disk Filesystems • Filesystem Flexibility • Plan for disk farm growth. • Practice array expansion and filesystem resizing before you need it. • San add capacity. • Partition expansion using fdisk (keep starting cylinder constant). • Linux command resize2fs. • LVM (logical volume manager) OK for smaller filesystems, low performance needs. May create problems in high demand applications like Oracle.
3. Backups A. Database Backups • RMAN (Oracle Recovery Manager) Recommended since you can run hot or cold backups. Full (Standard edition) or Incremental (Enterprise edition only) • Export / Import Older technology backup. Only used if database is down.
3. Backups (database) Sample Rman Configuration Statements: $ rman target / RMAN> configure retention policy to recovery window of 2 days; RMAN> configure controlfile autobackup on; RMAN> configure controlfile autobackup format for device type disk to '/DB-backups/sysbkups/%F'; RMAN> configure channel 1 device type disk format '/DB-backups/sysbkups/b_%u_%p_%c'; RMAN> configure maxsetsize to 4096 m; RMAN> show all; RMAN> exit
3. Backups (database) Sample Full Backup Rman script:▼ run { backup incremental level 0 database include current controlfile; SQL 'alter system archive log current'; backup archivelog all delete input; } exit; Note 1: If you want to do incremental backups, you MUST specify the incremental keyword for level 0 and level 1! Note 2:Restores from an incremental backup take 2-3 times longer. (Enterprise edition only)
3. Backups (database) Sample Rman disaster recovery: run { restore database; recover database; } NOTE: Try this as a test at least once before going into production.
3. Backups (database) Sample Rman limited recovery: (scn numbers are show with “list backup;” command) run { set until scn 69475014; restore database; recover database; }
3. Backups B. Section Backups • Unix line mode: backupRestoreCLI.sh▼ Creates .bak files on the app server filesystem where run. Requires tailored xml file as input. • GUI Backups Used by instructors, designers, or administrators. Creates backups within the database. Backups are a type of “snapshot” (using pointers) so they are efficient in terms of DB space.
3. Backups C. System Backups • Standard unix utilities Dump/restore, cpio, tar • Third party products NOTE: exclude Oracle table spaces from system backup (/app/webctDB/*.dbf)!
4. System Management • Software Service • BB/WebCT Service Packs and Hotfixes, Oracle upgrades, security patches Try on test system first (preferably a copy of prod). Backup database and bea813/bea920 directory before. BB still learning also. Expect an install to fail to play it safe. Build in downtime to restore database each time. Oracle security patches fairly safe. Oracle minor upgrades (ie. 9206 to 9207) take more planning. Oracle 9i to 10g takes the most planning and practice.
4. System Management • Operational Issues • CE / Vista Operations Guide Great tips on managing Oracle logs, recovery issues, and database jobs. Database performance monitoring. Database tuning. Advanced topics (standby databases, sub-clusters troubleshooting). • CE / Vista Installation Guide Checking / recompiling invalid objects.
5. Integration • Migrating Courses (the easy way) • CEMT GUI Interface Awkward Tough to document Many steps Wide variety of results when used by multiple staff Typos can effect end result • So Use Line Command and Script It ▼ Streamlines process Enforces standards Everyone migrates same way
5. Integration • Sample CE4 CEMT export: ▼ # cd /home/$WCTID/webct/webct/generic/ce_migration_tool rm -f $OUTFIL # ./extract_learning_context.pl \ -include_designers \ -only_designers_from_migrated_courses \ -enroll_designers -enroll_instructors \ -passwords -custom_columns \ -course=$SECTION \ -include_content \ -output_file=$OUTFIL /usr/local/etc/ce6-xmit $HOST >/dev/null
5. Integration • Sample CE6 import: ▼ # First parm is name of xml file # cd /home/webct/$WCTID6/bea813/weblogic81/config/WebCTDomain # ./siapi.sh ims import courses \ /home/webct/$WCTID6/import/$1 \ /home/webct/$WCTID6/import/content # rm -f /home/webct/$WCTID6/import/$1 mv /home/webct/$WCTID6/import/content/*.zip \ /home/webct/$WCTID6/old-content #
5. Integration • Sample CEMT script execution (on CE4): [webctce@webct99 webctce]$ ce6-content PT100 "Cooling, Mike" prod Notice: Exporting PT100... Notice: There are new warning/error messages written to ...cmu_log.txt. Notice: Export package completed (PT100_COURSE_20070628172914). Notice: Export package completed (0). Notice: Export packages completed in 1 and failed in 0. Reading information from password file: .../ce_migration_tool/server_backup/password_file... Reading information from mapping file: ...ce_migration_tool/server_backup/mapping_file... Reading information from data file: ...ce_migration_tool/server_backup/person_data... The migration file has been saved. The file name of the migration file is (.../exported_packages/csus-PT100-course.xml). The course content package(s) are saved in .../exported_packages/. The file name of each course content package is in the format <course_ID>_COURSE_yyymmddhhmmss.zip Done.
5. Integration • Sample import script execution (on CE6): [webctce6@webct91 import]$ ce6-import crs csus-PT100-course.xml Your environment has been set. Person import failed Result was: Finished import with 10 errors and 0 warnings. See logs/webct.log for details or logs/enterpriseImport.log for list of users who failed to import. Import continued after the failure Learning Context import failed (yet content did exist) Result was: Finished import with 1 errors and 0 warnings. See webct.log for details. Import continued after the failure Membership import completed successfully Please see enterpriseImport.log and webct.log for errors and warnings.
5. Integration • Adding and Enrolling Users • Write Perl script to convert existing CSV files (used with CE4) into XML. ▼ It’s an extra step, but will buy you time while better ways can be developed.
REFERENCES • URL’s ▼ https://webct99.csus.edu/tools/ • BB/WebCT Documentation Installation Guide Doc V6.2.0.0 2006 Administrator’s Guide Doc V6.2.0 2006 Operations Guide Doc V4.2.0.0 2007 System Integration Utility Guide Doc V6.2.0.0 2006 CE 4.1 (MP) to CE 6.0: Upgrade Guide Doc V4.0.0.12005 • OracleDocumentation Backup and Recovery Concepts Recovery Manager User’s Guide Recovery Manager Reference
Want More? • To view my resources and references for this presentation, visit www.scholar.com • Simply click “Advanced Search” and search by mcooling and tag: ‘bbworld07’