User Tools

Site Tools


computing:freebsd

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
computing:freebsd [2019/01/06 15:11] oemb1905computing:freebsd [2019/01/14 02:18] (current) oemb1905
Line 7: Line 7:
 ------------------------------------------- -------------------------------------------
  
-When installing, make sure to include "documentation" on text install screen. 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:+After installation, run:
  
   /usr/sbin/pkg   /usr/sbin/pkg
  
-With no internet, obtain the ports and migrate by disc to host, then:+With no internet, you must build from source (if you even still want it):
  
   cd /usr/ports/ports-mgmt/pkg   cd /usr/ports/ports-mgmt/pkg
Line 18: Line 18:
   make clean   make clean
  
-If you have internet, but are running beneath 10.X and cannot bootstrap (above), then:+Update ports after you have internet:
  
   portsnap fetch   portsnap fetch
- 
-Extract them into /usr/ports/ with the following 
- 
   portsnap extract   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, e.g.:+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.  Thereforethere is now a reason to build pkg from source - it will do this work for you more effectively (So what?  You can now search ports and geek out, and then use those names with pkg and sit back while it does the work!)
  
   pkg install <pkgname>   pkg install <pkgname>
  
-You may still, however, compile the package from source.  Just like the non-internet step installation of pkg requires above:+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.  They are sorted by intuitive names in the directory below, and it is wise to look around and then switch back to pkg, or if you know what you are doing, build from source as follows:
  
   cd /usr/ports/<pkgname>   cd /usr/ports/<pkgname>
Line 36: Line 33:
   make clean   make clean
  
-freeBSD has port managers, mostly that predate 10.X > freeBSD, but still help, such as:+freeBSD has other port managers besides portsnap
  
   pkg install portmaster   pkg install portmaster
- 
-And, notably, portupgrade listed below relies on Ruby, similar to Homebrew: 
- 
   pkg install portupgrade   pkg install portupgrade
  
-------------------------------------------- +You can set up DE by installing nano, xorg, & mate-desktop, xfcegnome3kde, etc., and an appropriate window manager and window server.  I choose gnome3 on bigger machines and xfce on smallerbut everyone has their preference.  For serversI leave it off I always use xorg and slim for xfceand gnome has its own when using that.  Anyway, here goes:
- +
-Ok, this is good time to: +
- +
-  reboot +
- +
-Then, probably get all your common packages: +
- +
-  pkg install cmus +
-  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 <lotsmore> +
- +
-Once nano, xorg, & mate-desktop are installedset-up a "desktop" (GUI) such as.  KDEGnomeMATE, etc.  Tap F1 at the log-in screen to toggle between +
- +
-  pkg install mate mate-desktop +
- +
-Desktops require "Window Managers" in order to functionsuch as.  FluxboxWindowMaker, X11, xwm, etcfor easeuse xorg:+
  
 +  pkg install mate mate-desktop [or]
 +  pkg install gnome3 [or]
 +  pkg install xfce [or]
   pkg install xorg   pkg install xorg
- 
-You will need a way to switch between desktops, and one convenient package is: 
- 
   pkg install slim   pkg install slim
- 
-------------------------------------------- 
- 
-Technically, that is all you need file-wise, but the /etc/ directory needs adjusting.  Consider adjusting build release date for pkg 
- 
-  nano /etc/pkg/FreeBSD.conf 
- 
-Replace /latest with /release/0/ or whatever.  If you do that, then run these to update the package manager to that version: 
- 
-  pkg upgrade 
-  pkg update 
  
 Add the following like below the last device (/dev): Add the following like below the last device (/dev):
Line 96: Line 55:
   dbus_enable="YES"   dbus_enable="YES"
   hald_enable="YES"   hald_enable="YES"
-  mate_enable="YES"+  mate_enable="YES" [or] 
 +  xfce_enable="YES" [or] 
 +  gnome3_enable="YES" [or]
   slim_enable="YES"   slim_enable="YES"
  
-Oradd other desktops, ifconfigs, etc., such as:+Add .xinitrc to ~ and /rootenter the syntax listed below the nano commands.
  
-  kdm4_enable="YES" +  nano /root/.xinitrc 
- +  exec start gnome3 
-Add .xinitrc to ~ +  nano /home/username/.xinitrc
- +
-  nano ~/.xinitrc+
   exec start gnome3   exec start gnome3
-   
-------------------------------------------- 
  
-Next upchanging wireless settings, adding keys, etc.etc.+Nowfine tune your user settings for your regular user Edit /etc/group 
  
-------------------------------------------- +  su - root
- +
-Add to wheel and operator groups +
- +
-Edit /etc/group  +
- +
-  login root+
   cd /etc   cd /etc
   nano group   nano group
Line 124: Line 75:
 Once inside the editor nano, please edit the operator and wheel lines as follows: Once inside the editor nano, please edit the operator and wheel lines as follows:
  
-  operator:*:5:root,<username> +  operator:*:5:root,<add-username> 
-  wheel:*:0:root,<username>+  wheel:*:0:root,<add-username>
  
 Or, edit the group file directly from the command line: Or, edit the group file directly from the command line:
  
   pw group mod <username> -m <username>   pw group mod <username> -m <username>
 +  
 +Or, alternately, you can install sudo (recommended):
  
--------------------------------------------+  pkg install sudo 
 +  nano /usr/local/etc/sudoers
  
-To update freeBSD from the command line:+In that file that you just opened called sudoers, there is a line that reads "root ALL=(ALL) ALL."  You want to create a line directly underneath that similar to this: 
 + 
 +  username ALL=(ALL) ALL 
 +   
 +Close and save the file and reboot: 
 + 
 +  reboot 
 + 
 +Basic updating:
  
   freebsd-update fetch   freebsd-update fetch
   freebsd-update install   freebsd-update install
  
-To upgrade to a specific distribution, for example, to 9.1 from 9.0:+To upgrade to a new major release:
  
   freebsd-update -r 9.1-RELEASE upgrade   freebsd-update -r 9.1-RELEASE upgrade
Line 150: Line 112:
  
   freebsd-update install   freebsd-update install
 +  
 +-- FEMP Stack on BSD --
 +
 +
 +  
 +-- Dokuwiki on BSD--
      
 Setting up dokuwiki on freeBSD and securing data directory (required on BSD).  (Only making BSD specific permission changes at present.) Setting up dokuwiki on freeBSD and securing data directory (required on BSD).  (Only making BSD specific permission changes at present.)
Line 189: Line 157:
   chmod -R 775 /usr/local/www/data   chmod -R 775 /usr/local/www/data
   chown -R www /usr/local/www/data   chown -R www /usr/local/www/data
-  chmod 2775 /usr/local/www/data/attic /usr/local/www/data/cache /usr/local/www/data/index /usr/local/www/data/locks /usr/local/www/data/media /usr/local/www/data/meta /usr/local/www/data/pages /usr/local/www/data/tmp +  chmod -R 2775 /usr/local/www/data/attic /usr/local/www/data/cache /usr/local/www/data/index /usr/local/www/data/locks /usr/local/www/data/media /usr/local/www/data/meta /usr/local/www/data/pages /usr/local/www/data/tmp 
-  chown www /usr/local/www/data/attic /usr/local/www/data/cache /usr/local/www/data/index /usr/local/www/data/locks /usr/local/www/data/media /usr/local/www/data/meta /usr/local/www/data/pages /usr/local/www/data/tmp+  chown -R www /usr/local/www/data/attic /usr/local/www/data/cache /usr/local/www/data/index /usr/local/www/data/locks /usr/local/www/data/media /usr/local/www/data/meta /usr/local/www/data/pages /usr/local/www/data/tmp
      
 Probably a good idea to restart php, nginx. Probably a good idea to restart php, nginx.
Line 196: Line 164:
   service nginx restart   service nginx restart
   service php-fpm restart   service php-fpm restart
-    + 
-   +Dokuwiki details their permission recommendations here:  [[https://www.dokuwiki.org/install:permissions|Install Permissions]].  The page is a bit complicated so the above is a simpler (but longer in syntax) version of the whole page, including the partial synopsis they put at the end, which I reprint below. 
- --- //[[netcmnd@jonathanhaack.com|oemb1905]] 2017/05/16 04:06//+ 
 +  yourwiki> chmod -R 775 data/ 
 +  yourwiki> chown -R www-data:foo data/ 
 +  everything below the data directory: 
 +  yourwiki/data> chmod 2775 {attic,cache,index,locks,media,meta,pages,tmp} 
 +  yourwiki/data> chown www-data:foo {attic,cache,index,locks,media,meta,pages,tmp} 
 + 
 +This tutorial is a designated "Invariant Section" of the "Technotronic" section of Haack's Wiki as described on the [[https://jonathanhaack.com/dokuwiki/doku.php?id=start|Start Page]]. 
 + 
 + --- //[[netcmnd@jonathanhaack.com|oemb1905]] 2019/01/06 20:00//
computing/freebsd.1546787462.txt.gz · Last modified: 2019/01/06 15:11 by oemb1905