out why some trivial change is causing things
Chapter 11: Advanced Software Management Overview This chapter covers several things you need to know about running software on FreeBSD. FreeBSD can run a wide variety of software packages, most of which are available as source code so they can be built as native FreeBSD software. And, thanks to some clever design, FreeBSD can also run software from many foreign operating systems. We’ll look at how to do this, focusing on the popular Linux compatibility package that allows FreeBSD to run unmodified Linux software. Also, for your programs to start at boot, and stop cleanly when the system shuts down, you must be able to edit and write proper startup and shutdown scripts. While some programs stop just fine when you kill the operating system they’re running on, others (like databases) demand a gentler shutdown process. While you can get by with a variety of ugly hacks, starting and stopping network services cleanly is an excellent habit to get into and enforce. We’ll examine how to properly implement and manage these systems in FreeBSD. And, while under normal circumstances you’ll never need to know how FreeBSD’s linking and shared library support works, we’ll discuss how shared libraries work and how to manage and configure them. Why? Because normal circumstances are, oddly, quite rare in the computer business. Finally, we’ll look at how systems with multiple processors work, and how they interact with software. While multiple processors can greatly increase system power, they won’t help you if your software isn’t properly configured. Startup and Shutdown Scripts While FreeBSD’s main system software is started by /etc/rc, add-on software is started by separate scripts. The ports and packages system installs these scripts for you. If you install your own software, however, you’ll need to create a script that handles this startup and shutdown process. Plus, to change an existing add-on package’s startup process, you must understand how the startup scripts function. Note This section assumes that you have some basic understanding of shell scripts. If you’ve never seen or used a shell script before, read the examples here very carefully. Shell scripting is not hard, and the best way to learn is to read examples. The /etc/rc shell scripts (see Chapter 9) handle the main system startup process. During boot up, the FreeBSD startup script checks several directories for additional shell scripts. The most popular directory for startup and shutdown scripts is /usr/local/etc/rc.d, though /usr/X11R6/etc/rc.d is another default location. These directories are specified in /etc/defaults/rc.conf, and can be overridden in /etc/rc.conf. (You can add additional script directories with the local_startup rc.conf variable.) The shell script locator just checks in those directories for any files ending in “.sh”. If it finds such a file, it assumes that the file is a shell script and executes it with an argument of start. During shutdown, FreeBSD runs these same scripts with an argument of stop. The scripts are expected to read those arguments and take appropriate action. 250
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Inexpensive Web Hosting services