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