dspacedbrewritecond

rewritecond  时间:2021-01-11  阅读:()
InstallingDSpaceonFreeBSD1Beforewestart2Requiredsofware3Configurationrollercoaster3.
1Configuresystem3.
2ConfigurePostgreSQL3.
3ConfigureJAVA3.
4ConfigureTomcat3.
5ConfigureApache4InstallDspace5Handle6Cleanupanddaemonsstartup7Finalnotes1BeforewestartTomcatrunsas"www"bydefaultandifoundabiteasiertorundspaceunder"www"usertoo.
IfYoudecidedtocreate"dspace"userthenpayattentiontofilesystempermissions.
Using"www"maynotbegoodideawhenserverisaccessiblebyanyotheruser(s)thansystemadministrator(s).
IfYouliketorundspaceonport80/443,you'llneedApachewebserver.
Tomcatitselfusesonportssomewhere8000.
.
.
9000.
Sincedspacedoesnotcomefromports,there'snoexactorgoodplaceforit.
Thinksomethingout.
Solarisoftenuses"/opt"or"/export".
Youmaycreatethosemountpoints.
Ithougtthat"/data"isfinetoputmostofdspacerelatedstuffthere.
Youcancreatemountpoint"/dspace"butidon'tthinkit'sagoodideatoputdspacesoftwaredirectlytomointpoint.
I'sbettertohavedspaceinsomekindsub-directory(eg/mntpnt/dspace).
Alsoavoidconstructionlike/dspace/dspace,whichisjustconfusing.
Idecidedtocreatesliceslikethat:tcsh#df-h-tufsFilesystemSizeUsedAvailCapacityMountedon/dev/da0s1a1.
9G489M1.
3G27%//dev/da0s1d496M84K456M0%/tmp/dev/da0s1e1.
4G826M537M61%/usr/local/dev/da0s1f1.
9G160M1.
6G9%/vartcsh#df-h-tzfsFilesystemSizeUsedAvailCapacityMountedondata63G2.
1G60G3%/data/usr/srcand/usr/portsaremountedfromNFSserverifneeded.
IfYouneedthosetoo,thenchangeparitionsizesaccordinglyandmaybeuseseparatemountpointfor"/usr"insteadof"/usr/local".
"/data"isseconddisk.
However-layoutaboveshouldgivepicturehowmuchrequiredsoftwareusesdiskspace.
NB!
Beextremelycarefulifusingcopy-paste!
Alsonotethatwikipagemayeatsomespecificchars.
2RequiredsofwareInstalltheminthatorder.
Youcanfindthemfrom/usr/ports.
lang/perl5.
14lang/python27www/apache22databases/postgresql91-server[databases/postgresql91-contrib>/etc/fstabtcsh#zpoolcreatedata/dev/da1Sinceweuse"www"usertorundspace,weneedtoprovideworkingshellandhomeforit.
Butlet'salsotightenaccess.
tcsh#grepAllowGroups/etc/ssh/sshd_configAllowGroupswheeltcsh#mkdir/var/log/apache2tcsh#chownwww/var/log/apache2tcsh#mkdir-p/data/home/wwwtcsh#pwusermodwww-d/data/home/wwwtcsh#echo"exit">/data/home/www/.
logintcsh#chsh-s/bin/shwwwSeveralscriptsfromdspaceareusing"/bin/bash".
Tomakethemhappy:tcsh#ln-s/usr/local/bin/bash/bin/bash3.
2ConfigurePostgreSQLtcsh#echo'postgresql_enable="YES"'>>/etc/rc.
conftcsh#echo'postgresql_data="/data/pgsql"'>>/etc/rc.
conftcsh#mkdir/data/pgsqltcsh#chown-Rpgsql:pgsql/data/pgsql/tcsh#/usr/local/etc/rc.
d/postgresqlinitdbBydefaultPostgreSQLuses"local0",butifYouareusingpffirewallloggingalso,thenchangeto"local3"forexampletoavoidmessinguplogs.
tcsh#egrep"listen|syslog_facility"/data/pgsql/postgresql.
conflisten_addresses='localhost'syslog_facility='LOCAL3'tcsh#egrep-v"#|"^$/data/pgsql/pg_hba.
conflocalallpgsqltrusthostdspacedbdspace127.
0.
0.
1/32md5Startdatabaseengineandcreatedatabaseuser"dspace":tcsh#/usr/local/etc/rc.
d/postgresqlstarttcsh#createuser-Upgsql-S-d-R-Pdspace#-S=--no-superuser#-d=userwillbeallowedtocreatedatabases#-R=--no-createrole#-Pcreateuserwillissueapromptforthepasswordortcsh#createuser-Upgsql-PdspaceEnterpasswordfornewrole:s0mepwEnteritagain:s0mepwShallthenewrolebeasuperuser(y/n)nShallthenewrolebeallowedtocreatedatabases(y/n)yShallthenewrolebeallowedtocreatemorenewroles(y/n)nCreatedatabasecalled"dspacedb":tcsh#createdb-Upgsql-Odspace-EUNICODEdspacedb3.
3ConfigureJAVAtcsh#echo"JAVA_HOME=/usr/local/openjdk6/">>/usr/local/etc/javavm_opts.
confFollowingaffectsonlycommandsfromshell.
IftheydifferMakesurethatbothparameters(-Xmxand-Xms)dohavesamevalueandatleast512m!
and/orarelessthan512,thenYoumayencounterproblemslateronifusing"antupdate"(ifupgradingdspace).
tcsh#echo'JAVA_OPTS="-Xmx512m-Xms512m"'>>/usr/local/etc/javavm_opts.
conf3.
4ConfigureTomcatOpenfilewithYourfavoritevi.
Locaterelevantlinesandupdatetobe:/usr/local/apache-tomcat-7.
0/conf/server.
xmlNB!
PayattentiontoUTF!
Onceagainifoundmorereasonablenottocopy(orsymlink)webappstotomcatappBasedirassuggestsdspaceofficialdocumentation.
Insteadi'mchangintomcatappBasetopointtodspacewebapps.
Alsoputtomcatlogswithotherwww/apachelogs.
Originallinesarecommentedoutandmylinesmarkedbold.
-->Finallyconfigureworker:tcsh#grep-v"#"/usr/local/etc/apache22/workers.
propertiesworker.
list=localhost-workerworker.
localhost-worker.
port=8009worker.
localhost-worker.
host=localhostworker.
localhost-worker.
type=ajp13worker.
localhost-worker.
lbfactor=13.
5ConfigureApacheSomelinesareomittedfromoutput.
Alsoconfigure"apache22/extra/httpd-mpm.
conf"and"httpd-default.
conf"tosuitYou.
Alsodon'tforgetapachecertificates.
tcsh#egrep-v"#|"^$/usr/local/etc/apache22/httpd.
conf/*/LoadModulerewrite_modulelibexec/apache22/mod_rewrite.
soLoadModulejk_modulelibexec/apache22/mod_jk.
so/*/ErrorLog"/var/log/apache2/httpd-error.
log"/*/CustomLog"|/usr/local/sbin/rotatelogs-l/var/log/apache2/httpd-access_%Y-%m-%d.
log86400"combined/*/Includeetc/apache22/extra/httpd-mpm.
confIncludeetc/apache22/extra/httpd-default.
confIncludeetc/apache22/extra/httpd-ssl.
conf/*/Includeetc/apache22/Includes/*.
confNameVirtualHost*:80#relativepathto/usr/localJkWorkersFileetc/apache22/workers.
propertiesJkShmFile/var/run/jk-runtime-statusJkLogLevelerrorJkLogFile/var/log/apache2/mod_jk.
logServerNamedspace.
example.
comDocumentRoot/usr/local/www/apache22/dataJkMount/xmluilocalhost-workerJkMount/xmlui/*localhost-workerJkMount/solrlocalhost-workerJkMount/solr/*localhost-workerJkMount/oailocalhost-workerJkMount/oai/*localhost-workerRewriteEngineOnRewriteRule^/$/xmlui/[PT]RewriteRule^/$/solr/[PT]RewriteRule^/$/oai/[PT]RewriteCondhttp://%{HTTP_HOST}%{REQUEST_URI}(.
*)-login(.
*)[OR]RewriteCondhttp://%{HTTP_HOST}%{REQUEST_URI}(.
*)/register(.
*)[OR]RewriteCondhttp://%{HTTP_HOST}%{REQUEST_URI}(.
*)/forgot(.
*)RewriteRule(.
*)https://%{HTTP_HOST}%{REQUEST_URI}#CustomLog"|/usr/local/sbin/rotatelogs-l/var/log/apache2/dspace.
example.
com-access-%Y-%m-%d.
log86400"combinedErrorLog/var/log/apache2/dspace.
example.
com-error.
logtcsh#egrep-v"#|"^$/usr/local/etc/apache22/extra/httpd-ssl.
confListen443/*/ServerNamedspace.
example.
com:443ServerAdminhostmaster@example.
comDocumentRoot"/usr/local/www/apache22/data"JkMount/xmluilocalhost-workerJkMount/xmlui/*localhost-workerJkMount/solrlocalhost-workerJkMount/solr/*localhost-workerJkMount/oailocalhost-workerJkMount/oai/*localhost-workerRewriteEngineOnRewriteRule^/$/xmlui/[PT]RewriteRule^/$/solr/[PT]RewriteRule^/$/oai/[PT]ErrorLog"|/usr/local/sbin/rotatelogs/var/log/apache2/https-error-%Y-%m-%d.
log5M"TransferLog"|/usr/local/sbin/rotatelogs/var/log/apache2/https-access-%Y-%m-%d.
log86400"/*/SSLCertificateFile"/usr/local/etc/apache22/certs/dspace.
example.
com.
crt"SSLCertificateKeyFile"/usr/local/etc/apache22/certs/dspace.
example.
com.
key"SSLCertificateChainFile"/usr/local/etc/apache22/certs/dspace-bundle.
example.
com.
crt"/*/SSLOptions+StdEnvVars+ExportCertData4InstallDspacetcsh#mkdir/data/dspacetcsh#cd/data*http://sourceforge.
net/projects/dspace/files/DSpace%20Stable/1.
8.
1/dspace-1.
8.
1-src-release.
tar.
gztcsh#fetch-odspace-1.
8.
1-src-release.
tar.
gz/download\*(http://sourceforge.
net/projects/dspace/files/DSpace%20Stable/1.
8.
1/dspace-1.
8.
1-src-release.
tar.
gz/download*)tcsh#tarxzfdspace-1.
8.
1-src-release.
tar.
gztcsh#cd/data/dspace-1.
8.
1-src-release/dspace/config/ConfigurewhateverauthenticationYouneed.
InfollowingexampledspaceisconfiguredtouseLDAP.
tcsh#egrep-v"#|"^$modules/authentication.
cfgplugin.
sequence.
org.
dspace.
authenticate.
AuthenticationMethod=org.
dspace.
authenticate.
LDAPHierarchicalAuthenticationOpen/data/dspace-1.
8.
1-src-release/dspace/config/andmakeYourchanges:dspace.
cfgdspace.
dir=/data/dspacedspace.
hostname=dspace.
example.
comdspace.
baseUrl=http://dspace.
example.
comdspace.
url=${dspace.
baseUrl}/xmluidspace.
name=DspaceatExample.
Comdb.
name=postgresdb.
url=jdbc:postgresql://localhost:5432/dspacedbdb.
driver=org.
postgresql.
Driverdb.
username=dspacedb.
password=s0mepwdb.
maxconnections=30db.
maxwait=5000db.
maxidle=-1db.
statementpool=truemail.
server=smtp.
example.
commail.
server.
port=25mail.
from.
address=dspace-noreply@example.
comfeedback.
recipient=dspace-help@example.
commail.
admin=dspace-help@example.
comalert.
recipient=postmaster@example.
comregistration.
notify=dspace-help@example.
commail.
charset=UTF-8mail.
allowed.
referrers=localhost,dspace.
example.
commail.
server.
disabled=falsedefault.
language=en_USassetstore.
dir=${dspace.
dir}/assetstorelog.
init.
config=${dspace.
dir}/config/log4j.
propertieslog.
dir=/var/log/apache2/search.
dir=${dspace.
dir}/search/*/handle.
canonical.
prefix=http://hdl.
handle.
net/handle.
prefix=12345handle.
dir=${dspace.
dir}/handle-server/*/upload.
max=536870912default.
locale=enxmlui.
supported.
locales=enxmlui.
force.
ssl=truexmlui.
user.
registration=falseConfigureLDAPmodule.
Asi'mwritingitsnotpossibletoconfiguremultipleldapserversinordertoachievefailover(eg.
ldap://ldapserver1ldapserver2/blahblah).
tcsh#egrep-v"#|"^$modules/authentication-ldap.
cfgenable=trueautoregister=trueprovider_url=ldaps://myldap.
example.
com/id_field=uidobject_context=ou=people,dc=example,dc=comsearch_context=ou=people,dc=example,dc=comemail_field=mailsurname_field=sngivenname_field=givenNamephone_field=telephoneNumbersearch_scope=2search.
user=cn=ldap-bind,cn=Users,dc=example,dc=comsearch.
password=s0mepw2netid_email_domain=@example.
comAsYoucansee,i'musingLDAPS.
We'llbebacktoitlateron.
Followingcommandfetchessoftwarefrominternetinordertobuilddspace.
Thissoftwillbeplacedunder$HOME/.
m2/directory.
Inmycase/root/.
m2/.
IfYouwantto,Youcanbuilddspaceas"www"user.
I'mdoingitasroot.
tcsh#/data/dspace-1.
8.
1-src-releasetcsh#mvnpackagetcsh#cd/data/dspace-1.
8.
1-src-release/dspace/target/dspace-1.
8.
1-build/tcsh#antfresh_installAslookingfrommynotestherewasanissuewithcreatingPostgreSQLdatabase(PL/pgSQLrelated).
Seemsthatfollowinghelpedout.
However-ican'tverifyorconfirmitatthemoment.
tcsh#dropdb-Upgsqldspacedbtcsh#createdb-Upgsql-Odspace-EUNICODEdspacedbtcsh#psql-hlocalhost-Udspace-f/data/dspace-1.
8.
1-src-release/dspace/etc/postgres/database_schema.
sqldspacedbAndfinallysetproperpermissons:tcsh#chown-Rwww:www/data/dspaceJustincaseverify/data/dspace/config/log4j.
propertiesdoesn'tbugYou.
Removeunneeded"/"Theremaybe3erraticlineslikethisone:/var/log/apache2//cocoon.
logAlsoverifythatandarecorrect.
/data/dspace/config/modules/authentication.
cfgauthentication-ldap.
cfgSinceiliketokeepalldspacerelatedthingsinoneplaceandihaveprettysmall/usr/local:tcsh#mkdir-p/data/dspace/tc-webinf/work/upload-dirtcsh#mkdir-p/data/dspace/tc-webinf/work/cache-dirtcsh#chown-Rwww:www/data/dspace/tc-webinftcsh#grepdspace/data/dspace/webapps/xmlui/WEB-INF/cocoon/properties/core.
propertiesorg.
apache.
cocoon.
uploads.
directory=/data/dspace/tc-webinf/work/upload-dirorg.
apache.
cocoon.
cache.
directory=/data/dspace/tc-webinf/work/cache-dirorg.
apache.
cocoon.
work.
directory=/data/dspace/tc-webinf/work/Don'tforgetthisoneifYouupgradedYourdspace-cocoonmayfill/usr/local.
Ifneeded,configureOAIalso::/data/dspace/config/oaicat.
properties/*/Crosswalks.
mods=org.
dspace.
app.
oai.
PluginCrosswalkCrosswalks.
mets=org.
dspace.
app.
oai.
PluginCrosswalkCrosswalks.
qdc=org.
dspace.
app.
oai.
PluginCrosswalkSetupcrontabs.
PATHisrequired.
dspace~#crontab-l-uwww#dspacewwwcrontabPATH=/data/dspace/bin:/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin#Sendoutsubscriptione-mailsat01:00everyday01***/data/dspace/bin/dspacesub-daily#Runthemediafilterat02:00everyday02***/data/dspace/bin/dspacefilter-media>/dev/null2>&1#Runthechecksumcheckerat03:0003***/data/dspace/bin/dspacechecker-lp>/dev/null2>&1#Mailtheresultstothesysadminat04:0004***/data/dspace/bin/dspacechecker-emailer-c>/dev/null2>&1#Runstatanalysis01***/data/dspace/bin/dspacestat-general01***/data/dspace/bin/dspacestat-monthly02***/data/dspace/bin/dspacestat-report-general02***/data/dspace/bin/dspacestat-report-monthlyNowinstallcertificatesrequiredtouseLDAPS.
MakesurethatYouhaveJAVA_HOMEset:tcsh#setJAVA_HOME=/usr/local/openjdk6tcsh#echo$JAVA_HOME/usr/local/openjdk6tcsh#keytool-import-file/tmp/myldap-clients.
example.
com.
crt-aliasmyldap.
example.
com-keystore$JAVA_HOME/jre/lib/security/cacertsEnterkeystorepassword:'changeit'>/var/log/apache2/catalina-`date+%Y-%m-%d`.
log2>&1"tomcat7_catalina_tmpdir="/tmp"handle_server_enable="YES"postgresql_enable="YES"postgresql_data="/data/pgsql"tcsh#sync;sync;reboot7FinalnotesIfYoushouldlateronupgrade"openjdk",thenYouneedtoimportLDAPcertificateagain-you'llloseit!
IfYoushouldupgrademod_jkport,thendontforgettouncomment"#LoadModulejk_module.
.
.
.
"line!
Afterdspaceupgradedontforgetcocoon:/data/dspace/webapps/xmlui/WEB-INF/cocoon/properties/core.
propertiesImplementbackupsandmonitoring!
Implementfirewall.
Ifusingpf:WEB_PORTS="{80,443}"HANDLE_PORTS="{2641,8000}"#wwwpassinlogquickon$EXT_IFprototcpfromanytoport$WEB_PORTS#dspacehandleservicepassinlogquickon$EXT_IFprototcpfromanytoport$HANDLE_PORTSMaybeYouneedSSHtoo,butingeneralkeepblocking.
Pleasereadcarefully.
dspacedocumentation

RAKsmart:美国圣何塞服务器限量秒杀$30/月起;美国/韩国/日本站群服务器每月189美元起

RAKsmart怎么样?RAKsmart是一家由华人运营的国外主机商,提供的产品包括独立服务器租用和VPS等,可选数据中心包括美国加州圣何塞、洛杉矶、中国香港、韩国、日本、荷兰等国家和地区数据中心(部分自营),支持使用PayPal、支付宝等付款方式,网站可选中文网页,提供中文客服支持。本月商家继续提供每日限量秒杀服务器月付30.62美元起,除了常规服务器外,商家美国/韩国/日本站群服务器、1-10...

HostYun 新上美国CN2 GIA VPS 月15元

HostYun 商家以前是玩具主机商,这两年好像发展还挺迅速的,有点在要做点事情的味道。在前面也有多次介绍到HostYun商家新增的多款机房方案,价格相对还是比较便宜的。到目前为止,我们可以看到商家提供的VPS主机包括KVM和XEN架构,数据中心可选日本、韩国、香港和美国的多个地区机房,电信双程CN2 GIA线路,香港和日本机房,均为国内直连线路。近期,HostYun上线低价版美国CN2 GIA ...

Virmach($7.2/年)特价机器发放

在八月份的时候有分享到 Virmach 暑期的促销活动有低至年付12美元的便宜VPS主机,这不开学季商家又发布五款年付VPS主机方案,而且是有可以选择七个数据中心。如果我们有需要低价年付便宜VPS主机的可以选择,且最低年付7.2美元(这款目前已经缺货)。这里需要注意的,这次发布的几款便宜年付方案,会在2021年9月30日或者2022年4月39日,分两个时间段会将INTEL CPU迁移至AMD CP...

rewritecond为你推荐
域名备案查询网站备案查询中文域名注册查询域名还分中文和英文的吗,在哪里可以查到中文域名到期了?海外主机美国主机与国内主机有哪些区别国内免费空间国内有没有好的免费空间啊网站空间购买不用备案的网站空间,哪里可以有这样的网站空间购买?香港虚拟主机香港的虚拟主机好不好,如何选择虚拟主机?虚拟主机服务商现在市场上那家服务商的虚拟主机性价比最高?郑州虚拟主机虚拟主机哪个好点,用过的推荐下apache虚拟主机为何apache要配置虚拟主机沈阳虚拟主机为什么修改了虚拟机Vmware的TCP/IP配置以后就上不了网
burstnet 美国主机代购 shopex空间 阿里云代金券 最好的空间 福建天翼加速 建立邮箱 股票老左 tna官网 稳定免费空间 中国电信测速网 酷番云 域名与空间 中国电信测速网站 百度云空间 北京主机托管 asp简介 报警主机 vpn服务器架设 百度空间登陆首页 更多