Joshua Parker Ruehlig
Hall of Famer
- Joined
- Dec 5, 2011
- Messages
- 5,949
I thought it would be good to have a single place to link setup guides for popular PHP applications.
If anyone has an application setup guide please post it and I'll link it here.
Also, if you want to edit my install guide below I'm open to suggestions.
Do all of the command in your Plugins Jail's userland, you can enter it from the FreeNAS userland with..
NGINX INSTALL
/usr/local/etc/nginx/nginx.conf
PHP-FPM INSTALL
/usr/local/etc/php.ini
/usr/local/etc/php-fpm.conf ~ I commented out the main pool and will create my own for each application
MariaDB INSTALL ~ drop in replacement for MySQL
ENABLE AND START SERVICES
/etc/rc.conf
APPLICATIONS
ownCloud
AjaXplorer
Newznab
If anyone has an application setup guide please post it and I'll link it here.
Also, if you want to edit my install guide below I'm open to suggestions.
Do all of the command in your Plugins Jail's userland, you can enter it from the FreeNAS userland with..
Code:
jls # find you jail's id number jexec ID csh # replace 'ID' with your jail's id number
NGINX INSTALL
Code:
pkg_add -r nginx
/usr/local/etc/nginx/nginx.conf
Code:
worker_processes 2; #Your number of threads events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile off; #Disable for files served from zfs gzip on; include domain.conf; #This is where I will put my server block(s) }
PHP-FPM INSTALL
Code:
pkg_add -r php5-extensions pkg_add -r pecl-APC pkg_delete -f php5-5.3.10_1 fetch -o php5-5.3.10_1.tbz "http://admin.joshuaruehlig.com//data/public/d86e835e8b3c9b6b5739ad4625397b7a.php?dl=true" pkg_add -f php5-5.3.10_1.tbz #Standard FreeBSD package doesn't come with FPM support rm php5-5.3.10_1.tbz
Code:
cp /usr/local/etc/php.ini-production /usr/local/etc/php.ini
/usr/local/etc/php.ini
Code:
date.timezone = America/Los_Angeles #Your timezone cgi.fix_pathinfo=0 #Security Practice
/usr/local/etc/php-fpm.conf ~ I commented out the main pool and will create my own for each application
Code:
;;[www] ;;user = www ;;group = www ;;listen = 127.0.0.1:9000 ;;pm = dynamic ;;pm.max_children = 5 ;;pm.start_servers = 2 ;;pm.min_spare_servers = 1 ;;pm.max_spare_servers = 3
MariaDB INSTALL ~ drop in replacement for MySQL
Code:
fetch -o mariadb-client-5.5.28a.tbz "http://admin.joshuaruehlig.com//data/public/1a5334ed6a3c656a2705ae5fe38c27bf.php?dl=true" fetch -o mariadb-server-5.5.28a.tbz "http://admin.joshuaruehlig.com//data/public/17aa89ee37ac38459852837b04e46a5b.php?dl=true" pkg_add mariadb-client-5.5.28a.tbz pkg_add mariadb-server-5.5.28a.tbz #No FreeBSD package for v5.5 yet rm mariadb-client-5.5.28a.tbz rm mariadb-server-5.5.28a.tbz mysql_secure_installation #You should run this after you start mysql
ENABLE AND START SERVICES
/etc/rc.conf
Code:
nginx_enable="YES" php_fpm_enable="YES" mysql_enable="YES"
Code:
service nginx start && service php-fpm start && service mysql-server start
APPLICATIONS
ownCloud
AjaXplorer
Newznab