You want to share a directory in Solaris, may be, the home of the users, or a directory with binaries.
With svcs the service status can be checked, so lets check the status of the nfs server:
-bash-3.00# svcs network/nfs/server
STATE STIME FMRI
offline 2:19:03 svc:/network/nfs/server:default
The service is offline, so you have to enable it and start it, lets do it:
-bash-3.00# svcadm enable -r network/nfs/server
-bash-3.00# svcadm enable -s network/nfs/server
-bash-3.00# svcadm restart network/nfs/server
Now it is started:
-bash-3.00# svcs network/nfs/server
STATE STIME FMRI
online 2:29:51 svc:/network/nfs/server:default
Now, to share a directory, edit /etc/dfs/dfstab and add:
share -F nfs /export/test
Save the file and execute:
# shareall -F nfs
Now check the shares:
-bash-3.00# share
- /export/test rw ""
Quiet simple ;-)
New Solaris Administrators Blog
miércoles, 30 de enero de 2008
miércoles, 2 de enero de 2008
Disable graphical login in Solaris
If you want to start solaris in text mode, it is easy:
-bash-3.00# /usr/dt/bin/dtconfig -d
The reboot ;-)
-bash-3.00# /usr/dt/bin/dtconfig -d
The reboot ;-)
Modifying the ip address of a Server
To modify the ipaddress permanently you have to edit the file:
/etc/hosts or /etc/inet/ipnodes (which is a link to /etc/hosts).
And set there the hostname and the IP address like:
127.0.0.1 localhost
10.10.10.20 solln
Then you have to reboot. You can also change it with ifconfig (like in Linux), first obtain the ethernet card address:
-bash-3.00# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
e1000g0: flags=1000843 mtu 1500 index 2
inet 10.10.10.21 netmask ff000000 broadcast 10.255.255.255
ether 0:c:29:2d:30:5
Then, carefully, modify the address:
# ifconfig e1000g0 10.10.10.20
You will probably loose the connection if you are doing this remotely, so, again, at your own risk.
/etc/hosts or /etc/inet/ipnodes (which is a link to /etc/hosts).
And set there the hostname and the IP address like:
127.0.0.1 localhost
10.10.10.20 solln
Then you have to reboot. You can also change it with ifconfig (like in Linux), first obtain the ethernet card address:
-bash-3.00# ifconfig -a
lo0: flags=2001000849
inet 127.0.0.1 netmask ff000000
e1000g0: flags=1000843
inet 10.10.10.21 netmask ff000000 broadcast 10.255.255.255
ether 0:c:29:2d:30:5
Then, carefully, modify the address:
# ifconfig e1000g0 10.10.10.20
You will probably loose the connection if you are doing this remotely, so, again, at your own risk.
Creating users in a Solaris Standalone server
In Solaris > 7 if you are going to use it without the NFS, when you want to create a user you may see this error:
# useradd -c "Walter" -m -s /bin/ksh -d /home/walter walter
ERROR: Unable to create the home directory: Operation not applicable.
To stop automount to mount the /home partition edit /etc/auto_master and comment the line
# /home auto_home -nobrowse
Then run "automount". And create your user.
# useradd -c "Walter" -m -s /bin/ksh -d /home/walter walter
ERROR: Unable to create the home directory: Operation not applicable.
To stop automount to mount the /home partition edit /etc/auto_master and comment the line
# /home auto_home -nobrowse
Then run "automount". And create your user.
How to reboot or shutdown a Solaris Server
When you have to reboot a Solaris you can use multiple commands as root user.
To reboot:
This command will not ask, you can interrupt it with ^C:
$ reboot
$ shutdown -i6 -g0
-i6 turns to State 6, the state 6 stops the operating system and reboots to the state defined by the initdefault entry in /etc/inittab.
-g0 permits to set a period to shutdown, the default is 60 seconds.
-y would not ask you for Y/N before rebooting.
To shutdown
$ shutdown -i5 -g0
This turns the machine into state 5, which means a state in which the machine can be turned off, and it turns the machine off.
$ poweroff
To reboot:
This command will not ask, you can interrupt it with ^C:
$ reboot
$ shutdown -i6 -g0
-i6 turns to State 6, the state 6 stops the operating system and reboots to the state defined by the initdefault entry in /etc/inittab.
-g0 permits to set a period to shutdown, the default is 60 seconds.
-y would not ask you for Y/N before rebooting.
To shutdown
$ shutdown -i5 -g0
This turns the machine into state 5, which means a state in which the machine can be turned off, and it turns the machine off.
$ poweroff
Suscribirse a:
Entradas (Atom)