Showing posts with label installation. Show all posts
Showing posts with label installation. Show all posts

Friday, December 16, 2011

Tips for Solaris 10

Enabling Root Login via SSH
After fresh installation of Solaris 10, root login via SSH is disabled by default. It can be enabled as follows:
1. Modify /etc/ssh/sshd_config, set "PermitRootLogin" to "yes".

2. Restart the SSH service:

# svcadm restart svc:/network/ssh:default

Changing Root's Default Shell to Bash
Modify /etc/passwd, change root user's default shell to /usr/bin/bash.

Installing Sudo
There is no sudo in Solaris 10 by default, so you need to build and install it from its source code by yourself. First, you need to install following dependent packages first (download them from http://sunfreeware.com):

gcc-3.4.6-sol10-x86-local.gz
libiconv-1.14-sol10-x86-local.gz

They can be installed by using "pkgadd" command.
Second, download sudo's source distribution from http://www.sudo.ws, "configure", "make" and "make install" it. 




Monday, November 28, 2011

A Patch to Keep the Resizing of tmps Surviving Through Reboot

After a fresh installation of RHEL 6.1, I needed to adjust the size of tmpfs. However, I found it is a little more complicated than just add "size" option in /etc/fstab for tmpfs. The setting of "size" in /etc/fstab doesn't keep through system reboot. Then I found following patch against /etc/rc.d/rc.sysinit which can make it persistent:

[root@bbrh6u1src ~]# diff -u /etc/rc.d/rc.sysinit.orig /etc/rc.d/rc.sysinit
--- /etc/rc.d/rc.sysinit.orig   2011-04-19 10:04:51.000000000 -0400
+++ /etc/rc.d/rc.sysinit        2011-11-28 08:33:53.166819280 -0500
@@ -487,7 +487,7 @@
        mount -f /proc >/dev/null 2>&1
        mount -f /sys >/dev/null 2>&1
        mount -f /dev/pts >/dev/null 2>&1
-       mount -f /dev/shm >/dev/null 2>&1
+       #mount -f /dev/shm >/dev/null 2>&1
        mount -f /proc/bus/usb >/dev/null 2>&1
 fi

@@ -495,7 +495,7 @@
 # mounted). Contrary to standard usage,
 # filesystems are NOT unmounted in single user mode.
 if [ "$READONLY" != "yes" ] ; then
-       action $"Mounting local filesystems: " mount -a -t nonfs,nfs4,smbfs,ncpfs,cifs,gfs,gfs2 -O no_netdev
+       action $"Mounting local filesystems: " mount -a -t tmpfs,nonfs,nfs4,smbfs,ncpfs,cifs,gfs,gfs2 -O no_netdev
 else
        action $"Mounting local filesystems: " mount -a -n -t nonfs,nfs4,smbfs,ncpfs,cifs,gfs,gfs2 -O no_netdev
 fi

References:
https://www.redhat.com/archives/rhelv6-list/2011-February/msg00081.html