Solaris 10 – Linux Shell Scripting
Unix Shells
If you use sh, ksh, or bash: Shell Environment Variables
- LD_LIBRARY_PATH=/usr/local/lib
- export LD_LIBRARY_PATH
- PATH=$PATH:/usr/local/bin:/usr/ccs/bin
- PATH=/opt/sunstudio12.1/bin:$PATH;
- export PATH
- MANPATH=/opt/sunstudio12.1/man:$MANPATH
- export MANPATH
Open Terminal
- Launch | Applications | Utilities | Terminal
- Right Click – Open Terminal
- Pattern Matching: sed, grep, awk
- Editors: vi, emacs, Netbeans, Eclipse
Man
- MANPATH=opt/sunstudio12.1/man:$MANPATH;
- export MANPATH
- man help
- javadoc
- help
System and Network Administration
- inetmenu – network card – dhcp
- ifconfig
Tar/Jar/Bunzip2
- Jar, Tar – Java Archive / Web Archive
- Unzip, Bunzip2 – bz2 packages
Solaris 10 - Developer's Guide
Developer Tools
- Netbeans 6.7.1
- Sun One / Tomcat Server
- Derby
- Oracle Database
Glass Fish Enterprise Admin Console
- http://localhost:4848
- admin
- sun214java
Database Programming
- derby - /opt/sges_v3_prelude/javadb/frameworks/embedded/bin
- oracle database
PostGre 8.2/8.3 Database
- post gre - /usr/postgres/8.3/doc/html/index.html
Solaris 10 – Home, Office, Journey Life
Home, Office, Journey Life / Journeyman Software CD / USB Key
- Copy workspace to /export/home/developer
- Migrate workspace to NetbeansProject
Journeyman Software - Java Desktop Application
- Create New Project
- Project | Java Application
- JavaApplication
Journey Life - Web Application
EJB Module
- Project | Java EE | EJB Module
- Enterprise Beans | New | Entity Classes from Database
- Data source | jdbc:sample
- Select All Tables
- Finish
Star Office Database
- Star Office Database 8
- Create Database
- Home: ID, Name, Description
- 1, JDBC, Testing Connection
- Save as | Documents | Database | organization.odb
Server Resources: JDBC-ODBC Connection
- Project | Java EE | EJB Module
- Server Resources
- New | Other | GlassFish | JDBC Connection Pool
- New Configuration using Database
- JDBC-ODBC Bridge
- Description: Organization
- Database: home
- Username: (admin)
- Password: (sun214java)
- Sun-resources.xml
GameFramework - Game Programming
- Create New Project
- Project | Java Application
- GameProgramming
Solaris 10 – Database Guide PostGres 8.3
# Commands Dir - /usr/postgres/8.3/bin
# Database Dir - /usr/local/pgsql/data
Open Terminal – Sun Studio 12 Environment Variables
- Launch | Applications | Utilities | Terminal
- Right Click – Open Terminal
- su
- mkdir /usr/local/pgsql/data
- chown ericoh /usr/local/pgsql/data
- exit
- PGDATA=/usr/local/pgsql/data
- export PGDATA
- /usr/local/pgsql/bin/createdb journeylife
- /usr/local/pgsql/bin/createdb animeichiban
Solaris 10 - User's Guide
Getting Started: Launcher
Go to the Launch menu select the corresponding icon and right click clicking on Add item to Launcher.
Workspace Folders / Icons
The applications for the Solaris 10 environment can be found under the following directory:
/usr/share/applications.
Applications
- Firefox 31.0
- Thunderbird 31.0
- Real Player 11
- Star Office 8
- Netbeans 6.7.1 / Sun Studio 12
- Java Media Player
- CD Player / Movie Player
- Terminal
Google-pedia
- Gmail
- Google+
- News
- Documents
- Sites
- Maps
- Books
- Google Play
Open Terminal – Installation of Firefox and Thunder Bird
- Launch | Applications | Utilities | Terminal
- Right Click – Open Terminal
- Copy the drivers
- Open the File Browser
- Download: http://releases.mozilla.com/sun/solaris10/
- Create the Folder: /export/home/downloads
- Copy the files from the /Desktop to /export/home/downloads
- Right click on the archives: Extract Here
- Firefox 3.0
- Open Terminal: pkgadd -d firefox-3.0-en-US-solaris-10-i386-pkg.bz2
- Thunderbird 3.0
- Open Terminal: pkgadd -d thunderbird-3.0b2.en-US.solaris-10-fcs-i386-gnome-2-24-pkg.bz2
- RealPlayer 11
- Create theFolder: /export/home/applications/realplayer
- Right click on the archives: Extract Here
- Open Terminal: ./realplay
The package will install to /opt/sfw/lib/firefox3 and won't conflict with 2.0, which is in /opt/sfw/lib/firefox. And /opt/sfw/bin/firefox is just a symbol link to /opt/sfw/lib/firefox3/firefox.
Solaris 10 – SMC – Sun Management Console
SMC - /usr/sbin/smc.sh – create launcher
==> Sun Management Console: 11/28/2011
- Disk Slice 2: 80 GB
- System Administration: (Disk Blocks and Free Files) df -k
- Backup Restore: Service Pack 1
==> Sun Management Console
- Computer / Network Tool
- Diskless Client Support
- Disk Tools
- Volume Manager
- Job Scheduler
- Mail Alias Support
- Mounts and Shares Tool
- Name Service Support
- Patch Tool
- Performance Tool
- Projects Tool
- RBAC Support Tool
- Serial port tool
- Software package tool
- System info tool
- User and Group tool
==> Solaris 10: Sun Management Console
- Default user – Solaris 10 (Administrator) root
- Grant Rights
- Added user – ericoh
- Grant Rights – admin, postgres
==> User Administration - Terminal
- useradd -u 1004 -g10 -d /export/user/home -s /bin/sh -c “comment” login_name
- passwd user
- userdel -r user
Solaris 10 – Systems Report – Maintenance Tasks
==> Solaris 10
- System Image (/boot): System Repair Disc - Report: 81.9 MB
- Drivers Disc (/kernel) - Report: Linux Drivers: 105.MB
- Disk Slice 1: 10 GB (100%)
=> Maintenance Tasks
- ifconfig – ip configuration
- netstat – network statistics
- watch net
- dmesg
- drvconfig – hardware
- prtconf – print configuration
=> Task Manager
- ps – Processes (a – frequent, A – all, f – comprehensive, I – complete, u – user)
- fg – foreground
- bg - background
- kill
=> System Tune / Log
=> Patches
=> Backup / Restore
- ufsdump 0 target datasource
- ufsdump 0 /export/backup /dev/dsk/c0d0s0
- ufsrestore xf /dev/dsk/c0d0s0
Solaris 10 - Dual Boot Installation Guide
Windows 7 Partition
- Partition Commander 10
- Create Linux Partition
- Install Solaris 10 – As a Linux Partition
- Dual Boot Windows 7 / Solaris 10
- Map Logical Drive for Solaris
- Computer Management – Administrative Tools | Computer Management | Partitions
Windows 7 Partition
- Use Partition Commander to create a FAT32 Partition for Solaris
Administration Guide
- Partition Commander 10
- Backup / Save Solaris Image
- Restore Solaris Image
Boot
- lilo
- dual boot – windows / solaris
Uninstall Guide
- Partition Commander 10
- Delete Linux Partition - Format to Windows Partition
- Make Windows Partition Active
- Boot Windows 7
- Troubleshooting - System 32 Repair Disc - Fix Startup Problems.
- Map Logical for e: driver – Logical Partition
Solaris 10 - Troubleshooting Guide – Failsafe Startup
Boot Solaris 10 – Fail Safe – mount filesystems
- Choose Solaris 10 fail safe
- mount: disk slice /a (yes) (OS - Volume Partition)
- Manual Mount:
- mount /dev/dsk/c2t0d0s0 /a
- mount /dev/dsk/c2t0d0s7 /a/export/data
- mount /dev/dsk/c0t0d0s0 /a/export/usb
Boot Solaris 10 – Fail Safe – eeprom variables
- Choose Solaris 10 fail safe
- mount: disk slice /a (yes)
- #eeprom – Environment Variables
- #prtconf – System Configuration
Boot Solaris 10 – Fail Safe – System Repair Startup
- #fsck - (File System Check)
- #init S
- #who -r
- #who am i
- PATH=/a/sbin:/a/usr/sbin:/a/usr/bin
- export PATH
Boot Solaris 10 – Fail Safe – System Repair Startup
Boot Solaris 10 – Fail Safe – X11 Startup
- #cd /a (/dev/dsk/c1t0d0s0)
- #/a/bin/X11/X
- #./X (Start X Server – Graphics Environment)
- # (cd /dev)
- # ln -s fb0 fb (Link dev/fb for X)
- # (Link X11 fonts from /a/usr/X11/lib/X1/fonts)
- (fonts: TrueType, Type1, F3bitmaps, misc, 100dpi, 75dpi)
- #/a/bin/X11/X
- #startrcS
Open Terminal
- Launch | Applications | Utilities | Terminal
- Right Click – Open Terminal
- #cd /a/export/home
- #ps – Processes (a – frequent, A – all, f – comprehensive, l – complete, u - user)
- #fg – Foreground
- #bg – Background
Solaris 10 – Disk Maintenance Guide
Check Disk – File System Check
- fsck - (File System Check)
Check Disk Space and Free Files
Check Disk Usage
Format Partitions: Increasing Disk Space - Partition the Disk Space
0- Disk Drive
Solaris 10: Disk Slices partition
- 0 - root - 70 GB - Solaris 10 - Solaris Partition
- 1 - swap - 10 GB - Memory Space
- 2 - backup - V_BACKUP
- 3 - alternates - 70 GB - Windows Sharing (NTFS)
- 7 - home - 70 GB - Users - Solaris 2 Partition (export/home)
- partition table name
- name: solaris
- Save the partition:
- Label
- Quit
- volume: solaris
- label: format.dat
- ./format.dat
- verify format.dat
- exit
- mv format.dat /etc/format/dat
File System and Volume Management
New File Systems
Print Volume Info
- prtvtoc /dev/dsk/c2t0d0s0
Mounting File Systems
- Sun Management Console => Partition Magic - Windows | Linux (32 bit)
- Disk slice 0 - Solaris 10 - Solaris Partition
- Mountall
- mount /dev/dsk/c1t0d0s0 /
Windows Computer Management => Partition Commander - Windows | Linux (32 bit)
- Disk slice 5 - Windows 7 - Windows Sharing Partition (NTFS)
- Mountall
- mount /dev/dsk/c1t0d0s5 /sharing
Data Management: Disk slice 7 - Solaris 2 - Users Partition (64 bit)
- mountall
- mount /dev/dsk/c1t0d0s7 /export/home
Unmounting File Systems
Volume Management: Windows | Solaris (Active)
0 - Disk Drive
4 - Change Between Solaris / Solaris 2
Partition 2
Solaris 10 – X11 Graphics Environment
X11 Startup
- cd /bin/X11/X
- ./X (Start X Server)
- startrcS
X11 Configuration File
- kdmconfig
- /usr/X11/bin/xorgconfig
- enter
- 1. auto-detect
- y
- /dev/mouse
- 6.101-keyboard
- 1. US-English
- enter
- enter
- enter
- 8. 1280-1024@ 60 HZ
- 50-70
- enter (Intel Express Integrated Graphics Controller 943/940 GML)
- 8. 8192K
- 5. 24 Bit
- File write to /etc/X11/xorg.conf
- /var/dt/Xerrors
- /var/log/Xor.0log
Solaris 10 – Additional Software
Applications
- Sun Screen Firewall
- CD Record
- Xfree.org X11 R6 – Mesa
- Sun Freeware: VIM, XMMS
- Saint
Open Terminal - Sun Freeware – Installation of XMMS Multimedia File
- Launch | Applications | Utilities | Terminal
- Right Click – Open Terminal
- pkgadd -d glib-1.2.10-sol10-sparc-local
- pkgadd -d gltk+1.2.10-solar-sparc-local
- LD_LIBRARY_PATH=/usr/local/lib
- export LD_LIBRARY_PATH
- GTK_CONFIG=/usr/local/bin/gtk-config
- export GTK_CONFIG
- GLIB_CONFIG=/usr/local/bin/glib-config
- export GLIB_CONFIG
- PATH=$PATH:/usr/local/bin:/usr/ccs/bin
- cd /export/home/applications/xmms-1.2.11
- ./configure
- make
- make install
Websites
- http://solaris-x86.org
- http://solaris.java.net