Skip to content
This repository has been archived by the owner on May 31, 2019. It is now read-only.

How to Install on freebsd.

nexusofdoom edited this page Sep 18, 2017 · 1 revision

install freebsd 10.x

pkg install git pkg install ntp pkg install sudo pkg install nano pkg install wget #pkg install libgd2-xpm libgd2-xpm-dev pkg install GeoIP /usr/local/bin/geoipupdate.sh pkg install libgd pkg install nload pkg install iftop pkg install unbound pkg install bash e2fsprogs-libuuid git curl autoconf automake gcc pkgconf pidof

Persistent IP Alias Configuration

https://www.cyberciti.biz/tips/freebsd-how-to-setup-2-ip-address-on-one-nic.html

Our Sample Setup

#Interface name: lnc0 – IP : 192.168.1.1/255.255.255.0

#Interface name: lnc0 alias – IP : 192.168.1.5/255.255.255.255

##Netmask must be different otherwise you will get an error ifconfig: ioctl (SIOCAIFADDR): File exists.

#Edit file /etc/rc.conf to setup persistent ip aliasing option by appending following configuration, so that next time #FreeBSD comes up (after restart/shutdown) it will create alias for you:

#example you will need 9 available ip's for your network ifconfig_lnc0_alias0="192.168.1.5 netmask 255.255.255.255"

#Therefore, one way to grant a normal user with superuser privileges is to add the #user to the wheel group. To add a user #to the wheel group, use this pw groupmod #command (replace the highlighted username):

#sammy would be your username #run from root user
pw groupmod wheel -m "sammy"

#after that the su root command should work. su root

ntpdate -v -b in.pool.ntp.org

git clone https://github.com/multiplay/lancache.git

curl -o nginx-1.12.1.tar.gz http://nginx.org/download/nginx-1.12.1.tar.gz tar xvfz nginx-1.12.1.tar.gz

#If this is from a fresh installation (and not a CustomISO), then you will likely need to install the port tree. Providing #that you have one already, it can be updated by using the following command:

portsnap fetch extract

#This may take a few minutes to download, but once it has finished, you will be able to move on to the next step.

Upgrade pkg

#To install the ports that were recently downloaded, you will need to upgrade pkg. Run the following command to upgrade #pkg:

cd /usr/ports/ports-mgmt/pkg

make reinstall

#You can install netdata from ports or packages collection. #This is how to install the latest netdata version from sources on FreeBSD:

#install required packages

#download netdata

git clone https://github.com/firehol/netdata.git --depth=1

install netdata in /opt/netdata

cd netdata

./netdata-installer.sh --install /opt

mkdir "/usr/portbuild/www/nginx/work" mkdir "/data/www/cache/installs" mkdir"/data/www/logs/"

cd /usr/portbuild/www/nginx/work

nano /boot/defaults/loader.conf #add to end of file accf_http_load = "YES"

wget "https://codeload.github.com/wandenberg/nginx-push-stream-module/tar.gz/0.5.1?dummy=/wandenberg-nginx-push-stream-module-0.5.1_GH0.tar.gz"

tar zxvf "0.5.1?dummy=%2Fwandenberg-nginx-push-stream-module-0.5.1_GH0.tar.gz"

wget "http://labs.frickle.com/files/ngx_cache_purge-2.3.tar.gz"

tar zxvf "ngx_cache_purge-2.3.tar.gz"

wget "https://codeload.github.com/multiplay/nginx-range-cache/tar.gz/0.2?dummy=/multiplay-nginx-range-cache-0.2_GH0.tar.gz"

tar zxvf "0.2?dummy=%2Fmultiplay-nginx-range-cache-0.2_GH0.tar.gz"

#cd to src location then run

./configure --prefix=/usr/local/etc/nginx --with-cc-opt='-I /usr/local/include' --with-ld-opt='-L /usr/local/lib' --conf-path=/usr/local/etc/nginx/nginx.conf --sbin-path=/usr/local/sbin/nginx --pid-path=/var/run/nginx.pid --error-log-path=/var/log/nginx/error.log --user=www --group=www --modules-path=/usr/local/libexec/nginx --with-file-aio --http-client-body-temp-path=/var/tmp/nginx/client_body_temp --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi_temp --http-proxy-temp-path=/var/tmp/nginx/proxy_temp --http-scgi-temp-path=/var/tmp/nginx/scgi_temp --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi_temp --http-log-path=/var/log/nginx/access.log --add-module=/usr/portbuild/www/nginx/work/ngx_cache_purge-2.3 --with-http_flv_module --with-http_geoip_module=dynamic --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_mp4_module --add-module=/usr/portbuild/www/nginx/work/nginx-range-cache-0.2 --with-http_realip_module --with-http_slice_module --with-http_stub_status_module --with-pcre --with-http_v2_module --with-stream=dynamic --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_ssl_module

make

make install

#install location /usr/local/nginx/conf

#need to move files from lancache to this folder /usr/local/nginx/conf

#cd into the lancache folder

cp -rvf * /usr/local/nginx/conf/

cp -rvf . /usr/local/nginx/conf/

new location to copy configs

cp -rvf * /usr/local/etc/nginx/

cp -rvf . /usr/local/etc/nginx/

###working on unbound for dns settings testing### #cd /usr/ports/dns/unbound/ && make install clean

#issue with perl

trying pkg install unbound

config location

/var/unbound/unbound.conf

#DNS for local lookups

#need to edit and add

nano /etc/hosts #need to add your ip x.x.x.x example 192.168.1.2
x.x.x.x lancache-steam x.x.x.x lancache-riot x.x.x.x lancache-blizzard x.x.x.x lancache-hirez x.x.x.x lancache-origin x.x.x.x lancache-sony

Clone this wiki locally