
|
|
Server System Administration |
| Installation and maintenance of a LON-CAPA server.
| |
| Subcategories:
Answers in this category: | |
| [New Answer in "Server System Administration"] | |
|
|
CVS |
| CVS
| |
| Subcategories:
Answers in this category: | |
| [New Answer in "CVS "] | |
|
|
CVS info |
|
(All examples below assume your cvs checkout is in /somewhere/loncapa) Send an e-mail to helpdesk@lon-capa.org to request a username for the CVS repository, if you want to be able to checkout the LON-CAPA code, and do not already have a username assigned. Accessing the repositoryNote: LON-CAPA CVS location changed October 22, 2008 to: source.lon-capa.org:/home/cvsUse the following commands to set-up access to CVS via ssh. $ export CVS_RSH=ssh $ export CVSROOT=:ext:USERNAME@source.lon-capa.org:/home/cvs(replacing USERNAME with your username on the cvs server). If you checked out your local copy of the repository from the old CVS server, (i.e., before October 22, 2008), you will need to change the contents of CVS/Root in each subdirectory. (You need only do this once, when you first switch from the old hostname to the new one). Change to the top level directory for the repository (i.e, the one which contains: loncom, rat, doc, capa, modules) $ cd /somewhere/loncapathen use the following (all on one line)
$ find . -name Root -exec perl -p -i -e "s/zaphod\.lite\.msu\.edu/source.lon-capa.org/" {} \;
to make the change recursively to use of the new location.
Prior to mid-May 2008, authentication with a cvs login to the LON-CAPA CVS repository on the old server was possible using the pserver command. export CVSROOT=:pserver:USERNAME@zaphod.lite.msu.edu:/home/cvs cvs login(replacing USERNAME with your username on the cvs server). As of May 14, 2008, remote access to the CVS repository (i.e., from outside the MSU network) using pserver authentication was no longer available. Furthermore, pserver authentication is no longer available for access from anywhere following migration to the new server on October 28, 2008. If you have a local copy of the cvs repository which you checked out prior to May 14, 2008 you will need to switch the method stored in CVS/Root in each directory in your local copy of the repository from :pserver to :ext (see below). The "cvs login" command (which relies on pserver) is no longer supported for remote connections; instead ssh will be used to authenticate. Each time you use a CVS command, e.g., cvs update -d -A to update your repository, you will be prompted to enter your password (which will be communicated to the CVS server via ssh). As noted above, for a local repository created prior to May 2008, it is necessary to change the contents of CVS/Root in each subdirectory. (You need only do this once, when you first switch from using pserver to using ssh). Change to the top level directory for the repository (i.e, the one which contains: loncom, rat, doc, capa, modules) $ cd /somewhere/loncapathen use the following:
$ find . -name Root -exec perl -p -i -e "s/pserver/ext/" {} \;
to make the change to use :ext recursively.
Updating the repositoryTo update a repository to have the files marked STABLE do this:$ cd /somewhere/loncapa $ cvs update -d -r STABLEIt is expected that all production machines will be using this. To change a repository to have the latest (and maybe greatest versions) do this: $ cd /somewhere/loncapa $ cvs update -d -AIt is expected that all developers to be using this. If you have updated a repository to the Latest (and as it turns out not so great) version, doing: $ cd /somewhere/loncapa $ cvs update -d -r STABLEWill take you back to the STABLE version. A refresher on how to upgrade your machine: export CVS_RSH=ssh export CVSROOT=:ext:USERNAME@source.lon-capa.org:/home/cvs cd loncapa cvs update -d -r STABLE cd loncom/build su make install make configinstall /etc/rc.d/init.d/httpd restart /etc/rc.d/init.d/loncontrol restart Using a public keyThe downside to using ssh for remote authentication in place of pserver is that you will be prompted to enter your password each time you issue a cvs command.A solution to this is to use $ ssh-keygen -t dsato generate public and private keys in ~/.ssh/ Send the public key (id_dsa.pub) to helpdesk@lon-capa.org so it can be added to the appropriate authorized_keys file on source.lon-capa.org If you have any problems or questions please contact me. -- Stuart Raeburn helpdesk@lon-capa.org | |
| [Append to This Answer] | |
|
|
How do I install LON-CAPA? |
Installation instructions are maintained at http://install.lon-capa.org/docs/install/index.html. | |
| [Append to This Answer] | |
|
|
What hardware does LON-CAPA require? |
Hardware Recommendation ----------------------- For full-time, classroom usage, an adequate LON-CAPA server should be/have: * a multiprocessor machine, * a CPU speed of 1 gigahertz, * a gigabyte of memory, * and at least 40 to 80 gigabytes of hard disk space. A lesser machine can be used for toying around with LON-CAPA (LON-CAPA will run for a single user on most any machine). LON-CAPA servers experience significant peaks of activity before a homework submission deadline. To support these critical peaks of activity, it is strongly advised that LON-CAPA machines fit the above recommendation. If thousands of students start accessing the box as a web server... well you may want to consider more options. The design of the LON-CAPA system is to naturally and transparently load-balance on multiple computer clusters. So, a simple solution for running an entire college campus is to just have an adequate plurality of LON-CAPA servers rather than a single, particularly monstrous server. We like to think of high web server usage as "a good problem" though.. :) More Information on Hardware and System Administration ------------------------------------------------------ I find that LON-CAPA works nicely (for development purposes) on a Pentium II, 20 gigabytes of hard-disk space, 256M RAM, and 400MHz. The consensus is though, that this may only be adequate for a class of a dozen students. If you are making a serious investment, we suggest you join our mailing list by visiting http://mail.lon-capa.org/mailman/listinfo/lon-capa-admin By posting to this mailing list, you can learn about what solutions have worked for others. We support Linux OS. LON-CAPA has been shown to work on Debian, Mandrake, and RedHat. Instructions are based on RedHat-centric installs. Given the current level of new LON-CAPA feature requests and frequency of new software versions, we suggest that you stick with RedHat to reduce high-frequency system administration overhead. | |
| [Append to This Answer] | |
|
|
What should I never do? |
| NEVER EVER EVER install the
LON-CAPA-setup rpm on a running system.
| |
| [Append to This Answer] | |
|
|
What are the links to check out how my system is running? |
http://MACHINENAME/lon-status/index.html http://MACHINENAME/lon-status/filestatus.html (CVS-> make statuspost) http://MACHINENAME/lon-status/rpmstatus.html (CVS-> make rpmstatuspost) | |
| [Append to This Answer] | |
|
|
Can reducing the number of servers in hosts.tab increase efficiency of my server? |
No. The network connections (lonc/lond) created by hosts.tab place a very low load on the server which does not greatly interfere with memory usage and the CPU rate. The only potential efficiency problem that might result is the introduction of poorly configured/updated LON-CAPA machines in the network (bad lonc/lond software)--causing servers to have their Apache web server children wait on various network request (the Apache child will go on with life, but it is inefficient while it is waiting to timeout the lonc/lond connection). There is great importance attached to this issue right now. The research and development arm of LON-CAPA is currently implementing these further solutions: * lonc/lond connections are dynamically brought up and down based off of the timeout field and the maximum number of connections fields in hosts.tab * the upgrade process will test the lonc/lond layer * hosts.tab will be automatically updated and with this automatic update, there will be testing of the lonc/lond connections | |
| [Append to This Answer] | |
|
|
How do I SAFELY upgrade from RedHat 6.2 to RedHat 7.2? |
You should only upgrade from RedHat 6.2 to RedHat 7.2 if you
are an experienced Linux System Administrator.
1. Backing up
2. Upgrade to RedHat 7.2
3. Secure your machine
4. Download stable LON-CAPA release
5. Check the status of your RPMs
6. Additional RPMs to download
7. Recheck the status of your RPMs
8. Updating your kernel
9. Install LON-CAPA
10. Set up MySQL and systemperl.
##################
# 1. Backing up. #
##################
There are two things that you must, by all costs, save.
**** All the files in the /home directory.
(NOTE: You will not be able to save the
/home/httpd/sockets directory)
**** Your machine's configuration.
I recommend you print out:
/etc/hostname
/etc/hosts
/etc/resolv.conf
/etc/httpd/conf/access.conf
/etc/httpd/conf/loncapa.conf
and any other files described at http://install.lon-capa.org/reconfig/.
############################
# 2. Upgrade to RedHat 7.2 #
############################
Here are two helpful links:
http://www.redhat.com/docs/manuals/linux/RHL-7.2-Manual/install-guide/
http://www.redhat.com/docs/manuals/linux/RHL-7.2-Manual/pdf/rhl-ig-x86-en-72.pdf
##########################
# 3. Secure your machine #
##########################
Do the following:
echo "ALL: PARANOID" > /etc/hosts.deny
Make any other modifications to your /etc/hosts.allow and /etc/hosts.deny.
The next goal is to update all of your
RPMs as quickly as possible (to avoid
a network break-in. Ideally, you
would not be connected to the network
and would have downloaded/burned onto CD-R's
the contents of:
ftp://mirror.pa.msu.edu/linux/redhat/linux/updates/7.2/en/os/i386
ftp://mirror.pa.msu.edu/linux/redhat/linux/updates/7.2/en/os/i486
ftp://mirror.pa.msu.edu/linux/redhat/linux/updates/7.2/en/os/i586
ftp://mirror.pa.msu.edu/linux/redhat/linux/updates/7.2/en/os/i686
ftp://mirror.pa.msu.edu/linux/redhat/linux/updates/7.2/en/os/noarch
Otherwise, you need to first ethernet configure
your computer.
#######################################
# 4. Download stable LON-CAPA release #
#######################################
This is still done with CVS. Please consult:
http://install.lon-capa.org/docs_old/cvsupgrade/
####################################
# 5. Check the status of your RPMs #
####################################
cd loncapa/loncom/build
perl check-rpms -ftp
mirror.pa.msu.edu/linux/redhat/linux/updates/7.2/en/os/ -d
/home/user/install --no-kernel --download
cd /home/user/install
rpm -Uvh *.rpm
should be a fairly straight shot
(you may need a few more additional RPMs from
ftp://mirror.pa.msu.edu/linux/redhat/redhat-7.2-en/os/i386/RedHat/RPMS/.)
##################################
# 6. Additional RPMs to download #
##################################
Compare the RPMs on your system (rpm -qa) with
loncapa/doc/otherfiles/rpm_list.txt
######################################
# 7. Recheck the status of your RPMs #
######################################
Recheck the status of your RPMs
one more time.
perl check-rpms -ftp
mirror.pa.msu.edu/linux/redhat/linux/updates/7.2/en/os/ -d
/home/user/install --no-kernel --download
###########################
# 8. Updating your kernel #
###########################
Follow the instructions at:
http://www.redhat.com/support/resources/howto/kernel-upgrade/
Note: If you fail with the kernel update, you will have to:
* insert a RedHat 7.2 Disc #1
* Type "linux rescue" at the boot prompt
* and try to make fixes onto the filesystem
#######################
# 9. Install LON-CAPA #
######################
Please see http://install.lon-capa.org/; especially
http://install.lon-capa.org/docs_old/cvsupgrade/
The goal is to run:
make install
###################################
# 10. Set up MySQL and systemperl #
###################################
See loncapa/doc/how_to_install_on_RedHat7.2.txt
| |
| [Append to This Answer] | |
|
|
RedHat 7.2 install is missing files lib_perl.so, libncurses.so, etc. |
To find out what RPMs correspond with the missing files libncurses, libreadline, libperl.so, you can often do a google search, for instance "rpm libncurses.so" will tell you to try the ncurses4 or ncurses RPM. libreadline is either the readline or readline2 rpm. libperl.so is part of the mod_perl rpm. All these rpms are available at: ftp://mirror.pa.msu.edu/linux/redhat/redhat-7.2-en/os/i386/RedHat/RPMS/ | |
| [Append to This Answer] | |
|
|
How do I configure the MySQL server? |
lonSqlAccess inside loncapa_apache.conf should always be set to value 'localhostkey' This is the password for www@localhost on the MySQL database as described in the instructions below. RedHat 7.* requires these RPMs: * mysql-3.23.41-1 (or standard RedHat 7.* version) * mysql-server-3.23.41 (or standard RedHat 7.* version) RedHat 6.* requires the RPM: * LON-CAPA-mysql available at http://install.lon-capa.org/3.1/latestRPMS/. DUE TO COMPATIBILITY PROBLEMS, PLEASE DO NOT USE RPMs FROM OTHER SOURCES SUCH AS www.mysql.com. Enter the mysql shell--- (use one of the following two commands) bash$ mysql -u root mysql bash$ mysql -u root -p mysql Run these commands--- mysql> CREATE DATABASE loncapa; mysql> INSERT INTO user (Host, User, Password) mysql> VALUES ('localhost','www',password('localhostkey')); mysql> GRANT ALL PRIVILEGES ON *.* TO www@localhost; mysql> FLUSH PRIVILEGES; mysql> SET PASSWORD FOR root@localhost=PASSWORD('new_password'); If you need to change the www@localhost password, then bash$ mysql -u root -p mysql mysql> SET PASSWORD FOR www@localhost=PASSWORD('localhostkey'); | |
| [Append to This Answer] | |
|
|
When I restart the web server, there are errors about missing perl files? What can be done? |
This is most likely due to missing files that are supposed to be inside the /usr/lib/perl5 directory tree. You can refresh your /usr/lib/perl5 directory tree (and make sure it is up to date with everything LON-CAPA needs) by 1) Going to http://install.lon-capa.org/3.1/latestRPMS/ 2) Downloading LON-CAPA-systemperl-*.*-1.i386.rpm if you are on RedHat 6.* or LON-CAPA-systemperl-*.*-rh72.i386.rpm if you are on RedHat 7.* 3) Install the files with the 'rpm' command: rpm -Uvh --nodeps --force LON-CAPA-systemperl-*.i386.rpm *** Debian users only, see below *** You should consult CVS:doc/otherfiles/perl_modules.txt and manually install needed perl modules from http://www.cpan.org/. | |
| [Append to This Answer] | |
|
|
What is a LON-CAPA domain? |
| A LON-CAPA domain is a collection of load-balancing institutional machines forming a cluster of LON-CAPA servers. It has nothing to do with the many other meanings for the word "domain", such as "domain names" like "loncapa.org", or Windows file server domains. If you are installing a LON-CAPA server for testing purposes, it is safe to create your own domain name for testing. You should ask the person running a real domain before adding your computer to their domain. | |
| [Append to This Answer] | |
|
|
What are all of the LON-CAPA configuration values? Expiration Cache Time? Server Load? Machine ID? LON-CAPA Domain? |
LON Host ID ("Machine Name")
is an internal ID within the LON-CAPA network used to specify
the uniqueness of a particular LON-CAPA server.
LON System Administrator E-Mail
specifies the e-mail address of an institutional member
responsible for direct upkeep of this server.
LON Domain ("Domain Name")
is a unique internal identifier within the LON-CAPA network
specific to the home institution;
A LON-CAPA domain is a collection of load-balancing institutional
machines forming a cluster of LON-CAPA servers. It has nothing to
do with the many other meanings for the word "domain", such as
"domain names" like "loncapa.org", or Windows file server domains.
If you are installing a LON-CAPA server for testing purposes,
it is safe to create your own domain name for testing. You should
ask the person running a real domain before adding your computer
to their domain.
LON Load Limit ("Server Load")
specifies a threshold of activity within The LearningOnline
Network that this machine should provide. We strongly recommend
a value of 2.00. Depending on processor architecture (dual processor),
this value may be increased, but there is no readily available
measure in this regard.
Cache Expiration Time
indicates, in seconds, how long distributed resources should be
held in the server's cache when not being accessed by students,
instructors, or any other class of user. | |
| [Append to This Answer] | |
|
|
What ports does a LON-CAPA system need open? |
| LON-CAPA requires that ports 5663, 8080 and 80 be open in order for
loncapa to work. 5663 is used to implement a TCP/IP courseware management trafficking layer on the distributed network system (educational resource data is passed, user information is handled, etc). 8080, necessary for logging in, is used to deliver auxiliary web content (e.g. icons). 80 is used for standard http data. While you can probably alter 80 to another port, 8080 and 5663 are currently hard-coded. Whereas 5663 is the uniform standard across all other LON-CAPA servers, it is unchangeable. You probably want port 22 (ssh) open. You may also wish to open other ports for nfs/samba etc. | |
| Leaving port 25 open, would also be a good idea as we plan for Lon-CAPA to receive email in the future.
| |
| [Append to This Answer] | |
|
|
RedHat 8.0 Tips |
| I (sharrison@users.sourceforge.net) do not currently plan
a specific set of instructions and customized installation
for RedHat 8.0. I am, however, working
on RedHat 8.0 in order to prepare for the future (e.g. RedHat
8.1, 8.2, or 8.3).
For more information, please visit:
http://bugs.lon-capa.org/show_bug.cgi?id=856 | |
| [Append to This Answer] | |
|
|
New Item |
| [Append to This Answer] | |
|
|
How can I tell if load-balancing is working between the servers listed in /home/httpd/lonTabs/spare.tab? |
| Overload the machine and then try logging in. You should end up on a different machine. This might be done (on a server which is not currently in production demand) by changing the server load parameter which, when exceeded, will trigger the attempt to use an alternate server. To change the server load which will trigger load balancing to another server adjust the following parameter /etc/httpd/conf/loncapa.confPerlSetVar lonLoadLim 2.00 2 is default, could be higher on a busy library server. Set it low to test out load balancing. (After changing tha loncapa.conf lonLoadLim parameter, you will need to restart httpd) batchelo@sfu.ca | |
| Subcategories:
Answers in this category:
| |
| [New Answer in " How can I tell if load-balancing is working between the servers listed in /home/httpd/lonTabs/spare.tab?"] | |
|
|
How Transparent is Load-balancing to the users? |
| Nearly transparent.
If they log-in to one server and it decides it is overloaded, it will ask the other servers for their load measures. If an alternate server isn't overloaded, the only change the student should notice is that the URL is now changed. Otherwise everything should look and act the same. Load balancing is done when logging in and at no other time. Once logged in the user does not shift between machines. batchelo@sfu.ca | |
| [Append to This Answer] |
| Previous: |
|
| Next: |
|
| ||||||||||||