Changeset ae9c528
- Timestamp:
- 03/28/2004 01:46:42 AM (20 years ago)
- Branches:
- 10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 6.0, 6.1, 6.2, 6.2.0, 6.2.0-rc1, 6.2.0-rc2, 6.3, 6.3-rc1, 6.3-rc2, 6.3-rc3, 7.10, 7.4, 7.5, 7.6, 7.6-blfs, 7.6-systemd, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, gnome, kde5-13430, kde5-14269, kde5-14686, kea, ken/inkscape-core-mods, ken/tuningfonts, krejzi/svn, lazarus, lxqt, nosym, perl-modules, plabs/python-mods, qt5new, renodr/vulkan-addition, systemd-11177, systemd-13485, trunk, upgradedb, v5_1, v5_1-pre1, xry111/intltool, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
- Children:
- fe88f584
- Parents:
- ff023d1
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
content/databases/mysql/mysql-config.xml
rff023d1 rae9c528 57 57 <screen><userinput><command>mysqladmin -p shutdown</command></userinput></screen> 58 58 59 <para>To automate the running of <application>My<acronym>SQL</acronym></application>, use the following command to create 60 the init.d script:</para> 61 62 <screen><userinput><command>cat > /etc/rc.d/init.d/mysql << "EOF"</command> 63 #!/bin/sh 64 # Begin $rc_base/init.d/ 65 66 # Based on sysklogd script from LFS-3.1 and earlier. 67 # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org 68 69 . /etc/sysconfig/rc 70 . $rc_functions 71 72 pid_file=/var/lib/mysql/`/bin/hostname`.pid 73 74 case "$1" in 75 start) 76 echo "Starting MySQL daemon..." 77 failure=0 78 if test -f "$pid_file" 79 then 80 if /bin/ps p `cat $pid_file` | grep mysqld >/dev/null 81 then 82 print_status warning running 83 exit 0 84 else 85 rm -f $pid_file 86 if test -f $pid_file 87 then 88 failure=1 89 fi 90 fi 91 fi 92 if [ $failure = 1 ] 93 then 94 print_status failure 95 else 96 /usr/bin/mysqld_safe --user=mysql 2>&1 >/dev/null & 97 evaluate_retval 98 fi 99 ;; 100 101 stop) 102 echo "Stopping MySQL daemon..." 103 if test -s "$pid_file" 104 then 105 kill `cat $pid_file` 106 sleep 1 107 failure=0 108 while [ -s $pid_file -a "$flags" != aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ] 109 do 110 [ -z "$flags" ] 111 flags=a$flags 112 sleep 1 113 done 114 if [ -s $pid_file ] 115 then failure=1 116 fi 117 (exit $failure) 118 evaluate_retval 119 else 120 print_status warning not_running 121 fi 122 ;; 123 124 restart) 125 $0 stop 126 sleep 1 127 $0 start 128 ;; 129 130 status) 131 statusproc /usr/sbin/mysqld 132 ;; 133 134 *) 135 echo "Usage: $0 {start|stop|restart|status}" 136 exit 1 137 ;; 138 esac 139 140 # End $rc_base/init.d/ 141 <command>EOF 142 chmod 755 /etc/rc.d/init.d/mysql</command></userinput></screen> 143 144 <para>Create the symbolic links to this file in the relevant 145 <filename class="directory">rc.d</filename> directory 146 with the following commands:</para> 147 148 <screen><userinput><command>cd /etc/rc.d/init.d && 149 ln -sf ../init.d/mysql ../rc0.d/K26mysql && 150 ln -sf ../init.d/mysql ../rc1.d/K26mysql && 151 ln -sf ../init.d/mysql ../rc2.d/K26mysql && 152 ln -sf ../init.d/mysql ../rc3.d/S34mysql && 153 ln -sf ../init.d/mysql ../rc4.d/S34mysql && 154 ln -sf ../init.d/mysql ../rc5.d/S34mysql && 155 ln -sf ../init.d/mysql ../rc6.d/K26mysql</command></userinput></screen> 59 <para>Install <filename>/etc/rc.d/init.d/mysql</filename> 60 init script included in the <xref linkend="intro-important-bootscripts"/> package.</para> 61 62 <screen><userinput><command>make install-mysql</command></userinput></screen> 156 63 157 64 </sect3> -
content/databases/postgresql/postgresql-config.xml
rff023d1 rae9c528 15 15 url="file:///usr/share/doc/postgresql/html/index.html"/>.</para> 16 16 17 <para>Create the boot script with the following: </para> 18 19 <screen><userinput><command>cat > /etc/rc.d/init.d/postgresql << "EOF"</command> 20 #!/bin/sh 21 # Begin $rc_base/init.d/postgresql 22 23 # Based on sysklogd script from LFS-3.1 and earlier. 24 # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org 25 26 . /etc/sysconfig/rc 27 . $rc_functions 28 29 case "$1" in 30 start) 31 echo "Starting PostgreSQL daemon..." 32 su - postgres -c '/usr/bin/pg_ctl start -W -D /var/pgsql/data \ 33 -l /var/pgsql/data/logfile -o "-i" ' 34 evaluate_retval 35 ;; 36 37 stop) 38 echo "Stopping PostgreSQL daemon..." 39 /usr/bin/pg_ctl stop -m smart -D /var/pgsql/data 40 evaluate_retval 41 ;; 42 43 restart) 44 $0 stop 45 sleep 1 46 $0 start 47 ;; 48 49 status) 50 /usr/bin/pg_ctl status -D /var/pgsql/data 51 ;; 52 53 *) 54 echo "Usage: $0 {start|stop|restart|status}" 55 exit 1 56 ;; 57 esac 58 59 # End $rc_base/init.d/ 60 <command>EOF 61 chmod 755 /etc/rc.d/init.d/postgresql</command></userinput></screen> 62 63 <para>Create the symbolic links to this file in the relevant 64 <filename class="directory">rc.d</filename> directory 65 with the following commands:</para> 66 67 <screen><userinput><command>cd /etc/rc.d/init.d && 68 ln -sf ../init.d/postgresql ../rc0.d/K26postgresql && 69 ln -sf ../init.d/postgresql ../rc1.d/K26postgresql && 70 ln -sf ../init.d/postgresql ../rc2.d/K26postgresql && 71 ln -sf ../init.d/postgresql ../rc3.d/S34postgresql && 72 ln -sf ../init.d/postgresql ../rc4.d/S34postgresql && 73 ln -sf ../init.d/postgresql ../rc5.d/S34postgresql && 74 ln -sf ../init.d/postgresql ../rc6.d/K26postgresql</command></userinput></screen> 17 <para>Install <filename>/etc/rc.d/init.d/postgresql</filename> 18 init script included in the <xref linkend="intro-important-bootscripts"/> package.</para> 19 20 <screen><userinput><command>make install-postgresql</command></userinput></screen> 75 21 76 22 </sect3> -
introduction/welcome/changelog.xml
rff023d1 rae9c528 11 11 12 12 <itemizedlist> 13 14 <listitem><para>March 27th, 2004 [tushar]: Updated mysql, postgresql, bind, dhcp 15 openssh, rsync, samba and xinetd to use lfs-bootscripts for init scripts.</para></listitem> 13 16 14 17 <listitem><para>March 27th, 2004 [tushar]: Added pico to the list of text editors.</para></listitem> -
server/other/bind/bind-config.xml
rff023d1 rae9c528 150 150 <screen><userinput><command>chown -R named.named /home/named</command></userinput></screen> 151 151 152 <para>Create the <application><acronym>BIND</acronym></application> 153 boot script:</para> 154 155 <screen><userinput><command>cat > /etc/rc.d/init.d/bind << "EOF"</command> 156 #!/bin/sh 157 # Begin $rc_base/init.d/bind 158 # Based on sysklogd script from LFS-3.1 and earlier. 159 # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org 160 . /etc/sysconfig/rc 161 . $rc_functions 162 case "$1" in 163 start) 164 echo "Starting named..." 165 loadproc /usr/sbin/named -u named -t /home/named -c \ 166 /etc/named.conf 167 ;; 168 stop) 169 echo "Stopping named..." 170 killproc /usr/sbin/named 171 ;; 172 restart) 173 $0 stop 174 sleep 1 175 $0 start 176 ;; 177 reload) 178 echo "Reloading named..." 179 /usr/sbin/rndc -c /etc/rndc.conf reload 180 ;; 181 182 status) 183 statusproc /usr/sbin/named 184 ;; 185 *) 186 echo "Usage: $0 {start|stop|restart|status}" 187 exit 1 188 ;; 189 esac 190 # End $rc_base/init.d/bind 191 <command>EOF</command></userinput></screen> 192 193 <para>Add the run level symlinks:</para> 194 195 <screen><userinput><command>chmod 754 /etc/rc.d/init.d/bind && 196 ln -s /etc/rc.d/init.d/bind /etc/rc.d/rc0.d/K49bind && 197 ln -s /etc/rc.d/init.d/bind /etc/rc.d/rc1.d/K49bind && 198 ln -s /etc/rc.d/init.d/bind /etc/rc.d/rc2.d/K49bind && 199 ln -s /etc/rc.d/init.d/bind /etc/rc.d/rc3.d/S22bind && 200 ln -s /etc/rc.d/init.d/bind /etc/rc.d/rc4.d/S22bind && 201 ln -s /etc/rc.d/init.d/bind /etc/rc.d/rc5.d/S22bind && 202 ln -s /etc/rc.d/init.d/bind /etc/rc.d/rc6.d/K49bind</command></userinput></screen> 152 <para>To start the DNS server at boot, install <filename>/etc/rc.d/init.d/bind</filename> 153 init script included in the <xref linkend="intro-important-bootscripts"/> package.</para> 154 155 <screen><userinput><command>make install-bind</command></userinput></screen> 203 156 204 157 <para>Now start <application><acronym>BIND</acronym></application> with -
server/other/bind/bind-intro.xml
rff023d1 rae9c528 3 3 4 4 <para>The <application><acronym>BIND</acronym></application> package 5 provides a <acronym>DNS</acronym> server and client utilities.</para> 5 provides a <acronym>DNS</acronym> server and client utilities. If you 6 are only interested in the utilities, refer to the <xref linkend="bind-utils"/>.</para> 6 7 7 8 <sect3><title>Package information</title> -
server/other/dhcp/dhcp-config.xml
rff023d1 rae9c528 11 11 found in Chapter 14.</para> 12 12 13 <para>Note that you only want to startthe <acronym>DHCP</acronym> server if13 <para>Note that you only need the <acronym>DHCP</acronym> server if 14 14 you want to issue <acronym>LAN</acronym> addresses over your network. The 15 15 <acronym>DHCP</acronym> client doesn't need this script to be used. Also note 16 16 that this script is coded for the <emphasis role="strong">eth1</emphasis> 17 interface, which may need to be modified for your hardware configuration. 18 With that in mind the <application><acronym>DHCP</acronym></application> init.d script can be created 19 using the following commands.</para> 17 interface, which may need to be modified for your hardware configuration.</para> 20 18 21 <screen><userinput><command>cat > /etc/rc.d/init.d/dhcp << "EOF"</command> 22 #!/bin/sh 23 # Begin $rc_base/init.d/dhcp 24 25 # Based on sysklogd script from LFS-3.1 and earlier. 26 # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org 27 28 . /etc/sysconfig/rc 29 . $rc_functions 30 31 case "$1" in 32 start) 33 echo "Starting DHCP Server..." 34 loadproc dhcpd -q eth1 35 ;; 36 37 stop) 38 echo "Stopping DHCP Server..." 39 killproc dhcpd 40 ;; 41 42 reload) 43 echo "Reloading DHCP Server..." 44 reloadproc dhcpd 45 ;; 46 47 restart) 48 $0 stop 49 sleep 1 50 $0 start 51 ;; 52 53 status) 54 statusproc dhcpd 55 ;; 56 57 *) 58 echo "Usage: $0 {start|stop|reload|restart|status}" 59 exit 1 60 ;; 61 esac 62 63 # End $rc_base/init.d/dhcp 64 <command>EOF 65 chmod 755 /etc/rc.d/init.d/dhcp</command></userinput></screen> 19 <para>Install <filename>/etc/rc.d/init.d/dhcp</filename> 20 init script included in the <xref linkend="intro-important-bootscripts"/> package.</para> 21 22 <screen><userinput><command>make install-dhcp</command></userinput></screen> 66 23 67 24 <para>The lease file must exist on startup. The following command will -
server/other/openssh/openssh-config.xml
rff023d1 rae9c528 15 15 <sect3><title>sshd init.d script</title> 16 16 17 <para>Note that you only want to start the <command>sshd</command> server if 18 you want to be able to <command>ssh</command> <emphasis>into</emphasis> your 19 machine. The <command>ssh</command> client doesn't need this script to be 20 used. Having said that, if you want to run the <command>ssh</command> daemon, 21 the <application>Open<acronym>SSH</acronym></application> daemon init.d script can be created using the following 22 commands:</para> 23 24 <screen><userinput><command>cat > /etc/rc.d/init.d/sshd << "EOF"</command> 25 #!/bin/sh 26 # Begin $rc_base/init.d/sshd 27 28 # Based on sysklogd script from LFS-3.1 and earlier. 29 # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org 30 31 . /etc/sysconfig/rc 32 . $rc_functions 33 34 case "$1" in 35 start) 36 echo "Starting SSH Server..." 37 loadproc /usr/sbin/sshd 38 ;; 39 40 stop) 41 echo "Stopping SSH Server..." 42 killproc /usr/sbin/sshd 43 ;; 44 45 reload) 46 echo "Reloading SSH Server..." 47 reloadproc /usr/sbin/sshd 48 ;; 49 50 restart) 51 $0 stop 52 sleep 1 53 $0 start 54 ;; 55 56 status) 57 statusproc /usr/sbin/sshd 58 ;; 59 60 *) 61 echo "Usage: $0 {start|stop|reload|restart|status}" 62 exit 1 63 ;; 64 esac 65 66 # End $rc_base/init.d/sshd 67 <command>EOF 68 chmod 755 /etc/rc.d/init.d/sshd</command></userinput></screen> 69 70 <para>Create the symbolic links to this file in the relevant <filename 71 class="directory">rc.d</filename> directories with the following 72 commands:</para> 73 <screen><userinput><command>cd /etc/rc.d/init.d && 74 ln -sf ../init.d/sshd ../rc0.d/K30sshd && 75 ln -sf ../init.d/sshd ../rc1.d/K30sshd && 76 ln -sf ../init.d/sshd ../rc2.d/K30sshd && 77 ln -sf ../init.d/sshd ../rc3.d/S30sshd && 78 ln -sf ../init.d/sshd ../rc4.d/S30sshd && 79 ln -sf ../init.d/sshd ../rc5.d/S30sshd && 80 ln -sf ../init.d/sshd ../rc6.d/K30sshd</command></userinput></screen> 17 <para>To start the SSH Server at boot, install <filename>/etc/rc.d/init.d/sshd</filename> 18 init script included in the <xref linkend="intro-important-bootscripts"/> package.</para> 19 20 <screen><userinput><command>make install-sshd</command></userinput></screen> 81 21 82 22 </sect3> -
server/other/rsync/rsync-config.xml
rff023d1 rae9c528 34 34 server if you want to provide a <application>rsync</application> archive on 35 35 your machine. The <application>rsync</application> client doesn't need this 36 script to be used. Having said that, if you want to run the <application>rsync 37 </application> daemon, the <application>rsync</application> daemon init.d script can be 38 created using the following commands:</para> 36 script to be used.</para> 39 37 40 <screen><userinput><command>cat > /etc/rc.d/init.d/rsyncd << "EOF"</command> 41 #!/bin/sh 42 # Begin $rc_base/init.d/rsyncd 43 44 # Based on sysklogd script from LFS-3.1 and earlier. 45 # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org 46 47 . /etc/sysconfig/rc 48 . $rc_functions 49 50 case "$1" in 51 start) 52 echo "Starting RSYNC Server..." 53 loadproc /usr/bin/rsync --daemon --compress 54 ;; 55 56 stop) 57 echo "Stopping RSYNC Server..." 58 killproc /usr/bin/rsync 59 ;; 60 61 reload) 62 echo "Reloading RSYNC Server..." 63 reloadproc /usr/bin/rsync 64 ;; 65 66 restart) 67 $0 stop 68 sleep 1 69 $0 start 70 ;; 71 72 status) 73 statusproc /usr/bin/rsync 74 ;; 75 76 *) 77 echo "Usage: $0 {start|stop|reload|restart|status}" 78 exit 1 79 ;; 80 esac 81 82 # End $rc_base/init.d/rsyncd 83 <command>EOF 84 chmod 755 /etc/rc.d/init.d/rsyncd</command></userinput></screen> 85 86 <para>Create the symbolic links to this file in the relevant 87 <filename class="directory">rc.d</filename> directories with the following 88 commands:</para> 89 <screen><userinput><command>cd /etc/rc.d/init.d && 90 ln -sf ../init.d/rsyncd ../rc0.d/K30rsyncd && 91 ln -sf ../init.d/rsyncd ../rc1.d/K30rsyncd && 92 ln -sf ../init.d/rsyncd ../rc2.d/K30rsyncd && 93 ln -sf ../init.d/rsyncd ../rc3.d/S30rsyncd && 94 ln -sf ../init.d/rsyncd ../rc4.d/S30rsyncd && 95 ln -sf ../init.d/rsyncd ../rc5.d/S30rsyncd && 96 ln -sf ../init.d/rsyncd ../rc6.d/K30rsyncd</command></userinput></screen> 38 <para>Install <filename>/etc/rc.d/init.d/rsyncd</filename> 39 init script included in the <xref linkend="intro-important-bootscripts"/> package.</para> 40 41 <screen><userinput><command>make install-rsyncd</command></userinput></screen> 97 42 98 43 </sect3> -
server/other/samba/samba-config.xml
rff023d1 rae9c528 69 69 smbpasswd -a -m win2kbox</command></userinput></screen> 70 70 71 <para>Create the <application>Samba</application> boot script:</para> 72 <screen><userinput><command>cat > /etc/rc.d/init.d/samba << "EOF"</command> 73 #!/bin/sh 74 # Begin $rc_base/init.d/samba 75 # Based on sysklogd script from LFS-3.1 and earlier. 76 # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org 77 . /etc/sysconfig/rc 78 . $rc_functions 79 case "$1" in 80 start) 81 echo "Starting nmbd..." 82 loadproc /usr/sbin/nmbd -D 83 echo "Starting smbd..." 84 loadproc /usr/sbin/smbd -D 85 ;; 86 stop) 87 echo "Stopping smbd..." 88 killproc /usr/sbin/smbd 89 echo "Stopping nmbd..." 90 killproc /usr/sbin/nmbd 91 ;; 92 reload) 93 echo "Reloading smbd..." 94 reloadproc /usr/sbin/smbd 95 echo "Reloading nmbd..." 96 reloadproc /usr/sbin/nmbd 97 ;; 98 restart) 99 $0 stop 100 sleep 1 101 $0 start 102 ;; 103 status) 104 statusproc /usr/sbin/nmbd 105 statusproc /usr/sbin/smbd 106 ;; 107 *) 108 echo "Usage: $0 {start|stop|reload|restart|status}" 109 exit 1 110 ;; 111 esac 112 # End $rc_base/init.d/samba 113 <command>EOF</command></userinput></screen> 114 <para>Add the run level symlinks:</para> 115 <screen><userinput>chmod 754 /etc/rc.d/init.d/samba && 116 ln -s /etc/rc.d/init.d/samba /etc/rc.d/rc0.d/K48samba && 117 ln -s /etc/rc.d/init.d/samba /etc/rc.d/rc1.d/K48samba && 118 ln -s /etc/rc.d/init.d/samba /etc/rc.d/rc2.d/K48samba && 119 ln -s /etc/rc.d/init.d/samba /etc/rc.d/rc3.d/S24samba && 120 ln -s /etc/rc.d/init.d/samba /etc/rc.d/rc4.d/S24samba && 121 ln -s /etc/rc.d/init.d/samba /etc/rc.d/rc5.d/S24samba && 122 ln -s /etc/rc.d/init.d/samba /etc/rc.d/rc6.d/K48samba</userinput></screen> 71 <para>Install <filename>/etc/rc.d/init.d/samba</filename> 72 init script included in the <xref linkend="intro-important-bootscripts"/> package.</para> 73 74 <screen><userinput><command>make install-samba</command></userinput></screen> 123 75 124 76 <para>Now, we'll use our new boot script to start <application>Samba -
server/other/xinetd/xinetd-config.xml
rff023d1 rae9c528 10 10 <sect3><title>Configuration Information</title> 11 11 12 <para>Insure the path to all daemons is<filename12 <para>Insure the path to all daemons are in <filename 13 13 class="directory">/usr/sbin</filename>, rather than the default path of 14 14 <filename class="directory">/usr/etc</filename>:</para> … … 21 21 found at <ulink url="http://www.xinetd.org"/>.</para> 22 22 23 <para>Create the <command>xinetd</command> boot script:</para> 24 25 <screen><userinput><command>cat > /etc/rc.d/init.d/xinetd << "EOF"</command> 26 #!/bin/sh 27 # Begin $rc_base/init.d/xinetd 28 # Based on sysklogd script from LFS-3.1 and earlier. 29 # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org 30 . /etc/sysconfig/rc 31 . $rc_functions 32 case "$1" in 33 start) 34 echo "Starting xinetd..." 35 loadproc /usr/sbin/xinetd 36 ;; 37 stop) 38 echo "Stopping xinetd..." 39 killproc /usr/sbin/xinetd 40 ;; 41 reload) 42 echo "Reloading xinetd..." 43 killall -HUP xinetd 44 ;; 45 restart) 46 $0 stop 47 sleep 1 48 $0 start 49 ;; 50 status) 51 statusproc /usr/sbin/xinetd 52 ;; 53 *) 54 echo "Usage: $0 {start|stop|reload|restart|status}" 55 exit 1 56 ;; 57 esac 58 # End $rc_base/init.d/xinetd 59 <command>EOF 60 chmod 754 /etc/rc.d/init.d/xinetd</command></userinput></screen> 61 62 <para>Add the run level symlinks:</para> 63 64 <screen><userinput><command>ln -s /etc/rc.d/init.d/xinetd /etc/rc.d/rc0.d/K49xinetd && 65 ln -s /etc/rc.d/init.d/xinetd /etc/rc.d/rc1.d/K49xinetd && 66 ln -s /etc/rc.d/init.d/xinetd /etc/rc.d/rc2.d/K49xinetd && 67 ln -s /etc/rc.d/init.d/xinetd /etc/rc.d/rc3.d/S23xinetd && 68 ln -s /etc/rc.d/init.d/xinetd /etc/rc.d/rc4.d/S23xinetd && 69 ln -s /etc/rc.d/init.d/xinetd /etc/rc.d/rc5.d/S23xinetd && 70 ln -s /etc/rc.d/init.d/xinetd /etc/rc.d/rc6.d/K49xinetd</command></userinput></screen> 23 <para>Install <filename>/etc/rc.d/init.d/xinetd</filename> 24 init script included in the <xref linkend="intro-important-bootscripts"/> package.</para> 25 26 <screen><userinput><command>make install-xinetd</command></userinput></screen> 71 27 72 28 <para>Now, we'll use our new boot script to start <command>xinetd</command>: </para>
Note:
See TracChangeset
for help on using the changeset viewer.