1. Install the postgresql database
1.1 run setup. bat in the installation package to start Installation
1.2 The first user is the postgresql database-specific operating system user and the second database user
1.3 use the default value for other options.
2. Install pgAdminII, A postgresql-specific client
2.1 initialize the database (replace the user in the script with your real user)
3. Install JDK (1.5.0) or JRE (1.5.0)
4. Copy the apache-tomcat-5.5.xx to the appropriate directory
5. Configure tomcat
5.1 configure JNDI
Add the element red in server. xml. Note that you must modify the following attribute values based on your project.
<GlobalNamingResources>
......
<Resource
Name = "jdbc/newbee"
Type = "javax. SQL. DataSource"
Password ="Esoon"
Driverclassname = "org. PostgreSQL. Driver"
Maxidle = "2"
Maxwait = "5000"
Validationquery = "select 1"
Username ="Sa"
Url = "JDBC: PostgreSQL: // localhost: 5432/Newbee"
Maxactive = "4"/>
</Globalnamingresources>
Manually add the conf/Catalina/localhost/Newbee. xml file. The file name must be consistent with that of the application project. The content is as follows:
<Context docbase ="C:/apache-tomcat-5.5.17/webapps/newbee"Privileged =" true ">
<Resourcelink name = "JDBC/Newbee" Global = "JDBC/Newbee" type = "javax. SQL. datasource"/>
</Context>
Copy the database driver to the directory % atat_home %/common/lib.
6. Change the absolute path in the log4j. properties file to an appropriate value.