{"id":2491,"date":"2013-10-13T11:31:08","date_gmt":"2013-10-13T03:31:08","guid":{"rendered":"http:\/\/rmohan.com\/?p=2491"},"modified":"2013-10-13T11:31:08","modified_gmt":"2013-10-13T03:31:08","slug":"solaris-10","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=2491","title":{"rendered":"Solaris 10"},"content":{"rendered":"<p>After the Solaris installation finished you got to modifiy these things.<\/p>\n<p>1. Login with &#8216;root&#8217; user<\/p>\n<p>2.To create group and user account:<br \/>\n#groupadd -g 500 unixmin<br \/>\n#useradd -u 500 -g unixmin -d \/export\/home\/zawhtet -m -s \/usr\/bin\/bash -c &#8220;Zaw Htet&#8221; zawhtet<br \/>\n#passwd zawhtet<\/p>\n<p>3.Create no login user for Services (Optional)<br \/>\n#groupadd -g 501 squid<br \/>\n#useradd -u 501 -g squid -s \/usr\/bin\/false -c &#8220;Squid Admin&#8221; squid<\/p>\n<p>4.To change the login name and home directory for &#8211; user2 (new) to user1 (old).<br \/>\n#usermod -m -d \/export\/home\/user1 -l user1 user2<\/p>\n<p>For Testing, create user2 first,<br \/>\n#useradd -u 503 -g unixmin -d \/export\/home\/user2 -m -s \/usr\/bin\/bash -c &#8220;User 2&#8221; user2<br \/>\nThen modify, user2 login name and home directory become user1<br \/>\n#usermod -m -d \/export\/home\/user1 -l user1 user2<br \/>\nNote: Even we modified the user&#8217;s home directory and login name, User2 name still remains\/ also put the account to random group.<br \/>\ncat \/etc\/passwd<br \/>\nuser1:x:503:500:User 2:\/export\/home\/user1:\/usr\/bin\/bash<\/p>\n<p>5.Deleting User Accounts<br \/>\n#userdel\u00a0 user1\u00a0\u00a0&#8211; to remove the user1 account<br \/>\n#userdel -r user1\u00a0&#8211; This command also remove the user&#8217;s Home Directory<\/p>\n<p>6.Deleting Group<br \/>\n#groupdel<br \/>\ncat \/etc\/group<\/p>\n<p>7.When we first login to terminal, you will see that you got &#8220;\/bin\/sh&#8221;<br \/>\n#echo $SHELL<br \/>\n\/bin\/sh<br \/>\n#bash<br \/>\nbash-3.00$<br \/>\nNote: When you edit the file even with root account you will get Read-Only message<br \/>\nIf you want to save after you open file with Vi editor use &#8216;:wq!&#8217;<br \/>\nbash-3.00# whereis bash<br \/>\nbash: \/usr\/bin\/bash \/usr\/man\/man1\/bash.1<\/p>\n<p>8.If you want to set root or your user account, permanently login to bash shell<br \/>\nvi\u00a0 \/etc\/passwd<br \/>\nroot:x:0:0:Super-User:\/:\/bin\/sh<br \/>\nchange to<br \/>\nroot:x:0:0:Super-User:\/:\/bin\/bash<\/p>\n<p>9. Create &#8216;.bash_profile&#8217; file under &#8216;\/&#8217; then copy to \/root (#cp\u00a0\u00a0 .*\u00a0\u00a0 \/root)<br \/>\nvi .bash_profile<br \/>\nexport PATH=\/usr\/bin:\/usr\/sbin:\/usr\/sfw\/bin:\/opt\/sfw\/bin:\/usr\/dt\/bin:\/usr\/sadm\/admin\/bin\/<br \/>\nexport PS1='[\\u@\\h \\W]\\$ &#8216;<br \/>\nexport HISTSIZE=5000<br \/>\nalias ls=&#8217;ls -l&#8217;<br \/>\nalias netstat=&#8217;netstat -an |grep LISTEN&#8217;<br \/>\nalias h=&#8217;history&#8217;<br \/>\nalias lsd=&#8217;ls -ACF \\!* | more&#8217;<br \/>\nalias lsl=&#8217;ls -alh | less&#8217;<br \/>\nalias lst=&#8217;ls -alt \\!* | more&#8217;<br \/>\nalias plm=&#8217;ps -elf | more&#8217;<br \/>\nalias plg=&#8217;ps -elf | grep &#8220;\\!*&#8221; | sort -n +3 -4&#8242;<br \/>\nalias psm=&#8217;ps -ef | more&#8217;<br \/>\nalias psg=&#8217;ps -ef | grep &#8220;\\!*&#8221; | sort -n +1 -2&#8242;<\/p>\n<p>10.refresh the profile with logout<br \/>\nsource ~root\/.bash_profile<br \/>\n.\u00a0 ~root\/.bash_profile<br \/>\n#env or\u00a0 set<br \/>\n#echo $PATH<br \/>\n\/usr\/sbin:\/usr\/bin:\/usr\/sfw\/bin\/<br \/>\n#export<\/p>\n<p>11.Make root account to login to his home directory<br \/>\nvi\u00a0 \/etc\/passwd<br \/>\nroot:x:0:0:Super-User:\/:\/bin\/bash<br \/>\nchange to<br \/>\nroot:x:0:0:Super-User:\/root:\/bin\/bash<\/p>\n<p>12.Make SSH login permission to root user<br \/>\nvi\u00a0 \/etc\/ssh\/sshd_config<br \/>\nPermitRootLogin\u00a0 yes<\/p>\n<p>13.Restart SSH service<br \/>\n#svcadm enable ssh<br \/>\n#svcadm refresh ssh<br \/>\n#svcs -a | grep ssh<br \/>\n#netstat -an | grep LISTEN<\/p>\n<p>14.IPFilter for Solaris Firewall<br \/>\nsvcadm enable ipfilter<br \/>\nsvcs -a|grep pfil<br \/>\n\/usr\/share\/ipfilter\/examples. Just copy one of them over \/etc\/ipf\/ipf.conf<\/p>\n<p>#ipf\u00a0 -Fa\u00a0 -f\u00a0 \/etc\/ipf\/ipf.conf<br \/>\npass in all<br \/>\npass out all<\/p>\n<p>routeadm -u -e ipv4-forwarding<\/p>\n<p>vi\u00a0 \/etc\/ipf\/ipf.conf<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;Firewall&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\npass in quick on lo0 all<br \/>\npass out quick on lo0 all<br \/>\nblock in log on e1000g0 all<br \/>\nblock out log on e1000g0 all<br \/>\npass out quick on e1000g0 proto tcp\/udp from any to any keep state<br \/>\npass out quick on e1000g0 proto icmp all keep state<br \/>\npass in quick on e1000g0 proto icmp all keep state<br \/>\npass in quick proto tcp from any to any port = 22 keep state<br \/>\npass in quick proto tcp from any to any port = 10000 keep state<br \/>\npass in quick proto udp from any to any port = 67 keep state<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n# Allow all traffic on loopback.<br \/>\npass in quick on lo0 all<br \/>\npass out quick on lo0 all<br \/>\n# Public Network.\u00a0\u00a0 Block everything not explicity allowed.<br \/>\nblock in log on e1000g0 all<br \/>\nblock out log on e1000g0 all<\/p>\n<p># Allow all connection out from this computer<br \/>\npass out quick on e1000g0 proto tcp\/udp from any to any keep state<\/p>\n<p># Allow pings out.<br \/>\npass out quick on e1000g0 proto icmp all keep state<\/p>\n<p># Allow pings in.<br \/>\npass in quick on e1000g0 proto icmp all keep state<\/p>\n<p># Allow ssh connection on port 22 to Laptop(192.168.0.1)<br \/>\npass in quick proto tcp from 192.168.0.1 to 192.168.0.254 port=22 keep state<br \/>\npass in quick proto tcp from any to any port = 22 keep state<br \/>\npass in quick proto tcp from any to any port = 10000 keep state<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n-bash-3.00# cat reloadipf.sh<br \/>\n#!\/bin\/sh<br \/>\n# Last Modified On: 25-FEB-2006<br \/>\n# Script to reload the IFP<br \/>\nipf -Fa -f \/etc\/ipf\/ipf.conf<br \/>\n-bash-3.00#<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\nipf -E\u00a0 : Enable ipfilter when running for the\u00a0\u00a0 first time.(Needed for ipf on Tru64)<\/p>\n<p>ipf -f \/etc\/ipf\/ipf.conf\u00a0 : Load rules in \/etc\/ipf\/ipf.conf file into the active firewall.<\/p>\n<p>ipf -Fa -f \/etc\/ipf\/ipf.conf : Flush all rules, then load rules in \/etc\/ipf\/ipf.conf\u00a0\u00a0 into active firwall.<\/p>\n<p>ipf -Fi\u00a0 : Flush all input rules.<\/p>\n<p>ipf -I -f \/etc\/ipf\/ipf.conf : Load rules in \/etc\/ipf\/ipf.conf file into inactive firewall.<\/p>\n<p>ipf -V\u00a0 : Show version info and active list.<\/p>\n<p>ipf -s\u00a0 : Swap active and inactive firewalls.<\/p>\n<p>ipfstat\u00a0 : Show summary<\/p>\n<p>ipfstat -i : Show input list<\/p>\n<p>ipfstat -o : Show output list<\/p>\n<p>ipfstat -hio : Show hits against all rules<\/p>\n<p>ipfstat -t -T 5 : Monitor the state table and refresh every 5 seconds.\u00a0\u00a0 Output is similiar to &#8216;top&#8217; monitoring the process table.<\/p>\n<p>ipmon -s S : Watch state table.<\/p>\n<p>ipmon -sn : Write logged entries to syslog, and convert back\u00a0\u00a0 to hostnames and servicenames.<\/p>\n<p>ipmon -s [file] : Write logged entries to some file.<\/p>\n<p>ipmon -Ds : Run ipmon as a daemon, and log to default location.\u00a0 (\/var\/adm\/messages for Solaris) (\/var\/log\/syslog for Tru64)<\/p>\n<p>15.Solaris 10 Static IP Configuration<br \/>\n\/etc\/nodename<br \/>\n\/etc\/hosts<br \/>\n\/etc\/inet\/hosts<br \/>\n\/etc\/hostname.e1000g0<br \/>\n\/etc\/inet\/ipnodes<br \/>\n\/etc\/inet\/netmasks<br \/>\n\/etc\/defaultdomain<br \/>\n\/etc\/defaultrouter<br \/>\n\/etc\/resolv.conf<br \/>\nsvcadm\u00a0 restart network\/physical<\/p>\n<p>16. Solaris 10 Dynamic IP Configuration, make sure following files are blank.<br \/>\n\/etc\/hostname.e1000g0<br \/>\n\/etc\/dhcp.e1000g0<br \/>\n\/etc\/defaultrouter<br \/>\nsvcadm\u00a0 restart network\/physical<\/p>\n<p>#\/usr\/sbin\/netservices limited<\/p>\n<p>17. Check Port Open\u00a0 status<br \/>\n#netstat -n -f inet<br \/>\n#netstat \u2013anf\u00a0 inet -P tcp<br \/>\n#netstat -anf\u00a0 inet \u2013P udp<br \/>\n#netstat\u00a0\u00a0 -nr<br \/>\nlsof\u00a0 -i\u00a0\u00a0 TCP<br \/>\nlsof\u00a0 -I\u00a0 TCP\u00a0 | grep LISTEN<\/p>\n<p>18. Package management<br \/>\nIf you want to add more solaris packages from DVD, after you installed the solaris<br \/>\nfirst insert the DVD and mount the DVD by<br \/>\nRemount volume manager<br \/>\n#\/etc\/init.d\/volmgt stop<br \/>\n#\/etc\/init.d\/volmgt start<br \/>\ncheck<br \/>\n# ls \/cdrom\/cdrom0<br \/>\n# cd \/cdrom\/cdrom0\/Solaris_10\/Product<br \/>\nor mount manually from<br \/>\n#mount -F\u00a0 hsfs\u00a0 \/dev\/dsk\/c0t0d0p0\u00a0\u00a0 \/mnt<\/p>\n<p>19.mount ISO file<br \/>\n#lofiadm -a \/tmp\/companion-sparc-sol10.iso \/dev\/lofi\/1<br \/>\n#mount -F hsfs -o ro \/dev\/lofi\/1 \/mnt<\/p>\n<p>20. CD Burning<br \/>\n#cdrw -l<br \/>\nLooking for CD devices&#8230;<br \/>\nNode\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Connected Device\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Device type<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n\/dev\/rdsk\/c2t0d0s2\u00a0\u00a0 | MATSHITA DVD-RAM UJ-845S\u00a0 D200 | CD Reader\/Writer<br \/>\n#cdrw -d c2t0d0s2 -i companion-sparc-sol10.iso<\/p>\n<p>21. Package installation<br \/>\n#ls\u00a0 \/mnt\/Solaris_10\/Product<br \/>\nSolaris Packages start with &#8216;SUNW*&#8217;<br \/>\nIf you want to add one package<br \/>\n#pkgadd\u00a0 -d\u00a0 .\u00a0 SUNWbash<br \/>\nNormally these packages install to &#8216;\/usr\/sfw&#8217;<\/p>\n<p>Or you want to manually download bz2 package from internet and install like this<br \/>\nbunzip2 firefox-24.0.en-US.solaris-10-fcs-i386-pkg.bz2<br \/>\npkgadd -d firefox-24.0.en-US.solaris-10-fcs-i386-pkg<\/p>\n<p>Decompress tar.gz file<br \/>\n#gunzip\u00a0\u00a0 vmware-solaris-tools.tar.gz\u00a0\u00a0 |tar\u00a0\u00a0\u00a0 -xv<br \/>\n#tar\u00a0 xvf\u00a0\u00a0 vmware-solaris-tools.tar.gz<\/p>\n<p>If your package is in .bz2 format then first uncompress it using bunzip2 command:<br \/>\n#bunzip2 Packagname.bz2<br \/>\nInstall package:<br \/>\n#pkgadd \u2013d Packagname<br \/>\nNote .bz2 extension will automatically removed by first command.<br \/>\nFor example if your package name is SFWqt.bz2<br \/>\n#buzip2 SFWqt.bz2<br \/>\n#pkgadd \u2013d SFWqt<\/p>\n<p>Add Packages from DVD to \/var\/spool\/pkg<br \/>\n#Pkgadd\u00a0\u00a0\u00a0 -d\u00a0\u00a0\u00a0 \/cdrom\/sol_10_910_x86\/Solaris_10\/Product\/\u00a0\u00a0\u00a0\u00a0 -s \/var\/spool\/pkg\/\u00a0\u00a0\u00a0\u00a0 SUNWgtar<br \/>\n#pkgadd\u00a0 SUNWgtar<br \/>\n#pkgadd \u2013d\u00a0\u00a0\u00a0\u00a0 \/path\/to\/cdrom\/Product\u00a0\u00a0\u00a0 SUNWjaf\u00a0\u00a0\u00a0\u00a0 SUNWjato\u00a0\u00a0\u00a0 SUNWjmail<br \/>\n#pkginfo -l | grep wget<br \/>\n#pkginfo -l SUNWwgetu<\/p>\n<p>#gunzip lsof_1106-4.80-sol10-sparc-local.gz<br \/>\n#pkgadd -d lsof_1106-4.80-sol10-sparc-local or *.pkg<br \/>\nIf gunzip cannot run add the variable path to<br \/>\n\/usr\/local\/bin<br \/>\n\/usr\/local\/lib<br \/>\n\/usr\/local\/man<\/p>\n<p>For installing all the packages, create an install administration file such as:<br \/>\n# cat \/var\/tmp\/admin<br \/>\nmail=<br \/>\nconflict=nocheck<br \/>\nsetuid=nocheck<br \/>\naction=nocheck<br \/>\npartial=nocheck<br \/>\ninstance=overwrite<br \/>\nidepend=nocheck<br \/>\nrdepend=nocheck<br \/>\nspace=check<br \/>\n#pkgadd -a \/var\/tmp\/admin -d \/cdrom\/cdrom\/Solaris_Software_Companion\/Solaris_i386\/<\/p>\n<p>Download zipped ISO from <a href=\"http:\/\/www.sun.com\/software\/solaris\/freeware\/\">http:\/\/www.sun.com\/software\/solaris\/freeware\/<\/a><br \/>\n# unzip sol-10-u8-companion-ga-iso.zip<br \/>\n# lofiadm -a `pwd`\/sol-10-u8-companion-ga.iso<br \/>\n# mount -oro -Fhsfs \/dev\/lofi\/1 \/mnt<br \/>\n# \/bin\/yes | pkgadd -d \/mnt\/Solaris_Software_Companion\/Solaris_sparc\/Packages all<br \/>\n# pkgrm SFWvnc<br \/>\n# umount \/mnt<br \/>\n# lofiadm -d `pwd`\/sol-10-u8-companion-ga.iso<br \/>\n# rm sol-10-u8-companion-ga.iso<br \/>\n# rm sol-10-u8-companion-ga-iso.zip<\/p>\n<p>22.To remove package<br \/>\n#pkgrm<\/p>\n<p>23.System Info Commands<br \/>\n#cat \/etc\/release<br \/>\n#showrev<br \/>\n#uname -a<br \/>\n#prtconf\u00a0 | grep -i memory<br \/>\n#psrinfo<br \/>\n#psrinfo -pv<br \/>\n#isainfo -bv<br \/>\n#isalist<br \/>\n#date &#8216;+DateTime: %m.%d.%y @ %H:%M:%S&#8217;<br \/>\ndate mmddHHMMccyy<br \/>\ndate\u00a0 091810022013<br \/>\n#ps -ef<br \/>\n#ps -U root<br \/>\n#tty \/ w<br \/>\n#pgrep sshd<br \/>\n#pgrep -o sshd<br \/>\n#pgrep -o sshd<br \/>\n#pkill (PID) or sshd<br \/>\n#pwdx (PID) &#8211; Lists the working directories of process<br \/>\n#prstat<br \/>\n#svcs -o FMRI,DESC<\/p>\n<p>24.KDE Login after intallation from Companion DVD<br \/>\n#\/opt\/sfw\/kde\/dtlogin\/install-dtlogin<\/p>\n<p>25.To disable the GUI login Solaris<br \/>\nFirst login with ssh and Kill desktop login<br \/>\n#\/usr\/dt\/bin\/dtconfig -kill<br \/>\n#\/usr\/dt\/bin\/dtconfig -d<br \/>\n#\/usr\/dt\/bin\/dtconfig -e<br \/>\n#\/usr\/dt\/bin\/dtconfig -reset<br \/>\n#\/usr\/dt\/bin\/dtconfig -inetd<\/p>\n<p>26.Static Routing (-p) option for permanent route<br \/>\n#route -p add -net 192.168.2.0\u00a0\u00a0\u00a0 192.168.1.2\u00a0\u00a0 255.255.255.0<br \/>\nNetwork\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Gateway<br \/>\nadd net 192.168.2.0: gateway 192.168.1.254<br \/>\nadd persistent net 192.168.2.0: gateway 192.168.1.254<\/p>\n<p>The above created route would still appear the same in a listing of the<br \/>\nrouting table, however, you may notice that there is a secondary line<br \/>\nof output upon creating the route:<\/p>\n<p>add persistent net 192.168.2.0: gateway 192.168.1.254<\/p>\n<p>This simply means that the &#8216;route&#8217; command updated config file<br \/>\n\/etc\/inet\/static_routes.\u00a0 By default, this file will not exist until<br \/>\na static route is created via &#8216;route -p &#8230;&#8217; or you create it.\u00a0 Before<br \/>\ngetting to contents, the following are the ownership \/ permissions set<br \/>\nto the file by &#8216;route&#8217;:<\/p>\n<p>#ls -l \/etc\/inet\/static_routes<br \/>\n-rw-r&#8211;r&#8211;\u00a0\u00a0 1 root\u00a0\u00a0\u00a0\u00a0 root\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 45 Oct\u00a0 6 13:35 \/etc\/inet\/static_routes<br \/>\nAnd now, the contents, which are effectively the arguments to &#8216;route add&#8217;:<\/p>\n<p>#cat \/etc\/inet\/static_routes<\/p>\n<p># File generated by route(1M) &#8211; do not edit.<br \/>\n-net 192.168.2.0 192.168.1.2 255.255.255.0<\/p>\n<p>Yes, I know it says do not edit, though in checking out the source of<br \/>\n&#8216;route&#8217; via opensolaris.org, it doesn&#8217;t appear that manual editing<br \/>\nis an issue.\u00a0 Finally, Solaris has a native, standardized means of<br \/>\nconfiguring persistent static routes.<\/p>\n<p>Additionally, to remove a static route, delete it from<br \/>\n\/etc\/inet\/static_routes and remove via &#8216;route&#8217; or simply use the following<br \/>\n&#8216;route&#8217; command:<\/p>\n<p>#route -p delete -net 192.168.2.0 192.168.1.2 255.255.255.0<\/p>\n<p>27.Bind DNS Server Solaris<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\npkginfo -x |grep -i bind<br \/>\nSUNWbind\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 BIND DNS Name server and tools<br \/>\nSUNWbindr\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 BIND Name server Manifest<\/p>\n<p>pkgchk -l SUNWbind (Client &amp; Server Utilities)<br \/>\npkgchk -l SUNWbindr | grep -i pathname | less<\/p>\n<p>dig linuxcbt.com ns<\/p>\n<p>ls -l \/usr\/sbin\/named<\/p>\n<p>ls -l \/usr\/sbin\/in.named<\/p>\n<p>ls -ltr \/var\/named<\/p>\n<p>vi \/etc\/named.conf\u00a0 &lt;&#8212; br=&#8221;&#8221; by=&#8221;&#8221; create=&#8221;&#8221; default=&#8221;&#8221; etc=&#8221;&#8221; file=&#8221;&#8221; have=&#8221;&#8221; no=&#8221;&#8221; s=&#8221;&#8221; there=&#8221;&#8221; this=&#8221;&#8221; to=&#8221;&#8221; within=&#8221;&#8221; you=&#8221;&#8221;&gt;<\/p>\n<p>options {<br \/>\ndirectory &#8220;\/var\/named&#8221;;<br \/>\ndump-file &#8220;\/var\/named\/data\/cache_dump.db&#8221;;<br \/>\nstatistics-file &#8220;\/var\/named\/data\/named_stats.txt&#8221;;<br \/>\nmemstatistics-file &#8220;\/var\/named\/data\/named_mem_stats.txt&#8221;;<br \/>\nlisten-on port 53 { 127.0.0.1; 192.168.100.103; };<br \/>\nallow-query { localhost; 192.168.100.0\/24; };<br \/>\nforwarders { 192.168.100.254; 8.8.8.8; };<br \/>\nrecursion yes;<br \/>\nmax-cache-size 100m;<br \/>\ncleaning-interval 60;<br \/>\n};<\/p>\n<p>zone &#8220;.&#8221; {<br \/>\ntype hint;<br \/>\nfile &#8220;named.root&#8221;;<br \/>\n};<\/p>\n<p>zone &#8220;mmx.com&#8221; {<br \/>\ntype master;<br \/>\nfile &#8220;db.mmx.com&#8221;;<br \/>\nallow-update { none; };<br \/>\n};<\/p>\n<p>zone &#8220;0.0.127.in-addr.arpa&#8221; {<br \/>\ntype master;<br \/>\nfile &#8220;db.127.0.0&#8221;;<br \/>\n};<\/p>\n<p>zone &#8220;100.168.192.in-addr.arpa&#8221; {<br \/>\ntype master;<br \/>\nfile &#8220;db.192.168.100&#8243;;<br \/>\nallow-update { none; };<br \/>\n};<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n@ is a variable which indicates the name of the zone as configured in \/etc\/named.conf<\/p>\n<p>############\/var\/named\/db.127.0.0###############################<br \/>\n$TTL 28800<br \/>\n@ IN SOA\u00a0 ns1.mmx.com.\u00a0 zawhtet.mmx.com. (<br \/>\n2013100301 ; serial number yyyymmdd01<br \/>\n7200 ; Refresh Interval<br \/>\n3600 ; Retry Interval<br \/>\n86400 ; Expiry<br \/>\n600 )\u00a0 ; Minimum TTL<\/p>\n<p>NS\u00a0\u00a0\u00a0 ns1.<br \/>\n1\u00a0 IN\u00a0\u00a0\u00a0 PTR\u00a0\u00a0 localhost.mmx.com.<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n#############\/var\/named\/db.192.168.100############################<br \/>\n$TTL 28800<br \/>\n@ IN SOA\u00a0 ns1.mmx.com.\u00a0 zawhtet.mmx.com. (<br \/>\n2013100301 ; serial number yyyymmdd01<br \/>\n7200 ; Refresh Interval<br \/>\n3600 ; Retry Interval<br \/>\n86400 ; Expiry<br \/>\n600 )\u00a0 ; Minimum TTL<\/p>\n<p>NS\u00a0\u00a0\u00a0 ns1.<br \/>\n89\u00a0 IN\u00a0\u00a0\u00a0 PTR\u00a0\u00a0 ns1.<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\n###############\/var\/named\/db.mmx.com##########################<br \/>\n$TTL 28800<br \/>\n@ IN SOA\u00a0 ns1.mmx.com.\u00a0 zawhtet.mmx.com. (<br \/>\n2013100301 ; serial number yyyymmdd01<br \/>\n7200 ; Refresh Interval<br \/>\n3600 ; Retry Interval<br \/>\n86400 ; Expiry<br \/>\n600 )\u00a0 ; Minimum TTL<\/p>\n<p>NS\u00a0\u00a0\u00a0 ns1.<br \/>\nIN\u00a0 MX\u00a0 10 ns1.mmx.com.<\/p>\n<p>ns1 IN\u00a0 A\u00a0\u00a0\u00a0\u00a0 192.168.100.89<br \/>\nwww\u00a0\u00a0\u00a0 CNAME\u00a0 ns1.mmx.com.<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\nsvcadm enable \/ restart dns\/server &amp;&amp; dig @localhost ns1.mmx.com<br \/>\nsvcs -l dns\/server<br \/>\ndig @localhost ns1.mmx.com<br \/>\ndig @localhost msn.com<br \/>\ndig @localhost www.mmx.com<br \/>\nnamed-checkconf -z \/etc\/named.conf<br \/>\nsvcs\u00a0 -a \\*dns\\*<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\nSlave DNS Server<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>Copy following files to slave server:<\/p>\n<p>1. \/var\/named\/db.127.0.0 &#8211; Houses reverse, loopback zone info<br \/>\n2. \/var\/named\/named.root &#8211; root hints<br \/>\n3. \/etc\/named.conf<\/p>\n<p>cd \/var\/named<\/p>\n<p>scp db.127.0.0 db.cache \/etc\/named.conf 192.168.100.2:\/root<\/p>\n<p>On SLave DNS Server<\/p>\n<p>cp \/root\/db.*\u00a0 \/var\/named<br \/>\ncp \/root\/named.conf \/etc<\/p>\n<p>vi \/etc\/named.conf\u00a0 &lt;&#8212; br=&#8221;&#8221; dns=&#8221;&#8221; server=&#8221;&#8221; slave=&#8221;&#8221;&gt;<br \/>\noptions {<br \/>\ndirectory &#8220;\/var\/named&#8221;;<br \/>\nallow-query { localhost; 192.168.100.0\/24; };<br \/>\n};<\/p>\n<p>zone &#8220;.&#8221; {<br \/>\ntype hint;<br \/>\nfile &#8220;named.root&#8221;;<br \/>\n};<\/p>\n<p>zone &#8220;mmx.com&#8221; {<br \/>\ntype slave;<br \/>\nfile &#8220;db.mmx.com&#8221;;<br \/>\nmasters { 192.168.100.89; };<br \/>\n};<\/p>\n<p>zone &#8220;0.0.127.in-addr.arpa&#8221; {<br \/>\ntype master;<br \/>\nfile &#8220;db.127.0.0&#8221;;<br \/>\n};<\/p>\n<p>zone &#8220;1.168.192.in-addr.arpa&#8221; {<br \/>\ntype slave;<br \/>\nfile &#8220;db.192.168.1&#8243;;<br \/>\nmasters { 192.168.100.89; };<br \/>\n};<\/p>\n<p>4. After synchronized with Master server<\/p>\n<p>db.mmx.com &#8211; will download to \/var\/named on Slave DNS Server.<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\n28. Install and Configure dhcp server from console<\/p>\n<p>#pkginfo | grep DHCP<\/p>\n<p>If it is not installed then install it from solaris CD &lt;&#8211; br=&#8221;&#8221; dhcpconfig=&#8221;&#8221; java=&#8221;&#8221; need=&#8221;&#8221; run=&#8221;&#8221; to=&#8221;&#8221; will=&#8221;&#8221; you=&#8221;&#8221;&gt;<br \/>\n# pkgadd\u00a0 -d . SUNWdhc*<\/p>\n<p>#which dhcpmgr<\/p>\n<p>no dhcpmgr in \/usr\/bin \/usr\/sbin \/usr\/sfw\/bin \/opt\/sfw\/bin \/usr\/dt\/bin<\/p>\n<p>#\/usr\/sadm\/admin\/bin\/dhcpmgr &amp; (Everyone can configure DHCP Server from GUI)<\/p>\n<p>#dhtadm<\/p>\n<p>If there&#8217;s no DHCP manager . let&#8217;s configure it<\/p>\n<p>#ifconfig -a &lt;&#8211; br=&#8221;&#8221; check=&#8221;&#8221; network=&#8221;&#8221; the=&#8221;&#8221;&gt;<br \/>\n#netstat -rn &lt;&#8211; br=&#8221;&#8221; check=&#8221;&#8221; gateway=&#8221;&#8221;&gt;<br \/>\nThen create dhcp database<\/p>\n<p>#dhcpconfig\u00a0 -D -r SUNWfiles -p \/var\/dhcp\/ -a 192.168.1.4;8.8.8.8 -d mmx.com -l 86400<\/p>\n<p>(Note: 192.168.1.4 &#8211; DNS Server \/ mmx.com = domain \/ Lease time = 86400)<\/p>\n<p>or<\/p>\n<p>#dhcpconfig\u00a0 -D -r SUNWfiles -p \/var\/dhcp\/<\/p>\n<p>Created DHCP configuration file.<br \/>\nCreated dhcptab.<br \/>\nAdded &#8220;Locale&#8221; macro to dhcptab.<br \/>\nAdded server macro to dhcptab &#8211; solaris-1.<br \/>\nDHCP server started.<\/p>\n<p>#svcs -a | grep dhcp<br \/>\nonline\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 18:57:30 svc:\/network\/dhcp-server:default<\/p>\n<p>#dhtadm -P &lt;&#8212; br=&#8221;&#8221; check=&#8221;&#8221; database=&#8221;&#8221;&gt;<br \/>\nNow configure network and IP<\/p>\n<p>#dhcpconfig -N 192.168.1.0 -m 255.255.255.240 -t 192.168.1.1<br \/>\n(Note: 192.168.1.1 = Gateway)<\/p>\n<p>#pntadm -P 192.168.1.0<\/p>\n<p>#dhcpconfig &#8211;help<\/p>\n<p>#pntadm -r SUNWfiles -p \/var\/dhcp\/ -A 192.168.1.7 192.168.1.0<br \/>\n#pntadm -r SUNWfiles -p \/var\/dhcp\/ -A 192.168.1.8 192.168.1.0<br \/>\n#pntadm -r SUNWfiles -p \/var\/dhcp\/ -A 192.168.1.9 192.168.1.0<br \/>\n#pntadm -r SUNWfiles -p \/var\/dhcp\/ -A 192.168.1.10 192.168.1.0<\/p>\n<p>Or<\/p>\n<p>#pntadm\u00a0 -A\u00a0 192.168.1.7 \u2013f\u00a0 MANUAL -i 01001BFC92BC10 -m\u00a0 192.168.1.0 -y\u00a0 192.168.1.0<\/p>\n<p>#pntadm -P 192.168.1.0<\/p>\n<p>#pntadm -L<\/p>\n<p>#dhtadm -P<\/p>\n<p>#svcadm restart dhcp-server<\/p>\n<p>#svcs -a | grep dhcp<\/p>\n<p>find\u00a0 \/usr\/ -name in.dhcp<\/p>\n<p>#\/usr\/lib\/inet\/in.dhcpd -i e1000g0 -d -v<\/p>\n<p>#pntadm -P 192.168.1.0<\/p>\n<p>If a DHCP server is already configured, you can unconfigure it by using the<br \/>\ndhcpconfig command with the unconfigure flag. For example:<\/p>\n<p># dhcpconfig -Ux<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After the Solaris installation finished you got to modifiy these things.<\/p>\n<p>1. Login with &#8216;root&#8217; user<\/p>\n<p>2.To create group and user account: #groupadd -g 500 unixmin #useradd -u 500 -g unixmin -d \/export\/home\/zawhtet -m -s \/usr\/bin\/bash -c &#8220;Zaw Htet&#8221; zawhtet #passwd zawhtet<\/p>\n<p>3.Create no login user for Services (Optional) #groupadd -g 501 squid #useradd -u [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[39],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2491"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2491"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2491\/revisions"}],"predecessor-version":[{"id":2492,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2491\/revisions\/2492"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2491"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2491"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2491"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}