Você está na página 1de 12

Explain the types of installations in Solaris

There are several ways to install Solaris. They are,


Solaris Installation Program This is a general way of Solaris installation through a CD/DVD-ROM.
Solaris Installation Program over Network Installing Solaris from server that has access to
Solaris disc images.
Custom Jumpstart Installation This method is a command line interface that can implicitly install
or upgrade several systems using the profile created.
Solaris Flash Installation This installation enables to use a common reference of the Solaris OS
on a master system.
WAN Boot This installation enables to boot and install over a wide area network by using HTTP.
Solaris Live Upgrade This method is used to upgrade the system while current operating
environment is running.
Solaris Zones After installing Solaris OS, Zones are configured and installed. The global zone is
the instance of the operating environment currently running.

How to add the our own run control script in server?


create a script for example file1
Copy this file to /etc/init.d
# cp file1 /etc/init.d
# chmod 0744 /etc/init.d/file1
# chown root:sys /etc/init.d/file1
# ln /etc/init.d/file1 /etc/rcn.d/S100file1
# ln /etc/init.d/file1 /etc/rcn.d/K100file1

What are the RAID levels in Solaris?


RAID means redundant Array of Inexpensive/Independent Disks
There are Six RAID levels
RAID Level 0
RAID Level 1
RAID Level 2
RAID Level 3
RAID Level 4
RAID Level 5
RAID Level 6
Here only level 0, 1 and 5 are used extensively, only few storage systems support level 2, 3 and 4.

What are NFS daemons?


Automountd
It handles mounting and unmounting requests using autofs service.
Lockd
It is used for file locking for both nfs server and clients.
Mountd
It handles mount requests and also provides information about mounting nfs shares.
Nfsd
It enables file system exporting and file access requests from remote clients. It is used at run level 3.
Nfslogd
This daemon provides operational logging information.
Nfsmapid

It provides information mapping from a User identification or Group identification to string


representation or vice versa.
Statd
It is in use with logd to provide crash and recovery information.

How many run levels are there and what are they?
There are eight run levels in Solaris. They are
Run level State
0
power down
s or S
single User
1
Administrative
2
Multi-User
3
Multi-use with NFS
4
Alternative Multi-user
5
Power down
6
Reboot

How do you copy files from remote system using FTP?


Firstly, change the directory on the local system to the required path in which the file is to be copied.
$ cd <dir name>
Establish ftp connection.
$ ftp <remote system name>
Now, move to the source directory.
ftp> cd < source directory>
Make sure that the user has read access rights for the source files.
ftp> ls l
Set the type to binary format.
ftp> binary
To copy a single, multiple files, use get, mget respectively.
ftp> get <file name>
ftp>mget <filename1> <filename2><filename?>
Terminate the ftp connection.
ftp> bye

What does pkgadd command do?


It installs a signed or unsigned software package.
Pkgadd
Remove any existing packages installed with the same name as of that we are adding.
Add package to the system using pkgadd.
Syntax: pkgadd a admin_file d device-name pkgid..
Verify if the package is installed successfully
#pkgchk v pkgid
Example: pkgadd -d /cdrom/cdrom0/solaris10/product SUNwaudio
The above example is to install the package from cdrom

Explain how to kill a process.

1.Become a superuser or root user to terminate the process of the another user.
2.Obtain the PID of the process to be terminated.
Syntax: $ps fu <username>
Example: $ps fu abc
abc 325 322 3 jan 12 ? 11:04 /usr/openwin/bin/sun
The process ID is displayed in the first column of the output.
Terminate the process using kill command.
$ kill <signal number> pid
Default signal number is -15 {SIGKILL}
-9 {SIGTERM}
Verifying if the process is terminated or not.
$pgrep <pid>

How do you remove a swap space?


To remove unneeded swap space, become a super or root user.
Remove the swap space
# /usr/sbin/swap d /path/filenames
Edit the /etc/vfstab file and delete the entries from swap file
Retain the disk space so that we can use it
#rm /path/filename
Verify if the swap file is available or not.
#swap l.

What are NIS daemons?


NIS services are provided by five daemons and managed by service management facility (SMF).
Ypserv Server Process
Ypbind Bind Process
Ypxfrd High speed map transferring
Rpc.yppasswdd NIS password update
Rpc.ypupdated Modifies mappings

How do you break the root password?


Enter in to the single use mode.
ok boot cdrom s
# mount /dev/dsk/c0t0d0s0 /a
# cd /a/etc
# TERM = vt100
# export TERM
# vi shadow
Here, remove the roots encrypted password string then save and exit.
# cd/
# umount /a
# init6
This will restart the system and now the root login can be entered without password.

Explain the difference between PID and PPID with example.


A collection of system programs and user generated programs is called Process.
Every process contains two IDs.
PID Process ID

Syntax: $ ps [-efc]
-ef full information about executed process
-c process schedule information
PPID Parent processs ID
Example: ps ef
Output: root 12066 12036 19:44 pts/2
Here 12066 is PID and 12036 is Parent Process ID.

How to login to a remote host with Solaris secure shell?


Start a Solaris secure shell session by using ssh command followed by name of the remote host.
Local Host # ssh RemoteHost
Here an authentication is to be given for initial connections to remote hosts.
If we cannot confirm the authentication of remote host, type no and contact system administrator.
If we can confirm the authentication, then type Yes and continue to the next step
Now , authenticate yourself to ssh.
When prompted, type the passphrase, account and password.
Transactions can be made on the remote host by encrypted commands.
Terminate the ssh conncection.

Which command is used to backup and restore Solaris file system?


Backup file system can be done by using ufsdump command.
ufsdump [options] [arguments] [file names]
Example:
#init 0
ok boot s
# ufsdump 0ucf /dev/rmt/0 /
Restoring files can be done by using ufsrestore command.
Ufsrestore ta [archive name] ./path/filename ./path/filename
Example:
# ufsrestore tf /dev/rmt/0
# <crtl+d> (to bring system to run level 3)

List out few performance monitoring tools.


Vmstat
This command is used to know virtual memory statistics
$ vmstat n
n Interval in seconds
$ vmstat s {to know the system events since the last boot}
$ vmstat S {to show the swapping statistics}
$ vmstat i {to show the interrupts per device}
Iostat
This command is used to display the statistics about disk input and output.
$ iostat 5
$ iostat xtc { to show extended disk statistics}
df
This command is used to know the free space on the mounted disk.
$df k {to show the disk space in kilobytes

What is sticky bit?


Permission that protects the files in a directory is called sticky bit.
If a file is set with a sticky bit, then it can only be deleted or renames by the owner of the file or
directory.
The sticky bit prevents a user from deleting the files of the others.
Octal value of the sticky bit is 1 .
Sticky bit is implicitly set in general but should be set manually in case of TMPFS file system.
drwxrwxrwt 7 root sys 528 jan 27 12:32 /tmp

17. How does a solaris cluster work?


A typical solaris cluster configuration comprises of the following components:
- Hardware components:
- Servers with local storage
- Share storage
- Cluster interconnects
- Public network interfaces
- Administrative workstation
- Software components:
- Solaris running on each node
- Solaris cluster software dunning
- Data services.
The server in a cluster use private interconnects to communicate with each other. These
interconnects are responsible for carrying the cluster information. The information carried is also
known as the heartbeat. This heartbeat lets the servers in the cluster monitor the health of other
servers hence ensuring that every other server is alive in the cluster. In case of a server failure the
heartbeat of that server disappears and the server is not considered to be the part of the cluster. The
term used to isolate the failed server is known as fail-over. The clusters are characterised by the high
rate of availability.

18. What are the differences between the command line and graphical user
interface?
The CLI or the command line interface allows a user to type commands into a terminal or console
window to interact with the operating system. The user has to enter the command or a series of
command for each task that the user wants to be performed.
The GUI or the graphical user interface on the other hand uses graphics in tandem with the keyboard
and a mouse to give the user an easy to use interface to use the program. The gui provides the user
with windows , menus , buttons , scrollbars etc to enbale the users to interact with the operating
system.
The most common tpyes of gui interfaces provided by solaris is the CDE ( common desktop
environment ) and the GNOME desktop. Both the gui`s provide similar functionality to the user to use
the operating system.

19. How can a user login to solaris? What is the login shell?
The solaris platform is a very secure platform and it requires the user to enter his login information
prior to starting any work in the operating system. Before a user login to his account the screen would
show the following prompt:
hostname console login: Rohit
On pressing return the user is asked to enter the password for his account. In order to prevent the
password from being detected by someone else the system does not scho the password on the
display screen. When a user issues a command ot the operating system via the terminal or the gui the

user is actually providing the information to the command interpretation system also known as the
shell. The shell takes all the user inputs and makes sure they are executed properly by the os. The
default shell for solaris systems is the Bourne shell.
There are various other shells supported by solaris such as:
GNU Bourne shell again.
C shell
Korn shell etc.
When the user initially logs into the system and the sees the command prompt , it means that the
shell program has been initiated.This shell is called the login shell.

20. How can the output be redirected to some other action process in place
showing it in the screen?
Solaris allows the user to redirect the output of an operation to a file or something else if required. For
ex.
$ date > sample.file
$
The above command upon execution would cause the output of the date command to redirect to a
new file sample.file.
Another type of requirement is that the user might want to use the output of a particular operation to
act as the input of another operation. This can be achieved in solaris by making use of the pipe (|). A
set of commands which are tied up together like this are called pipelines. An example depicting the
use of the pipes:
$ date | lp
request id is jetprint-46

21. How can the user in solaris check the status of processes?
Once the system interprets a command the system simply creates an independent process with a
unique PID assigned to that process. To keep the track of each process the system uses the PID. In
case the user wants to find out the processes that are currently running on the system the user can
use the ps command. The ps command on execution displays the:
-PID of the processess.
- The terminal from which a process was started
- The cpu time that the process has used so far.
The variable meanings:
O : this implies that the process is running on a processor.
S : This implies that the process is currently sleeping and waiting for an event to complete.
R: This implies that the process is in the run queue.
I : Implies the process is being created.
Z: Implies the process is zombie ie. it has terminated.
T: implies that the process is stopped as the parent was tracing it.
X: The process is waiting for more primary memory.

22. Discuss the two modes of the vi editor in solaris.


The two modes of operation of the vi editor are the entry and command mode. The drawback for first
time vi users is that it does not distinguish between the two modes visually.
- Entry mode: This mode is used to enter text into a file. The vi is by default in the command mode. In
order to enter text into a file the user has to type the vi insert command i. This changes the mode of
vi from command to entry mode.
- Command mode: Every time the vi editor is opened it launches the command mode by default. In
case the user is entering text and is one with it all he needs to do is press the esc button and the user
is back at the command mode. The command mode allows the user to enter and execute a vast
range of commands. Most of the commands consists of one or more letter with an optional number.
Most commands does not require the return key to be pressed to execute. But the commands
preceded by a colon require the return key to be pressed to execute.

1) What files control user administration?


A) /etc/passwd file: 7 Fields: loginid:x:userid:groupid:comment:homedir:shell
/etc/shadow: 9 Fields: loginid:password:lastchng:min:max:warn:inactive:expire
/etc/group : 4 Fields : groupname:password:groupid:username list)
2) What does the "pwconv" command do?
A) It updates the /etc/shadow file with information from /etc/passwd file.
3) Where are the failed login attemps to system logged?
A) /var/adm/loginlog (We need to create this file as it does not exist by default)
4) Which command shows the users currently logged in to system?
A) who ( It reads the information from /var/adm/utmpx file)
5) Which command will show detailed information about a user?
A) finger m
6) Which command displays all login and logouts?
A) last (It reads the information from /var/adm/wtmpx file)
7) What is the "StickyBit" file permission?
A) Sticky Bit permission protects the file within a public writable directory.
File set with sticky bit will not allow any user to delete the file except the
Owner of file, owner of the group or the root user.
8) How is ACL (Access Control Lists) implemented?
A) 8.1) "getfacl"command : To display an ACL on file.
Syntax : getfacl
8.2) setfacl command : To set the ACL on file
Syntax : setfacl
8.3) setfacl m command : To modify ACL entries
Syntax : setfacl m
8.4) setfacl s command : Remove old ACL entries and replace with new one.
Syntax : setfacl s
8.5) setfacl d command : Delete ACL entry
Syntax : setfacl d
9) Imp "root(/)" subdirectories and their purpose :
9.1) / : Root of overall file system.
9.2) /bin : Symbolic link to /usr/bin. Stores standard system commands and
binary files.
9.3) /dev : Primary location for "logical" device names
9.4) /devices : Primary location for "physical" device names

9.5) /etc : Contains host specific system admin config files


9.6) /export : Default directory for commonly shared filesystems.
9.7) /home : Default directory / mount point for user's home directory
9.8) /kernel : Directory of platform independent loadable kernel file
9.9) /mnt : Temporary mount point for file systems
9.10) /opt : Default directory for add on packages
9.11) /sbin : Executables used in booting process and file recovery
9.12) /tmp : Temporary files
9.13) /usr : Mount point for /usr file system
9.14) /var : Directory for varying files, temporary logging or status files
10) What are the different disk slices?
Slice Name Function
0 / Root's system files
1 swap Swap area
2 Entire Disk
5 /opt Optional Software
6 /usr System Exe's
7 /export/home User's file and directories
11) Which command displays the system configuration information?
A) prtconf
12) Which command is used to configure newly attached hardware ?
A) devfsadm c where
13) What are the different types of "file systems" in Solaris?
A) There are 3 Types of file system :
13.A.1) Disk based : ufs (standard unix), hsfs (cd-rom), pcfs (Floppy)
Or udf (DVD and CD Rom)
13.A.2) Distributed : NFS (enables sharing of files between many types of n/w)
13.A.3) Pseudo : tmpfs (temporary), swapfs , fdfs, procfs
14) What is a "boot block"?
A) The bootstrap program (bootblk) is found in the next 15 disk sectors. Only the
"root" file system has an active boot block, although the space is allocated for
boot block at the beginning of each file system.
15) What is "superblock"?
A) The file system is determined by its superblock. It is contained in the 16 disk
sectors following the boot block. It contains :
No. of data blocks
No.of cylinder groups
Size of data block fragment
Description of hardware
Name of mount point
File system state flag ( clean , stable , active , logging or unknown)

16) How will you repair the main superblock if it gets corrupted?
A) Every file system has backup superblock at block no.32, which can be given to
fsck to repair the main superblock.
# fsck o b=32 /dev/rdsk/c0t0d0s0
17) How to create new file systems ?
A) newfs /dev/rdsk/c0t0d0s0
18) How will you restore /etc/vfstab file if it gets corrupted?
A) Step 1 : Insert Solaris CD 1 of 2
Step 2 : Go to single user mode : ok boot cdrom s
Step 3 : Run "fsck" on /(root) partition : # fsck /dev/rdsk/c0t0d0s0
Step 4 : Mount /(root) file system on /a directory to gain access to file system
# mount /dev/dsk/c0t0d0s0 /a
Step 5 : Set & export TERM variable
# TERM=sun
# export TERM
Step 6 : Edit /etc/vfstab file and remove the incorrect entry : # vi /a/etc/vfstab
Step 7 : Unmount the file system : # cd / ; # umount /a and reboot the system.
19) How will you share user's home directory?
A) Step 1 : Login as root and verify mountd daemon is running
# ps ef grep mountd
Step 2 : If the daemon is not running start it :
# /etc/init.d/nfs.server start
Step 3 : List all shared filesystems
# share
Step 4 : Edit the /etc/dfs/dfstab file and add :
# share F nfs /export/home
Step 5 : Share the file systems in the /etc/dfs/dfstab file :
# shareall F nfs
Step 6 : Verify that the home directory is shared.
# share
20) What does /etc/inittab file contain ?
A) The /etc/inittab contains the systems default run level, processes to
start/monitor
or restart. It also contains the actions to be taken when run level changes.
/etc/inittab file is in foll format :- id:rstate:action:process
21) How will you use "shutdown" command?
A) # shutdown i0 g300 y
22) How will you check the OBP version of your system ?
A) Use " banner" command at the ok prompt

23) Explain the Solaris Boot process?


A) 23.1 ) Boot Prom Phase : Runs POST to verify system hardware and memory
Loads "bootblk" primary boot program.
23.2) Boot Program Phase : "bootblk" loads the finds "ufsboot" and loads it in
memory.ufsboot loads the kernel.
23.3) Kernel Initialization Phase : Loads modules using "ufsboot"
Creates user processes and starts /sbin/init process.
23.4) Initialization Phase : Starts "rc" scripts. These scripts check & mounts file
System, starts various processes and perform system maintanence tasks
24) Backup And Restore :
Full backup : # ufsdump 0uf /dev/rmt/0 /
Where 0 indicates full backup f Path of the backup device u update the
dumpdates file.
Restore : # ufsrestore if /dev/rmt/0
25) How to temporary disable user's login.
A) Log in as "root"
B) Create /etc/nologin file
# vi /etc/nologin
C) Include a message
D) Close and Save the file.
26) What does 'Probe' command do?
A) probe-scsi-all list all internal and external scsi devices
B) probe-ide-all List all ide devices
27) How to find whether a system is configured for 32-bit or 64-bit?
A) # isainfo -v
28) How to activate Ethernet card ?
A) # ifconfig qfe0 plumb
29) How will you assign ip address to system?
A) # ifconfig qfe0 192.168.0.1 netmask 255.255.255.0 up
30) How will you check current ip configuration?
A) # ifconfig a
31) How will you set a default router ?
A) # /etc/defaultrouter
32) How to remove all current routes and assign 192.168.1.100 as default
router?
A) # route flush
# route add default 192.168.1.100

33) How to change the network settings ?


A) # sys-unconfig
34) What all does the NVRAM store?
A) Ethernet Address / Host ID / Time of Day (TOD) clock and EEPROM Parameters
35) Where are all the port numbers stored?
A) Port numbers are stored in /etc/services
36) Where are eeprom file stored ?
A) /usr/sbin/eeprom
37) Some important NIS commands :
1) # ypcat hosts Prints info from hosts database
2) # ypmatch host1 hosts Match individual host entries
3) # ypmatch user1 passwd
4) # ypwhich Returns NIS master server.
38) Controlling the tape drive ?
1) mt f /dev/rmt/0n 'n' indicates no rewind.
39) What are the network utilities ?
1) snoop To capture network packets & display contents
2) netstat i Displays state of Ethernet address
3) ndd command Set & examine kernel parameters namely TCP/IP drivers.
40) Network Configuration :
1) /etc/resolv.conf : Contains Internet domain name, name server and search
order.
2) /etc/nsswitch.conf : Specifies information source from files, NIS, NIS+ or DNS
3) /etc/hostname.[int](hme0eri0le0] : IP v4 host
4) /etc/nodename : IP v6 host
5) /etc/inet/hosts : Host namefile (/etc/host links to this file)
6) /etc/inet/netmasks : TCP/IP subnet router
7) /etc/inet/protocols : Network protocols
8) /etc/inet/services : Network service name & port numbers
9) /etc/notrouter : Create this file to prevent in.routed or in.rdiscd from starting at
boot time
10) /etc/inet/inetd.conf : Internet super daemon config file
11) To change hostname / ip address :
/etc/hostname.{int}(hme0le0)
/etc/nodename
/etc/inet/hosts
/etc/net/*/hosts
/etc/defaultrouter
/etc/resolv.conf

41) How to configure interfaces at boot time>


A) /etc/rcS.d/s30network.sh file This script is run each time system is booted. It
uses ifconfig utility to configure each interface with IP add & other network info.It
searches for files called : hostname.xxn in /etc where xx int type & n instance
of interface

Você também pode gostar