📄 install
字号:
Installation shouldn't be too difficult, but it may take some tweaking toget it to work. The only outside requirements are postgresql, a webserver, php, and preferably SSL. Authentication is done using useraccounts on the local system (/etc/shadow). If you're reading this, thenyou've probably untarred the source already, so starting from there:1. Move the calendar and auth directories to some web-accessible place,preferably with SSL access too. Don't forget to change the uid of the files so your web server can read them.$ mv calendar /var/www/$ mv auth /var/www/$ chown -R root:www-data /var/www/auth /var/www/calendar2. Create two postgresql databases (I use srccalendar and auth) and inputthe table schema (and some sample data) from the included sql-dumps.$ createdb auth$ createdb srccalendar$ psql -f sql-dumps/auth.sql auth$ psql -f sql-dumps/srccalendar.sql srccalendar3. If you don't already have a postgres user, you'll need to create one,possibly two, for calendar access. (These are users in the postgresqldatabase, not unix users.) Grant the appropriate access to the tables. Igive read-only access to guest and read-write to another user. Nobodyneeds to write to the location, category, weekday, or audience tables,although the associated lists should be writeable for event creation. Noone should be able to write to the permissions table in the auth dbeither, that's not necessary. $ createuser guest$ createuser foo$ psql authauth=> grant select on last_login,permissions,session to guest;auth=> grant select,insert,update,delete on last_login,session to foo;auth=> grant select on permissions to foo;auth=> \connect srccalendarsrccalendar=> grant select on srcaudience,srcaudiencelist,srccategory,srccalendar-> srccategorylist,srcevent,srclocation,srcweekday,srccalendar-> srcweekdaylist,srcindex to guest;srccalendar=> grant select on srcaudience,srccategory,srcweekday,srccalendar-> srclocation to foo;srccalendar=> grant select,insert,update,delete on srcevent,srcindex,srccalendar-> srcweekdaylist,srccategorylist,srcaudiencelist to foo;4. Edit calendar/sql/sql.php3 so the functions connect as the appropriateusers.5. Edit calendar/includes/config.inc to meet your needs. You may alsowant to edit header.inc and footer.inc to match your site's layout, although I would appreciate some sort of recognition to remain at thebottom.6. Install the appropriate authentication utilities from the php-utilsdirectory. There's a Makefile in php-utils to help with this. Bydefault it installs things in /usr/local/php3/, but you can change this inphp-utils/auth-whatever/Makefile. Current options for authentication areshadow, PAM, and NIS. shadow gets its information directly from/etc/shadow. PAM passes a username and password to PAM. NIS currentlyworks the same as shadow, but contacts an NIS server for information.Some of these things need to be setuid root, so you should su beforeinstalling. The Makefile also makes them executable only by root andwhatever group is specified in the Makefile (which should be the group ofyour web server).$ cd php-utils$ su# make auth-shadow - OR -# make auth-pam - OR -# make auth-nis# make shadow-install - OR -# make pam-install - OR -# make nis-install7. Set up access for users to approve, modify, etc events in thecalendar. This is done in the permissions table in the auth database. Agiven row in permissions will contain some user's unix user ID, a numbersignifying permissions, and a location ID to which the given permissionsapply (or -1 if they apply to all locations). For instance, to grantaccess for user spaz (with unix user ID 42) to approve and modify his ownevents, use the following statement in psql:auth=> insert into permissions ( user_id, location_id, permissions )auth=> values ( 42, -1, 17 );A list of permissions is found in auth/permissions.php3. Permissions arecombined using a bitwise OR. Permissions to approve submittedmodifications use the Modify bits, *not* the Approve bits. This is so, onthe off chance that you only want somebody able to approve but not modifyevents, they can't submit a modification and then approve it.If I'm leaving anything out, or if you need help, e-mailfluffy@simons-rock.edu, and I'll see what I can do. You can also checkthe accompanying file "DESIGN" for some more information on how thecalendar works.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -