2

I am going to install oracle database 12c on oracle linux 7.5. In the process, I have to edit following kernel parameters and set values.

fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmall = 2097152 kernel.shmmax = 536870912 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048586 

Documentation says I should edit /etc/sysctl.conf file. When I run cat /etc/sysctl.conf to read current contents it displays following message.

# sysctl settings are defined through files in # /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/. # # Vendors settings live in /usr/lib/sysctl.d/. # To override a whole file, create a new file with the same in # /etc/sysctl.d/ and put new settings there. To override # only specific settings, add a file with a lexically later # name in /etc/sysctl.d/ and put new settings there. # # For more information, see sysctl.conf(5) and sysctl.d(5) 

When I try to edit with root user in vi, it says sysctl.conf is read only. even when I override with '!', changes does not apply and modify the parameters.

2
  • after editing sysctl.conf , changes to the runtime kernel parameters will only be applied after running sysctl -p as root/with sudo. Commented Jun 1, 2018 at 18:10
  • 1
    wow..it worked @RuiFRibeiro. thanks for the valuable reply. Commented Jun 1, 2018 at 18:18

1 Answer 1

0

Edits to the file /etc/sysctl.conf normally will only affect the system upon reboot unless you run by hand:

sudo sysctl -p 

If you want to set a particular kernel variable at run time, do:

sudo sysctl -w kernel.shmmni=4096 

If you want to see all the kernel variables, do:

sysctl -a 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.