You need to use pkgrm command which will remove a previously installed or partially installed package from the system. A check is made to determine if any other packages depend on the one being removed. If a dependency exists, the action taken is defined in the admin file.
The default state for the command is in interactive mode, meaning that prompt messages are given during processing to allow the administrator to confirm the actions being taken. Non-interactive mode can be requested with the -n option.
pkgrm command syntax
Use the following command syntax
The following example removes SUNWgtar (GNU Tar):
The following example removes all instances of SUNWjunk:
# pkgrm -R /export/root/client1 SUNWjunk*
- -R root_path : Defines the full path name of a directory to use as the root_path . All files, including package system information files, are relocated to a directory tree starting in the specified root_path .
See the pkgrm(1M) man page for information and options:
man 1 pkgrm
/etc/defaultrouter is the configuration file for default router under Solaris os. The /etc/defaultrouter file can contain the IP addresses or hostnames of one or more default routers, with each entry on its own line. If you use hostnames, each hostname must also be listed in the local /etc/hosts file, because no name services are running at the time that defaultrouter is read.
The default routes listed in this file replace those added by the kernel during diskless booting. An empty /etc/defaultrouter file will cause the default route added by the kernel to be deleted.
(1) First login to Solaris box as a root user:
The /etc/defaultrouter is configuration file for default router under Sun Solaris. Open the file /etc/defaultrouter and add the router IP address:
# vi /etc/defaultrouter
Append IP address:
Restart the Solaris network with following command:
# /etc/init.d/network restart
(3) Or you can add the router IP to default route table as follows:
# route add default 192.168.1.254
add net default: gateway 192.168.1.254
Finally use nslookup and ping command to check network settings:
$ ping 192.168.1.254
$ nslookup nixcraft.com
So 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/resolv.conf
Open /etc/resolv.conf using vi text editor:
# vi /etc/resolv.conf
Add the following lines to it:
- nameserver IP : It is IP of first DNS server
- search nixcraft.in : Default domain name to search. For example, if you type command nslookup www, it will search it as www.nixcraft.in
2) Enable the name resolving using DNS as follows:
# cp /etc/nsswitch.dns /etc/nsswitch.conf
3) Test new name server by running the nslookup command as follows:
# nslookup nixcraft.in
# /usr/sfw/sbin/nslookup nixcraft.in
Linux DNS Client / Nameserver configuration. Explains how to set or add ISP or your own dns servers to /etc/resolv.conf file to resolve hostnames.
The SSH protocol recommended a method for remote login and remote file transfer which provides confidentiality and security for data exchanged between two server systems. The SSH depends upon the use of public key cryptography. The OpenSSH server offers this kind of setup under Linux or Unix-like system. This how-to covers generating and using ssh public keys for automated usage such as:
- Automated Login using the shell scripts
- Making backups
- Run commands from the shell prompt and more
- Login without password