📄 readme
字号:
This directory contains code for two servers, a secure server and onethat is not secure. We recommend that you use only the secure server,we use the other one only for testing. This secure server can be installed for use public use, i.e. allusers can use the same copy, or you can make it available such thatindividual users can start it up as they need it. Each method hasits won advantages/disadvantages.Secure server installation for public use-----------------------------------------The following steps are done as a non-root user, to install theserver. We assume that it has been made as part of the top-levelp4 installation.1. Decide in which directory the server will live. By default itgoes into /etc. There will be two files in that directory: serv_p4(the server), and serv_p4.log (a logfile created by serv_p4). Thiswill be the SERVER_HOME directory.2. Edit Makefile to reflect the correct value for SERVER_HOME.The values for P4_PORT and P4_PORT_NAME should not need to be changed.3. Do a "make all". As root:4. Add an entry to /etc/services. The contents of services.entryshould work.If you are on a NIS/YellowPages network, this step need only be doneon the NIS server machine. After making the change, cd to the NISdirectory (usually /var/yp) and do a "make".5. Add an entry to /etc/inetd.conf for the server. See the manual pagefor inetd(8) for the correct syntax. One of the examples ininetd.entry is probably correct for your system. Ensure that the server will be run as root.Ensure that the pathname in /etc/inetd.conf points to the correct place.6. Make inetd aware of the new entry. On newer Unices, you should beable to do a "kill -HUP <inetd process id>". If that does not work,kill ("kill <inetd process id") and restart ("/etc/inetd &") inetd. Ifall else fails, reboot the machine.7. Do a "make install". This will copy serv_p4 tothe SERVER_HOME directory.--------------------------------------------------The P4 secure server should now be available. If you have problems,first try to telnet directly to the server: % telnet <machine> serv_p4If you get the error serv_p4: bad port numberthe /etc/services entry is incorrect. Did you do a make in /var/yp ona NIS system?If you get the error telnet: connect: Connection refusedinetd probably didn't get restarted correctly, or there is a syntaxerror in the /etc/inetd.conf file. Installing the server for private use-------------------------------------Merely make the server in a directory where all users can execute it,and then note the following:The server has several options (I didn't explain these earlier). o -d says to run in "daemon" mode. This is as opposed to "inetd" mode: it will loop accepting connections itself, instead of expecting fd 0 to be the net connection. o "-p port" says to listen on port, instead of the default port. If port is set to 0, the server will pick a port and print its value to stdout. o "-l logfile" sets the logfile. o "-D" says run in debug mode. By default, in daemon mode the server will fork and disconnect itself from the terminal. The -D flag disables this.If a non-root user runs the server, it will only run processes for thatuser. It will also assume "-p 0" and "-D" and set the default logfileto "P4Server.log.<pid>". Using P4 with the server------------------------In order for the server to execute a slave process, severalrequirements must be met. o The name of the executable must be supplied as a full pathname in the procgroup file o A file called .p4apps must exist in the home directory of the user under whose account the process will be run. The .p4apps file contains a list of filenames for executable p4 slaves, one per line. An executable must be listed in this file for the server to execute it. For example, if the procgroup file entry is remote 1 /usr/user/sr_slave ruser the file ~ruser/.p4apps must exist on the machine called "remote" and contain the line /usr/user/sr_slave In the file .p4apps blank lines and lines starting with '#' are ignored.The server will require the user to supply a password if the proper/etc/hosts.equiv or ~user/.rhosts files do not have the appropriateentries. In other words, if rlogin requires a password, so will the P4server.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -