Solaris

Quick Setup Domain Name System (DNS) for Solaris 10
lunedì 15 marzo 2010
Quick Setup Domain Name System (DNS)
for Solaris 10

Description:
This procedure describes how to quickly setup a Solaris Domain Name System (DNS) using the h2n Perl Script provided.
DNS or BIND uses a set of files converted from the data stored in the Unix system /etc/host file. This Quick Setup of DNS uses a Perl script called h2n that creates the appropriate files for a DNS server.
Prerequisites:
Super user access
Obtain the h2n file contained in this tar-gz file.
The latest version of this program can be obtained from ftp://ftp.hpl.hp.com/pub/h2n/h2n.tar.gz
When you untar-gz this file it will create a directory called h2n-2.56. In this directory will be a script called h2n. This script will be used to create your DNS tables.
Notes:
The h2n script is provided with this documentation (h2n-2.56.tar.gz). h2n translates /etc/hosts to DNS zone files and creates BIND named.conf configuration files. This tool can be run once or many times. After converting your host table to DNS format, you can manually maintain the DNS files, or you can maintain the host table and run h2n each time you modify /etc/hosts. h2n automatically increments the serial number in each DNS file when it makes a new one.
References:
h2n Scripts
h2n Scripts Documentation

Step

Action

Description

1

Edit /etc/hosts file
A simple Named Services system is created in the following manner:

The new domain server will be on system 192.168.21.37 which is called utility.
The following /etc/host file has been edit to contain all the DNS entries that are required:
127.0.0.1 localhost
192.168.21.37 utility utility.mydomain.com loghost
192.168.21.8 kadence kadence.mydomain.com
192.168.21.25 www www.mydomain.com myeb
192.168.21.26 mydev mydev.mydomain.com
192.168.21.32 mytest2-admin mytest2-admin.mydomain.com
192.168.21.33 myv20z myv20z.mydomain.com
192.168.21.34 myt1 myt1.mydomain.com
192.168.21.35 mytest mytest.mydomain.com
192.168.21.36 rlogic rlogic.mydomain.com
192.168.21.41 aix43p aix43p.mydomain.com
Assume domain name is to be mydomain.com.
Assume network is 192.168.21.
Create a domain run directory to contain the Named services files called /var/named.
Place the h2./n script is this directory.
Run the h2n script file as follows:
2 #mkdir -p /var/named
Create a domain run directory to contain the Named services files called /var/named.
Place the h2n script is this directory from the untar gzip directory of h2n-2.56. See Prerequisite above.
#mkdir -p /var/named

#cp /h2n /var/named
3 # h2n -d -n -u
Run the h2n script file as follows:
bash-3.00#cd /var
bash-3.00#mkdir named
bash-3.00#cp h2n named
bash-3.00#cd named
bash-3.00#./h2n -d mydomain.com -n 192.168.21 -u mbarto@mydomain.com
Initializing new database files...
Reading host file `/etc/hosts'...
Line 28: Skipping; IP not within range specified by -n/-a options.
> 127.0.0.1 localhost
Writing database files...
Generating boot and conf files...
Checking NS, MX, and other RRs for various improprieties...
Done.
bash-3.00# ls
boot.cacheonly db.127.0.0 h2n named.conf
conf.cacheonly db.192.168.21 db.mydomain named.boot
4
Obtain and copy
db.cache files.
The named server needs to know where servers for root zones are. This information is in the file db.cache. This file must be added to the /var/named directory for the Solaris 10 DNS server to work. This file is obtained from the web. To create a db.cache file, the information must be retrieved from the Internet host ftp.rs.internic.net (198.41.0.6). Use either ftp or a web browser to locate and download a file called named.root located in the domain directory.


After downloading the named.root file. Simply rename the file to db.cache and copy to the /var/named directory.

bash-3.00# ls
boot.cacheonly db.127.0.0 db.cache h2n named.conf
conf.cacheonly db.192.168.21 db.mydomain named.boot
bash-3.00#
5 # cp named.conf /etc Copy the configuration file to the /etc directory.
6 Setup Network
6a Edit
/etc/nsswitch.conf Edit the file /etc/nsswitch.conf and add the entry dns to the host entry as follows:
#

# /etc/nsswitch.files:
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# does not use any naming service.
#
# "hosts:" and "services:" in this file are used only if the
# /etc/netconfig file has a "-" for nametoaddr_libs of "inet" transports.
passwd: files
group: files
hosts: files dns
networks: files
protocols: files
: : : : : :
: : : : : :
The entry above means that for name resolution, the system will first look at the local /etc/hosts file and then use the dns server which in this case is itself.

6b Create/Edit
/etc/defaultdomain
and

Set domain

Create or edit a file called /etc/defaultdomain and add the single entry:
#vi /etc/defaultdomain
mydomain.com
Execute the domainname command to set the domain as follows:

#domainname `cat /etc/defaultdomain`
6c Edit
/etc/resolv.conf
For the /etc/resolv.conf file the following entries need to be established. This first is the name of the domain (e.g. mydomain.com) that was assigned with the h2n script. The second is the nameserver address of the system maintaining that domain assigned lists (e.g. nameserver 192.168.21.37) of the domain:

#vi /etc/resolv.conf
nameserver 12.11.108.15
nameserver 12.11.108.16
domain mydomain.com
nameserver 192.168.21.37
7 Start Named Services
Named services can be started by issuing the command:

#/usr/sbin/in.named &
Note: This assumes that in Solaris 10 a service configuration repository has been enabled to run. To enabled the respository use

svcs - report service status
svcadm - manipulate service instances
bash-3.00# svcs -a | grep dns
disabled 10:15:21 svc:/network/dns/server:default
disabled 10:15:22 svc:/network/dns/client:default
bash-3.00# svcadm enable /network/dns/server
bash-3.00# svcs -a | grep dns
online 10:15:21 svc:/network/dns/server:default
online 10:15:22 svc:/network/dns/client:default
/network/dns/server must be online for DNS to run properly and initiate if the DNS server is rebooted.

8 Configurating Clients to use DNS To use DNS, clients need to modify the /etc/resolv.conf, and /etc/nsswitch.conf as above. The /etc/defaultdomain file must also be created and establsihed as above.

http://www.logiqwest.com/dataCenter/Demos/RunBooks/DNS/DNSsetup.html
postato da Eduardo Kislanski @ 18:50   | 0 Commenti
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
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.