From time to time I’m doing some stuff on FreeBSD. I still like it for its simplicity (I’m old and Linux is progressing way to fast ;-).
I’m keeping some notes how to set up FreeBSD manually in this blog post. For newer versions of FreeBSD I’ll create a new post.
Disadvantages:
- manual setup
Update to Latest Stable Version Link to heading
After a fresh install, we first apply latest updates to the current FreeBSD version.
# freebsd-update fetch install
# shutdown -r now
# pkg
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]:
Sudo Link to heading
# pkg install sudo
# vi /usr/local/etc/sudoers
%wheel ALL=(ALL) ALL
Shell Link to heading
# pkg install bash zsh
New User And Default Shell Link to heading
# adduser
Username: gogo
Full name:
Uid (Leave empty for default):
Login group [gogo]: wheel
Login group is wheel. Invite gogo into other groups? []: wheel
Login class [default]:
Shell (sh csh tcsh bash rbash zsh rzsh nologin) [sh]: zsh
Home directory [/home/gogo]:
Home directory permissions (Leave empty for default):
Use password-based authentication? [yes]
Use an empty password? (yes/no) [no]:
Use a random password? (yes/no) [no]:
Enter password:
Enter password again:
Lock out the account after creation? [no]:
Username : gogo
Password : *****
Full name :
uid : 1001
Class :
Groups : wheel
Home : /home/gogo
Home Mode :
Shell : /usr/local/bin/zsh
Locked : no
Ok? (yes/no): yes
adduser: INFO: Successfully added (gogo) to the user database.
Add another user? (yes/no): no
Goodbye!
Please log in to the new user from now on.
General Packages Link to heading
More comfort:
$ sudo pkg install vim-console tmux
For development in general:
$ sudo pkg install git
Ruby Link to heading
rbenv Link to heading
Compilation dependencies:
pkg install gmake
$ git clone https://github.com/rbenv/rbenv.git ~/.rbenv
$ git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshenv
$ echo 'eval "$(rbenv init -)"' >> ~/.zshenv
Afterwards you need to relogin to your user account.
Now we can install a rather new Ruby version:
$ rbenv install --list
$ rbenv install 2.7.3
$ rbenv global 2.7.3
Rails Link to heading
Compilation dependencies (sqlite3):
pkg install sqlite3 node yarn
gem install rails
bundle config build.sqlite3 --with-sqlite3-include=/usr/local/include --with-sqlite3-lib=/usr/local/lib
rails new myapp
cd myapp
bin/rails server
Issues Link to heading
- Puma had in the past an issue: https://github.com/puma/puma/commit/15b079439222e489915380021b9dca7b9fa5ff65 Should be fixed with puma gem version ``.