Skip Navigation Links | |
Exit Print View | |
Introduction to Oracle Solaris 11 Network Services Oracle Solaris 11.1 Information Library |
Network Cache and Accelerator (Overview)
Managing Web Cache Servers (Task Map)
Interpositioning Library for Daemon Support of the Door Server
The following sections cover the procedures to enable or disable parts of the service.
For more information, see How to Use Your Assigned Administrative Rights in Oracle Solaris 11.1 Administration: Security Services.
Type the names of each of the physical interfaces in the /etc/nca/nca.if file. See the nca.if(4) man page for more information.
# cat /etc/nca/nca.if hme0 hme1
Each interface must have an accompanying hostname.interface-name file and an entry in /etc/hosts file for the contents of hostname.interface-name. To start the NCA feature on all interfaces, place an asterisk, *, in the nca.if file.
Change the status entry in /etc/nca/ncakmod.conf to enabled.
# cat /etc/nca/ncakmod.conf # # NCA Kernel Module Configuration File # status=enabled httpd_door_path=/system/volatile/nca_httpd_1.door nca_active=disabled
See the ncakmod.conf(4) man page for more information.
Change the status entry in /etc/nca/ncalogd.conf to enabled.
# cat /etc/nca/ncalogd.conf # # NCA Logging Configuration File # status=enabled logd_path_name="/var/nca/log" logd_file_size=1000000
You can change the location of the log file by changing the path that is indicated by the logd_path_name entry. The log file can be a raw device or a file. See the following examples for samples of NCA log file paths. See the ncalogd.conf(4) man page for more information about the configuration file.
Add the port numbers in the /etc/nca/ncaport.conf file. This entry causes NCA to monitor port 80 on all configured IP addresses.
# cat /etc/nca/ncaport.conf # # NCA Kernel Module Port Configuration File # . . ncaport=*/80
Use the eeprom command to set the kernelbase of the system.
# eeprom kernelbase=0x90000000 # eeprom kernelbase kernelbase=0x90000000
The second command verifies that the parameter has been set.
Note - By setting the kernelbase, you reduce the amount of virtual memory that user processes can use to less than 3 Gbytes. This restriction means that the system is not ABI compliant. When the system boots, the console displays a message that warns you about noncompliance. Most programs do not actually need the full 3–Gbyte virtual address space. If you have a program that needs more than 3 Gbytes, you need to run the program on a system that does not have NCA enabled.
Example 2-1 Using a Raw Device as the NCA Log File
The logd_path_name string in ncalogd.conf can define a raw device as the place to store the NCA log file. The advantage to using a raw device is that the service can run faster because the overhead in accessing a raw device is less.
The NCA service tests any raw device that is listed in the file to ensure that no file system is in place. This test ensures that no active file systems are accidentally written over.
To prevent this test from finding a file system, run the following command. This command destroys part of the file system on any disk partition that had been configured as a file system. In this example, /dev/rdsk/c0t0d0s7 is the raw device that has an old file system in place.
# dd if=/dev/zero of=/dev/rdsk/c0t0d0s7 bs=1024 count=1
After running dd, you can then add the raw device to the ncalogd.conf file.
# cat /etc/nca/ncalogd.conf # # NCA Logging Configuration File # status=enabled logd_path_name="/dev/rdsk/c0t0d0s7" logd_file_size=1000000
Example 2-2 Using Multiple Files for NCA Logging
The logd_path_name string in ncalogd.conf can define multiple targets as the place to store the NCA log file. The second file is used when the first file is full. The following example shows how to select to write to the /var/nca/log file first and then use a raw partition.
# cat /etc/nca/ncalogd.conf # # NCA Logging Configuration File # status=enabled logd_path_name="/var/nca/log /dev/rdsk/c0t0d0s7" logd_file_size=1000000
For more information, see How to Use Your Assigned Administrative Rights in Oracle Solaris 11.1 Administration: Security Services.
Change the status entry in /etc/nca/ncakmod.conf to disabled.
# cat /etc/nca/ncakmod.conf # NCA Kernel Module Configuration File # status=disabled httpd_door_path=/system/volatile/nca_httpd_1.door nca_active=disabled
See the ncakmod.conf(4) man page for more information.
Change the status entry in /etc/nca/ncalogd.conf to disabled.
# cat /etc/nca/ncalogd.conf # # NCA Logging Configuration File # status=disabled logd_path_name="/var/nca/log" logd_file_size=1000000
See the ncalogd.conf(4) man page for more information.
NCA logging can be turned on or turned off, as needed, after NCA has been enabled. See How to Enable Caching of Web Pages for more information.
For more information, see How to Use Your Assigned Administrative Rights in Oracle Solaris 11.1 Administration: Security Services.
To permanently disable logging, you need to change the status in /etc/nca/ncalogd.conf to disabled and reboot the system. See the ncalogd.conf(4) man page for more information.
Follow this process only if your web server does not provide native support of the AF_NCA socket.
In the startup script for the web server, add a line that causes the library to be preloaded. The line should resemble the following:
LD_PRELOAD=/usr/lib/ncad_addr.so /usr/bin/httpd
For more information, see How to Use Your Assigned Administrative Rights in Oracle Solaris 11.1 Administration: Security Services.
Add a new port entry to /etc/nca/ncaport.conf. This example adds port 8888 on IP address 192.168.84.71. See ncaport.conf(4) for more information.
# cat /etc/nca/ncaport.conf # # NCA Kernel Module Port Configuration File # . . ncaport=*/80 ncaport=192.168.84.71/8888
An address needs to be in the file that contains the NCA port configurations before a web server can use the address for NCA. If the web server is running, it must be restarted after the new address is defined.