Over the past few days I have been installing Solaris 10 on a SunFire V210 1U server. Having used Linux extensively for some time, some of my frustrations with Solaris are detailed below:-
boot cdrom<cr>It is cdrom even though the disk is a dvd.
bash-3.00# cat /etc/default/login # If CONSOLE is set, root can only login on that device. # Comment this line out to allow remote login by root. # CONSOLE=/dev/consoleCreate a /var/adm/loginlog to record failed login attempts:-
bash-3.00# touch /var/adm/loginlog chgrp sys /var/adm/loginlog chmod g-r /var/adm/loginlog chmod o-r /var/adm/loginlogThis ensures that only root can read the log.
-bash-3.00# ls -l /var/adm/loginlog -rw------- 1 root sys 0 Aug 22 11:49 /var/adm/loginlog
-bash-3.00# #. -bash-3.00# sc-ns0> console Enter #. to return to ALOM. -bash-3.00#Useful ALOM setup & configuration info can be found thus:-
bash-3.00# /usr/platform/SUNW,Sun-Fire-V240/sbin/scadm help (truncated info) bash-3.00# /usr/platform/SUNW,Sun-Fire-V240/sbin/scadm show (truncated info) bash-3.00# /usr/platform/SUNW,Sun-Fire-V240/sbin/scadm set netsc_ipaddr 10.79.0.101 bash-3.00# /usr/platform/SUNW,Sun-Fire-V240/sbin/scadm set netsc_ipnetmask 255.255.252.0 bash-3.00# /usr/platform/SUNW,Sun-Fire-V240/sbin/scadm set netsc_ipgateway 10.79.0.49The info for configuring the ILO does not seem to be available on Sun's website, it is only in the "Sun Fire V210 and V240 Server Documentation CD-ROM".
/usr/platform/`uname -i`/sbin/scadm version -v
/usr/platform/`uname -i`/sbin/scadm userpassword admin
bash-3.00# cat /etc/passwd | grep testuser testuser:x:100:100::/export/home/testuser:/bin/shChange this to :-
testuser:x:100:100::/export/home/testuser:/usr/bin/bashTo make the prompt a bit more informative, create a ~/.profile:-
bash-3.00# cat ~/.profile PS1="[\u@\h:\w]\$ " export PS1To alter this for all subsequently created users, some files in /etc/skel/ will need to be edited. More on this later when I've worked it out!
-bash-3.00# svcs network/telnet STATE STIME FMRI uninitialized 16:28:51 svc:/network/telnet:defaultAfter more reading on how SMF works we issued:-
-bash-3.00# svcs -x svc:/network/dns/client:default (DNS resolver) State: offline since Fri 02 Sep 2005 10:14:24 BST Reason: Dependency file://localhost/etc/resolv.conf is absent. See: http://sun.com/msg/SMF-8000-E2 See: resolver(3RESOLV) Impact: 13 dependent services are not running. (Use -v for list.)This gave a clue, /etc/resolv.conf was absent. Why it had not been written during the install, I do not know. After creating a resolv.conf file, the service could be started:-
-bash-3.00# cat /etc/resolv.conf nameserver 10.90.193.173 -bash-3.00# svcadm enable network/telnet -bash-3.00# svcs network/telnet STATE STIME FMRI online 10:26:23 svc:/network/telnet:defaultAs can be seen, telnetd is now working!
-bash-3.00# cat /etc/hosts # # Internet host table # 127.0.0.1 localhost 10.64.64.116 ns0 ns0.mycompany.co.uk loghost 10.20.194.143 myworkstation myworkstation.mycompany.co.uk -bash-3.00# cat etc/defaultrouter 10.64.64.49 -bash-3.00# cat etc/netmasks # # The netmasks file associates Internet Protocol (IP) address # masks with IP network numbers. # # network-number netmask # # The term network-number refers to a number obtained from the Internet Network # Information Center. # # Both the network-number and the netmasks are specified in # "decimal dot" notation, e.g: # # 128.32.0.0 255.255.255.0 # 10.64.64.0 255.255.240.0 -bash-3.00# -bash-3.00# cat /etc/hostname.bge0 ns0 -bash-3.00# cat /etc/inet/ipnodes # # Internet host table # ::1 localhost 127.0.0.1 localhost 10.64.64.116 ns0 loghost -bash-3.00#The location of ipnodes has changed to /etc/inet/ipnodes in Solaris 10, we forgot to alter it, so the ipaddress did not change even after several reboots, as soon as this was changed the ipaddress changed correctly.
bash-3.00# ln -s /opt/sfw/bin/pico /bin/picoWhile you are at it, you could create a symlink for pine also!
bash-3.00# pico named.conf Sorry, I don't know anything about your "linux" terminal. bash-3.00#The output of env showed that TERM=linux, a quick TERM=vt100 set the environment correctly and pico could run.
bash-3.00# svcadm enable network/dns/server:defaultThe status can be observed:-
bash-3.00# svcs -l network/dns/server:default fmri svc:/network/dns/server:default enabled true state online next_state none state_time Mon Dec 05 11:55:26 2005 logfile /var/svc/log/network-dns-server:default.log restarter svc:/system/svc/restarter:default contract_id 325 dependency require_all/none file://localhost/etc/named.conf (online) dependency require_all/none svc:/system/filesystem/minimal (online) dependency require_any/error svc:/network/loopback (online) dependency optional_all/error svc:/milestone/network (online) bash-3.00#named.conf lives in /etc/named.conf and the zone files location can be configured to be the usual /var/named/. The directory ownership was changed to root:sys as named runs as root without any changes.
[root@ns0:/var/named]$ rndc-confgen -a [root@ns0:/var/named]$ more /etc/rndc.key key "rndc-key" { algorithm hmac-md5; secret "7g2h7UiHLsr9OWERdg22PQ=="; }; [root@ns0:/var/named]$ pico /etc/named.conf options { directory "/var/named"; /* * If there is a firewall between you and nameservers you want * to talk to, you might need to uncomment the query-source * directive below. Previous versions of BIND always asked * questions using port 53, but BIND 8.1 uses an unprivileged * port by default. */ // query-source address * port 53; }; key "rndc-key" { algorithm hmac-md5; secret "6d1e1TiAJfx8AWVFcw50EQ=="; }; controls { inet 127.0.0.1 port 953 allow { 127.0.0.1; } keys { "rndc-key"; }; }; . . . rest of file.....To test your configuration and zone files for syntax, use named-checkconf which will return without any messages for a correct named.conf and named-checkzone to check zone files which returns the results of a test load of the zone and gives output if all is ok. Both give an error message if there is a problem. Also remember to check the logs to ensure that slave zones are being loaded correctly or that the correct allow-transfer statements are present for your secondaries to pull a copy from you.
[root@ns0:/var/named]$ named-checkconf [root@ns0:/var/named]$ named-checkzone myorg.int myorg.int.hosts zone myorg.int/IN: loaded serial 2005120801 OK [root@ns0:/var/named]$
[root@ns0:/etc/inet]$ cp ntp.server ntp.conf [root@ns0:/etc/inet]$ [root@ns0:/etc/inet]$ svcadm enable ntp [root@ns0:/etc/inet]$ [root@ns0:/etc/inet]$ svcs -xv ntp svc:/network/ntp:default (Network Time Protocol (NTP)) State: online since Thu Dec 08 16:38:39 2005 See: man -M /usr/share/man -s 1M xntpd See: man -M /usr/share/man -s 1M ntpdate See: man -M /usr/share/man -s 1M ntpq See: /var/svc/log/network-ntp:default.log Impact: None. [root@ns0:/etc/inet]$