http://www.ostechnix.com/how-to-install-kde-in-freebsd-10-2/
Month: February 2016
Pipe output to screen and log file in UNIX
# pkgadd curl 2>&1 | tee -a install.log
-a is append, so all output is appended to install.log in this instance.
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 :
1.
For csh-based Shell:
# setenv BATCH yes
OR for sh-based Shell:
# export BATCH=”yes”
2.
# make -DBATCH install clean
3.
# 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
- Install NGINX
$ pkg install nginx
- Create folder
$ mkdir /data/www
- Find configuration file nginx.conf
It’s either in /usr/local/nginx/conf, /etc/nginx or /usr/local/etc/nginx - Edit conf file, comment out everything then add a new server block
http { server { } }
- Add a location into the server block
location / { root /data/www; } location /images/ { root /data; }
- Create a basic html file in /data/www
<html> <head></head> <body><h1>hello NGINX</h1></body> </html>
- Start nginx
$ nginx
- To stop NGINX use
$ nginx -s stop
How to use cURL
CURL is used to download a file from the web
In this case the file jquery-2.2.0.min.js
# curl -# -o jquery-2.2.0.min.js http://code.jquery.com/jquery-2.2.0.min.js
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
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 # ./vmware-install.pl
I just press enter to accept all the defaults, you may want to read all the options and change some if required.
Installing Enlightenment on FreeBSD 10
To install enlightenment your need to do something like this :
# pkg install enlightenment
then add
exec enlightenment_start
to your .xinitrc file in your home directory
then when you start X11, enlightenment will also start.
to start X11/enlightenment use
# startx
pkg ‘hidden’ switch
Pkg on FreeBSD 10 seems to have a “hidden” switch/option.
If you’re getting the “failed checksum from repository” when trying to install a package, try doing and update with the -f switch.
# pkg update -f
I assume that stands for “force” and will force a download of the index from the repository.
Thanks,
Malcolm.