Javier's Blog

Mostly computers and other tech stuff,...

Thursday, January 28, 2010

lx Branded Solais Zones

Never knew how easy it was to setup a Linux branded zone under Solaris. Running Linux software on Solaris 10 has never been easier :).

Download CentOS-3.8-i386-bin1of*.iso to /path/to/isos and do the following:

# zonecfg -z CentOS
create -t SUNWlx
set autoboot=true
set zonepath=/zpool/zones/CentOS
add net
set address=x.x.x.x/24
set physical=e1000g0
# zoneadm list -cv
# zoneadm -z CentOS install -d /path/to/isos core
# zoneadm list -cv
# zoneadm -z CentOS boot
# zlogin -C -e '#' CentOS

now just press #. to exit the shell

Friday, January 08, 2010

OS X Apache PHP

I was pleasantly surprised to find out how easy it is to "use" Apache + PHP on OS X. That's right, no need to install it, it comes preinstalled. Just edit /private/etc/apache2/httpd.conf and uncomment the php_module line ('LoadModule php5_module'). Then go to System Preferences > Sharing, and enable Web Sharing.

Testing this is as easy as:

cat > ~/Sites/test.php
<? phpinfo(); ?>

Then go to http://localhost/~username/test.php :)