Skip to main content

Posts

Showing posts with the label SOLARIS

how to get process id attached with particular port in solaris

When you need to know process id attached with particular port use below command. pfiles /proc/* 2>/dev/null | nawk ' /^[0-9]*:/ { pid=$0 } /port: 7085 $/ { printf("%s %s\n",pid,$0);}' pfiles /proc/* is retrieving all processes file descriptors details 2>/dev/null is dropping out errors due to transient processes died in the meantime each line starting with a number followed by a colon reports the process id and details, it is stored in the awk pid variable when a line ends with the string port: <portnumber> (here is 7085), the corresponding pid variable is displayed. Note: you need the required privilege(s) to get port information from processes you do not own (root has all privileges).

Installing & Configuring RealVNC Server on Solaris 10

# Download RealVNC server package (Download & Use -> confirm form -> Find the latest Solaris package) (update: As of March 2007 there is no Solaris/x86 package available for download - it has been removed. I don't know why. Alternative is Solaris Companion DVD's SFWvnc package instead - pkgadd -d /mnt/tmp/Solaris_Software_Companion/Solaris_i386/P ackages SFWvnc) We will discuss first about RealVNC. Below are the steps to install & configure # Install package pkgadd -d vnc-4_1_1-x86_solaris.pkg # Add the 'vnc' service to /etc/services: echo 'vnc 5900/tcp' >>/etc/services

Setting Up NFS Services for Sharing directories in Solaris10

NFS, or Network File System, is a server-client protocol for sharing files between computers on a common network. NFS enables you to mount a file system on a remote computer as if it were local to your own system. You can then directly access any of the files on that remote file system. The server and client do not have to use the same operating system. The client system just needs to be running an NFS client compatible with the NFS server. Setting Up NFS Services How to Start the NFS Services Become an administrator. Enable the NFS service on the server. Type the following command. # svcadm enable network/nfs/server This command enables the NFS service. Note -  The NFS server starts automatically when you boot the system. Additionally, any time after the system has been booted, the NFS service daemons can be automatically enabled by sharing the NFS file system.  How to Stop the NFS Services Become an administrator. Disable the NFS service on the ser...

Disable T5120 RAID - Cause failure in booting/installing from HD

-> start /SP/console Are you sure you want to start /SP/console (y/n)? y Serial console started.  To stop, type #. {0} ok show-disks a) /pci@0/pci@0/pci@8/pci@0/pci@9/LSILogic,sas@0/disk b) /pci@0/pci@0/pci@2/scsi@0/disk c) /pci@0/pci@0/pci@1/pci@0/pci@1/pci@0/usb@0,2/hub@4/device@4/storage@0/disk q) NO SELECTION Enter Selection, q to quit: c /pci@0/pci@0/pci@1/pci@0/pci@1/pci@0/usb@0,2/hub@4/device@4/storage@0/disk has been selected. Type ^Y ( Control-Y ) to insert it in the command line. e.g. ok nvalias mydev ^Y          for creating devalias mydev for /pci@0/pci@0/pci@1/pci@0/pci@1/pci@0/usb@0,2/hub@4/device@4/storage@0/disk {0} ok boot /pci@0/pci@0/pci@1/pci@0/pci@1/pci@0/usb@0,2/hub@4/device@4/storage@0/disk -s Boot device: /pci@0/pci@0/pci@1/pci@0/pci@1/pci@0/usb@0,2/hub@4/device@4/storage@0/disk  File and args: -s

How To Reset The ALOM Password On A Sun Fire T2000

If an  ALOM password reset  is required on a Sun Fire T1000 or  Sun Fire T2000  in case the password is lost or forgotten, the following steps can be taken to erase the ALOM NVRAM so that a user can gain access to it, set a new password and restore the NVRAM settings. Note: Access to the server’s power cables and the ALOM serial port is required for this procedure. Connect your computer or laptop to the ALOM serial management port. Power cycle the system by unplugging the server’s power supplies, waiting several seconds and then plugging the power back in. You should see the ALOM booting on the serial management console. Hit “Esc” during the ALOM boot, before or at the point where the display says: Return to Boot Monitor for Handshake The system will return with this message: Return to Boot Monitor for Handshake ESC keypress detected. The ALOM enters the “ALOM boot escape menu”. The following choices will be displayed: ALOM  M...

Installing Net-SNMP on Solaris OS

Introduction: Sun OS versions previous to Solaris10 come configured with the Sun SNMP agent. Solaris has started shipping Net-SNMP with Solaris10 as an alternative to the Sun SNMP agent, this guide is designed to offer a road-map for installing Net-SNMP on versions older than Solaris10 so that users can utilize both the inclusion of the HOST-MIB Tree (Disk and CPU monitoring) and the use of SNMPv3 (encryption of SNMP traffic over a network) within these previous OS's (capability unavailable in the Sun SNMP agent). Check For Sun SNMP Agent: Before we start we need to check for the existence of the Sun SNMP agent and turn it off if it is running. To do so run the following command from the command line: Code: ps -ef | grep snmp

How to restrict FTP user to a specific directory in solaris 10

Procedure to configure FTP guest user access  1: Create a user which you want to use for the ftp , Name of the user can be anything except "ftp" ( In our Example it is "ftpuser") Useradd -g 10 -d /export/home/ftpuser -m -s /bin/bash ftpuser passwd ftpuser Enter the new password twice . 2: Run the "ftpconfig -d" command , on the home directory of newly created user.  # ftpconfig –d /export/home/ftpuser this updates the existing directory with the info needed to make the account restricted. After this you can see some extra directories in /export/home/ftpuser e.g bin, dev,lib e.t.c  3: Add the user to the /etc/ftpd/ftpaccess file. There is an existing commented entry  # guestuser username that can be uncommented and edited  guestuser ftpuser 4: Confirm that the user is a member of a class in /etc/ftpd/ftpaccess this entry should a already exist in ftpaccess class guestusers guest * 5: Modify permissions for guest user if necessary d...

Configuring NTP Server & Client in Solaris 10

Configuring  NTP ( Network Time Protocol) on Solaris 10 Configuring an NTP Server  1. Edit file ntp.conf bash > cp / etc / inet / ntp.server / etc / inet / ntp.conf bash > vi / etc / inet / ntp.conf Add server address for ntp server server 1.id.pool.ntp.org server 1.asia.pool.ntp.org server 3.asia.pool.ntp.org broadcast 224.0.1.1 ttl 4   enable auth monitor driftfile /var/ntp/ntp.drift statsdir /var/ntp/ntpstats/ filegen peerstats file peerstats type day enable filegen loopstats file loopstats type day enable filegen clockstats file clockstats type day enable   keys /etc/inet/ntp.keys trustedkey 0 requestkey 0 controlkey 0 Save your change configuration 2. Refresh daemon NTP bash > touch / var / ntp / ntp.drift bash > svcadm enable svc: / network / ntp

Configure VNC session to persist after exiting the VNC client

In My last Post we have learn how to install & configure a VNC server with GDM on a Solaris 10 OS. We will see in this post How to Configure a VNC session to persist even after exiting the VNC client. This may or may not be desirable for you, but if you want the VNC session to persist if you exit the VNC client then do the following: #  svccfg -s xvnc-inetd svc:/application/x11/xvnc-inetd>  editprop This take you into a vi session. Look for the line... #setprop inetd/wait = boolean: false Copy the line, uncomment it and set it to true. Save the file, exit svccfg and run the command... #  svcadm refresh xvnc-inetd Connect again with you VNC client. Now, when you exit/kill the VNC client, the session on the server will persist and you will be able to connect to it again.

How to Install & Configure VNC Server with GDM on Solaris10

VNC ( Virtual Network Computing) is a way to access and control the desktop of a remote computer. For this functionality the remote computer must be running VNC server software. The OpenSolaris 2008.05 binary distribution or Solaris10 Companion CD includes the SUNWxvnc package for the Solaris operating system. Once this package is installed, you can connect to the Solaris operating system from any other operating system that has a VNC client installed. alternatively you can download SUNWxvnc package from below link http://en.sourceforge.jp/projects/sfnet_solarispackages/downloads/solaris10-508-x86_packages/SUNWxvnc.tgz 1. Check that the VNC Server is Installed This should be present as it is part of the 2008.05 binary distribution, but I checked anyway. #  pkg info SUNWxvnc           Name: SUNWxvnc        Summary: X11/VNC server        ...

Solaris-10 md5 checksum verify

How to Verify md5 checksum on Solaris 10 ? md5sum package is available in the Solaris 10 companion CD. But even if the SFWcoreu package not installed on your machine, you can still verify/calculate md5 sum using the following: Solaris 9 ## Full Format [ root @ server:~ ] # cksum /dev/null 4294967295 0 / dev / null   ## Only display the checksum [ root @ server:~ ] # cksum /dev/null | cut -f1 4294967295

How to mount ISO in solaris & resolve error (iso is not a multiple of 512)

Many software packages download are in the form of an ISO image. Rather than burning the image to a CD-ROM to access its contents, it is easy to mount the image directly into the Solaris file-system using the lofiadm and mount commands. Given an ISO image in /export/temp/Compusoft.iso, a loopback file device (/dev/lofi/1) is created with the following command: #lofiadm -a /export/temp/Compusoft.iso Output      /dev/lofi/1 The lofi device creates a block device version of a file. This block device can be mounted to /mnt with the following command: #mount -F hsfs -o ro /dev/lofi/1 /mnt These commands can be combined into a single command: #mount -F hsfs -o ro `lofiadm -a /export/temp/Compusoft.iso` /mnt Sometimes when you convert image from .nrg to .iso & converted image is not a multiple of 512 bytes. lofiadm refuses. Unmount and detach the images Use umount command to unmount image: #umount /mnt Now remove/free block device: #lofiadm...

Solaris10 UNIX: How to Configure DNS Client / name server

How do you set DNS namserver under Sun Solaris UNIX system? The resolver is a set of routines in the C library that provide access to the Internet Domain Name System (DNS). The resolver configuration file contains information that is read by the resolver routines the first time they are invoked by a process. The file is designed to be human readable and contains a list of keywords with values that provide various types of resolver information. Internet address (in dot notation) of a name server that the resolver should query. Up to MAXNS (currently 3, see  ) name servers may be listed, one per keyword. If there are multiple servers, the resolver library queries them in the order listed. To configure Solaris nameserver edit or modify /etc/resolv.conf file. DNS Client Setup First Create the file called /etc/resolv.conf - which includes the primary and secondary DNS server IP address for Solaris system, it can be your own DNS server or your ISPs DNS server: # touch /etc/...

Allow root account to use SSH in Solaris

Q. Root access to ssh server blocked. How do I allow root account access to ssh server? A. Allowing direct root access over ssh is a security risk. However following steps will allow you to login as root over ssh session: Open sshd_config file: # vi /etc/ssh/sshd_config Find out line that read as follows: PermitRootLogin  no Set it as follows: PermitRootLogin  yes Find out line that read as follows (this line may not exists in your configuration): DenyUsers root user2 user3 Set is as follows: DenyUsers user2 user3 Save and close the file. Restart the sshd: # /lib/svc/method/sshd restart

Solaris IPMP (IP Network Multipathing)

The  IP network multipathing  or  IPMP  is a facility provided by Solaris to provide fault-tolerance and load spreading for network interface cards (NICs). With IPMP, two or more NICs are dedicated for each network to which the host connects. Each interface is assigned a static "test" IP address, which is used to assess the operational state of the interface. Each virtual IP address is assigned to an interface, though there may be more interfaces than virtual IP addresses, some of the interfaces being purely for standby purposes. When the failure of an interface is detected its virtual IP addresses are swapped to an operational interface in the group. The IPMP load spreading feature increases the machine's bandwidth by spreading the outbound load between all the cards in the same IPMP group. in.mpathd  is the daemon in the Solaris OS responsible for IPMP functionality. Purpose of IP network Multipathing: In a highly available server con...

Solaris Commands

Starting, Stopping and Rebooting Boot solaris from ok prompt boot Boot Solaris and reconfigure from ok prompt boot –r Boot Solaris from CD / Install Solaris boot cdrom Boot Solaris from network boot net Install Solaris from network boot net - install Shutdown machine to OK prompt init 0 Shutdown and power off machine init 5 How to interrupt bootup STOP key and A key together or send from terminal emulator BREAK signal Boot solaris in single user & system maintenance mode init s or S Shutdown with grace time shutdown -y -g5 -i6 Rebooting to Default Runlevel init 6 If system has 2 Solaris OS say 8/9 to boot in OS us eeprom Installing and Managing software Display list of all installed packages pkginfo Display patches installed showrev –p Install a package in file fcaw.pkg pkgadd –d fcaw.pkg Check the install of package JNIfcaw pkgchk JNIfcaw Display version / info etc of package abc pkginfo –l abc Remove a package JNIfcaw pkgrm JNIfcaw Find what package a file called ...