FreeBSD: make install – Accept default config

Using FreeBSD ports means compiling software by executing make install clean. This is great since it automatically fetches the dependencies then compile them.
using make install clean, most of the packages have configuration options in which I have to manually choose the options. So if I install packageA with a lot of dependencies, those dependencies may have each a configuration option in which I have to select.
To select default Configuration i know 3 options that you can make use :
For csh-based Shell:
# setenv BATCH yes
OR for sh-based Shell:
# export BATCH=”yes”
# make -DBATCH install clean
# make config-recursive
usually to get all of the options displayed for you to choose upfront. I say “usually” because not all ports support it, but most do.

Install NGINX on FreeBSD

Installing NGINX

  1. Install NGINX
     $ pkg install nginx
  2. Create folder
     $ mkdir /data/www
  3. Find configuration file nginx.conf
    It’s either in /usr/local/nginx/conf, /etc/nginx or /usr/local/etc/nginx
  4. Edit conf file, comment out everything then add a new server block
     http {
         server {
  5. Add a location into the server block
     location / {
       root /data/www;
     location /images/ {
       root /data;
  6. Create a basic html file in /data/www
    <body><h1>hello NGINX</h1></body>
  7. Start nginx
    $ nginx
  8. To stop NGINX use
    $ nginx -s stop

sample nginx.conf file

Using diskpart on Windows to partition a USB stick

Open an elevated command prompt.
Run diskpart

<C:> diskpart
DISKPART> list disk

Note the disk number that corresponds to your USB drive, it should be obvious going by size.
select disk X where X is the number from above

 select disk X
 list partition
 select partition 0
 delete partition
 select partition 1
 delete partition
 create partition primary

Exit Command Prompt (type exit or just close the window)
In Windows, go to Computer and try to open the disk. It will ask you to format it.
Format it with the default settings and give it a name if you want.
It should now a single, unified partitioned drive.

Installing VMware tools on Freebsd 10

Installing VMware tools on Freebsd 10

  • When installing OS, add kernel src
  • Once installed, start the tools installer
    Player, Manage, Install VMware tools
  • Mount the tools cd in the OS
     # mount -t cd9660 -o -e /dev/cd0 /cdrom

    Assumes /dev/cd0 is your cdrom and that /cdrom exits

  • Copy install from cd to local file system
     # cp /cdrom/vmware-freebsd-tools.tar.gz /tmp
  • Eject cdrom
     # umount /cdrom

    then Click Player, Manage, Cancel VMware tools installation

  • Install required packages
     # pkg install compat6x-i386
     # pkg install perl5
     # pkg install xf86-input-vmmouse
  • Create link to perl (so vmware tools can find it)
     # ln -s /usr/local/bin/perl /usr/bin/perl
  • Extract vmware tools installer ad start installer
# cd /tmp
 # tar zxvf vmware-freebsd-tools.tar.gz
 # cd vmware-tools-distrib
 # ./

I just press enter to accept all the defaults, you may want to read all the options and change some if required.