mkdir /btaciksistem
mkfile 15g /btaciksistem/disk0
ldm add-vdsdev /btaciksistem/disk0 disk0@primary-vds0
ldm remove-vdsdev disk0@primary-vds0
ldm create test-ldom
#ldm set-core 1 test-ldom
#ldm set-domain max-cores=1 test-ldom
ldm set-vcpu 1 test-ldom
ldm set-mem 4G test-ldom
ldm bind test-ldom
#ldm add-vdsdev options=ro /var/share/pkg/solaris11/Solaris-11_4_42_111_0-Text-SPARC.iso solaris114@primary-vds0
ldm add-vdisk cd solaris114@primary-vds0 test-ldom
https://docs.oracle.com/cd/E26502_01/html/E28987/geyqe.html#NWSTAgldhm
# netadm enable -p ncp DefaultFixed
# dladm show-phys
LINK MEDIA STATE SPEED DUPLEX DEVICE
net3 Ethernet up 100Mb full bge3
# dladm show-link
LINK CLASS MTU STATE BRIDGE OVER
net3 phys 1500 up -- --
# ipadm create-ip net3
# ipadm create-addr -a 192.168.84.3/24 net3
ipadm: net3/v4
# ipadm
NAME CLASS/TYPE STATE UNDER ADDR
lo0 loopback ok -- --
l0/v4 static ok -- 127.0.0.1/8
net3 ip ok -- --
net3/v4 static ok -- 192.168.84.3/24
# vi /etc/hosts
# Internet host table
# 127.0.0.1 localhost
10.0.0.14 myhost
192.168.84.3 campus01
pkg set-publisher -G '*' -M '*' -g http://1.1.1.1/ solaris
pkg update --license --accept
pkg install oracle-database-preinstall-19c
pkg avoid oracle-database-os-configuration
pkg install xclock
svccfg -s application/pkg/server listprop pkg
svccfg -s application/pkg/server setprop pkg/inst_root=
projadd -U grid -K "project.max-shm-memory=(priv,16G,deny)" user.grid
projadd -U oracle -K "project.max-shm-memory=(priv,40G,deny)" user.oracle
su - oracle
prctl -n project.max-shm-memory -i process $$
perl -pi -e 's/ wrong / Correct /g' /etc/hosts
svccfg -s system/identity:node listprop config/nodename
svccfg -s system/identity:node listprop config/loopback
svccfg -s system/identity:node setprop config/nodename="gunes"
svccfg -s system/identity:node setprop config/loopback="gunes"
svccfg -s system/identity:node refresh
svcadm restart system/identity:node
# 01. Find boot disk/CD and add them into ldom
echo |format |grep 0707
c0t610C3AB10036526948967292340707Fd0 <HUAWEI-XSG1-6001 cyl 41793 alt 2 hd 224 sec 112> boot_disk01
ldm add-vdsdev /dev/dsk/c0t610C3AB10036526948967292340707Fd0s2 sunucu1_boot@primary-vds0
ldm add-vdsdev options=ro /mnt/Solaris-11_4_42_111_0-Text-SPARC.iso sunucu1_cd@primary-vds0
# 02. Create VM
ldm create sunucu1-ldom
ldm set-core 2 sunucu1-ldom
ldm set-domain max-cores=2 sunucu1-ldom
ldm set-mem 4G sunucu1-ldom
# 03. Add net, disk, cd
ldm add-vnet pvid=1 vnet0 primary-vsw0 sunucu1-ldom
ldm add-vdisk sunucu1_boot sunucu1_boot@primary-vds0 sunucu1-ldom
ldm add-vdisk sunucu1_cd sunucu1_cd@primary-vds0 sunucu1-ldom
ldm bind sunucu1-ldom
ldm start sunucu1-ldom
ldm ls -o disk
ldm ls -o network
ldm ls
telnet 0 5000
devalias
boot cd
...
# eject cdrom
ldm rm-vdisk sunucu1_cd sunucu1-ldom
# last save
ldm add-config 20221230
ldm list-config
zpool create dpool c1d1
mkdir /u01
zfs create dpool/oracle
zfs set mountpoint=/dpool/oracle
zpool list
dladm show-linkprop -p mac-address
dladm show-link
ipadm create-ip net0
ipadm delete-ip net0
ipadm
ipadm create-addr -T static -a 192.168.1.225/24 net0/v4
ipadm delete-addr net0/v4
ipadm
route -p add default 192.168.1.1
root@gunes:~# route -p show
add persistent net -name route-1 default: gateway 192.168.1.1
ipadm show-ifprop net0
root@solaris:~# svccfg -s dns/client 'setprop config/nameserver = net_address: 192.168.1.1'
root@solaris:~# svccfg -s dns/client 'setprop config/domain = astring: "example.com" '
root@solaris:~# svccfg -s name-service/switch 'setprop config/host = astring: "files dns" '
root@solaris:~# svcadm refresh name-service/switch
root@solaris:~# svcadm refresh dns/client
Alternatively, you can edit the usual files /etc/resolv.conf and /etc/nsswitch.conf,
but you have to import them into the naming service configuration:
root@solaris:~# nscfg import -f svc:/system/name-service/switch:default
root@solaris:~# nscfg import -f svc:/network/dns/client:default
root@solaris:~# svcadm refresh dns/client
cp /etc/inet/ntp.client /etc/inet/ntp.conf
echo "server kuveytturk.local iburst" >> /etc/inet/ntp.conf
svcadm enable ntp
svcadm restart ntp
ntpq -pn
svccfg -s system/identity:node listprop config/nodename
svccfg -s system/identity:node listprop config/loopback
svccfg -s system/identity:node setprop config/nodename="gunes"
svccfg -s system/identity:node setprop config/loopback="gunes"
svccfg -s system/identity:node refresh
svcadm restart system/identity:node
root@gunes:~# svccfg -s dns/client setprop config/nameserver = net_address: 1.1.1.1
or
root@gunes:~# svccfg -s dns/client setprop config/nameserver = net_address: \( 192.168.1.1 8.8.8.8 \)
root@gunes:~# svccfg -s dns/client setprop config/search = ornek.com
root@gunes:~# svccfg -s dns/client listprop config
config application
config/nameserver net_address 192.168.1.1 8.8.8.8
config/search astring ornek.com
config/value_authorization astring solaris.smf.value.name-service.dns.client
root@gunes:~# cat /etc/resolv.conf
#
# _AUTOGENERATED_FROM_SMF_V1_
#
# WARNING: THIS FILE GENERATED FROM SMF DATA.
# DO NOT EDIT THIS FILE. EDITS WILL BE LOST.
# See resolv.conf(5) for details.
search ornek.com
nameserver 192.168.1.1
nameserver 8.8.8.8
svccfg -s network/dns/client setprop config/domain = astring: ornek.com
svccfg -s system/name-service/switch
setprop config/host = astring: "files dns"
svcadm enable system/name-service/switch
svcadm restart system/name-service/switch
svcadm refresh system/name-service/switch
root@gunes:~# svccfg -s system/name-service/switch listprop config
config application
config/default astring files
config/host astring "files dns"
config/value_authorization astring solaris.smf.value.name-service.switch
root@gunes:~# cat /etc/nsswitch.conf
#
# _AUTOGENERATED_FROM_SMF_V1_
#
# WARNING: THIS FILE GENERATED FROM SMF DATA.
# DO NOT EDIT THIS FILE. EDITS WILL BE LOST.
# See nsswitch.conf(5) for details.
passwd: files
group: files
hosts: files dns
ipnodes: files dns
networks: files
protocols: files
rpc: files
ethers: files
netmasks: files
bootparams: files
publickey: files
netgroup: files
automount: files
aliases: files
services: files
project: files
auth_attr: files
prof_attr: files
tnrhtp: files
tnrhdb: files
sudoers: files
useradd -d "/export/home/kullan" -m -s /usr/bin/bash -c "Alparslan Ozturk" -u 1111 -g 10 kullan
passwd kullan
echo "lnxadm12003 ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
su - kullan
sudo -l
cat > solaris_useradd.sh << "EOF"
#!/usr/bin/expect
set u "kullan"
set u "parola123"
spawn useradd -m $u
expect eof
spawn passwd $u
expect "assword:"
send "$p\r"
expect "assword:"
send "$p\r"
expect eof
EOF
chmod +x solaris_useradd.sh
#sample work here
root@gunes:~# userdel -r kullan
root@gunes:~#
root@gunes:~# ./solaris_useradd.sh
spawn useradd -m kullan
80 blocks
spawn passwd kullan
New Password:
Re-enter new Password:
passwd: password successfully changed for kullan
pkg update --accept
pkg instlal solaris-desktop
svcadm disable application/graphical-login/gdm:default