Forum OpenACS Q&A: Notes on reinstall of developmental computer

My hard disk on my dev computer died a couple of days ago. Fortunately, I had backups of my CVS repository, and most of the other stuff that was important on it. Since I'm going to have to go through the process of reinstalling, I thought I would keep notes, both for myself and for posterity. If you have any comments on what I've done, or suggestions for better ways of doing things, please chime in!

I'm setting up my dev box with Oracle 8.16, the newest Postgres, the newest OpenACS (I don't think 4.6.1 is out yet, so I'll go with 4.6), and the venerable ACS 3.4.10+, which we're still using, but which I'm working on getting ported to OpenACS. I'm not sure yet which Aolserver to install to support both the older ACS and the newer OpenACS. I'm thinking to go with the old Aolserver 3.3+ad13. Would a newer version work?

First of all, I'm installing RedHat Linux 8.0 instead of 7.2. We'll see how that goes..

RedHat 8.0 installation

  • Language selection: English
  • Keyboard configuration: US English
  • Mouse configuration: 3 button (PS/2)
  • Installation type: Custom
  • Disk partitioning: Automatically partition (if this was a production server, I wonder if I should do it a different way? I never know how much to give to each partition, though..)
  • The disk had a previous Linux partition, so I removed it.
  • Boot loader: nothing special
  • Network configuration: I set it up with a manual hostname: myworkstation.bread.com. (I actually used something else). I'm not sure this is a good idea, because we don't have any DNS record for that. But it is internal, so perhaps this is okay?
  • Firewall: opened up a few other ports for https and etc..
  • Additional language support: None.
  • Time zone selection: select Los Angeles, changed UTC offset to US Pacific (why isn't this done automatically when I select Los Angeles?) Checked use daylight savings time.
  • Account configuration: added in root password, and user account(s)
  • Authentication Configuration: left as is
  • Package Group Selection: selected X Windows, Gnome, Editors, Graphical Internet, Text-based Internet, Office-productivitiy, Authoring and Publishing, Graphics, Server configuration tools, Developmental Tools, Administrative Tools, System Tools, Printing Support. I went in and took out a few things that seemed unnecessary in these categories. Of course, on a production server, I'd have done as little as possible.
  • Hmmm, at this point, Linux totally bombed. The error I saw is GnomeCanvas-CRITICAL **: file gnome-canvas-path-def.c: line 1142 (gnome_canvas_path_def_any_closed): assertion `path != NULL' failed. all processed all terminated, and I have to reboot the system. Looks like I have to start over. Any suggestions?
  • I search Google, and some people have had similar problems, but nobody says a solution. Go to RedHat, and it appears that they have shut down their support forums, so searching through there isn't an option (why the heck would they shut that down. Mailing lists are the only option, but they aren't searchable.) I'm going to start over, but if anybody has run into this problem before, I'd appreciate your advice! 😊
Collapse
Posted by Jade Rubick on
Well, this reinstall seems to be working. So nevermind about the last error. Apparently I disabled a package that shouldn't have been disabled, and the error handling was crappy.

More notes to follow...

Collapse
Posted by Jade Rubick on
I just saw Don's posting where he suggests using Postgres 7.2.3. Okay.

RedHat 8.0 installation continued

  • Make boot disk
  • Monitor Configuration
  • Customize Graphics Workstation - changed login type to text
  • Congratulations, my Linux installation is complete!
  • Eject CD and boot disk, restart
Redhat 8.0 updates
  • Log in as root
  • up2date -u
  • Oops, up comes a configuration option. Oh yeah, I guess I have to register with RHN (again). Unfortunately, I can't see the first 8 options (bad interface). It says I need to import the RH key.
  • rpm --import /usr/share/rhn/RPM-GPG-KEY
  • up2date -u
  • Red Hat Network Registration comes up. I fill everything out.
  • After registration, it downloads all the RPMs. This will take a while.
  • Then update the kernel: up2date -dfi kernel
Setting up Oracle 8.1.6
  • Following installation docs.
  • su -
  • groupadd dba
  • groupadd oinstall
  • groupadd oracle
  • useradd -g dba -G oinstall,oracle -m oracle
  • passwd oracle
  • mkdir /ora8
  • cd /ora8
  • mkdir -p m01 m02 m03/oradata/ora8
  • chown -R oracle.dba /ora8
  • su - oracle
  • Added the lines in to .bash_profile, changing 8.1.7 to 8.1.6
  • exit
  • su - oracle
  • env | grep ORA Looks good.
  • echo $PATH Looks good.
  • I log out and log back in as Oracle. startx
  • cd /tmp/Oracle8iR2/
  • ./runInstaller I didn't have the problem some RedHat 8.0 people are supposed to have. It came up fine.
  • File locations, clicked next
  • UNIX group name: typed in oinstall, clicked next.
  • In a new window: su -
  • cd /ora8/m01/app/oracle/product/8.1.6
  • ./orainstRoot.sh
  • mkdir -p /usr/local/java
  • Clicked retry.
  • Available products: clicked Oracle8i Enterprise Edition 8.1.6.1.0 note: I used Standard Edition before, but I can't seem to find the disk for it. Oracle told me (IIRC) that as long as I don't use the Enterprise Edition features, that's okay. Click next.
  • Installation types: custom
  • Available Product Components: default + "Oracle SQLJ 8.1.7.0," "Oracle Protocol Support 8.1.7.0.0," and "Linux Documentation 8.1.7.0.0".
  • Component locations: clicked next
  • Privileged Operating System Groups: next
  • Authentication methods, Choose JDK both didn't show up as according to directions. Probably because this is 8.1.6.1 instead of 8.1.7
  • Create database: No
  • Oracle product support doesn't show up.
  • Summary screen: click INSTALL. Now I take a break.
Collapse
Posted by Talli Somekh on
Rather than use up2date, which is nice but only if you pay for it, try apt-rpm:

APT-RPM is a port of Debian's apt tools to a RPM based distribution (Red Hat, Conectiva, SuSE etc). apt-get is an advanced package management utility front-end which allows you to easily perform package installation, upgrading and removal. Dependencies are automatically handled, so if you try to install a package that needs others to be installed, it will download all needed packages and install them.

talli

Collapse
Posted by Jade Rubick on
Continuing with Oracle install
  • su - oracle
  • /ora8/m01/app/oracle/product/8.1.6/root.sh
  • Press return
  • Click okay on popup window.
  • Seems like it's taking forever for the Net8 Configuration assistant to come up... Hitting stop doesn't seem to stop it from being "in progress...". I waited a few minutes, and the Net8 Configuration assistant still did not come up. Humph. This is the kind of thing I hate about installing Oracle. I kill the Net8 process, and the installer let's be Retry. So I hit Retry. I wait a minute or two. It doesn't seem to be working. Grr.. I think a couple of years ago (on Linux 6.2) a similar thing happened to me, and I went into the log and figured out exactly what command was being executed for the Net8 assistant, and I typed it in from the command line. I'll try that now.
  • cd /ora8/m01/app/oracle/oraInventory/logs
  • less installActions.log Go to the end
  • The last line should show what the command is.
  • Type in that command at the command line. But quit the Oracle installer first.
  • Voila! The Net8 Configuration Assistant appears!
  • Next
  • Directory Serving Access: No
  • Listener Name: next
  • Select protocols: next
  • Port number: next
  • More listeners: No
  • Listener config: Next
  • Naming methods: Next
  • Click finish. Yeah, we're done!
Setting up database
  • Downloaded the patch for Redhat 8 from Oracle site.
  • cd $ORACLE_HOME
  • tar xzf /tmp/glibc2.1.3-stubs.gz (not tgz)
  • ./setup_stubs Relinking the executables takes a long time.. Okay it is done.
  • dbassist
  • Welcome screen: next
  • Type of database: Custom
  • Type of application: Multipurpose
  • Concurrent users: 60
  • Mode: dedicated server mode
  • Options: next
  • Global database name: ora8, SID ora8
  • Control file: next
  • Rollback tab: size 150MB, Temporary tab: size 150MB
  • Redo log sizes to 10000 each
  • Checkpoint: next
  • Processes->100, block size->4096
  • Trace file: next
  • Save file to shell script
  • It did NOT automatically give the right name, so I had to navigate to the /ora8/m01/app/oracle/product/8.1.6/assistants/dbca/jlib/ and type in the filename as sqlora8.ora
  • Edit the file in emacs as per the instructions, adding in nls_date_format and changing the number of open cursors.
  • Shut down X
  • I logged out and back in, just for fun.
  • cd /ora8/m01/app/oracle/product/8.1.6/assistants/dbca/jlib
  • ./sqlora8.sh
  • I'm getting a million ORA-03114: not connected to ORACLE errors. This doesn't seem good. Control-C doesn't break it. Hmm, logged in as another Oracle user and killed the process.
  • I'm going to restart just to be paranoid.
  • ./sqlora8.sh
  • Again I get the same errors. This seems to be identical to the problem that Michael is having. Any suggestions?
Collapse
Posted by Janine Ohmer on
Jade,

Just for grins, try installing the glibc patch again, and then rerunning the script to create the database.  I got lots of 3113 errors when I hadn't done it, which is awfully close to what you're getting.

To prevent the runaway process, look at sqlora8.sh and then manually run just the first script (I forget the name).  That way if it fails, it won't take off on you.  Just remember this:  once you get it to work, you have to comment that line out of sqlora8.sh - you can't run the script twice!

Collapse
Posted by Jade Rubick on
Janine, thank you for the help!!!! 😊 Hmmm, I hope this patch actually works on 8.1.6.... Oh, and I also never did the original i386-glibc21-linux-env.sh or export LD_ASSUME_KERNEL=2.2.5 when I ran the Oracle installer.

Installing the glibc patch again

  • cd $ORACLE_HOME
  • tar xzf /tmp/glibc2.1.3-stubs.gz
  • ./setup_stubs I didn't notice any error messages.
  • I'm going through the dbassist process again.
  • When I get to the part where you enter the Global Database Name (ora8) and SID (ora8), it returns an error window: The Oracle system identifier ora8 already exists. Specify another SID.

Question #1: Should I do something to clear our the ora8 that's already there, or should I type something else in?

Question #2: I have a copy of the entire /ora8 directory from my production box that was copied from last night while the database was shut down. Can I just copy that over the /ora8 directory on this production box, and be ready to go?

Collapse
Posted by Janine Ohmer on
Oops.  You don't need to run dbassist again.  What I meant was to reinstall the patch, which is the tar and the ./setup_stubs, and then go right back to trying to run sqlora8.sh.  All dbassist is doing is creating the set of scripts, which you already have.

You could, possibly, copy over /ora8.  If you can't get this to work it's worth a try.  But if this isn't working then something is wrong, and it would be better to find it now.  That's my theory, anyway. :)

Collapse
Posted by Jade Rubick on
Attempt to get around creating a database
  • sftp to my production box, download a copy of /ora8 directory
  • su -
  • mv /ora8 /ora8.bkup
  • Untar the /ora8 tar file.
  • Hmm, maybe now it will work?
  • Open an window as oracle,
  • sqlplus internal
  • SQL> startup
  • SQL> exit
  • That did seem to work. I'm now able to log in to sqlplus as the user and password combination for my ACS installation.
It seems like a cop-out, however. I'm not sure what I'd recommend for someone else in the same situation.

It's taken me almost all day just to install Oracle and Linux. I better continue on, before I have to leave work.

Collapse
Posted by Don Baccus on
You've put the wrong spin on it, Jade ... you actually managed to install Oracle on a recent Linux distribution in just one day!
Collapse
Posted by Jade Rubick on
Good point, Don 😊 I guess practice makes perfect. I think I've installed Oracle about 10 times now, most of it a couple of years ago, when it was truly a horrific experience. I think it will be interesting to compare my Oracle install with my Postgres install. (Rolling up the sleeves).

I'm installing both ACS 3.4 and OpenACS 4.6 on this computer. The ACS uses Oracle, the OpenACS installation will use Postgres. I figure I might as well do all my porting at once..

Finish up Oracle install

  • Downloaded acceptance test
  • cp /tmp/acceptance-sql.txt /tmp/acceptance.sql
  • svrmgrl
  • SVRMGR> connect internal
  • SVRMGR> startup
  • SVRMGR> exit
  • sqlplus system/manager This doesn't work, because I copied the /ora8 directory, hence the username and password have already been changed. So I ignore the next few lines.
  • SQL> select sysdate from dual;
  • SQL> @ /tmp/acceptance.sql
  • SQL> exit
  • cd /tmp
  • wget https://openacs.org/doc/openacs-4/files/dbstart.txt
  • cp /tmp/dbstart.txt /ora8/m01/app/oracle/product/8.1.6/bin/dbstart
  • chmod 755 /ora8/m01/app/oracle/product/8.1.6/bin/dbstart
  • I edited the /etc/oratab file, set N to Y.
  • wget https://openacs.org/doc/openacs-4/files/oracle8i.txt
  • (as root) cp /tmp/oracle8i.txt /etc/rc.d/init.d/oracle8i
  • chown root.root /etc/rc.d/init.d/oracle8i
  • chmod 700 /etc/rc.d/init.d/oracle8i
  • I had to edit the oracle8i file and change 8.1.7 to 8.1.6
  • I tested the script and it works.
  • cd /etc/rc.d/init.d
  • chkconfig --add oracle8i
  • chkconfig --list oracle8i
  • su - oracle
  • Downloaded the three scripts.
  • Copied them to /ora8/m01/app/oracle/product/8.1.6/bin/ and chmod them to 700.
  • exit
  • cp /tmp/listener8i.txt /etc/rc.d/init.d/listener8i
  • chmod 700 listener8i
  • When I tested the listener8i script, it didn't work, because I am using Oracle 8.1.6. I had to edit each of the scripts and change 8.1.7 to 8.1.6.
  • I started the listener back up, and then tested it out, per the directions. Seems to work fine.
  • chkconfig --add listener8i
  • chkconfig --list listener8i
  • shutdown -r now

Installing Postgres

  • Downloaded Postgres 7.2.3
  • cd /usr/local/src
  • tar xzf /tmp/postgresql-7.2.3.tar.gz
  • groupadd web
  • useradd -g web -d /usr/local/pgsql postgres
  • passwd postgres
  • su - postgres
  • edited my .bash_profile
  • exit
  • su - postgres
  • echo $PATH (looks good)
  • Oops I forgot to add in the directories and everything...
  • (as root) mkdir -p /usr/local/pgsql
  • chown -R postgres.web /usr/local/pgsql /usr/local/src/postgresql-7.2.3/
  • su - postgres
  • cd /usr/local/src/postgresql-7.2.3/
  • ./configure
  • make all
  • make install
  • cd contribut/tsearch
  • make
  • make install
  • cd
  • /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
  • /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l /usr/local/pgsql/data/server.log start
  • I think I'll create another user instead of joeuser, I'll call it joeuser here though.
  • (as root) useradd -g web joeuser
  • (as postgres) createlang plpgsql tempate1
  • createlang -l template1
  • createuser joeuser y and y
  • Ran through the mytestdb tests. Works fine.
  • wget https://openacs.org/doc/openacs-4/files/postgresql.txt
  • su -
  • cp /tmp/postgresql.txt /etc/rc.d/init.d/postgresql
  • chown root.root /etc/rc.d/init.d/postgresql
  • chmod 700 /etc/rc.d/init.d/postgresql
  • /etc/rc.d/init.d/postgresql stop
  • chkconfig --add postgresql
  • We're done installing Postgres. I think it took less than an hour, compared to most of yesterday for Oracle...
Collapse
Posted by Jade Rubick on
Installing Aolserver 3.3+ad13

  • su - joeuser
  • cd /tmp
  • wget http://uptime.openacs.org/aolserver-openacs/aolserver3.3ad13-oacs1-beta-src.tar.gz
  • exit
  • cd /usr/local/src
  • tar xzf /tmp/aolserver3.3ad13-oacs1-beta-src.tar.gz
  • chown -R root.root aolserver
  • edited joeuser .bash_profile, added in both Oracle and Postgres sections.
  • rpm -qa | grep libxml2 looks like I don't need to install libxml2
  • su -
  • mkdir -p /usr/local/aolserver
  • cd /usr/local/src/aolserver
  • ./conf-clean
  • echo "both" > conf-db
  • Edited the pgdriver/makefile
  • ./conf
  • I look at all the compliation logs, and it looks like the oracle driver wasn't built correctly. Maybe it's because I need to specify whether I'm using make or gmake? Or perhaps it was because the ORACLE_HOME variable wasn't set?
  • export ORACLE_HOME=/ora8/m01/app/oracle/product/8.1.6
  • ./conf
  • It seems to have worked this time. So the problem was that ORACLE_HOME wasn't set correctly.
  • cd /usr/local/aolserver
  • chown -R root.web log servers
  • chmod -R g+w log servers
  • ./bin/nsd -t sample.config.tcl -u nobody -g web
  • It seems to be working.
  • Aolserver is installed!
Collapse
Posted by Jade Rubick on
  • sftp to place where I put the cvsweb tar file, and download it.
  • su -
  • cd /
  • tar xzf /tmp/cvsweb.tar.gz
  • chown -R joeuser.web /cvsroot
  • chgrp -R web /cvsroot
  • So the repository is there, but is it working? I go to the production box, as root:
  • cd /web/myservicename/
  • chgrp -R web /web
  • su - joeuser
  • env |grep CVS shows CVSROOT=:ext:devcomputer:/cvsweb
  • devcomputer is aliased to my IP address in /etc/hosts
  • cd /web/myservicename/
  • cvs update readme.txt
  • It asks for my password, but then it hangs... Hmmm, a permissions problem? Here's what I get when I type in cvs -t update readme.txt
    -> main loop with CVSROOT:=ext:dev:/cvsweb
    -> Starting server: ssh devcomputer cvs server
    joeuser@devcomputer's password:
    S-> Reader_Lock(/cvsweb/intranet)
    S-> Lock_Cleanup()
    S-> Lock_Cleanup()
    
  • I'm not really a CVS guru. Let's see if I can look this up on Google... Okay, I'm not finding anything. Has anybody else encountered this problem?
Collapse
Posted by Janine Ohmer on
try

export CVS_RSH=ssh

(you may need to adjust for your shell;  this works in bash)

I think that will do it.  It tells CVS to use ssh to access your repository.

Collapse
Posted by Jade Rubick on
I went back and checked all my CVS environmental variable:
CVSEDITOR=emacs
CVS_RSH=ssh
CSVROOT=:ext:devcomputer:/cvsweb
The problem still seems to be occuring. Any other suggestions? I tried changing the permissions on the file directly, and even opening it up completely doesn't seem to work.

I'm using the same user name on both computers. Is there anything I need to do to set up the CVS daemon on my developmental computer? I don't remember if I did it before..

Collapse
Posted by Jeff Davis on
the CVSROOT variable is ignored if you already have a
checkout.  In that case it looks in CVS/Root to find
the repository, so you should check that it is right there.
Collapse
17: CVS reinstall troubles (response to 16)
Posted by Jade Rubick on
Thanks, Jeff. I think you may be on to something, although it's not completely fixed yet. Under /web/myservicename/CVS/Root on the production computer, the value is :ext:dev:/cvsweb, just like CVSROOT. However...

The cvs repository is on my dev computer. If I login as joeuser on the production computer and do:

cvs co servicename
All my code is checked out of the repository on the dev computer.

Back on production:

cd servicename
rm readme.txt
cvs update readme.txt
joeuser@devcomputer's password:
U readme.txt
However, it hangs at U readme.txt

I hate to bug you all with this, but I really do appreciate the help. I'm doing my best to find resources on the net as well.

Collapse
Posted by Jade Rubick on
According to this page: http://mail.gnu.org/archive/html/info-cvs/2002-12/msg00015.html, there is a bug or incompatibility in the cvs 1.11.2 server (which ships by default on Redhat 8) that causes this problem. It is related to compression. Apparently, if I disable compression, it should work. So, again on the production computer.
cd
rm -rf myservicename
cvs co myservicename
cd myservicename
rm readme.txt
cvs -z0 update readme.txt
However, I get the same problem as before. It freezes after showing U readme.txt
Collapse
Posted by Jade Rubick on
I figured out the source of the problem. If you look at this page, it suggests that using older versions of ssh with a newer server can cause this problem. That seems to be the case.

Strangely, however, the workaround seems to be use use the trace option (-t). For example:

cvs -t update readme.txt
works.

I'm going to ignore this problem for now, since I have a workaround. On to more interesting things:

Getting ACS 3.4.10 up again

  • su - joeuser
  • download the openacs4.tcl.txt configuration file. I'm not sure if this will work with ACS 3.4, but I'd like to try it. I edit it.
  • Hmm, looks like I didn't install the nsd-oracle and nsd-postgres scripts.
  • cd /tmp
  • wget https://openacs.org/openacs-4/files/nsd-oracle.txt
  • wget https://openacs.org/openacs-4/files/nsd-postgres.txt
  • su -
  • cd /usr/local/aolserver/bin
  • cp /tmp/nsd-oracle.txt ./nsd-oracle
  • cp /tmp/nsd-postgres.txt ./nsd-postgres
  • chmod 750 nsd-oracle
  • chmod 755 nsd-postgres Now, why does Postgres need different permissions? Hmm, it looks like nsd-oracle doesn't run from joeuser unless the permissions are 755. So I set them that way. Any security problems with that?
  • exit
  • /usr/local/aolserver/bin/nsd-oracle -t ~/web/myservicename/myservicename.tcl I get an error saying that no log directory exists. Yes, that's true, I better add it in. mkdir web/myservicename/log
  • I get these errors:

    Warning: modload: failed to load '/usr/local/aolserver/bin/ora8.so': 'libclntsh.so.8.0: cannot open shared object file: No such file or directory'
    Error: dbdrv: failed to load driver 'ora8'
    Error: dbinit: no such default pool 'pool1'
    Debug: dbinit: no configured pools

    That doesn't look good. Permissions are root.root on the aolserver bin and lib directories..

  • su -
  • cd /usr/local/aolserver
  • chgrp web bin lib
  • exit
  • killall nsd
  • /usr/local/aolserver/bin/nsd-oracle -t ~/web/myservicename/myservicename.tcl
  • That didn't seem to work. Same problem as before. So I change the groups back. Trying the same command as root doesn't work either:
  • /usr/local/aolserver/bin/nsd-oracle -t ~/web/myservicename/myservicename.tcl -u joeuser -g web
  • I see at this website that this is a sign that LD_LIBRARY_PATH is incorrect. And what do you know? Looking at nsd-oracle, it sure it. So I edit in and change 8.1.7 to 8.1.6
  • It seems like it might be working... Nope. In the log it says it failed to have permission to listen on 0.0.0.0, which I set it for. So I set the port back to 8000 instead of 80, and now...
  • Error: /tcl/user-group-defs.tcl: function ug_serve_group_pages: first element in url_list is not [ad_parameter GroupsDirectory ug]
  • I had to add two lines under ns/parameters in myservicename.tcl:
    ns_param user joeuser
    ns_param auxconfigdir ${serverroot}/parameters
    
    This is ACS 3.4, so that file is necessary. Now it seems to be working fine.
  • I set up daemontools. It was even easier than I thought it would be to set up.
  • For some reason, I wasn't able to get the run script to work unless I changed the user from nobody to joeuser. I'm certain that's not as good an option security-wise...
  • ACS is now functioning fine. I'll install OpenACS later, maybe next week or so.
Collapse
Posted by Jade Rubick on
Setting up OpenACS