Windows下Plone安装位置的变更

How to Change Installation Location

The new Plone Windows installer does not allow you to change the installation location when you run the installer. However, it is still possible to install Plone into a different location after the initial installation, albeit via a more manual process. For example, suppose you have installed Plone into C:\Plone41 and after evaluation you want to copy it to a more permanent location, lets say Z:\Plone41-Intranet\.

The good news is that your installation directory, C:\Plone41, is 100% self-contained. There are no external dependencies defined anywhere else. You can simply copy/paste this directory, modify your buildout.cfg file (described below), and rebuild your custom environment. For a production-quality deployment of Plone, you will nearly always need to do this because the default settings for Plone Windows installation are very basic, and intended more for evaluation than for production deployment scenarios.

Here’s a simple example for moving Plone from its default installation directory (C:\Plone41) to a new directory, Z:\Plone41-Intranet

  • Change to Z:\ drive mkdir Plone41-Intranet cd Plone41-Intranet cp C:\Plone41\* .
  • switch to Z:\Plone41-Intranet
  • edit the buildout.cfg file
    • goto [shared] section
    • change user variable to login:password they want to use
    • change the http-address to a unique port, say 9090
    • change the zeo-address to a unique port, say 9999

[shared]user = administrator:s3kr1t
http-address = 9090
zeo-address = 9999
debug-mode = off
verbose-security = off

    • goto [service] section
    • change name variable to “Plone 4.1 Intranet”
      [service]
      recipe = enfold.recipe.winservice:service
      name = Plone 4.1 Intranet
      runzope = run-instance
    • goto [service-zeo] section
    • change name variable to “Plone 4.1 Intranet Database”

[service-zeo]
recipe = enfold.recipe.winservice:service
name = Plone 4.1 Intranet Database
runzope = run-zeo

  • re-build the configuration files
    • bin\buildout.exe
  • now install your new service
    • bin\instance.exe install bin\zeo_service.exe install
  • you can now start your database server service
    • bin\zeo_service.exe start
  • It is always best to start your client/instance in foreground mode. If this fails you a substantial configuration problem or source code mismatch in your system.
    • bin\instance.exe fg

 

Your terminal will be connected to the server. If it says:

“Zope Ready to Serve Requests”

you are good to. Control-C or Break out of it and start the service from services panel or command line

    • bin\instance.exe start


NOTE:
I believe there is a problem with registry and python. Since we *do not* register the python system-wide you will need to have your current working directory as Python. So the command will be as follows:

Z:\Plone41-Intranet> bin\buildout
Z:\Plone41-Intranet> cd python
Z:\Plone41-Intranet\Python> python ..\bin\service.py --startup auto install
Z:\Plone41-Intranet\Python> python ..\bin\service-zeo.py --startup auto install

Building a Custom Windows Installer

The biggest feature of the new installer is the ability to create a custom Windows installers, which you can use or distribute. Previously, building a custom Windows installer required substantial knowledge of how many different sub-systems work together. Now you simply edit the installer.cfg buildout recipe. Re-run buildout with -c installer.cfg and you will get a new Windows installer executable in the current working directory.

More details later. See the “Windows Packaging Details” link below for more information.

References

 

NOTES FOR REVISION OF building custom windows installer

Required SVN, Python 2.6, Innosetup
http://www.jrsoftware.org/isdl.php
Download isetup-5.4.2.exe
Put it in your path
start cmd (as administrator)
test: ISCC and ensure you see it

Grab SDK:
Windows SDK (for Win32 and .NET Framework)
download mt.exe
put it in your path ala
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin
start cmd and ensure its in your path: mt


mkdir isntaller
cd installer
svn co https://svn.enfoldsystems.com/public/plone-packages/plone41-windows-installer/installer.cfg
c:\installer>c:\Python26\python.exe bootstrap.py -c installer.cfg
c:\installer>bin\buildout.exe -c installer.cfg
c:\installer>bin\installer.exe

You will get a buncha errors around mt tools and pyd files; ignore them.

mt.exe : general error c101008c: Failed to read the manifest from the resource o
f file "c:\INSTAL~1\build\plone41\417902~1.2\EXTERN~1.6-S\DLLs\_testcapi.pyd". T
he specified image file did not contain a resource section.

ERROR:build:""C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\mt.EXE" "-
nologo" "-inputresource:c:\INSTAL~1\build\plone41\417902~1.2\EXTERN~1.6-S\DLLs\_
tkinter.pyd;#2" "-out:c:\INSTAL~1\build\plone41\417902~1.2\EXTERN~1.6-S\DLLs\_tk
inter.pyd.manifest"" failed: 31
ERROR:build:Last 100 lines of output:

NOTE:
- If you are building an installer and it fails half way through the build. You will probably have to delete the installation directory and all of the files; and re-run. the build process is not re-entrant (patches accepted).

 

来源:http://plone.org/documentation/kb/plone-4-windows-installer

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值