Archive for the tag 'Set'

Set Idle Timeout Interval for User Logins

SSH allows administrators to set an idle timeout interval. After this interval has passed, the idle user will be
automatically logged out.

Find and edit the following lines in /etc/ssh/sshd_config as follows:

ClientAliveInterval interval
ClientAliveCountMax 0

The timeout interval is given in seconds. To have a timeout of 5 minutes, set interval to 300.

SBDavid

How to set Daemon umask

How to set Daemon umask

Edit the file /etc/sysconfig/init, and add or correct the following line:

umask 027

The settings file /etc/sysconfig/init contains settings which apply to all processes started at boot time.

The system umask must be set to at least 022, or daemon processes may create world-writable files. The more restrictive setting 027 protects files, including temporary files and log files, from unauthorized reading by unprivileged users on the system. If a particular daemon needs a less restrictive umask, consider editing the startup script or sysconfig file of that
daemon to make a specific exception.

Set a barrier and limits for the new Container

Set a barrier and limit for unswappable kernel memory, private (or potentially private) memory, number of files opened by all Container processes, disk space and the total number of disk inodes (files, directories, symbolic links) a Container can allocate

Save the barrier/limit values to the Container configuration file.

# vzctl set 444 –save –kmemsize 24299200:26429120 –privvmpages 362144:392912 –numfile
12000:12000 –diskspace 5117880:5242880 –diskinodes 350000:370000

Enable working Power Panel on the vzpp port with the “–offline_management yes –offline_service vzpp” options.

# vzctl set 444 –save –offline_management yes –offline_service vzpp

How to set the MTU for network interface

The MTU can be set by editing the configuration file for the device. To see the devices you have use the ifconfig command:

$ ifconfig -a
eth0 Link encap:Ethernet HWaddr 08:00:27:7d:bd:61
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe7d:bd61/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:153050 errors:54 dropped:0 overruns:0 frame:0
TX packets:86060 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:168036386 (168.0 MB) TX bytes:9165208 (9.1 MB)
Interrupt:10 Base address:0xd020

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:480 (480.0 B) TX bytes:480 (480.0 B)

Alternatively, you can use the ip command:

$ ip link list
1: lo: mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
link/ether 08:00:27:7d:bd:61 brd ff:ff:ff:ff:ff:ff

The interface eth0 has an MTU set to 1500 bytes. To change the setting temporarily (to 1200 in this example) issue the following command as root:

ip link set dev eth0 mtu 1200

To make the setting permanent for eth0, edit the configuration file /etc/sysconfig/network-scripts/ifcfg-eth0 and add the line MTU=1200

How to set up one domain to be your DNS in Plesk

You must first have the domain you wish to make your DNS already set up in Plesk. You will also need at least 2 IP’s to use for your server. For reference, in this article ’serverbuddies.com’ will refer to the domain name you are using. Make sure to replace this with your actual domain name.

1. Log into your Plesk control panel as Administrator and select the domain from the Domains list you wish to make DNS.
2. Select the DNS icon from your services list.
3. Select the link serverbuddies.com from the Host list, with Record Type NS and Value ns.serverbuddies.com
4. In the Enter nameserver field change the ns.serverbuddies.com to ns1.serverbuddies.com and select OK.
5. From the Tools area select Add Record. For Record type select NS and enter ns2.serverbuddies.com in the Enter nameserver field and select OK.
6. Select from your host list ns.serverbuddies.com with Record type A and change the value to ns1 and select OK.
7. From the Tools area select Add Record again. For Record type leave as A, in the Enter domain name add ns2, in the Enter IP address enter your second IP address that you are going to use and select OK.
8. You should now have 2 Record types with the NS value of ns1.serverbuddies.com and ns2.serverbuddies.com and under the Host list you will also have ns1.serverbuddies.com and ns2.serverbuddies.com with the Record type of A and they will have 2 separate IP’s.

In order to have these added as DNS values for when you add new domains you will need to change the default DNS record in Plesk.

1. Select Server from the list on your left.
2. Select the DNS icon from the Services list.
3. From the Host list select with record type NS and enter ns1.serverbuddies.com in the Enter nameserver field and select OK.
4. From the Tools area select Add New Record. Change the Record type to NS and in the Enter nameserver field input ns2.serverbuddies.com and select OK.

If you want to use 2 separate domains for your DNS this is even easier, because Plesk has already created this for you. You must have 2 domains entered in Plesk and assigned separate IP’s. You would then only need to create a DNS zone template the same way described earlier, only inputting ns1.serverbuddies.com and ns2.serverbuddies.com for your default values.

Reference: http://parallels.com/

Next »