Step 3. Install PHP, MySQL, Python and Lighttpd
Usually people use Apache with FreePBX, but DNS-323 is just not powerful enough to handle it. In fact, it can barely handle Lighttpd. But we shutdown Lighttpd after we finish configure everything.
dlink-xxx:# apt-get install lighttpd mysql php5 php-pear php-mysql python python-setuptoolsFirst we configure Lighttpd to support PHP:
dlink-xxx:# nano /etc/lighttpd/lighttpd.confChange
server.username = "asterisk" .. .. #I use 81 since 80 has been occupied by DNS-323's web interface. server.port ="81"
You can change “server.document-root” if you want to use a custom location. But make sure you remember to use this location in the steps followed.
Now we add the configuration for Fast-CGI support
dlink-xxx:# nano /etc/lighttpd/conf-enabled/10-fastcgi.confPut these in
## FastCGI programs have the same functionality as CGI programs, ## but are considerably faster through lower interpreter startup ## time and socketed communication ## ## Documentation: /usr/share/doc/lighttpd-doc/fastcgi.txt.gz ## http://www.lighttpd.net/documentation/fastcgi.html server.modules += ( "mod_fastcgi" ) ## Start an FastCGI server for php (needs the php5-cgi package) fastcgi.server = ( ".php" => (( "bin-path" => "/usr/bin/php-cgi", "socket" => "/tmp/php.socket", "max-procs" => 2, "idle-timeout" => 20, "bin-environment" => ( "PHP_FCGI_CHILDREN" => "4", "PHP_FCGI_MAX_REQUESTS" => "10000" ), "bin-copy-environment" => ( "PATH", "SHELL", "USER" ), "broken-scriptfilename" => "enable" )) )
2 Responses to “Asterisk + FreePBX + Google Voice on DNS-323”
January 15th, 2010 at 6:35 AM
Wow, great tutorial! Makes it really clear, the steps you’ve taken. It’s actually deterred me from doing it on my own dns-323, which I’m using primarily now, as a torrent client/server ( I was using it a a backup/fileserver for our home computer network, but realized pretty quickly it just didn’t have the horsepower to do what I wanted it to do). That said, it’s as reliable as a hammer, in that it will run for months without a hiccup (installed funplug on it almost immediately after unboxing it a couple years ago).
After reading about your experiences, and the instructions on the nerdvittles site, I think I’m going to buy one of those low power acer revo boxes, and install pbx-in-a-flash on it. I think they have enough power to do what you’ve done on the dns-323, and media-centre as well
Thanks again for the writeup!
January 15th, 2010 at 8:36 AM
Thanks. But this is not something original, I just put those pieces together specifically for DNS-323.
I use my DNS-323 mostly as a media server, occasionally for Bittorrent. But the built-in BT client is very limited and crashes often. So I siwtched to rTorrent. I can turn it on and off as I wish.
The Acer Revo is a great machine. It’s cheap, even cheaper if you go the Ubuntu route. I was considering getting one as a HTPC. But I do want Blu-Ray capability and Atom is just not gonna cut it.
D-Link has a 4-Bay NAS DNS-343, that maybe my next NAS since the 2TB on my DNS-323 is running out soon…