Changes

Jump to navigation Jump to search
1,438 bytes added ,  19:31, 5 March 2022
Line 1: Line 1:  
==db command tutorial==
 
==db command tutorial==
   −
The db command is unique to sme server. It is used to add settings to the various configuration databases which are then incorporated into the standard configuration files in /etc/.... via the template expansion process.
+
The '''db''' command is unique to SME Server, and is the command line user interface to the '''db system'''. It is used to manipulate configuration setting of the various configuration databases which are then incorporated into the standard configuration files in /etc/.... via the template expansion process.
   −
To display the syntax, at a command prompt type
+
The '''db system''' comes with default values that can be manipulated by either manually through the CLI or fully automatic through the Server Manager. This tutorial explains manipulating the '''db system''' manually through the CLI.
  db
+
 
then press Enter, which displays the usage:
+
 
 +
To display the syntax issue the following command:
 +
  /sbin/e-smith/db
 +
which will result in the db help output below, for we did not pass any parameters.
 
  /sbin/e-smith/db dbfile keys
 
  /sbin/e-smith/db dbfile keys
 
  /sbin/e-smith/db dbfile print [key]
 
  /sbin/e-smith/db dbfile print [key]
Line 82: Line 85:       −
imap = '''key'''
+
{| class="wikitable"
ConcurrencyLimit = '''property'''
+
|-
400 = '''value'''
+
! Database name !! Unique key !! Property name !! Default value || Possible values || Description
ConcurrencyLimitPerIP = '''property'''
+
|-
12 = '''value'''
+
| configuration ||style="text-align:center;"| imap || ||style="text-align:center;"|'''service'''|| || Unique key name
TCPPort = '''property'''
+
|-
143 = '''value'''
+
| || || Concurrenstyle || style="text-align:center;"|'''400''' || style="text-align:center;"|nnn || User defined value
access = '''property'''
+
|-
private = '''value'''
+
| || || ConcurrencyLimitPerIP || style="text-align:center;"|'''12''' || style="text-align:center;"|nn || User defined value
status = '''property'''
+
|-
enabled = '''value'''
+
| || || TCPPort || style="text-align:center;"|'''143''' || style="text-align:center;"|nnn || TCP port or port range [nnn] or [nnn-nnn]
 +
|-
 +
| || || access || style="text-align:center;"|'''private''' || style="text-align:center;"|private / public || Specify LAN only or LAN and WAN access.<br> The firewall will be adjusted accordingly
 +
|-
 +
| || || status || style="text-align:center;"|'''enabled''' || style="text-align:center;"|enabled / disabled || Enable or disable this service.<br> The firewall will be adjusted accordingly
 +
|}
 +
 
    
Apply the above "reasoning" to any database and the the syntax presented by issuing db then makes sense.
 
Apply the above "reasoning" to any database and the the syntax presented by issuing db then makes sense.
Line 105: Line 114:  
===show all available databases===
 
===show all available databases===
 
To show a list of existing databases do
 
To show a list of existing databases do
  cd /home/e-smith/db
+
  ls -al /home/e-smith/db
ls -al
      
which gives something like for official databases
 
which gives something like for official databases
Line 252: Line 260:  
or
 
or
 
  config setprop plop WpLang <nowiki>''</nowiki>
 
  config setprop plop WpLang <nowiki>''</nowiki>
 +
 +
====Check if a key is used====
 +
To check if a key is used, grep templates
 +
 +
Eg :
 +
 +
grep -irn grapCutof /etc/e-smith/templates
 +
 +
 +
grep -rn AutoBlock /etc/e-smith/templates
 +
 +
{{Note box|: via CLI so it is easy to make mistakes.
 +
 +
Hence it is safer to user server manager when there is an entry to configure key.}}
 +
    
{{Warning box|Database parameters are case sensitive so take great care when typing at the server shell because no error messages are given should you make a mistake.}}
 
{{Warning box|Database parameters are case sensitive so take great care when typing at the server shell because no error messages are given should you make a mistake.}}
3,054

edits

Navigation menu