User Tools

Site Tools


computing:freebsd

This is an old revision of the document!



  • freeBSD
  • Jonathan Haack
  • Haack's Networking
  • netcmnd@jonathanhaack.com

After installation, run:

/usr/sbin/pkg

With no internet, obtain the ports and migrate by disc to host, then:

cd /usr/ports/ports-mgmt/pkg
make
make install 
make clean

Update ports after you have internet

portsnap fetch
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.:

pkg install <pkgname>

You may still, however, compile the packaer from source. Just like the non-internet step installation of pkg requires above: cd /usr/ports/<pkgname> make install make clean freeBSD has other port managers besides portsnap pkg install portmaster pkg install portupgrade You can set up a DE by installing nano, xorg, & mate-desktop, xfce, gnome3, kde, etc., and an appropriate window manager and window server. I choose gnome3 on bigger machines and xfce on smaller, but everyone has their preference. For servers, I leave it off. I always use xorg and slim for xfce, and gnome has its own when using that. Anyway, here goes: pkg install mate mate-desktop [or] pkg install gnome3 [or] pkg install xfce [or] pkg install xorg pkg install slim Add the following like below the last device (/dev): nano /etc/fstab proc /proc procfs rw 0 0 Then, edit your rc.conf file: dbus_enable=“YES” hald_enable=“YES” mate_enable=“YES” [or] xfce_enable=“YES” [or] gnome3_enable=“YES” [or] slim_enable=“YES” Add .xinitrc to ~ and /root, enter the syntax listed below the nano commands. nano /root/.xinitrc exec start gnome3 nano /home/username/.xinitrc exec start gnome3 Now, fine tune your user settings for your regular user. Edit /etc/group su - root cd /etc nano group Once inside the editor nano, please edit the operator and wheel lines as follows: operator:*:5:root,<add-username> wheel:*:0:root,<add-username> Or, edit the group file directly from the command line: pw group mod <username> -m <username> Or, alternately, you can install sudo (recommended): pkg install sudo nano /usr/local/etc/sudoers 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 install To upgrade to a new major release: 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 – 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.) su - root cd /usr/ports/www/dokuwiki make install clean mv /usr/local/www/dokuwiki /usr/local/www/nginx/dokuwiki sudo chmod -R 755 /usr/local/www/nginx/dokuwiki/conf sudo chown -R www /usr/local/www/nginx/dokuwiki/conf sudo chown www /usr/local/www/nginx/dokuwiki/data sudo chmod -R 775 /usr/local/www/nginx/dokuwiki/data sudo chmod -R 755 /usr/local/www/nginx/dokuwiki/lib sudo chown -R www /usr/local/www/nginx/dokuwiki/lib Now, go to https://domain.com/dokuwiki/install.php and run the installer. Now, it is time to move the data directory and to configure dokuwiki's main .php configuration file to “see” that move. mv /usr/local/www/nginx/dokuwiki/data /usr/local/www/data cd /usr/local/www/nginx/dokuwiki/conf/ 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['savedir'] = '/usr/local/www/data/'; When you moved the data directory it likely lost its permissions from the above changes. If not, or if you are unsure, execute: sudo chmod -R 775 /usr/local/www/data sudo chown www -R /usr/local/www/data Remove the original data directory and restore root as owner of the main configuration directory. sudo rm -r /usr/local/www/nginx/dokuwiki/data sudo chown -R root /usr/local/www/nginx/dokuwiki/conf Reload the primary page, make a test submission. Also, log in and select Admin and you should see the security warning removed now. At this point, follow these standard permission recommendations from dokuwiki. (The user is www for nginx, not www-data, and the group is wheel, but do not specify the group.): chmod g+rwx /usr/local/www/nginx/dokuwiki chmod -R 775 /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 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 Probably a good idea to restart php, nginx. service nginx restart service php-fpm restart — oemb1905 2017/05/16 04:06

computing/freebsd.1546801578.txt.gz · Last modified: 2019/01/06 19:06 by oemb1905