-
Notifications
You must be signed in to change notification settings - Fork 4
Home
Basim Ramadhan edited this page Jun 1, 2017
·
24 revisions
Welcome to the lovelace-website wiki!
- Create a FreeBSD 11.0 server on DigitalOcean.
- Log into the server:
ssh freebsd@<server_ip>
- Set up a root password:
sudo passwd
- Change default shell to tcsh:
chsh
- Basic shell setup:
- get a starter shell config file:
cp /usr/share/skel/dot.cshrc ~/.cshrc
- open the shell config file:
vim ~/.cshrc
- choose a default editor (ex: vim, ee):
setenv EDITOR vim
- choose a default pager (ex: less):
setenv PAGER less
- without closing the file, append the following to the bottom for navigation key support in the shell:
- get a starter shell config file:
if ($term == "xterm" || $term == "vt100" \
|| $term == "vt102" || $term !~ "con*") then
# bind keypad keys for console, vt100, vt102, xterm
bindkey "\e[1~" beginning-of-line # Home
bindkey "\e[7~" beginning-of-line # Home rxvt
bindkey "\e[2~" overwrite-mode # Ins
bindkey "\e[3~" delete-char # Delete
bindkey "\e[4~" end-of-line # End
bindkey "\e[8~" end-of-line # End rxvt
endif
- Update shell config:
source ~/.cshrc
- Check for base operating system updates:
sudo freebsd-update fetch install
, restarting withsudo shutdown -r now
if kernel updates were installed - Set up automatic checking for base operating system software updates:
- open the crontab file:
sudo vim /etc/crontab
- append the following line:
@daily root freebsd-update -t freebsd cron
- that will check for updates daily and notify the freebsd user
- check for notifications with:
mail
- if there are updates available, install them with
sudo freebsd-update install
- remember to restart after kernel updates!
- open the crontab file:
- Fetch the ports tree:
sudo portsnap fetch extract
(one-time setup) - Check for package updates:
- update the ports tree:
sudo portsnap fetch update
- fetch most recent package database information:
sudo pkg update
- run
pkg version -vRL=
for available package updates - check the notes before updating:
less /usr/ports/UPDATING
- proceed with updating packages:
sudo pkg upgrade
- update the ports tree:
- Package management:
- finding packages:
pkg search <name>
- installing packages: `sudo pkg install
- after installing package a package, run
rehash
to updatePATH
- viewing package information:
pkg info <name>
- removing packages:
sudo pkg delete <name>
- removing unused dependencies:
sudo pkg autoremove
- list installed packages:
pkg info
- check for security vulnerabilities in installed packages:
pkg audit -F
- finding packages:
- Service management:
- enabling services:
sudo sysrc <name>_enable=yes
(this will append to /etc/rc.conf) - to enable a service means auto-starting on boot, as well as allowing users to manually start it
- starting services:
sudo service <name> start
(service must have been enabled first)
- enabling services: