User Tools

Site Tools


server_config

Small server tricks

Networking

To speed up server boot-up, ensure that every ethernet interface have allow-hotplug instead of auto keyword in /network/interface.

Server installation

SSH access

vim /etc/ssh/sshd_config
PermitRootLogin without-password ⇒ PermitRootLogin yes

Packages

After installation

sudo update-alternatives –config editor

sudo configuration
-OR-
usermod -g sudo MY_USER

Chroot

  1. Mounting the FS
mount -t proc none /mnt/proc
mount -obind /dev /mnt/dev
mount -obind /sys /mnt/sys
  1. Starting chroot
chroot /mnt/

LVM

Commands prefixes :
Physical Volume = pv
Volume Group = vg
Logical Volume = lv

sources: howtogeek

Extend a LV

  1. Ordered List ItemResize the partition (again, you can do this with the system running). GParted is easy to use and supports resizing.
  2. You can also use a lower level tool such as fdisk. But you'll have to delete the partition and recreate it. Just make sure when doing so that the new partition starts at the exact same location.
  3. Reboot. Since the partition table was modified on the running system, it won't take effect until a reboot.
  4. Run pvresize /dev/sdXY to have LVM pick up the new space.
  5. Resize the logical volume with lvextend. If you want to use the whole thing, lvextend -l +100%FREE /dev/VGNAME/LVNAME. Though I always recommend against using the entire volume group. You never know what you'll need in the future. You can always expand later, you can't shrink.
  6. Resize the filesystem. With ext2/3/4 you can just run resize2fs /mount/point. With other filesystems you'll need to use the appropriate utility for that filesystem.

source : stackexchange

server_config.txt · Last modified: 2015/10/29 17:54 by louisbob