Sep 15, 2016 ·
1 minute read
npm
As part of installing phantomjs when buoilding a development environment for Magento 2 I encountered a problem where it failed to install. The error presented to me was Error: Command failed: tar jxf /usr/lib/node_modules/phantomjs/phantomjs/phantomjs-{version}.tar.bz2 I was able to run tar, and tar was in my $PATH, so I was confused about the problem. Turns out because the file was a bzip one, it was trying to execute bzip2 within tar, hence why it seemed like tar was failing.
Read On →
Sep 15, 2016 ·
2 minute read
lxc
LXC is great, I’m really loving it. However I also love Fedora and work almost exclusively in the Red Hat, Centos, Fedora ecosphere - so the Ubuntu centric nature of LXC is sometimes a bit of a hindrance. One thing is that the LXC implementation on Ubuntu and Fedora differs in how the commands are run, eg Ubuntu: lxc start -n containerName and Fedora: lxc-start -n containerName This means that I can’t easily use the LXC bash completion I found here I love bash completion, it’s awesome and really quite easy to get working Here is something quick I threw together for working with LXC on Fedora: #!/usr/bin/env bash _lxc-containers(){ local cur local -a toks cur="${COMP_WORDS[COMP_CWORD]}" toks=( $( ls /var/lib/lxc | grep "$cur" )) COMPREPLY=( "${toks[@]}" ) return 0 } complete -F _lxc-containers -o nospace lxc-start complete -F _lxc-containers -o nospace lxc-stop complete -F _lxc-containers -o nospace lxc-attach I also use the following aliases to make life a bit easier: alias lxc-start="sudo lxc-start -n " alias lxc-stop="sudo lxc-stop -n " alias lxc-attach="sudo lxc-attach -n " And now if I add both of the above to my ~/.bashrc file, I get completion on start, stop and attach.
Read On →
Sep 14, 2016 ·
1 minute read
lxc
If you are finding that when you run lxc-checkconfig then you will probably get output like: Kernel configuration not found at /proc/config.gz; searching... Kernel configuration found at /boot/config-4.7.3-200.fc24.x86_64 --- Namespaces --- Namespaces: enabled Utsname namespace: enabled Ipc namespace: enabled Pid namespace: enabled User namespace: enabled Network namespace: enabled Multiple /dev/pts instances: missing --- Control groups --- Cgroup: enabled Cgroup clone_children flag: enabled Cgroup device: enabled Cgroup sched: enabled Cgroup cpu account: enabled Cgroup memory controller: enabled Cgroup cpuset: enabled --- Misc --- Veth pair device: enabled Macvlan: enabled Vlan: enabled Bridges: enabled Advanced netfilter: enabled CONFIG_NF_NAT_IPV4: enabled CONFIG_NF_NAT_IPV6: enabled CONFIG_IP_NF_TARGET_MASQUERADE: enabled CONFIG_IP6_NF_TARGET_MASQUERADE: enabled CONFIG_NETFILTER_XT_TARGET_CHECKSUM: enabled FUSE (for use with lxcfs): enabled --- Checkpoint/Restore --- checkpoint restore: enabled CONFIG_FHANDLE: enabled CONFIG_EVENTFD: enabled CONFIG_EPOLL: enabled CONFIG_UNIX_DIAG: enabled CONFIG_INET_DIAG: enabled CONFIG_PACKET_DIAG: enabled CONFIG_NETLINK_DIAG: enabled File capabilities: enabled Note : Before booting a new kernel, you can check its configuration usage : CONFIG=/path/to/config /usr/bin/lxc-checkconfig The good news is that the error about dev/pts is a false alarm.
Read On →
Sep 14, 2016 ·
1 minute read
xdebug
Recently while trying to set up XDebug and PHPStorm for remote debugging I came accross the following error: cannot Accept External Xdebug Connection: Cannot Evaluate Expression '$_server['server_port']' I managed to fix this error by adding the following to my nginx.conf: fastcgi_param SERVER_PORT $server_port;
Sep 13, 2016 ·
1 minute read
nginx
When specifying Nginx config, a common requirement is to control access to particular routes or even servers and use IP addresses as the method of restriction. Generally that’s quite simple, you can just allow 123.123.123.123; for any IPs you want to allow and then conclude with deny all; However - what if you have quite a large range of IPs to block - do you need to do a separate allow for each line?
Read On →
Sep 5, 2016 ·
26 minute read
Magento2
Magento 2 Quick Start - Preparing and Installing Magento 2 on CentOS
Read On →