Showing posts with label freebsd. Show all posts
Showing posts with label freebsd. Show all posts

Friday, April 25, 2014

install yesod on FreeBSD

This is for FreeBSD 10.0

http://www.yesodweb.com/page/quickstart
$ sudo pkg install hs-haskell-platform
$ cabal update

... now this says that we should upgrade with: cabal install cabal-install
... but do NOT do it, otherwise some packages will not find some header files

$ cabal install yesod-platform yesod-bin --max-backjumps=-1 --reorder-goals

... this takes long

$ ghc-pkg list | grep yesod
    yesod-1.2.5.2
    yesod-auth-1.3.0.4
    yesod-auth-hashdb-1.3.0.1
    yesod-core-1.2.14
    yesod-form-1.3.8.2
    yesod-persistent-1.2.2.3
    yesod-platform-1.2.10
    yesod-routes-1.2.0.6
    yesod-static-1.2.2.5
    yesod-test-1.2.1.2
If you happen to mess up the ghc/cabal packages, just
rm -rf ~/.cabal ~/.ghc/

Wednesday, March 26, 2014

configure dwm on FreeBSD

portsnap fetch update
cd /usr/ports/x11-wm/dwm/
make deinstall
make install

find . -name config.h
cp work/dwm-6.0/config.h .

make deinstall
make clean
change config.h

- #define MODKEY Mod1Mask
+ #define MODKEY Mod4Mask

make DWM_CONF=`pwd`/config.h install clean

pkg lock dwm

Saturday, January 25, 2014

setup node.js-based couchapp on FreeBSD

as root:

pkg install couchdb
couchdb -b

pkg install node
pkg install npm

# this brings problems
#npm install couchapp -g


as normal user:

mkdir myapp
cd myapp/

# workaround: install locally
npm install couchapp
./node_modules/.bin/couchapp boiler
# it complains that it cannot be created, but app.js and attachments are there
./node_modules/.bin/couchapp push app.js http://localhost:5984/myapp
$ tree myapp -L 4
myapp
|-- app.js
|-- attachments
|   |-- index.html
|   |-- jquery-1.4.4.min.js
|   |-- layout.css
|   |-- sammy
|   |   |-- plugins
|   |   |   |-- sammy.cache.js
|   |   |   |-- sammy.data_location_proxy.js
|   |   |   |-- sammy.ejs.js
|   |   |   |-- sammy.form.js
|   |   |   |-- sammy.haml.js
|   |   |   |-- sammy.json.js
|   |   |   |-- sammy.meld.js
|   |   |   |-- sammy.mustache.js
|   |   |   |-- sammy.nested_params.js
|   |   |   |-- sammy.path_location_proxy.js
|   |   |   |-- sammy.pure.js
|   |   |   |-- sammy.storage.js
|   |   |   |-- sammy.template.js
|   |   |   `-- sammy.title.js
|   |   `-- sammy.js
|   `-- site.js

setup python-based couchapp on FreeBSD


as root:

pkg install couchdb
couchdb -b

pkg install py27-virtualenv 
pkg install py27-pip


as normal user:

virtualenv couchapps
cd couchapps
. bin/activate
pip install couchapp

mkdir apps
cd apps/

couchapp generate app1
cd app1
git init
couchapp push . http://localhost:5984/example

setup main my packages on FreeBSD-10

pkg install sudo
pkg install emacs-nox11
pkg install screen
pkg install git

Monday, January 20, 2014

freebsd samba mount without netbios

conneting samba share from freebsd over simple TCP and without netbios:
mount_smbfs -I <server> -W <domain> //agreif@<server>:445/<share> /home/agreif/<mountpoint>
2 important points:

  • use the workgroup for the correct authentication domain 
  • use the 445 port "samba over tcp" instead of 137 or 139