This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| computing:freebsd [2016/04/24 04:34] – oemb1905 | computing:freebsd [2019/01/14 02:18] (current) – oemb1905 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | #freeBSD Basics | ||
| - | #Jonathan Haack | ||
| - | # | ||
| - | # | ||
| - | |||
| ------------------------------------------- | ------------------------------------------- | ||
| - | + | * **freeBSD** | |
| - | #When installing, make sure to include " | + | * **Jonathan Haack** | 
| - | #After succesful install, run these commands first to get the ports installed | + | * **Haack' | 
| - | + | * **netcmnd@jonathanhaack.com** | |
| - | #If you did not do this, then for 10.X > freeBSD, bootstrap the entire system: | + | |
| - | + | ||
| - | / | + | |
| - | + | ||
| - | #With no internet, obtain the ports and migrate by disc to host, then: | + | |
| - | + | ||
| - | cd / | + | |
| - | make | + | |
| - | make install | + | |
| - | make clean | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | #If you have internet, but are running beneath 10.X and cannot bootstrap (above), then: | + | |
| - | + | ||
| - | portsnap fetch | + | |
| - | + | ||
| - | #Extract them into /usr/ports/ with the following | + | |
| - | + | ||
| - | portsnap extract | + | |
| - | + | ||
| - | #As of 10.X > freeBSD will automatically allow the native pkg manager to install ports: | + | |
| - | #This allows the user to avoid compiling from source and navigating to directories, | + | |
| - | + | ||
| - | pkg install < | + | |
| - | + | ||
| - | #You may still, however, compile the package from source | + | |
| - | #Just like the non-internet step installation of pkg requires above: | + | |
| - | + | ||
| - | cd / | + | |
| - | make install | + | |
| - | make clean | + | |
| - | + | ||
| - | #freeBSD has port managers, mostly that predate 10.X > freeBSD, but still help, such as: | + | |
| - | + | ||
| - | pkg install portmaster | + | |
| - | + | ||
| - | #And, notably, portupgrade listed below relies on Ruby, similar to Homebrew: | + | |
| - | + | ||
| - | pkg install portupgrade | + | |
| ------------------------------------------- | ------------------------------------------- | ||
| - | #Ok, this is a good time to: | + | After installation, run: | 
| - | reboot | + | / | 
| - | #Then, probably get all your common packages: | + | With no internet, you must build from source (if you even still want it): | 
| - | pkg install cmus | + | cd / | 
| - | pkg install irssi | + | make | 
| - | pkg install | + |  | 
| - | pkg install nano | + | make clean | 
| - | pkg install libreoffice | + | |
| - | pkg install gimp | + | |
| - | pkg install firefox | + | |
| - | pkg install chromium | + | |
| - | pkg install alpine | + | |
| - | pkg install mutt | + | |
| - | pkg install < | + | |
| - | #Once nano, xorg, & mate-desktop are installed, set-up a " | + | Update ports after you have internet: | 
| - | #KDE, Gnome, MATE, etc. Tap F1 at the log-in screen to toggle between | + | |
| - | pkg install mate mate-desktop | + | portsnap fetch | 
| + | portsnap extract | ||
| - | #Desktops require " | + | As of 10.X > freeBSD will automatically allow the native pkg manager | 
| - | #Fluxbox, WindowMaker, | + | |
| - | pkg install | + |  | 
| - | #You will need a way to switch between desktops, and one convenient package | + | And of course installing pkg from source is but one example of the whole ports system, which is a set of binaries ready to compile. | 
| - | pkg install | + | cd / | 
| + | make install | ||
| + | make clean | ||
| - | ------------------------------------------- | + | freeBSD has other port managers besides portsnap | 
| - | # | + | pkg install portmaster | 
| + | pkg install portupgrade | ||
| - | #Consider adjusting build release date for pkg | + | You can set up a DE by installing nano, xorg, & mate-desktop, | 
| - | nano /etc/pkg/ | + |  | 
| - | %Replace /latest with / | + | pkg install gnome3 [or] | 
| + | pkg install xfce [or] | ||
| + | pkg install xorg | ||
| + | pkg install slim | ||
| - | #If you do that, then run these to update | + | Add the following like below the last device (/dev): | 
| - | pkg upgrade | + | |
| - | pkg update | + | |
| - | #nano / | + |  | 
| - | #Add the following like below the last device (/dev): | + |  | 
| - | proc /proc procfs rw 0 0 | + | Then, edit your rc.conf file: | 
| - | #Then, edit your rc.conf file: | + | dbus_enable=" | 
| + | hald_enable=" | ||
| + | mate_enable=" | ||
| + | xfce_enable=" | ||
| + | gnome3_enable=" | ||
| + | slim_enable=" | ||
| - | dbus_enable=" | + | Add .xinitrc to ~ and /root, enter the syntax listed below the nano commands. | 
| - | hald_enable=" | + | |
| - | mate_enable=" | + | |
| - | slim_enable=" | + | |
| - | #Or, add other desktops, ifconfigs, etc., such as: | + | nano /root/.xinitrc | 
| + | exec start gnome3 | ||
| + | nano / | ||
| + | exec start gnome3 | ||
| - | kdm4_enable=" | + | Now, fine tune your user settings for your regular user.  Edit / | 
| - | ------------------------------------------- | + | su - root | 
| + | cd /etc | ||
| + | nano group | ||
| - | #Next up, changing wireless settings, adding keys, etc., etc. | + | Once inside the editor nano, please edit the operator and wheel lines as follows: | 
| - | ------------------------------------------- | + | operator: | 
| + | wheel: | ||
| - | #Add to wheel and operator groups | + | Or, edit the group file directly from the command line: | 
| - | #edit /etc/group | + | pw group mod < | 
| + | |||
| + | Or, alternately, | ||
| - | login root | + | pkg install sudo | 
| - | cd /etc | + | nano /usr/local/etc/sudoers | 
| - | nano group | + | |
| - | #Once inside the editor nano, please edit the operator and wheel lines as follows: | + | In that file that you just opened called sudoers, there is a line that reads "root ALL=(ALL) ALL." | 
| - | operator: | + |  | 
| - | wheel:*: | + | |
| + | Close and save the file and reboot: | ||
| - | #Or, edit the group file directly from the command line: | + | reboot | 
| - | pw group mod < | + | Basic updating: | 
| - | ------------------------------------------- | + | freebsd-update fetch | 
| + | freebsd-update install | ||
| - | #To update freeBSD from the command line: | + | To upgrade to a new major release: | 
| - | freebsd-update | + |  | 
| - | freebsd-update install | + | freebsd-update install | 
| - | #To upgrade to a specific distribution, | + | After either updating or installing | 
| - | freebsd-update | + | shutdown | 
| - | freebsd-update install | + | |
| - | #After either updating or installing a new release: | + | After restarting, run the update again to remove old shared libraries and objects | 
| - | shutdown | + | freebsd-update install | 
| + | |||
| + | -- FEMP Stack on BSD -- | ||
| - | #After restarting, run the update again to remove old shared libraries and objects | ||
| - | freebsd-update install | + | |
| + | -- Dokuwiki on BSD-- | ||
| + | |||
| + | Setting up dokuwiki on freeBSD and securing data directory (required on BSD). (Only making BSD specific permission changes at present.) | ||
| - | ------------------------------------------- | + | su - root | 
| + | cd / | ||
| + | make install clean | ||
| + | mv / | ||
| + | sudo chmod -R 755 / | ||
| + | sudo chown -R www / | ||
| + | sudo chown www / | ||
| + | sudo chmod -R 775 / | ||
| + | sudo chmod -R 755 / | ||
| + | sudo chown -R www / | ||
| + | |||
| + | Now, go to https:// | ||
| + | mv / | ||
| + | cd / | ||
| + | nano local.php | ||
| + | Ok, inside the .php main configuration file for dokuwiki that you just opened, add the following line below that others that specify other global parameters. | ||
| + | $conf[' | ||
| + |  | ||
| + | When you moved the data directory it likely lost its permissions from the above changes. | ||
| + | sudo chmod -R 775 / | ||
| + | sudo chown www -R / | ||
| + |  | ||
| + | Remove the original data directory and restore root as owner of the main configuration directory. | ||
| + | sudo rm -r / | ||
| + | sudo chown -R root / | ||
| + | Reload the primary page, make a test submission. | ||
| + | chmod g+rwx / | ||
| + | chmod -R 775 / | ||
| + | chown -R www / | ||
| + | chmod -R 2775 / | ||
| + | chown -R www / | ||
| + |  | ||
| + | Probably a good idea to restart php, nginx. | ||
| + | service nginx restart | ||
| + | service php-fpm restart | ||
| + | Dokuwiki details their permission recommendations here:  [[https:// | ||
| + | yourwiki> | ||
| + | yourwiki> | ||
| + | everything below the data directory: | ||
| + | yourwiki/ | ||
| + | yourwiki/ | ||
| + | This tutorial is a designated " | ||
| + | --- // | ||