Ms4
ArielGlenn (Talk | contribs) (→Web server set up) |
ArielGlenn (Talk | contribs) (→Web server set up) |
||
| Line 24: | Line 24: | ||
ln -s ../init.d/webserver7 S75webserver7 | ln -s ../init.d/webserver7 S75webserver7 | ||
| − | The new services management system under Solaris 10 uses svcs but this is a legacy app so it uses scripts in init.d. You should have a look at the scripts bin/startserv and bin/stopserv because they may, depending on how the webserver was installed, contain a lot of cruft about SERVER_FMRI, SERVER_SVC_START_CMD, SERVER_SVC_STOP_CMD without there actually being an svc instance for the webserver. You can toss that junk. If you don't, the script will claim to succeed but actually no webserver will start. | + | The new services management system under Solaris 10 uses svcs but this is a legacy app so it uses scripts in init.d. You should have a look at the scripts bin/startserv and bin/stopserv because they may, depending on how the webserver was installed, contain a lot of cruft about SERVER_FMRI, SERVER_SVC_START_CMD, SERVER_SVC_STOP_CMD without there actually being an svc instance for the webserver. Run svcs -a to see if there is an instance (probably not). You can toss that junk. If you don't, the script will claim to succeed but actually no webserver will start. |
(If someone has the info on how to add the legacy scripts to svcs... and whether we want that... please add it here. It seems to want an xml file in /var/svc/manifest, couldn't find one to steal from; how is it running on ms1??) | (If someone has the info on how to add the legacy scripts to svcs... and whether we want that... please add it here. It seems to want an xml file in /var/svc/manifest, couldn't find one to steal from; how is it running on ms1??) | ||
Revision as of 18:57, 19 August 2009
Ms4 is a Sun something-or-other. I'll put more information in here soon.
Ms4 is going to be our primary server for thumbnails. Currently it servers some of them; the filesystem is nfs-mounted on the apaches and on ms1, and some of the thumb directories on the ms1 share are sym links to the ms4 locations.
Web server set up
We are running the Sun Java Web Server 7. To get this:
- Make sure you have a login at sunsolve (I wonder if you need this); you can create it for free.
- One the left where it says "Change Contract" click that, and add our contract number. You are supposed to log out and log back in for it to take effect.
- Go to Sun and download the software. We just need the plain web server, not all the rest. To do this, click through to the point where you actually click to download; when the download starts, interrupt it, right click on the link in the page to copy it and then use wget on ms4 to retrieve the file. (Uploading it form the office is going to be too slow.) The session token is only good for a few minutes.
- Install info: [1]. In a nutshell: unpack the tarball someplace convenient for you, cd into the directory and run ./setup --console
- The install root will be /opt/webserver7, hostname ms4, port 80, runtime id apache, /export/thumbs for the document root.
If you need to go fool with the configuration later, the file you want is server.xml and it's in /opt/webserver7/https-ms4/config.
If you wind up copying the /opt/webserver7/https-*/config files to another host, you will have to move the directory to reflect the new hostname and then edit all of the scripts under /opt/webserver7/https-*/bin to change the hostname as well. If you're not using /export/thumbs on the new host, edit that too. Also, edit /opt/webserver7/https-*/config/server.xml to change the hostname there. You may also need to tweak /opt/webserver7/https-*/obj.conf to change directory paths and so on.
Copies of the config files are on /home/wikipedia/conf/webserver7 in the directory with the hostname. (It would be nice to have a repo!)
If you need the web server to start on boot and you didn't specify it at install time, you're going to go looking for /etc/init.d/webserver7 and it won't be there. Steal one from another Sun box running Solaris (if anyone knows the right way, please add it here :-P) Then cd into /etc/rc2.d and
ln -s ../init.d/webserver7 K05webserver7
and cd into /etc/rc3.d and
ln -s ../init.d/webserver7 S75webserver7
The new services management system under Solaris 10 uses svcs but this is a legacy app so it uses scripts in init.d. You should have a look at the scripts bin/startserv and bin/stopserv because they may, depending on how the webserver was installed, contain a lot of cruft about SERVER_FMRI, SERVER_SVC_START_CMD, SERVER_SVC_STOP_CMD without there actually being an svc instance for the webserver. Run svcs -a to see if there is an instance (probably not). You can toss that junk. If you don't, the script will claim to succeed but actually no webserver will start.
(If someone has the info on how to add the legacy scripts to svcs... and whether we want that... please add it here. It seems to want an xml file in /var/svc/manifest, couldn't find one to steal from; how is it running on ms1??)
changing config files
If you wind up editing the config files on a running instance of the webserver, you don't kill -HUP to get it to reread the config files. Instead, you run /opt/webserver7/https-servername/bin/reconfig ro force the reread.
This doesn't work in all cases; see [2] (primarily if you touch certain things in the server.xml file). In this case you will have to /etc/init.d/webserver7 restart (hrd stop and restart of the server).
More info:
- [3]: Sun FAQ on installing