Solaris

CREARE UN FILESYSTEM UFS
giovedì 25 febbraio 2010
CREARE UN FILESYSTEM

Per creare un nuovo filesystem di tipo UFS, si può usare il comando mkfs o il comando newfs.
Ecco alcuni esempi:

newfs /dev/rdsk/c0t0d0s1

mkfs -f ufs /dev/rdsk/c0t0d0s1

postato da Eduardo Kislanski @ 10:54   | 0 Commenti
Comandi di GlassFish
lunedì 22 febbraio 2010

Comando di GlassFish

Asadmin è un comando di GlassFish che gestisce sia GlashFish che i suoi domini.
I domini vengono avviati separatamente, hanno istanze di JVM diverse e per la loro gestione c'è la console web.

asadmin si trova nella cartella bin di GlassFish.
I principali comandi sono:

1) create-domain - adminPort =

Ci sono diversi parametri di un dominio, ma è possibile utilizzare solo
questa sintassi. Dopo aver lanciato questo comando, viene richiesta la password, laporta HTTP, la porta HTTPS, ecc..E' possibile configurare il dominio direttamente dalla console web.

2) delete-domain

Questo comando permette dicancellare un dominio.

3) start-domain

Questo comando avvia un dominio.

4) stop-domain

Questo comando permette di fermare un dominio.Non ha effetti su tutti gli altri domini.
postato da Eduardo Kislanski @ 04:06   | 0 Commenti
Installation of Oracle 10g Release 2 on Solaris 10 x86
venerdì 19 febbraio 2010
Installation of Oracle 10g Release 2 on Solaris 10 x86


This paper (HOWTO) describes step-by-step installation of Oracle 10g release 2 (10.2.0.2) database software on Solaris 10 x86.

This paper covers following steps:

Pre-Instalation Tasks

1. Create oracle User Account

Login as root and create te user oracle which belongs to dba group.
su -
# groupadd dba
# useradd -G dba -m -d /export/home/oracle -s /usr/bin/bash oracle
Note: "#" sign means that you need execute this command as root user.
2. Setting System parameters
Edit the /etc/system and add following line:
set noexec_user_stack=1
Note: Since Solaris 10 shared memory settings for Oracle in /etc/system is obsolete.

Execute following commands to configure system settings for Oracle.
# projadd -U oracle -K "project.max-shm-memory=(priv,4g,deny)" user.oracle
# projmod -sK "project.max-sem-nsems=(priv,256,deny)" user.oracle
# projmod -sK "project.max-sem-ids=(priv,100,deny)" user.oracle
# projmod -sK "project.max-shm-ids=(priv,100,deny)" user.oracle
Note: Use "prctl -i project user.oracle" command to check the settings.

3. Enviroment settings
Edit the /export/home/oracle/.bash_profile file and add following lines:

ORACLE_BASE=/opt/oracle
ORACLE_HOME=$ORACLE_BASE/102
ORACLE_SID=ORA10GR2
LD_LIBRARY_PATH=$ORACLE_HOME/lib
PATH=$PATH:/usr/local/bin:/usr/ccs/bin:/usr/sfw/bin:$ORACLE_HOME/bin

export ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH PATH
Note: This configuration assumes that user oracle is using Bash as default shell.

Save the .bash_profile and execute following commands for load new enviroment:
cd /export/home/oracle
. .bash_profile

4. Create base directory for Oracle

Login as root and create base directory for Oracle ($ORACLE_BASE).
su -
# cd /opt
# mkdir oracle
# chown oracle:dba oracle

Download & Install

1. Installation of required packages

Some additional packages are required for succesful instalation of Oracle software. To check whether required packages are installed on your operating system use following command:
pkginfo -i SUNWlibms SUNWtoo SUNWi1cs SUNWi15cs SUNWxwfnt SUNWxwplt SUNWmfrun SUNWxwplr SUNWxwdv SUNWgcc SUNWbtool SUNWi1of SUNWhea SUNWlibm SUNWsprot SUNWuiu8


Install the required packages using the pkgadd command:
# pkgadd -d . SUNWlibms SUNWtoo SUNWi1cs SUNWi15cs SUNWxwfnt SUNWxwplt SUNWmfrun SUNWxwplr SUNWxwdv SUNWgcc SUNWbtool \
SUNWi1of SUNWhea SUNWlibm SUNWsprot SUNWuiu8

3. Download the Oracle 10g (10.2.0.2) software from Oracle website.
Extract the files using following command:
unzip 10202_database_solx86.zip

4. Start the Oracle software installation process.

Now the system is prepared for Oracle software installation. To start the installation process execute the following commands:
cd database
./runInstaller

Post-Instalation Tasks

1. Execute scripts (# means "as root"):
# /opt/oracle/oraInventory/orainstRoot.sh
# /opt/oracle/102/root.sh


2. (Optional) You may consider to use rlwrap for comfortable wor with sqlplus. Package for Solaris 10 (x86) release you can download here. Note rlwrap is dependent on readline library which should be installed first. Download readline library package.
su -
# gunzip readline-5.1-solaris-x86.gz
# gunzip rlwrap-solaris-x86.gz
# pkgadd -d readline-5.1-solaris-x86 rlwrap-solaris-x86
# exit
echo "alias sqlplus='/usr/local/bin/rlwrap sqlplus'" >> /export/home/oracle/.bash_profile
. /export/home/oracle/.bash_profile

*http://ivan.kartik.sk/oracle/install_ora10gR2_solaris.html
postato da Eduardo Kislanski @ 09:09   | 0 Commenti
Installazione XORG
pkgadd SUNWxorg-*



:)
postato da Eduardo Kislanski @ 09:05   | 0 Commenti
Installazione SUN WEB STACK su Opensolaris
giovedì 18 febbraio 2010
m171c0@opensolaris:~#pkg set-authority -O http://pkg.opensolaris.org/webstack webstack

oppure

m171c0@opensolaris:~# pkg info -r amp-dev
Nome: amp-dev
Riepilogo: AMP Development cluster
Descrizione: AMP Development cluster
Categoria: Development/Integrated Development Environments
Stato: Non installato
Publisher: opensolaris.org
Versione: 0.5.11
Release della build: 5.11
Ramo: 0.111
Data del packaging: 08 maggio 2009 16.46.40
Dimensione: 0.00 B
FMRI: pkg://opensolaris.org/amp-dev@0.5.11,5.11-0.111:20090508T164640Z

m171c0@opensolaris:~$ pfexec pkg install amp-dev


DOWNLOAD PKGS FILES XFER (MB)
SUNWmysql51 11/51 831/19304 31.2/302.6^C
m171c0@opensolaris:~$ pfexec pkg install amp-dev


DOWNLOAD PKGS FILES XFER (MB)
Completed 51/51 19304/19304 302.6/302.6

PHASE ACTIONS
Fase di installazione 21940/21940

m171c0@opensolaris:~$ svcadm enable apache22
m171c0@opensolaris:~$ svcadm enable mysql
postato da Eduardo Kislanski @ 00:17   | 0 Commenti
Installazione di OpenSolaris extras Certificate
mercoledì 17 febbraio 2010
1. Scarica i file della chiave e del certificato

2. Usa uno dei seguenti comanndi per creare una cartella nel path /var/pkg per memorizzare la chiave e il certificato e copia la chiave e il certificato all'interno della cartella

m171c0@opensolaris:~$ pfexec mkdir -m 0755 -p /var/pkg/ssl
m171c0@opensolaris:~$ pfexec cp -i ~/Desktop/OpenSolaris_extras.key.pem /var/pkg/ssl
m171c0@opensolaris:~$ pfexec cp -i ~/DesktoOpenSolaris_extras.certificate.pem /var/pkg/ssl

3. Aggiungi il pubblico

m171c0@opensolaris:~$ pfexec pkg set-authority \
-k /var/pkg/ssl/OpenSolaris_extras.key.pem \
-c /var/pkg/ssl/OpenSolaris_extras.certificate.pem \
-O https://pkg.sun.com/opensolaris/extra/ extra

4. Per vedere i pacchetti forniti da questa authority, prova così:

m171c0@opensolaris:~$ pkg list -a 'pkg://extra/*'NAME (PUBLISHER) VERSION STATE UFOXI
SUNWadmj (extra) 0.5.11-0.111 noto -----
SUNWjsnmp (extra) 0.5.11-0.111 noto -----
SUNWwbapi (extra) 0.5.11-0.111 noto -----
SUNWwbcou (extra) 0.5.11-0.111 noto -----
SUNWwbdev (extra) 0.5.11-0.111 noto -----
develop/java/javafx-sdk (extra) 1.2.0.233-0.111 noto -----
service/compute/sungridengine (extra) 6.2.2-0.111 noto -----
service/compute/sungridengine/arco (extra) 6.2.2-0.111 noto -----
service/compute/sungridengine/domainmanager (extra) 6.2.2-0.111 noto -----
system/font/truetype/ttf-fonts-core (extra) 1.1-0.111 noto -----
system/iiim/ja/atok (extra) 17-0.111 noto -----
system/iiim/ja/wnn8 (extra) 8-0.111 noto -----
virtualbox (extra) 3.1.2-0.101 installato -----
virtualbox/kernel (extra) 3.1.0-0.101 noto -----
web/firefox/plugin/flash (extra) 10.0.42.34-0.111 installato -


esempio: ttf-fonts-core
m171c0@opensolaris:~$ pfexec pkg install 'pkg://extra/system/font/truetype/ttf-fonts-core'
postato da Eduardo Kislanski @ 00:15   | 0 Commenti
Creare OpenSolaris live USB
martedì 16 febbraio 2010
m171c0@opensolaris:~$ pfexec pkg install SUNWdistro-const



m171c0@opensolaris:~/$ pfexec usbgen osol-dev-132-x86.iso osol-dev-132-x86.usb.img /tmp/opensolaris
/dev/rlofi/2: 1598400 sectors in 2664 cylinders of 1 tracks, 600 sectors
780.5MB in 167 cyl groups (16 c/g, 4.69MB/g, 2240 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 9632, 19232, 28832, 38432, 48032, 57632, 67232, 76832, 86432,
1507232, 1516832, 1526432, 1536032, 1545632, 1555232, 1564832, 1574432,
1584032, 1593632
Copying ISO contents to USB image...
..................................................
..................................................
..................................................
.....................................
1331696 blocks
=== /usr/bin/usbgen completed at martedì 16 febbraio 2010 18.55.03 CET
2,



m171c0@opensolaris:~/$ pfexec usbcopy osol-dev-132-x86.usb.img
Found the following USB devices:
0: /dev/rdsk/c4t0d0p0 Generic- Multi-Card 1.00
1: /dev/rdsk/c7t0d0p0 1.9 GB Flash Disk 1100
Enter the number of your choice: 1

WARNING: All data on your USB storage will be lost.
Are you sure you want to install to
Flash Disk 1100, 1900 MB at /dev/rdsk/c7t0d0p0 ? (y/n) y
Copying and verifying image to USB device
Finished 780 MB in 196 seconds (3.9MB/s)
0 block(s) re-written due to verification failure
Installing grub to USB device /dev/rdsk/c7t0d0s0
Completed copy to USB
postato da Eduardo Kislanski @ 09:40   | 0 Commenti
Installazione di GlassFish
lunedì 15 febbraio 2010
  • Scarica glassfish-installer-v1_ur1-p01-b02.jardal sito della Sun
  • Esegui il seguente comando:
java -Xmx256m -jar glassfish-installer-v1_ur1-p01-b02.jar
  • cd glassfish
  • esegui ant -f setup.xml
postato da Eduardo Kislanski @ 17:58   | 0 Commenti
Come montare un'immagine ISO
venerdì 12 febbraio 2010

lofiadm -a /export/temp/file.iso /dev/lofi/1

Il lofi device crea una versione a blocchi del file.

Questa versione a blocchi può essere montata in /mnt con il seguente comeìando:

mount -F hsfs -o ro /dev/lofi/1 /mnt


postato da Eduardo Kislanski @ 17:17   | 0 Commenti
SMC Solaris Manager Console
Pacchetti che sono necessari per eseguire SMC:

SUNWmc
SUNWmcc
SUNWmccom
SUNWmcdev
SUNWmcex
SUNWwbmc
SUNWmga

Guarda se i pacchetti sono installati:

pkginfo -i | grep "Solaris Management Console"
pkginfo -i | grep "Solaris Management Applications"


pkgadd SUNWmc
pkgadd SUNWmcc
pkgadd SUNWmccom
pkgadd SUNWmcdev
pkgadd SUNWmcex
pkgadd SUNWwbmc
pkgadd SUNWmga
pkgadd SUNWj3dev
postato da Eduardo Kislanski @ 16:21   | 0 Commenti
Uso del comando FIND
lunedì 1 febbraio 2010
FIND pathname expression action

Il comando find riceve quindi 3 argomenti: pathname, expression e action.

Esempio:


$ find ~ -name m171c0
/export/home/m171c0


$ find . -mtime +2
./.bash_profile
./WLIDLogo.gif
./.bashrc
./.links
./.links/bookmarks
./.links/links.his
./.p
./.teste
./.ssh
./.ssh/authorized_keys
./.sunw
./.sunw/pkcs11_softtoken
./.sunw/pkcs11_softtoken/objstore_info
./.sunw/pkcs11_softtoken/private
./.sunw/pkcs11_softtoken/public
./count_lines.sh
./hotmail.txt
./.profile

Per cercare files più grandi di 10 blocchi:

$ find /export/home/m171c0/ -size +10
/export/home/m171c0/.gnupg/gpg.conf

postato da Eduardo Kislanski @ 02:12   | 0 Commenti
MARVEL and SPIDER-MAN: TM & © 2007 Marvel Characters, Inc. Motion Picture © 2007 Columbia Pictures Industries, Inc. All Rights Reserved. © 2007 Sony Pictures Digital Inc. All rights reserved.