- 浏览: 39889 次
- 来自: ...
-
最近访客 更多访客>>
最新评论
-
acdc:
gKarerM 写道acdc 写道>> Carbi ...
17th Annual Jolt Award Winners -
sg552:
为啥无ECLIPSE?
17th Annual Jolt Award Winners -
gKarerM:
acdc 写道>> Carbide .c++ Pr ...
17th Annual Jolt Award Winners -
guojiafuzhuxi:
xsddddddddddddd
17th Annual Jolt Award Winners -
gKarerM:
eclipse销声匿迹了?
17th Annual Jolt Award Winners
http://www.plope.com/Books/2_7Edition/InstallingZope.stx
* Installing and Starting Zope
o Downloading Zope
o Installing Zope
+ Installing Zope for Windows With Binaries from Zope.org
+ Compiling and Installing Zope from Source Code
o Starting Zope
o Using Zope With An Existing Webserver
o Starting Zope On Windows
o Starting Zope on UNIX
+ Starting Zope As The Root User
o Your Zope Installation
o Logging In
o Controlling the Zope Process With the Control Panel
o Controlling the Zope Process From the Command Line
o Troubleshooting and Caveats
+ Running zopectl returns with an OSError
+ Browser cannot connect to port 8080
+ Forgot administrative password
o Customizing your Zope instance
# Server stanzas and port-base
# The debug-mode directive
# Additional products directories
# Switch the User the Zope process runs as: effective-user
# Configuring the Session machinery
# Logging
o When All Else Fails
Installing and Starting Zope
By the end of this chapter you should be able to install and start Zope. It is fairly easy to install Zope on most platforms, and it should typically take you no longer than ten minutes.
Downloading Zope
There are typically two types of Zope releases: a "stable" release and a "development" release. If you are new to Zope, you almost certainly want to use the "stable" Zope release.
You may download Zope from the Zope.org web site. The most recent stable and development versions are always available from the Download area of the Zope.org website.
Zope comes as a "binary" release for the Windows platform, and in source format for Unix-like operating systems. Zope may be compiled on almost any Unix-like operating system. Zope has reportedly been successfully compiled on Linux, FreeBSD, NetBSD, OpenBSD, Mac OS X, HPUX, IRIX, DEC OFS/1, and even Cygwin (the UNIX emulation platform for Windows). As a general rule of thumb, if Python is available for your operating system, and you have a C compiler and associated development utilities, then you can probably compile Zope. A notable exception is Mac OS 7/8/9. Zope does not run at all on these platforms.
Various binary Zope packages exist that are not distributed by Zope Corporation, but instead are distributed by third parties. Provided here is a list of URLs to these below for convenience's sake. These packages are not directly supported by Zope Corporation, although Zope Corporation encourages alternate binary distributions for unsupported platforms by third parties. Not all versions of Zope are available for all platforms.
SPVI's Mac OS X binary distro
Marcus Schopens Zope packages for Linux
FreeBSD Zope port
Debian Linux Zope package
Gentoo Zope ebuild
Some other Linux distributions, eg. SUSE, also include Zope with their products. Check your vendors documentation to find out more.
Installing Zope
Zope requires different installation steps depending on your operating system platform. The sections below detail installing the binary version of Zope on Windows on Intel platforms, and a source installation on Linux.
Installing Zope for Windows With Binaries from Zope.org
The "Win32" version of Zope works under Windows 95, Windows 98, Windows ME, Windows NT, Windows 2000, Windows XP and Windows Server 2003. Zope for Windows comes as a self-installing .exe file. To install Zope, first, download the Win32 executable installer from the Download area on Zope.org. It is typically named something like "Zope-2.X.X-win32-x86.exe" where the "X"'s refer to the current Zope version number.
[myimg]upload/download-zope.png[/myimg]
Figure 2-1 Current stable Windows Zope Release
Download the current stable release installer for Windows from Zope.org using your web browser. Place the file in a temporary directory on your hard disk or on your Desktop. Once the installer file has been downloaded, navigate to the folder in which you downloaded the file to, and double-click on the file's icon. The installer then begins to walk you through the installation process.
[myimg]upload/installer-package-icon.png[/myimg]
Figure 2-2 Zope installer
[myimg]upload/installer-first-screen.png[/myimg]
Figure 2-3 Beginning the installer
Click Next. The installer asks for an installation path. The default is usually acceptable, though you are of course free to choose another path. Then click Next. You then can choose which components to install.
[myimg]upload/component-selection.png[/myimg]
Figure 2-4 Select components
You should select "Full installation" unless you know what you are doing. On the next screen, you may customize the entry placed in your Start Menu folder. Click Next again. The installer now asks you wether you would like to run Zope as a service, unless you are running Windows 98 or ME, where services are not available. If you are just running Zope for personal use, don't bother running it as a service.
[myimg]upload/start-as-service.png[/myimg]
Figure 2-5 Server Options
Upon clicking Next, the installer takes you to the "Instance Setup" Screen.
[myimg]upload/instance-path.png[/myimg]
Figure 2-6 Instance Setup
You can have more than one Zope running on your PC, but each has to have its own Instance Home. The Instance Home is the path you have to specify here. This is the path where Zope later will place its database files. Make sure that you have enough disk space left on the specified drive and that you can make backups easily.
The Next screen asks you for a password for an initial administrative account. You use this account to log in for the first time and create more users. Note that the installer does not ask you to verify your password -- be careful not to mis-type your password.
[myimg]upload/instance-passwd.png[/myimg]
Figure 2-7 Administrative password
Click Next after entering a password. The installer presents an overview, commence installation by clicking Install. After a few moments, the Zope installer should present you with a "Completion" screen.
[myimg]upload/installer-complete.png[/myimg]
Figure 2-8 Installation completion
Let the installer start Zope for you, or start Zope manually by navigating to the Zope folder in the Start Menu and selecting "Run Zope in Console". See below in the section entitled "Starting Zope".
Compiling and Installing Zope from Source Code
If binaries aren't available for your platform, chances are good that you will be able to compile Zope from its source code. To do this, however, you first must:
* ensure you have a "C" compiler on your system (GNU gcc is preferred)
* ensure you have a recent "make" on your system (GNU make is preferred)
* install the Python language on your system from source (or install a binary package including development headers)
Zope is written primarily in the Python language, and Zope requires Python to be able to run at all. Though binary versions of Zope ship with a recent Python, the source Zope distribution does not. Although we try to use the most recent Python for Zope, often the latest Python version is more recent than the version we "officially" support for Zope. For the most recent information on which version of Python you need to compile Zope with, see the release notes on the Web page for each version. Zope 2.7 requires Python 2.3.2 or later. Zope versions 2.5 and 2.6 require a Python 2.1 version equal to or greater than 2.1.3.
You can obtain instructions for downloading, compiling and installing Python from source at the Python.org web site. Some Linux distributions ship with a preinstalled Python 2.3, but you need to be careful when attempting to use a vendor-installed Python to compile Zope. Some of these vendor-supplied Python distributions do not ship the necessary Python development files needed to compile Zope from source. Sometimes these development files are included in a separate "python-devel" package that you may install and use, but sometimes they are not. The author has used the binary packages shipping with Debian with success, but in general it is advisable that you compile and install Python from source if you wish to compile and install Zope from source.
After downloading, compiling, and installing Python from source, download the current Zope source distribution. See the Zope.org Downloads area for the latest Zope source release.
Download the source to your home directory. After you have downloaded the source tarball, cd to your home directory and unpack it with something similar to:
$ gunzip -c Zope-2.7.0.tgz | tar xvf -
Zope now uses the conventional UNIX build sequence configure, make, make install.
To configure Zope, cd to the Zope directory and issue the configure command:
$ cd Zope-2.7.0
$ ./configure --prefix=/where/to/install/zope
Replace /where/to/install/zope above with an appropriate path, for instance ~/myzope/zope2.7. This path is referred to as the ZOPE_HOME. If you want to install Zope in a system directory instead of your user home, replace ~/myzope/zope2.7 with an appropriate path, eg. /usr/local/zope2.7 and make sure you have suitable privileges for installing and starting Zope.
If the configure script is unable to find your Python installation, it will report an error not unlike this one:
$ ./configure --prefix=~/myzope/zope2.7
Configuring Zope installation
Testing for an acceptable Python interpreter...
No suitable Python version found. You should install
Python version 2.3.3 before continuing. Versions
2.3.2 2.3.1 2.3 2.2.3 2.2.2 also work, but not as optimally.
In this case, you have to point it to your Python interpreter -- which you should have installed either from a binary package or compiled yourself, see above.
Use the --with-python option to the configure script, eg. for a python living under /usr/local :
$ ./configure --prefix=~/myzope/zope2.7 \\
--with-python=/usr/local/bin/python
Replace /usr/local/bin/python with the path to your Python executable.
Zope is now ready to be built. From within the source directory, issue:
$ make
[ lots of output snipped ]
Zope built. Next, do 'make install' (or 'make instance'
to run a Zope instance directly from the build directory).
You are now ready to install Zope. To do this, you will have to execute make install :
$ make install
[ lots of output snipped ]
Zope binaries installed successfully.
Now run '~/myzope/zope2.7/bin/mkzopeinstance.py'
With the Zope binaries installed, you are now ready to install a Zope instance. A Zope instance holds configuration and runtime data for a single Zope server process. This helps to keep your own or third-party software separate from the main Zope source.
We will assume you want to install a Zope instance in the directory ~/myzope/instance. To create a Zope instance, run the following command:
$ ~/myzope/zope2.7/bin/mkzopeinstance.py
You will need to provide the following values:
* The directory where your instance should be located -- the INSTANCE_HOME. The instance home will hold your database files, log files, the "Extensions" and "Products" directories, configuration files, and scripts to start and stop the instance. For our example, we assume the instance home to be located at ~/myzope/instance
* Username and Password for an initial Zope user. You will log in with this username and password to create your own Zope users. To change the username or password for your initial Zope user, run:
$ cd ~/myzope/instance
$ ~/myzope/zope2.7/bin/zpasswd.py inituser
You will have to provide the username and password you wish to set; optionally, you can specify the hashing method and an additional domain restriction.
Zope installation is now complete. Read on to see how to start your brand new Zope.
Starting Zope
Zope is managed via a web browser, and Zope contains its own web server (named "ZServer"). A successful Zope startup implies that its web server starts, allowing you to access the Zope management interface via your web browser. You can access Zope's management interface from the same machine on which Zope runs, or you can access it from a remote machine that is connected to the same network as your Zope server.
Zope's ZServer will "listen" for HTTP (web browser, or Hypertext Transfer Protocol) requests on TCP port 8080. If your Zope instance fails to start, make sure you don't have another application running which is already using TCP port 8080.
Zope also has the capability to listen on other TCP ports. Zope supports separate TCP ports for FTP (File Transfer Protocol), "monitor" (internal debugging), WebDAV (Web Distributed Authoring and Versioning), and ICP (Internet Cache Protocol) access. If you see messages which indicate that Zope is listening on ports other than the default 8080 HTTP, don't panic, it's likely normal.
Using Zope With An Existing Webserver
If you wish, you can configure your existing web server to serve Zope content. Zope interfaces with Microsoft IIS, Apache, and other popular webservers.
The
Virtual Hosting Services chapter of this book provides rudimentary setup information for configuring Zope behind Apache. However, configuring Zope for use behind an existing webserver can be a complicated task, and there is more than one way to get it done. In the interest of completeness, here are some additional resources which should get you started:
* Apache: see the excellent DevShed article entitled Using Zope With Apache .
* IIS: see brianh's HowTo on using IIS with Zope. Also of interest may be the WEBSERVER.txt file in your Zope installation's doc directory, and hiperlogica's Connecting IIS to Zope article.
If you are just "getting started" with Zope, note that it is not necessary to configure Apache or IIS (or any other webserver) to serve your Zope pages, as Zope comes with its own webserver. You typically only need to configure your existing webserver if you want to use it to serve Zope pages in a production environment.
Starting Zope On Windows
If you installed Zope to "run manually" (as opposed to installing Zope as a "service"), navigate to the Zope folder in your Start Menu and click on Run Zope in Console. A console window with process startup information will be displayed.
If you chose to run Zope as a "service" on Windows NT/2000/XP, you can start Zope via the standard Windows "Services" control panel application. A Zope started as a service writes events to the standard Windows Event Log; you can keep track of when your service starts and stops by reviewing your system's Event Log. A Zope instance which has been installed as a "service" can also be run manually by invoking the Run Zope in Console menu entry as described above. Take care though that you either can run Zope manually or as a service at the same time, so make sure you stop the Zope service if you want to invoke Zope manually.
Starting Zope on UNIX
Important note: If you installed Zope from an RPM or a another "vendor distribution" instead of installing a Zope Corporation-distributed source release, the instructions below may be not be applicable. Under these circumstances, please read the documentation supplied by the vendor to determine how to start your Zope instance instead of relying on the instructions below.
To start your Zope instance (which we assumed to live in ~/myzope/instance) issue:
$ ~/myzope/instance/bin/zopectl start
This will start the instance in the background. Alternatively you can start it in the foreground by issuing:
$ ~/myzope/instance/bin/zopectl fg
Run the zopectl script with a parameter of help to get a list of additional commands:
$ ~/myzope/instance/bin/zopectl help
Starting Zope As The Root User
ZServer (Zope's server) supports setuid() on POSIX systems in order to be able to listen on low ports such as 21 (FTP) and 80 (HTTP) but drop root privileges when running; on most POSIX systems only the root user can do this. Versions of Zope prior to 2.6 had less robust versions of this support. Several problems were corrected for the 2.6 release.
The most important thing to remember about this support is that you don't have to start ZServer as root unless you want to listen for requests on "low" ports. In fact, if you don't have this need, you are much better off just starting ZServer as a user account dedicated to running Zope. nobody is not a good idea for this user account, because if any other daemon on a system that ran as nobody was compromised, this would have opened up your Zope object data to compromise.
If you do need to have ZServer listening on low ports, you will need to start zopectl as the root user, and also specify what user ZServer should setuid() to. Do this by setting the effective-user parameter in your Zope instances configuration file, residing in $INSTANCE_HOME/etc/zope.conf and make sure the log and database files are writeable by this user.
Your Zope Installation
To use and manage Zope, you will need a web browser. Zope's management interface is written entirely in HTML, therefore any browser that understands modern HTML allows you to manage a Zope installation. Mozilla, and any 3.0+ version of Microsoft Internet Explorer or Netscape Navigator will do. Other browsers that are known to work with Zope include Opera, Galeon, Konqueror, OmniWeb, Lynx, and W3M.
Start a web browser on the same machine on which you installed Zope and visit the URL
http://localhost:8080/ . If your Zope is properly installed and you're visiting the correct URL, you will be presented with the Zope "QuickStart" screen.
[myimg]upload/quickstart.png[/myimg]
Figure 2-8 Zope QuickStart
If you see this screen, congratulations! You've installed Zope successfully. If you don't, see the Troubleshooting section below.
Logging In
To do anything remotely interesting with Zope, you need to use its "management interface", also known as the ZMI. Zope is completely web-manageable. To log into the Zope management interface, use your web browser to navigate to Zope's management URL. Assuming you have Zope installed on the same machine from which you are running your web browser, the Zope management URL will be http://localhost:8080/manage.
Successful contact with Zope using this URL will result in an authentication dialog. In this dialog enter the "initial" username and password you chose when you installed Zope. You will be presented with the Zope Management Interface (ZMI).
[myimg]upload/zmi.png[/myimg]
Figure 2-9 The Zope Management Interface.
If you do not see an authentication dialog and the Zope Management interface, refer to the Troubleshooting section of this chapter.
Controlling the Zope Process With the Control Panel
When you are using the ZMI, you can use the Zope Control Panel to control the Zope process. Find and click the Control_Panel object in ZMI.
The Control Panel
Figure 2-10 The Control Panel
The Control Panel displays information about your Zope, such as the Zope version you are running, the Python version that Zope is using, the system platform, the INSTANCE_HOME, the ZOPE_HOME, Zope's process id, the Network Services that have been started, how long Zope has been running for, and other installation specifics. Several buttons and links will also be shown.
If you are running Zope on UNIX or as a service on Windows, you will see a button in the Control Panel named Restart. If you click the Restart button, Zope will shut down and then immediately start up again. It may take Zope a few seconds to come back up and start handling requests. You needn't shut your web browser down and restart it to resume using Zope after pressing Restart, just wait for the Control Panel display to reappear.
To shut Zope down from the ZMI, click the Shutdown button. Shutting Zope down will cause the server to stop handling requests and exit. You will have to manually start Zope to resume using it. Shut Zope down only if you are finished using it and you have the ability to access the server on which Zope is running, so that you can manually restart it later.
Controlling the Zope Process From the Command Line
To stop a manually-run Zope on Windows press "Ctrl-C" while the console window under which Zope is running is selected. To stop a Zope on Windows that was run as a service, find the service with the name you assigned to your Zope installed in the Services Control Panel application and stop the service.
To stop Zope on UNIX, do one of the following:
* press "Ctrl-C" in the terminal window from which you started Zope if you started it in the foreground
* if you started Zope in the background, use the zopectl script:
$ ~/myzope/instance/bin/zopectl stop
* use the UNIX "kill" command against the process id in the "var/Z2.pid" file inside of your Zope instance directory:
$ kill `cat var/Z2.pid`
Troubleshooting and Caveats
Running zopectl returns with an OSError
When running Zope on a 2.6.x Linux kernel, Solaris or MaC OSX, zopectl returns with OSError: [Errno 10] No child processes. This is due to a bug in Zope 2.7.0. You have the following options:
* Install a patch currently in CVS. See http://zope.org/Collectors/Zope/1235 for the collector log and a small patch. The patch file is named zdctl.diff. Download it to a temporary directory, eg. /tmp. Then change to the directory $ZOPE_HOME/lib/python/zdaemon (in our previous examples, this would be ~/myzope/zope2.7/lib/python/zdaemon) and run the patch command: patch < /tmp/zdctl.diff. The patch program should respond with an output like patching file zdctl.py.
* Downgrade to a 2.4.x kernel if you are running Linux.
* Work around this issue by placing Zope in the background manually with:
$ nohup ~/myzope/instance/bin/runzope &
Note though that your Zope instance will not be automatically restarted by zdaemon this way; you probably should not use this workaround on a production server.
Browser cannot connect to port 8080
If your browser fails to connect with anything on TCP port 8080, your Zope may be running on a nonstandard TCP port (for example, some versions of Debian Linux ship with Zope's TCP port as 9673). To find out exactly which URL to use, look at the logging information Zope prints as it starts up when started in the foreground, ie. when started with ./runzope or ./zopectl fg. For example:
------
2004-04-21T21:48:27 INFO(0) ZServer HTTP server started at Wed Apr 21 21:48:27 2004
Hostname: arod
Port: 9673
------
2004-04-21T21:48:27 INFO(0) ZServer FTP server started at Wed Apr 21 21:48:27 2004
Hostname: arod
Port: 8021
...
The first log entry indicates that Zope's web server is listening on port 9673 on host arod. This means that the management URL is http://arod:9673/manage.
As mentioned above, Zope only prints to the console if started in the foreground, with ./runzope or runzope.bat, respectively. The same information can be found in the log/event.log file in your INSTANCE_HOME directory.
Certain versions of Microsoft Internet Explorer 5.0.1 and 5.5 have issues with the Zope management interface which manifest themselves as an inability to properly log in. If you have troubles logging in with IE 5.0.1 or IE 5.5, try a different browser or upgrade IE 6.
Forgot administrative password
If you forget or lose the initial user name and password, shut Zope down and change the initial user password with the zpasswd.py script and restart Zope. See the chapter entitled Users and Security for more information about configuring the initial user account.
Customizing your Zope instance
As of Zope 2.7.0, configuration no longer is done with a mix of environment variables and command line options. Instead, there is a directory etc in your instance home, which contains a zope.conf file where numerous configuration directives can be specified. This scheme greatly enhances manageability and configurability for Zope 2.7.x
The
zope.conf file has extensive inline documentation which we will not reproduce here. We will give an overview and some additional hints for the most widely used directives though.
Server stanzas and port-base
The port-base directive together with the stanzas for the individual servers determine the ports those servers listen on. The stanzas are formed with XML-like constructs:
<http-server>
# valid keys are "address" and "force-connection-close"
address 8080
</http-server>
<ftp-server>
...
</ftp-server>
<webdav-source-server>
...
</webdav-source-server>
The address directive determines the port the respective server listens on. The HTTP Server in this example listens on port 8080.
The port-base directive comes in handy if you want to run several Zope instances on one machine. port-base specifys an offset to the port all servers listens on. Let us assume our HTTP Servers address directive is set to 8080 like in our example above, and port-base is specified as 1000. The actual port the HTTP Server will listen on will be 9080. Assuming the FTP Servers address directive is set to 8021, the FTP Server will then listen on port 9021, and so on.
The debug-mode directive
This directive is a switch, specified as either on or off. When set to on (the default), Zope runs in debug mode. This causes Zope to reload Filesystem-based templates in real time and several other settings suitable for development. You should set this directive to off in a productions environment however.
Additional products directories
One of the most useful directive in the authors opinion. You can specify additional Products directories here, ie. places where Zope looks for (possibly third-party) add-on Zope Products. Two directories come to mind: one for commonly used third-party Products like CookieCrumbler or CMF and Plone packages, which I like to keep in /usr/local/zopeproducts (any directory will do, of course). The benefit is better separation of core Zope Products and third-party Add-Ons. The other directory could be of interest for Zope Product developers, which are able to specify a probably version-controlled development directory with this directive.
Switch the User the Zope process runs as: effective-user
This directive causes Zope to setuid(2) to the specified user when run as root on a Unix system. This benefits security a lot, since a compromised Zope cannot as easily damage a whole system. One motivation for running Zope as root in the first place is to be able to bind to privileged ports (ports with numbers below 1024)
Configuring the Session machinery
Use the maximum-number-of-session-objects directive to limit the number of session objects. This value defaults to 1000 objects; 0 means unlimited.
session-timeout-minutes sets the Session timeout in minutes. The default is 20min.
Logging
Three log facilities are provided: access logging, event logging, and trace logging. Access logging logs individual HTTP Requests in a common format, by default to the file log/Z2.log in your instance home. Event logging logs Zope events, for example start/stop information or debugging messages. The Trace logger logs detailed Zope debugging information.
Each log message has an associated severity level, ranging from CRITICAL, ERROR, WARN, INFO to DEBUG and ALL. You can specify a filter for log messages with the level directive inside a logger stanza. Set the level to ALL to get all log messages, or to ERROR or CRITICAL to see only the most serious messages.
The default is to write the messages to a log file; you can however arrange for log messages to be mailed to you or to go to syslog(3) (on Unix) or the NT event log (on MS Windows)
For further documentation, see the inline comments in zope.conf
When All Else Fails
If there's a problem with your installation that you just cannot seem to solve, do not despair. You have many places to turn for help, including the Zope maillists and the #zope IRC channel.
If you are new to open source software, please realize that, for the most part, participants in the various "free" Zope support forums are volunteers. Though they are typically friendly and helpful, they are not obligated to answer your questions. Therefore, it's in your own self-interest to exercise your best manners in these forums in order to get your problem resolved quickly.
The most reliable way to get installation help is to send a message to the general Zope maillist detailing your installation problem. For more information on the available Zope mailing lists, see the Resources section of Zope.org. Typically someone on the "zope@zope.org" list will be willing to help you solve the problem.
For even more immediate help, you may choose to visit the #zope channel on the OpenProjects IRC (Internet Relay Chat) network. See the OpenProjects website for more information on how to connect to the OpenProjects IRC network.
If you are truly desperate and under a time constraint that prohibits you from utilizing "free" support channels, Zope Corporation provides for-fee service contracts which you can use for Zope installation help. See Zope.com for more information about Zope Corporation service contracts.
* Installing and Starting Zope
o Downloading Zope
o Installing Zope
+ Installing Zope for Windows With Binaries from Zope.org
+ Compiling and Installing Zope from Source Code
o Starting Zope
o Using Zope With An Existing Webserver
o Starting Zope On Windows
o Starting Zope on UNIX
+ Starting Zope As The Root User
o Your Zope Installation
o Logging In
o Controlling the Zope Process With the Control Panel
o Controlling the Zope Process From the Command Line
o Troubleshooting and Caveats
+ Running zopectl returns with an OSError
+ Browser cannot connect to port 8080
+ Forgot administrative password
o Customizing your Zope instance
# Server stanzas and port-base
# The debug-mode directive
# Additional products directories
# Switch the User the Zope process runs as: effective-user
# Configuring the Session machinery
# Logging
o When All Else Fails
Installing and Starting Zope
By the end of this chapter you should be able to install and start Zope. It is fairly easy to install Zope on most platforms, and it should typically take you no longer than ten minutes.
Downloading Zope
There are typically two types of Zope releases: a "stable" release and a "development" release. If you are new to Zope, you almost certainly want to use the "stable" Zope release.
You may download Zope from the Zope.org web site. The most recent stable and development versions are always available from the Download area of the Zope.org website.
Zope comes as a "binary" release for the Windows platform, and in source format for Unix-like operating systems. Zope may be compiled on almost any Unix-like operating system. Zope has reportedly been successfully compiled on Linux, FreeBSD, NetBSD, OpenBSD, Mac OS X, HPUX, IRIX, DEC OFS/1, and even Cygwin (the UNIX emulation platform for Windows). As a general rule of thumb, if Python is available for your operating system, and you have a C compiler and associated development utilities, then you can probably compile Zope. A notable exception is Mac OS 7/8/9. Zope does not run at all on these platforms.
Various binary Zope packages exist that are not distributed by Zope Corporation, but instead are distributed by third parties. Provided here is a list of URLs to these below for convenience's sake. These packages are not directly supported by Zope Corporation, although Zope Corporation encourages alternate binary distributions for unsupported platforms by third parties. Not all versions of Zope are available for all platforms.
SPVI's Mac OS X binary distro
Marcus Schopens Zope packages for Linux
FreeBSD Zope port
Debian Linux Zope package
Gentoo Zope ebuild
Some other Linux distributions, eg. SUSE, also include Zope with their products. Check your vendors documentation to find out more.
Installing Zope
Zope requires different installation steps depending on your operating system platform. The sections below detail installing the binary version of Zope on Windows on Intel platforms, and a source installation on Linux.
Installing Zope for Windows With Binaries from Zope.org
The "Win32" version of Zope works under Windows 95, Windows 98, Windows ME, Windows NT, Windows 2000, Windows XP and Windows Server 2003. Zope for Windows comes as a self-installing .exe file. To install Zope, first, download the Win32 executable installer from the Download area on Zope.org. It is typically named something like "Zope-2.X.X-win32-x86.exe" where the "X"'s refer to the current Zope version number.
[myimg]upload/download-zope.png[/myimg]
Figure 2-1 Current stable Windows Zope Release
Download the current stable release installer for Windows from Zope.org using your web browser. Place the file in a temporary directory on your hard disk or on your Desktop. Once the installer file has been downloaded, navigate to the folder in which you downloaded the file to, and double-click on the file's icon. The installer then begins to walk you through the installation process.
[myimg]upload/installer-package-icon.png[/myimg]
Figure 2-2 Zope installer
[myimg]upload/installer-first-screen.png[/myimg]
Figure 2-3 Beginning the installer
Click Next. The installer asks for an installation path. The default is usually acceptable, though you are of course free to choose another path. Then click Next. You then can choose which components to install.
[myimg]upload/component-selection.png[/myimg]
Figure 2-4 Select components
You should select "Full installation" unless you know what you are doing. On the next screen, you may customize the entry placed in your Start Menu folder. Click Next again. The installer now asks you wether you would like to run Zope as a service, unless you are running Windows 98 or ME, where services are not available. If you are just running Zope for personal use, don't bother running it as a service.
[myimg]upload/start-as-service.png[/myimg]
Figure 2-5 Server Options
Upon clicking Next, the installer takes you to the "Instance Setup" Screen.
[myimg]upload/instance-path.png[/myimg]
Figure 2-6 Instance Setup
You can have more than one Zope running on your PC, but each has to have its own Instance Home. The Instance Home is the path you have to specify here. This is the path where Zope later will place its database files. Make sure that you have enough disk space left on the specified drive and that you can make backups easily.
The Next screen asks you for a password for an initial administrative account. You use this account to log in for the first time and create more users. Note that the installer does not ask you to verify your password -- be careful not to mis-type your password.
[myimg]upload/instance-passwd.png[/myimg]
Figure 2-7 Administrative password
Click Next after entering a password. The installer presents an overview, commence installation by clicking Install. After a few moments, the Zope installer should present you with a "Completion" screen.
[myimg]upload/installer-complete.png[/myimg]
Figure 2-8 Installation completion
Let the installer start Zope for you, or start Zope manually by navigating to the Zope folder in the Start Menu and selecting "Run Zope in Console". See below in the section entitled "Starting Zope".
Compiling and Installing Zope from Source Code
If binaries aren't available for your platform, chances are good that you will be able to compile Zope from its source code. To do this, however, you first must:
* ensure you have a "C" compiler on your system (GNU gcc is preferred)
* ensure you have a recent "make" on your system (GNU make is preferred)
* install the Python language on your system from source (or install a binary package including development headers)
Zope is written primarily in the Python language, and Zope requires Python to be able to run at all. Though binary versions of Zope ship with a recent Python, the source Zope distribution does not. Although we try to use the most recent Python for Zope, often the latest Python version is more recent than the version we "officially" support for Zope. For the most recent information on which version of Python you need to compile Zope with, see the release notes on the Web page for each version. Zope 2.7 requires Python 2.3.2 or later. Zope versions 2.5 and 2.6 require a Python 2.1 version equal to or greater than 2.1.3.
You can obtain instructions for downloading, compiling and installing Python from source at the Python.org web site. Some Linux distributions ship with a preinstalled Python 2.3, but you need to be careful when attempting to use a vendor-installed Python to compile Zope. Some of these vendor-supplied Python distributions do not ship the necessary Python development files needed to compile Zope from source. Sometimes these development files are included in a separate "python-devel" package that you may install and use, but sometimes they are not. The author has used the binary packages shipping with Debian with success, but in general it is advisable that you compile and install Python from source if you wish to compile and install Zope from source.
After downloading, compiling, and installing Python from source, download the current Zope source distribution. See the Zope.org Downloads area for the latest Zope source release.
Download the source to your home directory. After you have downloaded the source tarball, cd to your home directory and unpack it with something similar to:
$ gunzip -c Zope-2.7.0.tgz | tar xvf -
Zope now uses the conventional UNIX build sequence configure, make, make install.
To configure Zope, cd to the Zope directory and issue the configure command:
$ cd Zope-2.7.0
$ ./configure --prefix=/where/to/install/zope
Replace /where/to/install/zope above with an appropriate path, for instance ~/myzope/zope2.7. This path is referred to as the ZOPE_HOME. If you want to install Zope in a system directory instead of your user home, replace ~/myzope/zope2.7 with an appropriate path, eg. /usr/local/zope2.7 and make sure you have suitable privileges for installing and starting Zope.
If the configure script is unable to find your Python installation, it will report an error not unlike this one:
$ ./configure --prefix=~/myzope/zope2.7
Configuring Zope installation
Testing for an acceptable Python interpreter...
No suitable Python version found. You should install
Python version 2.3.3 before continuing. Versions
2.3.2 2.3.1 2.3 2.2.3 2.2.2 also work, but not as optimally.
In this case, you have to point it to your Python interpreter -- which you should have installed either from a binary package or compiled yourself, see above.
Use the --with-python option to the configure script, eg. for a python living under /usr/local :
$ ./configure --prefix=~/myzope/zope2.7 \\
--with-python=/usr/local/bin/python
Replace /usr/local/bin/python with the path to your Python executable.
Zope is now ready to be built. From within the source directory, issue:
$ make
[ lots of output snipped ]
Zope built. Next, do 'make install' (or 'make instance'
to run a Zope instance directly from the build directory).
You are now ready to install Zope. To do this, you will have to execute make install :
$ make install
[ lots of output snipped ]
Zope binaries installed successfully.
Now run '~/myzope/zope2.7/bin/mkzopeinstance.py'
With the Zope binaries installed, you are now ready to install a Zope instance. A Zope instance holds configuration and runtime data for a single Zope server process. This helps to keep your own or third-party software separate from the main Zope source.
We will assume you want to install a Zope instance in the directory ~/myzope/instance. To create a Zope instance, run the following command:
$ ~/myzope/zope2.7/bin/mkzopeinstance.py
You will need to provide the following values:
* The directory where your instance should be located -- the INSTANCE_HOME. The instance home will hold your database files, log files, the "Extensions" and "Products" directories, configuration files, and scripts to start and stop the instance. For our example, we assume the instance home to be located at ~/myzope/instance
* Username and Password for an initial Zope user. You will log in with this username and password to create your own Zope users. To change the username or password for your initial Zope user, run:
$ cd ~/myzope/instance
$ ~/myzope/zope2.7/bin/zpasswd.py inituser
You will have to provide the username and password you wish to set; optionally, you can specify the hashing method and an additional domain restriction.
Zope installation is now complete. Read on to see how to start your brand new Zope.
Starting Zope
Zope is managed via a web browser, and Zope contains its own web server (named "ZServer"). A successful Zope startup implies that its web server starts, allowing you to access the Zope management interface via your web browser. You can access Zope's management interface from the same machine on which Zope runs, or you can access it from a remote machine that is connected to the same network as your Zope server.
Zope's ZServer will "listen" for HTTP (web browser, or Hypertext Transfer Protocol) requests on TCP port 8080. If your Zope instance fails to start, make sure you don't have another application running which is already using TCP port 8080.
Zope also has the capability to listen on other TCP ports. Zope supports separate TCP ports for FTP (File Transfer Protocol), "monitor" (internal debugging), WebDAV (Web Distributed Authoring and Versioning), and ICP (Internet Cache Protocol) access. If you see messages which indicate that Zope is listening on ports other than the default 8080 HTTP, don't panic, it's likely normal.
Using Zope With An Existing Webserver
If you wish, you can configure your existing web server to serve Zope content. Zope interfaces with Microsoft IIS, Apache, and other popular webservers.
The
Virtual Hosting Services chapter of this book provides rudimentary setup information for configuring Zope behind Apache. However, configuring Zope for use behind an existing webserver can be a complicated task, and there is more than one way to get it done. In the interest of completeness, here are some additional resources which should get you started:
* Apache: see the excellent DevShed article entitled Using Zope With Apache .
* IIS: see brianh's HowTo on using IIS with Zope. Also of interest may be the WEBSERVER.txt file in your Zope installation's doc directory, and hiperlogica's Connecting IIS to Zope article.
If you are just "getting started" with Zope, note that it is not necessary to configure Apache or IIS (or any other webserver) to serve your Zope pages, as Zope comes with its own webserver. You typically only need to configure your existing webserver if you want to use it to serve Zope pages in a production environment.
Starting Zope On Windows
If you installed Zope to "run manually" (as opposed to installing Zope as a "service"), navigate to the Zope folder in your Start Menu and click on Run Zope in Console. A console window with process startup information will be displayed.
If you chose to run Zope as a "service" on Windows NT/2000/XP, you can start Zope via the standard Windows "Services" control panel application. A Zope started as a service writes events to the standard Windows Event Log; you can keep track of when your service starts and stops by reviewing your system's Event Log. A Zope instance which has been installed as a "service" can also be run manually by invoking the Run Zope in Console menu entry as described above. Take care though that you either can run Zope manually or as a service at the same time, so make sure you stop the Zope service if you want to invoke Zope manually.
Starting Zope on UNIX
Important note: If you installed Zope from an RPM or a another "vendor distribution" instead of installing a Zope Corporation-distributed source release, the instructions below may be not be applicable. Under these circumstances, please read the documentation supplied by the vendor to determine how to start your Zope instance instead of relying on the instructions below.
To start your Zope instance (which we assumed to live in ~/myzope/instance) issue:
$ ~/myzope/instance/bin/zopectl start
This will start the instance in the background. Alternatively you can start it in the foreground by issuing:
$ ~/myzope/instance/bin/zopectl fg
Run the zopectl script with a parameter of help to get a list of additional commands:
$ ~/myzope/instance/bin/zopectl help
Starting Zope As The Root User
ZServer (Zope's server) supports setuid() on POSIX systems in order to be able to listen on low ports such as 21 (FTP) and 80 (HTTP) but drop root privileges when running; on most POSIX systems only the root user can do this. Versions of Zope prior to 2.6 had less robust versions of this support. Several problems were corrected for the 2.6 release.
The most important thing to remember about this support is that you don't have to start ZServer as root unless you want to listen for requests on "low" ports. In fact, if you don't have this need, you are much better off just starting ZServer as a user account dedicated to running Zope. nobody is not a good idea for this user account, because if any other daemon on a system that ran as nobody was compromised, this would have opened up your Zope object data to compromise.
If you do need to have ZServer listening on low ports, you will need to start zopectl as the root user, and also specify what user ZServer should setuid() to. Do this by setting the effective-user parameter in your Zope instances configuration file, residing in $INSTANCE_HOME/etc/zope.conf and make sure the log and database files are writeable by this user.
Your Zope Installation
To use and manage Zope, you will need a web browser. Zope's management interface is written entirely in HTML, therefore any browser that understands modern HTML allows you to manage a Zope installation. Mozilla, and any 3.0+ version of Microsoft Internet Explorer or Netscape Navigator will do. Other browsers that are known to work with Zope include Opera, Galeon, Konqueror, OmniWeb, Lynx, and W3M.
Start a web browser on the same machine on which you installed Zope and visit the URL
http://localhost:8080/ . If your Zope is properly installed and you're visiting the correct URL, you will be presented with the Zope "QuickStart" screen.
[myimg]upload/quickstart.png[/myimg]
Figure 2-8 Zope QuickStart
If you see this screen, congratulations! You've installed Zope successfully. If you don't, see the Troubleshooting section below.
Logging In
To do anything remotely interesting with Zope, you need to use its "management interface", also known as the ZMI. Zope is completely web-manageable. To log into the Zope management interface, use your web browser to navigate to Zope's management URL. Assuming you have Zope installed on the same machine from which you are running your web browser, the Zope management URL will be http://localhost:8080/manage.
Successful contact with Zope using this URL will result in an authentication dialog. In this dialog enter the "initial" username and password you chose when you installed Zope. You will be presented with the Zope Management Interface (ZMI).
[myimg]upload/zmi.png[/myimg]
Figure 2-9 The Zope Management Interface.
If you do not see an authentication dialog and the Zope Management interface, refer to the Troubleshooting section of this chapter.
Controlling the Zope Process With the Control Panel
When you are using the ZMI, you can use the Zope Control Panel to control the Zope process. Find and click the Control_Panel object in ZMI.
The Control Panel
Figure 2-10 The Control Panel
The Control Panel displays information about your Zope, such as the Zope version you are running, the Python version that Zope is using, the system platform, the INSTANCE_HOME, the ZOPE_HOME, Zope's process id, the Network Services that have been started, how long Zope has been running for, and other installation specifics. Several buttons and links will also be shown.
If you are running Zope on UNIX or as a service on Windows, you will see a button in the Control Panel named Restart. If you click the Restart button, Zope will shut down and then immediately start up again. It may take Zope a few seconds to come back up and start handling requests. You needn't shut your web browser down and restart it to resume using Zope after pressing Restart, just wait for the Control Panel display to reappear.
To shut Zope down from the ZMI, click the Shutdown button. Shutting Zope down will cause the server to stop handling requests and exit. You will have to manually start Zope to resume using it. Shut Zope down only if you are finished using it and you have the ability to access the server on which Zope is running, so that you can manually restart it later.
Controlling the Zope Process From the Command Line
To stop a manually-run Zope on Windows press "Ctrl-C" while the console window under which Zope is running is selected. To stop a Zope on Windows that was run as a service, find the service with the name you assigned to your Zope installed in the Services Control Panel application and stop the service.
To stop Zope on UNIX, do one of the following:
* press "Ctrl-C" in the terminal window from which you started Zope if you started it in the foreground
* if you started Zope in the background, use the zopectl script:
$ ~/myzope/instance/bin/zopectl stop
* use the UNIX "kill" command against the process id in the "var/Z2.pid" file inside of your Zope instance directory:
$ kill `cat var/Z2.pid`
Troubleshooting and Caveats
Running zopectl returns with an OSError
When running Zope on a 2.6.x Linux kernel, Solaris or MaC OSX, zopectl returns with OSError: [Errno 10] No child processes. This is due to a bug in Zope 2.7.0. You have the following options:
* Install a patch currently in CVS. See http://zope.org/Collectors/Zope/1235 for the collector log and a small patch. The patch file is named zdctl.diff. Download it to a temporary directory, eg. /tmp. Then change to the directory $ZOPE_HOME/lib/python/zdaemon (in our previous examples, this would be ~/myzope/zope2.7/lib/python/zdaemon) and run the patch command: patch < /tmp/zdctl.diff. The patch program should respond with an output like patching file zdctl.py.
* Downgrade to a 2.4.x kernel if you are running Linux.
* Work around this issue by placing Zope in the background manually with:
$ nohup ~/myzope/instance/bin/runzope &
Note though that your Zope instance will not be automatically restarted by zdaemon this way; you probably should not use this workaround on a production server.
Browser cannot connect to port 8080
If your browser fails to connect with anything on TCP port 8080, your Zope may be running on a nonstandard TCP port (for example, some versions of Debian Linux ship with Zope's TCP port as 9673). To find out exactly which URL to use, look at the logging information Zope prints as it starts up when started in the foreground, ie. when started with ./runzope or ./zopectl fg. For example:
------
2004-04-21T21:48:27 INFO(0) ZServer HTTP server started at Wed Apr 21 21:48:27 2004
Hostname: arod
Port: 9673
------
2004-04-21T21:48:27 INFO(0) ZServer FTP server started at Wed Apr 21 21:48:27 2004
Hostname: arod
Port: 8021
...
The first log entry indicates that Zope's web server is listening on port 9673 on host arod. This means that the management URL is http://arod:9673/manage.
As mentioned above, Zope only prints to the console if started in the foreground, with ./runzope or runzope.bat, respectively. The same information can be found in the log/event.log file in your INSTANCE_HOME directory.
Certain versions of Microsoft Internet Explorer 5.0.1 and 5.5 have issues with the Zope management interface which manifest themselves as an inability to properly log in. If you have troubles logging in with IE 5.0.1 or IE 5.5, try a different browser or upgrade IE 6.
Forgot administrative password
If you forget or lose the initial user name and password, shut Zope down and change the initial user password with the zpasswd.py script and restart Zope. See the chapter entitled Users and Security for more information about configuring the initial user account.
Customizing your Zope instance
As of Zope 2.7.0, configuration no longer is done with a mix of environment variables and command line options. Instead, there is a directory etc in your instance home, which contains a zope.conf file where numerous configuration directives can be specified. This scheme greatly enhances manageability and configurability for Zope 2.7.x
The
zope.conf file has extensive inline documentation which we will not reproduce here. We will give an overview and some additional hints for the most widely used directives though.
Server stanzas and port-base
The port-base directive together with the stanzas for the individual servers determine the ports those servers listen on. The stanzas are formed with XML-like constructs:
<http-server>
# valid keys are "address" and "force-connection-close"
address 8080
</http-server>
<ftp-server>
...
</ftp-server>
<webdav-source-server>
...
</webdav-source-server>
The address directive determines the port the respective server listens on. The HTTP Server in this example listens on port 8080.
The port-base directive comes in handy if you want to run several Zope instances on one machine. port-base specifys an offset to the port all servers listens on. Let us assume our HTTP Servers address directive is set to 8080 like in our example above, and port-base is specified as 1000. The actual port the HTTP Server will listen on will be 9080. Assuming the FTP Servers address directive is set to 8021, the FTP Server will then listen on port 9021, and so on.
The debug-mode directive
This directive is a switch, specified as either on or off. When set to on (the default), Zope runs in debug mode. This causes Zope to reload Filesystem-based templates in real time and several other settings suitable for development. You should set this directive to off in a productions environment however.
Additional products directories
One of the most useful directive in the authors opinion. You can specify additional Products directories here, ie. places where Zope looks for (possibly third-party) add-on Zope Products. Two directories come to mind: one for commonly used third-party Products like CookieCrumbler or CMF and Plone packages, which I like to keep in /usr/local/zopeproducts (any directory will do, of course). The benefit is better separation of core Zope Products and third-party Add-Ons. The other directory could be of interest for Zope Product developers, which are able to specify a probably version-controlled development directory with this directive.
Switch the User the Zope process runs as: effective-user
This directive causes Zope to setuid(2) to the specified user when run as root on a Unix system. This benefits security a lot, since a compromised Zope cannot as easily damage a whole system. One motivation for running Zope as root in the first place is to be able to bind to privileged ports (ports with numbers below 1024)
Configuring the Session machinery
Use the maximum-number-of-session-objects directive to limit the number of session objects. This value defaults to 1000 objects; 0 means unlimited.
session-timeout-minutes sets the Session timeout in minutes. The default is 20min.
Logging
Three log facilities are provided: access logging, event logging, and trace logging. Access logging logs individual HTTP Requests in a common format, by default to the file log/Z2.log in your instance home. Event logging logs Zope events, for example start/stop information or debugging messages. The Trace logger logs detailed Zope debugging information.
Each log message has an associated severity level, ranging from CRITICAL, ERROR, WARN, INFO to DEBUG and ALL. You can specify a filter for log messages with the level directive inside a logger stanza. Set the level to ALL to get all log messages, or to ERROR or CRITICAL to see only the most serious messages.
The default is to write the messages to a log file; you can however arrange for log messages to be mailed to you or to go to syslog(3) (on Unix) or the NT event log (on MS Windows)
For further documentation, see the inline comments in zope.conf
When All Else Fails
If there's a problem with your installation that you just cannot seem to solve, do not despair. You have many places to turn for help, including the Zope maillists and the #zope IRC channel.
If you are new to open source software, please realize that, for the most part, participants in the various "free" Zope support forums are volunteers. Though they are typically friendly and helpful, they are not obligated to answer your questions. Therefore, it's in your own self-interest to exercise your best manners in these forums in order to get your problem resolved quickly.
The most reliable way to get installation help is to send a message to the general Zope maillist detailing your installation problem. For more information on the available Zope mailing lists, see the Resources section of Zope.org. Typically someone on the "zope@zope.org" list will be willing to help you solve the problem.
For even more immediate help, you may choose to visit the #zope channel on the OpenProjects IRC (Internet Relay Chat) network. See the OpenProjects website for more information on how to connect to the OpenProjects IRC network.
If you are truly desperate and under a time constraint that prohibits you from utilizing "free" support channels, Zope Corporation provides for-fee service contracts which you can use for Zope installation help. See Zope.com for more information about Zope Corporation service contracts.
相关推荐
利用Simulink实现混合储能系统在直流微网中的下垂控制策略研究:保持直流母线电压稳定的实践与探究,Simulink仿真下的光储直流微网混合储能系统下垂控制策略优化研究(注意版本要求为2021A以上),混合储能系统 光储微网 下垂控制 Simulink仿真 注意版本2021A以上 由光伏发电系统和混合储能系统构成直流微网。 混合储能系统由超级电容器和蓄电池构成,通过控制混合储能系统来维持直流母线电压稳定。 混合储能系统采用下垂控制来实现超级电容和蓄电池的功率分配,蓄电池响应低频量,超级电容响应高频量。 通过改变光照来影响光伏出力,控制混合储能系统保持微网直流母线电压稳定在380V,不受光伏出力变化影响。 ,混合储能系统; 光储微网; 下垂控制; Simulink仿真; 版本2021A; 直流母线电压稳定; 光伏出力变化; 超级电容器; 蓄电池。,2021A+混合储能系统:光储微网下垂控制Simulink仿真研究
内容概要:本文档是针对JavaScript这一跨平台解释型语言的详尽入门手册,首先概述了JavaScript的概念及其重要特性,强调它不仅适用于前端同时也活跃于Node.js的服务器环境之中,从而成为全栈开发的重要技能。紧接着文档阐述了JavaScript的基本语法元素如变量声明、数据类型、运算符及控制结构,让新手理解JavaScript的语法规则,并通过函数与对象操作加深印象。之后介绍了一些常见的实用工具和高级用法,例如模板字符串、解构赋值以及异步编程手段(比如Promise)。对于想要深入探索的应用场景给出了广泛的指引,无论是传统的web开发还是新兴领域的IoT或自动化脚本编写皆有所涉猎。 适合人群:对于那些没有编程背景或有其他编程经验但仍希望了解并擅长运用JavaScript的个人来说非常适合。 使用场景及目标:目的是向初学者提供足够的理论指导和技术实践机会,使他们能够在不同平台上利用JavaScript创造出有意义的作品;不论是想要从事专业软件开发或是业余项目爱好者都能够从中受益。 其他说明:文档还提供了大量权威且有用的外部链接供进一步深造学习,包括但不限于主流的在线课程、权威的技术参考资料及充满活力的支持社区。
1.版本:matlab2014/2019a/2024a 2.附赠案例数据可直接运行matlab程序。 3.代码特点:参数化编程、参数可方便更改、代码编程思路清晰、注释明细。 4.适用对象:计算机,电子信息工程、数学等专业的大学生课程设计、期末大作业和毕业设计。
级联H桥SVG无功补偿系统在不平衡电网中的三层控制策略:电压电流双闭环PI控制、相间与相内电压均衡管理,级联H桥SVG无功补偿系统在不平衡电网中的三层控制策略:电压电流双闭环PI控制、相间与相内电压均衡管理,不平衡电网下的svg无功补偿,级联H桥svg无功补偿statcom,采用三层控制策略。 (1)第一层采用电压电流双闭环pi控制,电压电流正负序分离,电压外环通过产生基波正序有功电流三相所有H桥模块直流侧平均电压恒定,电流内环采用前馈解耦控制; (2)第二层相间电压均衡控制,注入零序电压,控制通过注入零序电压维持相间电压平衡; (3)第三层相内电压均衡控制,使其所有子模块吸收的有功功率与其损耗补,从而保证所有H桥子模块直流侧电压值等于给定值。 有参考资料。 639,核心关键词: 1. 不平衡电网下的SVG无功补偿 2. 级联H桥SVG无功补偿STATCOM 3. 三层控制策略 4. 电压电流双闭环PI控制 5. 电压电流正负序分离 6. 直流侧平均电压恒定 7. 前馈解耦控制 8. 相间电压均衡控制 9. 零序电压注入 10. 相内电压均衡控制 以上十个关键词用分号分隔的格式为:不
1.版本:matlab2014/2019a/2024a 2.附赠案例数据可直接运行matlab程序。 3.代码特点:参数化编程、参数可方便更改、代码编程思路清晰、注释明细。 4.适用对象:计算机,电子信息工程、数学等专业的大学生课程设计、期末大作业和毕业设计。
基于主从博弈的动态定价策略与电动汽车充电管理优化在智能小区的实践(MATLAB+CPLEX gurobi实现),基于主从博弈理论的智能小区电动汽车充电与代理商动态定价策略优化研究,MATLAB代码:基于主从博弈的智能小区代理商定价策略及电动汽车充电管理 关键词:电动汽车 主从博弈 动态定价 智能小区 充放电优化 参考文档:《基于主从博弈的智能小区代理商定价策略及电动汽车充电管理》基本复现 仿真平台:MATLAB+CPLEX gurobi平台 主要内容:代码主要做的是一个电动汽车充电管理和智能小区代理商动态定价的问题,将代理商和车主各自追求利益最大化建模为主从博弈,上层以代理商的充电电价作为优化变量,下层以电动汽车的充电策略作为优化变量,通过优化得出最优电价策略以及动态充电策略。 ,电动汽车; 主从博弈; 动态定价; 智能小区; 充放电优化; MATLAB; CPLEX; gurobi平台。,基于主从博弈的电动汽车充电管理与定价策略优化MATLAB代码实现
基于Matlab语言实现的设计项目 2、适用人群:计算机,电子信息工程、数学等专业的大学生课程设计、期末大作业或毕业设计中的部分功能,作为“参考资料”使用。 3、解压说明:本资源需要电脑端使用WinRAR、7zip等解压工具进行解压,没有解压工具的自行百度下载即可。 4、免责声明:本资源作为“参考资料”而不是“定制需求”,代码只能作为参考,不能完全复制照搬。不一定能够满足所有人的需求,需要有一定的基础能够看懂代码,能够自行调试代码并解决报错,能够自行添加功能修改代码。由于作者大厂工作较忙,不提供答疑服务,如不存在资源缺失问题概不负责,谢谢理解。
资源内项目源码是均来自个人的课程设计、毕业设计或者具体项目,代码都测试ok,都是运行成功后才上传资源,答辩评审绝对信服的,拿来就能用。放心下载使用!源码、说明、论文、数据集一站式服务,拿来就能用的绝对好资源!!! 项目备注 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用! 2、本项目适合计算机相关专业(如计科、人工智能、通信工程、自动化、电子信息等)的在校学生、老师或者企业员工下载学习,也适合小白学习进阶,当然也可作为毕设项目、课程设计、大作业、项目初期立项演示等。 3、如果基础还行,也可在此代码基础上进行修改,以实现其他功能,也可用于毕设、课设、作业等。 下载后请首先打开README.md文件(如有),仅供学习参考, 切勿用于商业用途。 4、如有侵权请私信博主,感谢支持
Labiew噪音与振动检测模块源码揭秘:傅里叶变换与倍频程技术应用于实际项目,LabVIEW平台噪声与振动检测模块源码解析:基于傅里叶变换与倍频程原理的实用功能模块,已成功应用于实际项目,虚拟产品退换政策严谨执行,Labiew噪音与振动检测模块源码,改功能模块已运用到实际项目,原理是利用傅里叶变和倍频程实现的,产品一旦发概不 。 需要的可以联系哟 ,Labiew源码; 噪音与振动检测模块; 傅里叶变换; 倍频程; 实际项目运用,Labiew傅里叶变换倍频程噪音振动检测模块源码
基于Comsol多物理场仿真的光伏集热器异形体建模技术研究,探索comsol多物理场仿真技术:光伏集热器异形体建模应用,comsol多物理场仿真,光伏集热器,异形体建模 ,comsol多物理场仿真; 光伏集热器仿真; 异形体建模,Comsol多物理场仿真在光伏集热器及异形体建模中的应用
器官3D分割-基于WinForm框架开发的医学影像系统源码+sln+演示视频(毕设基于c#和python开发).zip 【项目简单介绍】 主要功能 肺炎诊断 器官 3D 分割 该系统具备肺炎诊断和器官 3D 分割的功能,并模仿了罗万科技的系统界面风格。 python和c#开发实现
MATLAB可以用于开发水果识别系统。这种系统通常利用机器学习和图像处理技术,对输入的水果图像进行特征提取和分类识别。以下是开发水果识别系统的一般步骤: 1. 数据收集:收集包含各种水果类别的图像数据集。 2. 数据预处理:对图像进行预处理,包括裁剪、缩放、灰度化等操作。 3. 特征提取:从每个水果图像中提取特征,例如颜色直方图、纹理特征、形状特征等。 4. 数据标记:为每个图像标记水果类别,形成训练集和测试集。 5. 模型训练:使用机器学习算法(如支持向量机、卷积神经网络等)对训练集进行训练,建立水果识别模型。 6. 模型测试:使用测试集对模型进行测试和评估,调整模型超参数以提高准确率。 7. 系统集成:将训练好的模型集成到MATLAB应用程序中,实现水果识别功能。 8. 用户界面设计:设计用户友好的界面,以便用户上传水果图像并查看识别结果。 MATLAB提供了丰富的图像处理工具箱和机器学习工具箱,可以帮助开发者快速构建水果识别系统。通过结合这些工具箱,可以实现水果的快速、准确识别。
COMSOL声子晶体仿真研究:一维至三维能带与带隙分析及色散曲线弹性波声波分析,声子晶体仿真:COMSOL代做能带图、带隙图及弹性波、声波分析与优化设计,COMSOL代做 声子晶体仿真,一维,二维,三维能带图,带隙图,色散曲线,弹性波,声波。 ,COMSOL代做;声子晶体仿真;一维/二维/三维能带图;带隙图;色散曲线;弹性波仿真;声波分析,COMSOL声子晶体仿真专家:一至三维声波模拟及能带图绘制
Matlab Simulink仿真探究Flyback反激式开关电源性能表现与优化策略,Matlab Simulink仿真探究Flyback反激式开关电源的工作机制,Matlab Simulimk仿真,Flyback反激式开关电源仿真 ,Matlab; Simulink仿真; Flyback反激式; 开关电源仿真,Matlab Simulink在Flyback反激式开关电源仿真中的应用
陪读租房系统(源码+数据库+论文+ppt)java开发springboot框架javaweb,可做计算机毕业设计或课程设计 【功能需求】 本系统有三个角色:管理员、租客和房主,要求具备以下功能: (a) 管理员;管理员使用本系统涉到的功能主要有:首页、个人中心、租客管理、房主管理、房源信息管理、房源类型管理、教育书籍管理、文章分类管理、租房信息管理、合同信息管理、在线咨询管理、咨阅回复管理、教育论坛、系统管理等功能。 (b) 租客;进入前台系统可以实现首页、房源信息、教育书籍、教育论坛、公告信息、后台管理等功能进行操作。 (C) 房主;进入系统可以实现首页、个人中心、房源信息管理、租房信息管理、合同信息管理、在线咨询管理、咨询回复管理等功能进行操作。 【环境需要】 1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。 3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可 4.数据库:MySql 5.7/8.0等版本均可; 【购买须知】 本源码项目经过严格的调试,项目已确保无误,可直接用于课程实训或毕业设计提交。里面都有配套的运行环境软件,讲解视频,部署视频教程,一应俱全,可以自己按照教程导入运行。附有论文参考,使学习者能够快速掌握系统设计和实现的核心技术。
vue3的一些语法以及知识点
1、文件内容:libicu-doc-50.2-4.el7_7.rpm以及相关依赖 2、文件形式:tar.gz压缩包 3、安装指令: #Step1、解压 tar -zxvf /mnt/data/output/libicu-doc-50.2-4.el7_7.tar.gz #Step2、进入解压后的目录,执行安装 sudo rpm -ivh *.rpm 4、更多资源/技术支持:公众号禅静编程坊
水果销售商城(源码+数据库+论文+ppt)java开发springboot框架javaweb,可做计算机毕业设计或课程设计 【功能需求】 水果购物网站用户可以注册登录,在首页开通会员卡,查看水果,购买水果,查看水果信息,以及个人中心修改个人资料,在自己的后台查看自己的购买记录等。 水果购物网站管理员功能:个人中心管理,用户管理,会员管理,会员卡管理,开通会员记录管理,积分管理,水果管理,购买水果订单管理,积分兑换管理,积分兑换记录管理,加积分记录管理,减积分记录管理。 【环境需要】 1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。 3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可 4.数据库:MySql 5.7/8.0等版本均可; 【购买须知】 本源码项目经过严格的调试,项目已确保无误,可直接用于课程实训或毕业设计提交。里面都有配套的运行环境软件,讲解视频,部署视频教程,一应俱全,可以自己按照教程导入运行。附有论文参考,使学习者能够快速掌握系统设计和实现的核心技术。
基于Matlab的双输入深度学习模型构建指南:处理序列与图像数据的创新性应用,Matlab双输入深度学习模型搭建指南:如何处理两种输入数据并实现创新与优势,Matlab搭建双输入深度学习模型,双输入网络。 相比普通的单输入网络,双输入网络能处理两种输入数据,在科研上也更具有优势和创新性。 如何用Matlab搭建双输入网络也是困扰本人很长时间的一个问题,现已弄明白。 注意,需要Matlab 2022b及以上版本,以下版本估计是都不行。 本程序是两个输入全为一维序列的情况(第二个输入序列是第一个输入序列的特征值,或者变后的序列)。 也可改为两边输入都是图像,或者一边输入图像,一边输入图像的一维特征序列。 本程序工作如下: 1、加载数据,两种输入数据一一对应,第二个数据是第一个数据做FFT之后的序列,属于一个类别。 两种数据样本数相等,序列长度不相等。 2、搭建双输入网络,此网络一边是CNN-LSTM,一边是CNN。 3、训练。 4、测试,输出准确率。 注:程序可直接运行,包教会和调通。 可以有偿修改为两边输入都是图像,或一边输入图像一边输入序列的模型。 可有偿替数据,调通程序。 程序注释详
包含十大管理49个过程组的输入与输出和解释,还有EVA铮值管理的公式汇总和解释