Category Archives: DragonFy BSD

Can’t find minimal tcmalloc on DragonFlyBSD

Quick note :

— Can’t find minimal tcmalloc
ERROR: Unable to find Intel TBB install directory.
CMake Error at CMake/HPHPFindLibs.cmake:296 (if):
if given arguments:

“LESS” “5005”

Unknown arguments specified
Call Stack (most recent call first):
CMake/HPHPSetup.cmake:125 (include)
third-party/CMakeLists.txt:18 (include)
— Configuring incomplete, errors occurred!
See also “/root/hhvm/hhvm/CMakeFiles/CMakeOutput.log”.
See also “/root/hhvm/hhvm/CMakeFiles/CMakeError.log”.

To solve that error :

# pkg install google-perftools
Updating Avalon repository catalogue…
Avalon repository is up-to-date.
All repositories are up-to-date.
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
google-perftools: 2.4

The process will require 5 MiB more space.
621 KiB to be downloaded.

Proceed with this action? [y/N]: y
Fetching google-perftools-2.4.txz: 100% 621 KiB 79.5kB/s 00:08
Checking integrity… done (0 conflicting)
[1/1] Installing google-perftools-2.4…
[1/1] Extracting google-perftools-2.4: 100%

Building and Testing PHP 7 under DragonFlyBSD 4.0.5

DragonFlyBSD 4.0.5 is waiting for me to test it :-) . I love it for several factors :

  • Size; its iso file is light in size (only 200MB + in bz2 form)
  • Learning curve; no need to learn much as I’m familiar with FreeBSD :-)

As I already try PHP7 in FreeBSD before :

  1. Install PHP 7 akan phpng on FreeBSD 10
  2. Using PHP 7 with lighttpd on FreeBSD 10

I want to test it in DragonFly BSD with nginx as web server. This time  I use virtualbox and I try Hammer File system (make sure to have minimum 50 GB in disk size to usse Hammer File System in DragonFly BSD).

dflybsd405_hammer

With 60 GB in disk size and 2GB memory allocated to this virtual machine I’ll try PHP 7.

dflybsd405_specs

Installation step is no different like before.

dflybsd405_user

 

DHCP for sure :-)

dflybsd405_dhcp

Reboot it and change boot order to get start with next steps :

Login via ssh

$ ssh alam@127.0.1.1 -p 2222
The authenticity of host ‘[127.0.1.1]:2222 ([127.0.1.1]:2222)’ can’t be established.
ECDSA key fingerprint is bd:e0:2a:f5:44:86:8d:5a:cd:2a:56:26:6a:f1:08:ce.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘[127.0.1.1]:2222’ (ECDSA) to the list of known hosts.
Permission denied (publickey).

Ups, I forgot to configure ssh server first after as post installation step in DragonFly BSD.

Retry login

$ ssh alam@127.0.1.1 -p 2222
alam@127.0.1.1’s password:
Last login: Fri Jun 12 11:29:12 2015
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
The Regents of the University of California. All rights reserved.

DragonFly v4.0.5-RELEASE (X86_64_GENERIC) #29: Sun Mar 22 17:42:50 PDT 2015

Welcome to DragonFly!

Need to see the calendar for this month? Simply type “cal”. To see the
whole year, type “cal -y”.
— Dru <genesis@istar.ca>
>

Looking around for hammer

# ps ax | grep hammer
-1 ?? B0L 0:00.00 (hammer-S3)
-1 ?? B0L 0:00.00 (hammer-S2)
-1 ?? B0L 0:00.01 (hammer-S1)
-1 ?? B0L 0:00.01 (hammer-S0)
-1 ?? B0L 0:00.01 (hammer-M)

# cat /etc/fstab
# Device Mountpoint FStype Options Dump Pass#
/dev/serno/VBb247cd88-d6dc6e95.s1a /boot ufs rw 1 1
/dev/serno/VBb247cd88-d6dc6e95.s1b none swap sw 0 0
/dev/serno/VBb247cd88-d6dc6e95.s1d / hammer rw 1 1
/pfs/var /var null rw 0 0
/pfs/tmp /tmp null rw 0 0
/pfs/usr /usr null rw 0 0
/pfs/home /home null rw 0 0
/pfs/usr.obj /usr/obj null rw 0 0
/pfs/var.crash /var/crash null rw 0 0
/pfs/var.tmp /var/tmp null rw 0 0
proc /proc procfs rw 0 0

Well. Everything is on the right place :-)

Lets get start install PHP 7 on DragonFly BSD :

# pkg update
Updating Avalon repository catalogue…
pkg: http://mirror-master.dragonflybsd.org/dports/dragonfly:4.0:x86:64/LATEST/meta.txz: No address record
pkg: repository Avalon has no meta file, using default settings
pkg: http://mirror-master.dragonflybsd.org/dports/dragonfly:4.0:x86:64/LATEST/packagesite.txz: No address record
pkg: Unable to update repository Avalon

Ups, looks like Avalon is not available at the moment.

My bad, I find out that nameserver is not work. Add Google public dns server.

# cat /etc/resolv.conf
nameserver 127.0.1.1
nameserver 8.8.8.8
nameserver 8.8.4.4

Retry pkg update :

# pkg update
Updating Avalon repository catalogue…
Fetching meta.txz: 100% 264 B 0.3kB/s 00:01
Fetching packagesite.txz: 100% 4 MiB 138.8kB/s 00:34
Processing entries: 100%
Avalon repository update completed. 22075 packages processed

Continue reading

Compile HHVM 3.4 on DragonFlyBSD 4

My last experiment with HHVM is testing compile it with HHVM LTS (its version 3.3) on FreeBSD 10. Since HHVM 3.4 is out I think I’ll try it again with FreeBSD 10 but since I just install DragonFlyBSD 4 then I think I’ll give it try.

Another reason is I just curious to see implementation of DragonFlyBSD in many field. By share it to others perhaps I can contribute too.

Ok, lets go back to topic.

I use DragonFlyBSD 4 that I install recently. It has 2 cpu and memory 2GB plus hammer filesystem enabled.

See current installed package

# pkg info
bind-tools-9.10.1_3 BIND DNS suite with updated DNSSEC and DNS64
ca_root_nss-3.17.2_1 The root certificate bundle from the Mozilla Project
cdrtools-3.00_2 CD/DVD/BluRay and ISO-9660 image creation and extraction tools
curl-7.38.0_2 Non-interactive tool to get files from FTP, GOPHER, HTTP(S) servers
cvsps-2.1_1 Create patchset information from CVS
expat-2.1.0_1 XML 1.0 parser written in C
gettext-0.18.3.1_1 GNU gettext package
git-2.1.2 Distributed source code management tool
idnkit-1.0_5 Library to handle internationalized domain names
indexinfo-0.2 Utility to regenerate the GNU info page index
isc-dhcp42-server-4.2.7 The ISC Dynamic Host Configuration Protocol server
libxml2-2.9.2_2 XML parser library for GNOME
openssl-1.0.1_16 SSL and crypto library
pkg-1.3.8_3 Package manager

Continue reading

DragonFlyBSD 4.0.1 and VirtualBox Bridge

After success configure teamviewer 10 on my peppermint os 5 I continue with Virtualbox. No problem here and I can get virtualbox running. Another task I try to accomplish is testing newest DragonFlyBSD (its 4.0.1) that only available in 64 bit.

Everything is smooth except nat section on my virtualbox. I can not connect to internet but I can ping to host.

Being curious I decide to test ‘bridge’ connection via wireless connection.

bridge_virtualbox_dragonflybsd

I activate portable hotspot using my Xiaomi Red 1s .

Checking ip address of host

$ ifconfig wlan0

wlan0 Link encap:Ethernet HWaddr 38:b1:db:ec:d1:a1
inet addr:192.168.43.94 Bcast:192.168.43.255 Mask:255.255.255.0
inet6 addr: fe80::3ab1:dbff:feec:d1a1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8786 errors:0 dropped:0 overruns:0 frame:5364
TX packets:9104 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4774804 (4.7 MB) TX bytes:2067642 (2.0 MB)
Interrupt:18

Well, I can use 192.168.43.95 as ip address.

For gateway find it out by trace route

$ traceroute yahoo.com
traceroute to yahoo.com (98.138.253.109), 30 hops max, 60 byte packets
1 192.168.43.1 (192.168.43.1) 3.269 ms 4.229 ms 5.127 ms
2 * * *
3 * * *
4 * * *
^C

Great. Gateway located in 192.168.43.1

Last information needed for my dragonflybsd is nameserver.

I use google dns (8.8.8.8) for that purpose.

Lets configure Ip address on dragonlybsd 4.0.1 box

# ifconfig em0 inet 192.168.43.95/24

# route add default 192.168.43.1

# echo 'nameserver    8.8.8.8' > /etc/resolv.conf

Done.

Last step is configure sshd_config for allow ssh access as I do previously.

Try ssh now from my linux box.

$ ssh alam@192.168.43.95
The authenticity of host ‘192.168.43.95 (192.168.43.95)’ can’t be established.
ECDSA key fingerprint is b0:7e:40:28:5a:d6:10:e0:7f:f7:58:a6:30:21:47:47.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘192.168.43.95’ (ECDSA) to the list of known hosts.
alam@192.168.43.95’s password:
Last login: Fri Jan 2 11:26:41 2015
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
The Regents of the University of California. All rights reserved.

DragonFly v4.0.0.32.gce3e27-RELEASE (X86_64_GENERIC) #25: Mon Nov 24 20:15:26 PST 2014

Welcome to DragonFly!

dports/net/netcat package is useful not only for redirecting input/output
to TCP or UDP connections, but also for proxying them. See inetd(8) for
details.
>

Great.

uname -a

DragonFly 4.0-RELEASE DragonFly v4.0.0.32.gce3e27-RELEASE #25: Mon Nov 24 20:15:26 PST 2014 root@pkgbox64.dragonflybsd.org:/usr/obj/build/home/justin/src/sys/X86_64_GENERIC x86_64

top

load averages: 0.00, 0.00, 0.00; up 0+00:27:33 11:53:20
21 processes: 1 running, 21 active
CPU states: 0.0% user, 0.0% nice, 4.1% system, 0.0% interrupt, 95.8% idle
Memory: 12M Active, 2252K Inact, 137M Wired, 105M Buf, 1798M Free
Swap: 4096M Total, 4096M Free

PID USERNAME NICE SIZE RES STATE CPU TIME CTIME CPU COMMAND
1080 alam 0 14M 2196K CPU0 0 0:00 0:00 0.10% top
1002 root 0 15M 2904K ttyin 1 0:00 0:00 0.00% csh
867 root 0 18M 3592K kqread 0 0:00 0:00 0.00% sendmail
979 alam 0 15M 2916K pause 0 0:00 0:00 0.00% tcsh
971 root 0 38M 1796K wait 1 0:00 0:00 0.00% login
1074 alam 0 15M 2888K pause 0 0:00 0:00 0.00% tcsh
1071 root 0 30M 4156K kqread 0 0:00 0:00 0.00% sshd
999 alam 0 38M 1912K wait 1 0:00 0:00 0.00% su
518 root 0 6532K 1148K kqread 0 0:00 0:00 0.00% syslogd
870 smmsp 0 17M 3404K pause 1 0:00 0:00 0.00% sendmail
977 root 0 6900K 1308K ttyin 1 0:00 0:00 0.00% getty
974 root 0 6900K 1308K ttyin 0 0:00 0:00 0.00% getty
894 root 0 9528K 1236K nanslp 1 0:00 0:00 0.00% cron
975 root 0 6900K 1308K ttyin 1 0:00 0:00 0.00% getty
976 root 0 6900K 1308K ttyin 0 0:00 0:00 0.00% getty
973 root 0 6900K 1308K ttyin 1 0:00 0:00 0.00% getty
978 root 0 6900K 1308K ttyin 0 0:00 0:00 0.00% getty
972 root 0 6900K 1308K ttyin 0 0:00 0:00 0.00% getty
1073 alam 0 30M 2740K kqread 1 0:00 0:00 0.00% sshd
853 root 0 27M 1592K kqread 0 0:00 0:00 0.00% sshd
452 root 0 5928K 628K kqread 0 0:00 0:00 0.00% devd

df

df -H

Filesystem Size Used Avail Capacity Mounted on
ROOT 80G 1.2G 79G 1% /
devfs 1.0k 1.0k 0B 100% /dev
/dev/serno/VB1831c6f3-9ab76793.s1a 793M 122M 608M 17% /boot
/pfs/@@-1:00001 80G 1.2G 79G 1% /var
/pfs/@@-1:00002 80G 1.2G 79G 1% /tmp
/pfs/@@-1:00003 80G 1.2G 79G 1% /usr
/pfs/@@-1:00004 80G 1.2G 79G 1% /home
/pfs/@@-1:00005 80G 1.2G 79G 1% /usr/obj
/pfs/@@-1:00006 80G 1.2G 79G 1% /var/crash
/pfs/@@-1:00007 80G 1.2G 79G 1% /var/tmp
procfs 4.1k 4.1k 0B 100% /proc

fstab

cat /etc/fstab

# Device Mountpoint FStype Options Dump Pass#
/dev/serno/VB1831c6f3-9ab76793.s1a /boot ufs rw 1 1
/dev/serno/VB1831c6f3-9ab76793.s1b none swap sw 0 0
/dev/serno/VB1831c6f3-9ab76793.s1d / hammer rw 1 1
/pfs/var /var null rw 0 0
/pfs/tmp /tmp null rw 0 0
/pfs/usr /usr null rw 0 0
/pfs/home /home null rw 0 0
/pfs/usr.obj /usr/obj null rw 0 0
/pfs/var.crash /var/crash null rw 0 0
/pfs/var.tmp /var/tmp null rw 0 0
proc /proc procfs rw 0 0

gcc version

gcc -v
Using built-in specs.
COLLECT_GCC=/usr/libexec/gcc47/gcc
Target: x86_64-pc-dragonflybsd
Configured with: DragonFly/x86_64 system compiler (c, c++, objc, LTO)
Thread model: posix
gcc version 4.7.4 [DragonFly] Release/2014-06-12

Check CPU information

sysctl -a | egrep -i 'hw.machine|hw.model|hw.ncpu'
hw.machine: x86_64
hw.model: Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz
hw.ncpu: 2
hw.machine_arch: x86_64

Wait.

To make configuration permanent (ip address)

Switch to root first before edit rc.conf (I already add alam user with group wheel)

# ee /etc/rc.conf

# Basic rc.conf, adjust according to your needs
#
nfs_reserved_port_only=”YES”
sshd_enable=”YES”
usbd_enable=”YES”
nfs_client_enable=”YES”
rpc_umntall_enable=”NO”
dumpdev=”/dev/serno/VB1831c6f3-9ab76793.s1b” # via installer configuration
ifconfig_em0=”DHCP” # via installer configuration
#add permanent ip address after comment ifconfig_em0 line

ifconfig_em0=”inet 192.168.43.95 netmask 255.255.255.0″
defaultrouter=”192.168.43.1

save the file by hit esc key and choose save option.

Next step is try hhvm on DragonFlyBSD :-)