From owner-freebsd-questions@freebsd.org Thu May 5 10:24:51 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC12CB2D6D4 for ; Thu, 5 May 2016 10:24:51 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8567314F3 for ; Thu, 5 May 2016 10:24:51 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de (port-92-195-216-66.dynamic.qsc.de [92.195.216.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx02.qsc.de (Postfix) with ESMTPS id EDC4C24F07; Thu, 5 May 2016 12:24:41 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id u45AOfh6002286; Thu, 5 May 2016 12:24:41 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Thu, 5 May 2016 12:24:41 +0200 From: Polytropon To: Mathe Eliel Cc: freebsd-questions@freebsd.org Subject: Re: How can I release freebsd with apache php application files? Message-Id: <20160505122441.92fefb40.freebsd@edvax.de> In-Reply-To: References: Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2016 10:24:51 -0000 On Thu, 5 May 2016 11:56:25 +0200, Mathe Eliel wrote: > am happy to come to this great community of developers. I have a concern > on releasing freebsd. I am making an application in php and html that > interfaces some other applications on freebsd. Now I made a release by some > commands provided by FreeBSD like make buildworld, make release, ... then I > got the files: .iso and .img . Now, when I installed them, the php files > that were written in the first system were not found and the /usr/local > directory was empty. How can I release FreeBSD thus I may find all the > files I added and all the ports or packages I downloaded? I was inspired by > pfsense which is a fork of FreeBSD. Thank you very much. The key is that both PHP and your application files are not part of the FreeBSD OS. The "make release" procedure creates an installation media for FreeBSD, but it usually does not include "3rd party programs" which reside in the /usr/local subtree. For this component, you should create a port for your application, and define Apache, PHP (and what other utilities you might need) as dependencies. Then you can create a package. Add this package as well as the dependency packages to the installation media and have them installed via pkg (afterwards). Always keep in mind that /usr/local is _not_ part of the OS. This is pkg's domain. :-) Another solution, probably not "very correct", is to make an image from a system where you've installed FreeBSD, Apache, PHP, your application and its dependencies. Then you just use a script to prepare installation disks (partitioning and newfs), then extract those images to the desired partition(s) as needed. For creating a port, see the "FreeBSD Porter's Handbook": https://www.freebsd.org/doc/en/books/porters-handbook/ Probably "6.15. Web Applications, Apache and PHP" will help: https://www.freebsd.org/doc/en/books/porters-handbook/using-php.html It's much easier than it sounds, and it will free you from lots of tasks including dependency tracking, package registration, configuration files, and updating. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...