Source string Read only

(itstool) path: sect2/screen
196/1960
Context English State
Before discussing the changes necessary to successfully use the ports tree, a reminder is necessary regarding the read-only nature of your filesystems on the flash media. Since they are read-only, you will need to temporarily mount them read-write using the mount syntax shown in <xref linkend="ro-fs"/>. You should always remount those filesystems read-only when you are done with any maintenance - unnecessary writes to the flash media could considerably shorten its lifespan.
install
To make it possible to enter a ports directory and successfully run <command>make</command> <_:buildtarget-1/>, we must create a packages directory on a non-memory filesystem that will keep track of our packages across reboots. As it is necessary to mount your filesystems as read-write for the installation of a package anyway, it is sensible to assume that an area on the flash media can also be used for package information to be written to.
First, create a package database directory. This is normally in <filename>/var/db/pkg</filename>, but we cannot place it there as it will disappear every time the system is booted.
<prompt>#</prompt> <userinput>mkdir /etc/pkg</userinput>
Now, add a line to <filename>/etc/rc.d/var</filename> that links the <filename>/etc/pkg</filename> directory to <filename>/var/db/pkg</filename>. An example:
<prompt>#</prompt> <userinput>ln -s /etc/pkg /var/db/pkg</userinput>
Now, any time that you mount your filesystems as read-write and install a package, the <command>make</command> <_:buildtarget-1/> will work, and package information will be written successfully to <filename>/etc/pkg</filename> (because the filesystem will, at that time, be mounted read-write) which will always be available to the operating system as <filename>/var/db/pkg</filename>.
Apache Web Server
The steps in this section are only necessary if Apache is set up to write its pid or log information outside of <filename>/var</filename>. By default, Apache keeps its pid file in <filename>/var/run/httpd.pid</filename> and its log files in <filename>/var/log</filename>.
It is now assumed that Apache keeps its log files in a directory <filename><replaceable>apache_log_dir</replaceable></filename> outside of <filename>/var</filename>. When this directory lives on a read-only filesystem, Apache will not be able to save any log files, and may have problems working. If so, it is necessary to add a new directory to the list of directories in <filename>/etc/rc.d/var</filename> to create in <filename>/var</filename>, and to link <filename><replaceable>apache_log_dir</replaceable></filename> to <filename>/var/log/apache</filename>. It is also necessary to set permissions and ownership on this new directory.
First, add the directory <literal>log/apache</literal> to the list of directories to be created in <filename>/etc/rc.d/var</filename>.
Second, add these commands to <filename>/etc/rc.d/var</filename> after the directory creation section:
<prompt>#</prompt> <userinput>chmod 0774 /var/log/apache</userinput>
<prompt>#</prompt> <userinput>chown nobody:nobody /var/log/apache</userinput>
Finally, remove the existing <filename><replaceable>apache_log_dir</replaceable></filename> directory, and replace it with a link:
<prompt>#</prompt> <userinput>rm -rf <replaceable>apache_log_dir</replaceable></userinput>
<prompt>#</prompt> <userinput>ln -s /var/log/apache <replaceable>apache_log_dir</replaceable></userinput>

Loading…

No matching activity found.

Browse all component changes

Things to check

Multiple failing checks

The translations in several languages have failing checks

Reset

Glossary

English English
No related strings found in the glossary.

Source information

Source string comment
(itstool) path: sect2/screen
Flags
no-wrap, read-only
Source string location
article.translate.xml:536
String age
a year ago
Source string age
a year ago
Translation file
articles/solid-state.pot, string 87