Difference between revisions of "FreeBSD Post Install Steps"

From Aram's Wiki
Jump to: navigation, search
Line 6: Line 6:
  
 
  su -
 
  su -
 +
 +
== Set hostname ==
 +
 +
echo 'hostname="phoenix.xw.is"' >> /etc/rc.conf
  
 
== Install basic software ==
 
== Install basic software ==

Revision as of 17:55, 27 June 2018


Introduction

Everything on this page needs to be done as root, unless specified, so su to root.

su -

Set hostname

echo 'hostname="phoenix.xw.is"' >> /etc/rc.conf

Install basic software

pkg install -y bash sudo rsync

ZFS

If you don't have ZFS root (e.g. cloud computing), you might want to create a separate ZFS pool.

echo 'zfs_enable="YES"' >>/etc/rc.conf
service zfs start
zpool create -m /tank tank xbd1
zfs set compression=on tank

Create a user

This will create a user with a random password that can do passwordless sudo:

pw useradd -n aram -c 'Aram Havarneanu' -g staff -G wheel -m -s /usr/local/bin/bash -L staff -w random

SSH

For ssh access, use su to switch from root to the user and then add ssh keys.

su - aram
# as a user
mkdir -p .ssh
echo 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIANJ9BKKslS9Zqp1dRWL1nRiLmFp7nGvP06zPJ4L7cES aram@emerald.local' >> .ssh/authorized_keys