Some websites don't need publications and such and can use the simple Berkeley web template.
Please add a MX and A record for human-cps.eecs.berkeley.edu: human-cps.eecs.berkeley.edu. 86400 IN MX 5 moog.eecs.berkeley.edu. human-cps.eecs.berkeley.edu. 86400 IN A 128.32.48.150 Thanks!
So, email hostnamster@nic.berkeley.edu and cc root@moog.eecs.berkeley.edu:Yes. Hostnames are provided on a first-come-first-served basis. Hostnames are generally assigned as part of a CNS work-order (installation). Requests to change a hostname or add an alias can be sent to hostmaster@nic.berkeley.edu.
Please add a MX and A record for xxx.berkeley.edu: xxx.berkeley.edu. 86400 IN MX 5 moog.eecs.berkeley.edu. xxx.berkeley.edu. 86400 IN A 128.32.48.150 Thanks!
Basically, on the hostname registrar, set up the A and MX records as above.
[root@moog human-cpswww]# dig any human-cps.eecs.berkeley.edu ; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6_4.6 <<>> any human-cps.eecs.berkeley.edu ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15321 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 5, ADDITIONAL: 7 ;; QUESTION SECTION: ;human-cps.eecs.berkeley.edu. IN ANY ;; ANSWER SECTION: human-cps.eecs.berkeley.edu. 86400 IN MX 5 moog.eecs.berkeley.edu. human-cps.eecs.berkeley.edu. 86400 IN A 128.32.48.150 ;; AUTHORITY SECTION: eecs.berkeley.edu. 86400 IN NS ns.CS.berkeley.edu. eecs.berkeley.edu. 86400 IN NS adns2.berkeley.edu. eecs.berkeley.edu. 86400 IN NS adns1.berkeley.edu. eecs.berkeley.edu. 86400 IN NS ns.eecs.berkeley.edu. eecs.berkeley.edu. 86400 IN NS cgl.UCSF.edu. ;; ADDITIONAL SECTION: moog.eecs.berkeley.edu. 86400 IN A 128.32.48.150 ns.CS.berkeley.edu. 86400 IN A 169.229.60.61 ns.eecs.berkeley.edu. 86400 IN A 169.229.60.153 adns1.berkeley.edu. 7750 IN A 128.32.136.3 adns1.berkeley.edu. 2313 IN AAAA 2607:f140:ffff:fffe::3 adns2.berkeley.edu. 9554 IN A 128.32.136.14 adns2.berkeley.edu. 2313 IN AAAA 2607:f140:ffff:fffe::e ;; Query time: 1 msec ;; SERVER: 128.32.48.21#53(128.32.48.21) ;; WHEN: Fri Dec 6 07:54:59 2013 ;; MSG SIZE rcvd: 318 [root@moog human-cpswww]#If the address has not been propagated, then the A and MX records will not be present.
It is easiest to search the Apache configuration in /usr/local/apache/conf and /usr/local/apache/conf/extra and make similar edits.
/usr/local/apache/conf/httpd.conf
and add
<Directory "/home/www/human-cpswww"> Options +Includes +Indexes +FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory>The above is necessary for Server Side Includes (SSI) to work. If it is not present, then the web page will not get the decorations, it will just be text
/usr/local/apache/conf/extra/httpd-vhosts.conf
. This file has alphabetical sections for the different websites. Here, search for a previous website like cps-forces, copy the text and paste it in. The only change is to change
ServerName cps-forces.eecs.berkeley.edu DocumentRoot /home/www/cps-forceswwwto
ServerName human-cps.eecs.berkeley.edu DocumentRoot /home/www/human-cpswwwand
TransferLog "|/usr/local/sbin/cronolog -l /usr/local/apache/logs/access_log_cps-forces /usr/local/apache/logs/%Y/%m/%d/access_log_cps-forces"to
TransferLog "|/usr/local/sbin/cronolog -l /usr/local/apache/logs/access_log_human-cps /usr/local/apache/logs/%Y/%m/%d/access_log_human-cps"
To copy the files, as root do:
cd /usr/www mkdir human-cpswww chown cvs human-cpswww chgrp cvs human-cpswww chmod g+ws human-cpswww cd human-cpswww (cd ../cps-forceswww; tar -cf - .) | tar -xpf -
/etc/init.d/apachectl graceful
chmod a+x *.htm *.html
See http://chess.eecs.berkeley.edu/ptolemy/wiki/Ptolemy/PtolemyWebsite for other hints
vc
user check out the repo, copy the files in and commit them.
Note that as this repository is in the trust space, we use vc@truststc.org
If you are prompted for the password, use the secondary password (begins with a k).
If you are prompted to save the password unencrypted, then select yes.
su - vc cd /tmp svn --username vc@truststc.org co https://repo.eecs.berkeley.edu/svn/projects/trust/human-cpswww/ cd human-cpswww (cd ~www/human-cpswww/; tar -cf - .) | tar -xpf - svn add * svn commit -m "Initial checkin"
cd ~www mv human-cpswww /tmp/human-cpswww.bak mv /tmp/human-cpswww .
To update the site, we will modify a php file and add a link so that if a user clicks on the link, then the update occurs. Before doing that work, it is a good idea to test the command. As root:
cd ~www/human-cpswww ~www/bin/vc-svn --username vc@truststc.org update
Replace truststc.org
with the name of the main website.
If you are prompted for the password, use the secondary password (begins with a k).
Then, fix the permissions:chown -R vc.vc human-cpswww chmod -R g+wX human-cpswww
If the permissions are not fixed, attempting to update the website will fail, see svn: Can't open file '.svn/lock': Permission denied.
The way this works is that we create a special link that checks to see if the user is admin in a particular group and if they are, then invokes svn to update to the site.
For trust sites (hi-cons etc), edit ~www/php/trust.eecs.berkeley.edu/group.php
For cps-forces sites (cybear, gie, success) and robotics.eecs sites (isaacs, aucgoc, edit
~www/php/ucb/group.php
/* Perform pre-processing according to the authoring style */ switch ($groupinfo['authoring']) { case "cvs": case "svn": case "vc": // Do a CVS update if requested if ($Action == "cvsupdate" || $Action == "svnupdate" || $Action == "vcupdate" || $Action == "vcupdate-augcogwww" || $Action == "vcupdate-cacwww" || $Action == "vcupdate-cybear" || $Action == "vcupdate-gie" || $Action == "vcupdate-success" || $Action == "vcupdate-isaacswww") {Add the website to be updated to the
if
statement and below:
if ($Action == "cvsupdate" || $Action == "svnupdate" || $Action == "vcupdate") { $pageinfo['script'] = "svn_update('$group');"; } else if ($Action == "vcupdate-augcogwww" && $group == 'roboadmin' && user_ok($group, "admin")) { $pageinfo['script'] = "svn_update('augcogwww');"; } else if ($Action == "vcupdate-cacwww" && $group == 'roboadmin' && user_ok($group, "admin")) { $pageinfo['script'] = "svn_update('cacwww');"; } else if ($Action == "vcupdate-cybear" && $group == 'forcesadmin' && user_ok($group, "admin")) { $pageinfo['script'] = "svn_update('cybear');"; } else if ($Action == "vcupdate-gie" && $group == 'forcesadmin' && user_ok($group, "admin")) { $pageinfo['script'] = "svn_update('gie');"; } else if ($Action == "vcupdate-success" && $group == 'forcesadmin' && user_ok($group, "admin")) { $pageinfo['script'] = "svn_update('success');"; } else if ($Action == "vcupdate-isaacswww" && $group == 'isaacs' && user_ok($group, "admin")) { $pageinfo['script'] = "svn_update('isaacswww');"; }Add your Action, group and svn_update lines above.
~www/php/include/svn.inc.php
and add the repository.
Go back Working Directory: /home/www/augcogwww Command: /home/www/bin/vc-svn update --username vc@robotics.eecs.berkeley.edu --config-dir /home/vc/.subversion-robotics 2>&1 Updating module augcogwww: svn: Can't open file '.svn/lock': Permission denied Done! Go back
Then be sure that the permissions are updated.