레이블이 Ubuntu인 게시물을 표시합니다. 모든 게시물 표시
레이블이 Ubuntu인 게시물을 표시합니다. 모든 게시물 표시

2020년 3월 12일 목요일

Ubuntu Server 18.04 SVN Apache2 연동하기

SVN과 Apache2 설치는 생략...


apache와 svn연동에 필요한 모드 설치
sudo apt-get install libapache2-mod-svn

repository 생성
mkdir /home/svn
svnadmin create /home/svn/repos
chown -R www-data:www-data /home/svn/repos

vi /etc/apache2/mods-available/dav_svn.conf
아래 내용 편집

<Location /svn>
     DAV svn
     SVNParentPath /home/svn
     AuthType Basic
     AuthName "Subversion Repository"
     AuthUserFile /etc/apache2/dav_svn.passwd
     Require valid-user
</Location>

svn password 파일 생성과 사용자 생성
htpasswd -cm /home/svn/dav_svn.passwd [user_name]

아파치 재시작
/etc/init.d/apache2 restart

여기까지가 기본 설정 완료

mkdir TestProject
svn

2020년 3월 10일 화요일

ubuntu ofbiz mariadb

entityengine.xml 파일
mariadb를 위한 설정값을 추가해야 한다.
아래는 파일 전체 내용
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->
<!--
 - This file configures the Entity Engine JDBC (or other DataSource) and JTA
access. For a detailed description see the core/docs/entityconfig.html file.
-->
<entity-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entity-config.xsd">
    <resource-loader name="fieldfile" class="org.apache.ofbiz.base.config.FileLoader"
            prepend-env="ofbiz.home" prefix="/framework/entity/fieldtype/"/>

    <!-- the transaction factory class to use, one is needed for each way of getting JTA interfaces -->
    <!-- Use this one for Geronimo -->
    <transaction-factory class="org.apache.ofbiz.entity.transaction.GeronimoTransactionFactory"/>

    <!-- Use this one for getting the JTA objects from JNDI -->
    <!-- NOTE: to use the JndiFactory you must specify the necessary JNDI properties
    <transaction-factory class="org.apache.ofbiz.entity.transaction.JNDITransactionFactory">
        <user-transaction-jndi jndi-server-name="default" jndi-name="java:comp/UserTransaction"/>
        <transaction-manager-jndi jndi-server-name="default" jndi-name="java:comp/UserTransaction"/>
    </transaction-factory>
    -->
    <!--
        It is common to use UserTransaction for the TransactionManager, but if that doesn't work, try this: <transaction-manager-jndi jndi-server-name="default" jndi-name="java:comp/TransactionManager"/>
        Common UserTransaction locations:
            java:comp/UserTransaction (most servers: Resin, Orion, OC4J, etc)
            UserTransaction (RexIP)
        JBoss uses two different objects for the UserTransaction and TransactionManager interfaces;
        they are located in JNDI at: "java:comp/UserTransaction" and "java:/TransactionManager" respectively
    -->

    <!-- the connection factory class to use, one is needed for obtaining connections/pools for defined resources -->
    <connection-factory class="org.apache.ofbiz.entity.connection.DBCPConnectionFactory"/>

    <debug-xa-resources value="false" />  <!-- see https://issues.apache.org/jira/browse/OFBIZ-4282 for more -->
   
    <delegator name="default" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main" distributed-cache-clear-enabled="false">
        <group-map group-name="org.apache.ofbiz" datasource-name="localmariadb"/>
        <group-map group-name="org.apache.ofbiz.olap" datasource-name="localmariadbolap"/>
        <group-map group-name="org.apache.ofbiz.tenant" datasource-name="localmariadbtenant"/>
    </delegator>
    <delegator name="default-no-eca" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main" entity-eca-enabled="false" distributed-cache-clear-enabled="false">
        <group-map group-name="org.apache.ofbiz" datasource-name="localmariadb"/>
        <group-map group-name="org.apache.ofbiz.olap" datasource-name="localmariadbolap"/>
        <group-map group-name="org.apache.ofbiz.tenant" datasource-name="localmariadbtenant"/>
    </delegator>

    <!-- be sure that your default delegator (or the one you use) uses the same datasource for test. You must run "gradlew loadDefault" before running "gradlew testIntegration" -->
    <delegator name="test" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main">
        <group-map group-name="org.apache.ofbiz" datasource-name="localmariadb"/>
        <group-map group-name="org.apache.ofbiz.olap" datasource-name="localmariadbolap"/>
        <group-map group-name="org.apache.ofbiz.tenant" datasource-name="localmariadbtenant"/>
    </delegator>
 
    <!-- need to at least define a name for each component to use -->
    <entity-model-reader name="main"/>

    <!-- need to at least define a name for each component to use -->
    <entity-group-reader name="main"/>

    <!-- need to at least define a name for each component to use -->
    <entity-eca-reader name="main"/>

    <!-- need to at least define a name for each component to use -->
    <!-- defining:
        tenant       = OFBiz and External Tenant Data
        seed         = OFBiz and External Seed Data - to be maintained along with source and updated whenever a system deployment is updated
        seed-initial = OFBiz and External Seed Data - to be maintained along with source like other seed data, but only loaded initially and not updated when a system is updated except manually reviewing each line
        demo         = OFBiz Only Demo Data
        ext          = External General Data (custom)
        ext-test     = External Test Data (custom)
        ext-demo     = External Demo Data (custom)
    -->
    <entity-data-reader name="tenant"/>
    <entity-data-reader name="seed"/>
    <entity-data-reader name="seed-initial"/>
    <entity-data-reader name="demo"/>
    <entity-data-reader name="ext"/>
    <entity-data-reader name="ext-test"/>
    <entity-data-reader name="ext-demo"/>

    <field-type name="hsql" loader="fieldfile" location="fieldtypehsql.xml"/>
    <field-type name="derby" loader="fieldfile" location="fieldtypederby.xml"/>
    <field-type name="daffodil" loader="fieldfile" location="fieldtypedaffodil.xml"/>
    <field-type name="axion" loader="fieldfile" location="fieldtypeaxion.xml"/>
    <field-type name="mysql" loader="fieldfile" location="fieldtypemysql.xml"/>
    <field-type name="postgres" loader="fieldfile" location="fieldtypepostgres.xml"/>
    <field-type name="oracle" loader="fieldfile" location="fieldtypeoracle.xml"/>
    <field-type name="sapdb" loader="fieldfile" location="fieldtypesapdb.xml"/>
    <field-type name="sybase" loader="fieldfile" location="fieldtypesybase.xml"/>
    <field-type name="firebird" loader="fieldfile" location="fieldtypefirebird.xml"/>
    <field-type name="mssql" loader="fieldfile" location="fieldtypemssql.xml"/>
    <field-type name="advantage" loader="fieldfile" location="fieldtypeadvantage.xml"/>
   
<field-type name="mariadb" loader="fieldfile" location="fieldtypemariadb.xml"/>
    <!--
    For DAO/JDBC Helper: Tries:
      1. JNDI Datasource IF jdbc.jndi.name, context.provider, etc are specified
      2. Embedded (JOTM) if available (uses jdbc.driver, jdbc.uri, jdbc.username, jdbc.password, isolation.level)
      3. Direct to manually laoded JDBC driver (uses jdbc.driver, jdbc.uri, jdbc.username, jdbc.password)

    Transaction Isolation Levels - (<helperName>.isolation.level) can be as follows:
     * None
     * ReadCommitted (Recommended)
     * ReadUncommitted
     * RepeatableRead
     * Serializable (NOT Recommended)
     * Not set uses database default
    -->
   
    <datasource name="localhsql"
            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
            field-type-name="hsql"
            check-on-start="true"
            add-missing-on-start="true"
            check-indices-on-start="true"
            use-foreign-keys="true"
            use-foreign-key-indices="true"
            use-fk-initially-deferred="false"
            join-style="ansi-no-parenthesis"
            alias-view-columns="true">
        <read-data reader-name="tenant"/>
        <read-data reader-name="seed"/>
        <read-data reader-name="seed-initial"/>
        <read-data reader-name="demo"/>
        <read-data reader-name="ext"/>
        <read-data reader-name="ext-test"/>
        <read-data reader-name="ext-demo"/>
        <inline-jdbc
                jdbc-driver="org.hsqldb.jdbcDriver"
                jdbc-uri="jdbc:hsqldb:runtime/data/hsqldb/ofbiz"
                jdbc-username="ofbiz"
                jdbc-password="ofbiz"
                isolation-level="ReadCommitted"
                pool-minsize="2"
                pool-maxsize="250"
                time-between-eviction-runs-millis="600000"/>
        <!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/HsqlDataSource" isolation-level="ReadUncommitted"/> -->
        <!-- <jndi-jdbc jndi-server-name="default" jndi-name="comp/env/jdbc/xa/localhsql" isolation-level="ReadUncommitted"/> --> <!-- Orion Style JNDI name -->
        <!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="localhsqlDataSource"/> --> <!-- Weblogic Style JNDI name -->
    </datasource>

    <datasource name="localderby"
            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
            schema-name="OFBIZ"
            field-type-name="derby"
            check-on-start="true"
            add-missing-on-start="true"
            use-pk-constraint-names="false"
            use-indices-unique="false"
            alias-view-columns="false"
            use-order-by-nulls="true"
            offset-style="fetch">
        <read-data reader-name="tenant"/>
        <read-data reader-name="seed"/>
        <read-data reader-name="seed-initial"/>
        <read-data reader-name="demo"/>
        <read-data reader-name="ext"/>
        <read-data reader-name="ext-test"/>
        <read-data reader-name="ext-demo"/>
        <!-- beware use-indices-unique="false" is needed because of Derby bug with null values in a unique index -->
        <inline-jdbc
                jdbc-driver="org.apache.derby.jdbc.EmbeddedDriver"
                jdbc-uri="jdbc:derby:ofbiz;create=true"
                jdbc-username="ofbiz"
                jdbc-password-lookup="derby-ofbiz"
                isolation-level="ReadCommitted"
                pool-minsize="2"
                pool-maxsize="250"
                test-on-borrow="true"
                pool-jdbc-test-stmt="values 1"
                soft-min-evictable-idle-time-millis="600000"
                time-between-eviction-runs-millis="600000"/>
        <!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/DerbyDataSource" isolation-level="ReadCommitted"/> -->
    </datasource>
    <datasource name="localderbyodbc"
        helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
        schema-name="OFBIZ"
        field-type-name="derby"
        check-on-start="true"
        add-missing-on-start="true"
        use-pk-constraint-names="false"
        use-indices-unique="false"
        alias-view-columns="false"
        use-order-by-nulls="true"
        offset-style="fetch">
        <!-- beware use-indices-unique="false" is needed because of Derby bug with null values in a unique index -->
        <inline-jdbc
            jdbc-driver="org.apache.derby.jdbc.EmbeddedDriver"
            jdbc-uri="jdbc:derby:ofbizodbc;create=true"
            jdbc-username="ofbiz"
            jdbc-password-lookup="derby-ofbizodbc"
            isolation-level="ReadCommitted"
            pool-minsize="2"
            pool-maxsize="250"
                time-between-eviction-runs-millis="600000"/>
        <!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/DerbyDataSource" isolation-level="ReadCommitted"/> -->
    </datasource>
    <datasource name="localderbyolap"
            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
            schema-name="OFBIZ"
            field-type-name="derby"
            check-on-start="true"
            add-missing-on-start="true"
            use-pk-constraint-names="false"
            use-indices-unique="false"
            alias-view-columns="false"
            use-order-by-nulls="true">
        <!-- beware use-indices-unique="false" is needed because of Derby bug with null values in a unique index -->
        <read-data reader-name="tenant"/>
        <read-data reader-name="seed"/>
        <read-data reader-name="seed-initial"/>
        <read-data reader-name="demo"/>
        <read-data reader-name="ext"/>
        <read-data reader-name="ext-test"/>
        <read-data reader-name="ext-demo"/>
        <inline-jdbc
                jdbc-driver="org.apache.derby.jdbc.EmbeddedDriver"
                jdbc-uri="jdbc:derby:ofbizolap;create=true"
                jdbc-username="ofbiz"
                jdbc-password-lookup="derby-ofbizolap"
                isolation-level="ReadCommitted"
                pool-minsize="2"
                pool-maxsize="250"
                time-between-eviction-runs-millis="600000"/>
        <!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/DerbyDataSource" isolation-level="ReadCommitted"/> -->
    </datasource>
    <datasource name="localderbytenant"
        helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
        schema-name="OFBIZ"
        field-type-name="derby"
        check-on-start="true"
        add-missing-on-start="true"
        use-pk-constraint-names="false"
        use-indices-unique="false"
        alias-view-columns="false"
        use-order-by-nulls="true">
        <read-data reader-name="tenant"/>
        <read-data reader-name="seed"/>
        <read-data reader-name="seed-initial"/>
        <read-data reader-name="demo"/>
        <read-data reader-name="ext"/>
        <read-data reader-name="ext-test"/>
        <read-data reader-name="ext-demo"/>
        <!-- beware use-indices-unique="false" is needed because of Derby bug with null values in a unique index -->
        <inline-jdbc
            jdbc-driver="org.apache.derby.jdbc.EmbeddedDriver"
            jdbc-uri="jdbc:derby:ofbiztenant;create=true"
            jdbc-username="ofbiz"
            jdbc-password-lookup="derby-ofbiztenant"
            isolation-level="ReadCommitted"
            pool-minsize="2"
            pool-maxsize="250"
            time-between-eviction-runs-millis="600000"/>
        <!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/DerbyDataSource" isolation-level="ReadCommitted"/> -->
    </datasource>
   
    <datasource name="localdaffodil"
            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
            field-type-name="daffodil"
            check-on-start="true"
            add-missing-on-start="true">
        <read-data reader-name="tenant"/>
        <read-data reader-name="seed"/>
        <read-data reader-name="seed-initial"/>
        <read-data reader-name="demo"/>
        <read-data reader-name="ext"/>
        <read-data reader-name="ext-test"/>
        <read-data reader-name="ext-demo"/>
        <!-- this setup is for the embedded version of Daffodil, with in.co.daffodil.db.jdbc.DaffodilDBDriver -->
        <!-- note that Daffodil can also run in a network mode with the driver class: in.co.daffodil.db.rmi.RmiDaffodilDBDriver and URI: jdbc:daffodilDB://<hostname>:<port>/ofbiz;create=true -->
        <inline-jdbc
                jdbc-driver="in.co.daffodil.db.jdbc.DaffodilDBDriver"
                jdbc-uri="jdbc:daffodilDB_embedded:ofbiz;create=true"
                jdbc-username="ofbiz"
                jdbc-password="ofbiz"
                isolation-level="ReadCommitted"
                pool-minsize="2"
                pool-maxsize="250"
                time-between-eviction-runs-millis="600000"/>
        <!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/DaffodilDataSource" isolation-level="ReadCommitted"/> -->
    </datasource>

    <datasource name="localaxion"
            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
            field-type-name="axion"
            check-on-start="true"
            add-missing-on-start="true"
            use-pk-constraint-names="false">
        <read-data reader-name="tenant"/>
        <read-data reader-name="seed"/>
        <read-data reader-name="seed-initial"/>
        <read-data reader-name="demo"/>
        <read-data reader-name="ext"/>
        <read-data reader-name="ext-test"/>
        <read-data reader-name="ext-demo"/>
        <inline-jdbc
                jdbc-driver="org.axiondb.jdbc.AxionDriver"
                jdbc-uri="jdbc:axiondb:ofbiz:data/axion/ofbiz"
                jdbc-username="ofbiz"
                jdbc-password="ofbiz"
                isolation-level="ReadCommitted"
                pool-minsize="2"
                pool-maxsize="250"
                time-between-eviction-runs-millis="600000"/>
    </datasource>

    <datasource name="localmysql"
            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
            field-type-name="mysql"
            check-on-start="true"
            add-missing-on-start="true"
            check-pks-on-start="false"
            use-foreign-keys="true"
            join-style="ansi-no-parenthesis"
            alias-view-columns="false"
            drop-fk-use-foreign-key-keyword="true"
            table-type="InnoDB"
            character-set="latin1"
            collate="latin1_general_cs">
        <read-data reader-name="tenant"/>
        <read-data reader-name="seed"/>
        <read-data reader-name="seed-initial"/>
        <read-data reader-name="demo"/>
        <read-data reader-name="ext"/>
        <read-data reader-name="ext-test"/>
        <read-data reader-name="ext-demo"/>
        <inline-jdbc
                jdbc-driver="com.mysql.jdbc.Driver"
                jdbc-uri="jdbc:mysql://127.0.0.1/ofbiz?autoReconnect=true"
                jdbc-username="ofbiz"
                jdbc-password="ofbiz"
                isolation-level="ReadCommitted"
                pool-minsize="2"
                pool-maxsize="250"
                time-between-eviction-runs-millis="600000"/><!-- Please note that at least one person has experienced a problem with this value with MySQL
                and had to set it to -1 in order to avoid this issue.
                For more look at http://markmail.org/thread/5sivpykv7xkl66px and http://commons.apache.org/dbcp/configuration.html-->
        <!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/MySqlDataSource" isolation-level="Serializable"/> -->
    </datasource>

    <datasource name="localmysqlolap"
            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
            field-type-name="mysql"
            check-on-start="true"
            add-missing-on-start="true"
            check-pks-on-start="false"
            use-foreign-keys="true"
            join-style="ansi-no-parenthesis"
            alias-view-columns="false"
            drop-fk-use-foreign-key-keyword="true"
            table-type="InnoDB"
            character-set="latin1"
            collate="latin1_general_cs">
        <read-data reader-name="tenant"/>
        <read-data reader-name="seed"/>
        <read-data reader-name="seed-initial"/>
        <read-data reader-name="demo"/>
        <read-data reader-name="ext"/>
        <read-data reader-name="ext-test"/>
        <read-data reader-name="ext-demo"/>
        <inline-jdbc
                jdbc-driver="com.mysql.jdbc.Driver"
                jdbc-uri="jdbc:mysql://127.0.0.1/ofbizolap?autoReconnect=true"
                jdbc-username="ofbiz"
                jdbc-password="ofbiz"
                isolation-level="ReadCommitted"
                pool-minsize="2"
                pool-maxsize="250"
                time-between-eviction-runs-millis="600000"/><!-- Please note that at least one person has experienced a problem with this value with MySQL
                and had to set it to -1 in order to avoid this issue.
                For more look at http://markmail.org/thread/5sivpykv7xkl66px and http://commons.apache.org/dbcp/configuration.html-->
        <!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/MySqlDataSource" isolation-level="Serializable"/> -->
    </datasource>
    <datasource name="localmysqltenant"
            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
            field-type-name="mysql"
            check-on-start="true"
            add-missing-on-start="true"
            check-pks-on-start="false"
            use-foreign-keys="true"
            join-style="ansi-no-parenthesis"
            alias-view-columns="false"
            drop-fk-use-foreign-key-keyword="true"
            table-type="InnoDB"
            character-set="latin1"
            collate="latin1_general_cs">
        <read-data reader-name="tenant"/>
        <read-data reader-name="seed"/>
        <read-data reader-name="seed-initial"/>
        <read-data reader-name="demo"/>
        <read-data reader-name="ext"/>
        <read-data reader-name="ext-test"/>
        <read-data reader-name="ext-demo"/>
        <inline-jdbc
                jdbc-driver="com.mysql.jdbc.Driver"
                jdbc-uri="jdbc:mysql://127.0.0.1/ofbiztenant?autoReconnect=true"
                jdbc-username="ofbiz"
                jdbc-password="ofbiz"
                isolation-level="ReadCommitted"
                pool-minsize="2"
                pool-maxsize="250"
                time-between-eviction-runs-millis="600000"/><!-- Please note that at least one person has experienced a problem with this value with MySQL
                and had to set it to -1 in order to avoid this issue.
                For more look at http://markmail.org/thread/5sivpykv7xkl66px and http://commons.apache.org/dbcp/configuration.html-->
        <!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/MySqlDataSource" isolation-level="Serializable"/> -->
    </datasource>

<!--                          mariadb conf start  schkim 2020.03.06                  -->
    <datasource name="localmariadb"
            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
            field-type-name="mariadb"
            check-on-start="true"
            add-missing-on-start="true"
            check-pks-on-start="false"
            use-foreign-keys="true"
            join-style="ansi-no-parenthesis"
            alias-view-columns="false"
            drop-fk-use-foreign-key-keyword="true"
            table-type="InnoDB"
            character-set="utf8"
            collate="utf8-general_ci">
        <read-data reader-name="tenant"/>
        <read-data reader-name="seed"/>
        <read-data reader-name="seed-initial"/>
        <read-data reader-name="demo"/>
        <read-data reader-name="ext"/>
        <read-data reader-name="ext-test"/>
        <read-data reader-name="ext-demo"/>
        <inline-jdbc
                jdbc-driver="org.mariadb.jdbc.Driver"
                jdbc-uri="jdbc:mariadb://127.0.0.1/ofbiz?autoReconnect=true"
                jdbc-username="ofbiz"
                jdbc-password="ofbiz"
                isolation-level="ReadCommitted"
                pool-minsize="2"
                pool-maxsize="250"
                time-between-eviction-runs-millis="600000"/><!-- Please note that at least one person has experienced a problem with this value with MySQL
                and had to set it to -1 in order to avoid this issue.
                For more look at http://markmail.org/thread/5sivpykv7xkl66px and http://commons.apache.org/dbcp/configuration.html-->
        <!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/MySqlDataSource" isolation-level="Serializable"/> -->
    </datasource>
    <datasource name="localmariadbolap"
            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
            field-type-name="mariadb"
            check-on-start="true"
            add-missing-on-start="true"
            check-pks-on-start="false"
            use-foreign-keys="true"
            join-style="ansi-no-parenthesis"
            alias-view-columns="false"
            drop-fk-use-foreign-key-keyword="true"
            table-type="InnoDB"
            character-set="utf8"
            collate="utf8-general_ci">
        <read-data reader-name="tenant"/>
        <read-data reader-name="seed"/>
        <read-data reader-name="seed-initial"/>
        <read-data reader-name="demo"/>
        <read-data reader-name="ext"/>
        <read-data reader-name="ext-test"/>
        <read-data reader-name="ext-demo"/>
        <inline-jdbc
                jdbc-driver="org.mariadb.jdbc.Driver"
                jdbc-uri="jdbc:mariadb://127.0.0.1/ofbizolap?autoReconnect=true"
                jdbc-username="ofbizolap"
                jdbc-password="ofbizolap"
                isolation-level="ReadCommitted"
                pool-minsize="2"
                pool-maxsize="250"
                time-between-eviction-runs-millis="600000"/><!-- Please note that at least one person has experienced a problem with this value with MySQL
                and had to set it to -1 in order to avoid this issue.
                For more look at http://markmail.org/thread/5sivpykv7xkl66px and http://commons.apache.org/dbcp/configuration.html-->
        <!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/MySqlDataSource" isolation-level="Serializable"/> -->
    </datasource>
    <datasource name="localmariadbtenant"
            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
            field-type-name="mariadb"
            check-on-start="true"
            add-missing-on-start="true"
            check-pks-on-start="false"
            use-foreign-keys="true"
            join-style="ansi-no-parenthesis"
            alias-view-columns="false"
            drop-fk-use-foreign-key-keyword="true"
            table-type="InnoDB"
            character-set="utf8"
            collate="utf8_general_ci">
        <read-data reader-name="tenant"/>
        <read-data reader-name="seed"/>
        <read-data reader-name="seed-initial"/>
        <read-data reader-name="demo"/>
        <read-data reader-name="ext"/>
        <read-data reader-name="ext-test"/>
        <read-data reader-name="ext-demo"/>
        <inline-jdbc
                jdbc-driver="org.mariadb.jdbc.Driver"
                jdbc-uri="jdbc:maraidb://127.0.0.1/ofbiztenant?autoReconnect=true"
                jdbc-username="ofbiztenant"
                jdbc-password="ofbiztenant"
                isolation-level="ReadCommitted"
                pool-minsize="2"
                pool-maxsize="250"
                time-between-eviction-runs-millis="600000"/><!-- Please note that at least one person has experienced a problem with this value with MySQL
                and had to set it to -1 in order to avoid this issue.
                For more look at http://markmail.org/thread/5sivpykv7xkl66px and http://commons.apache.org/dbcp/configuration.html-->
        <!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/MySqlDataSource" isolation-level="Serializable"/> -->
    </datasource>
<!--   mariadd config end  -->
    <datasource name="odbcmysql"
            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
            field-type-name="mysql"
            check-on-start="true"
            add-missing-on-start="true"
            check-pks-on-start="false"
            use-foreign-keys="true"
            join-style="ansi-no-parenthesis"
            alias-view-columns="false"
            drop-fk-use-foreign-key-keyword="true"
            table-type="InnoDB"
            character-set="latin1"
            collate="latin1_general_cs">
        <read-data reader-name="tenant"/>
        <read-data reader-name="seed"/>
        <inline-jdbc
                jdbc-driver="com.mysql.jdbc.Driver"
                jdbc-uri="jdbc:mysql://127.0.0.1/ofbiz_odbc?autoReconnect=true"
                jdbc-username="ofbiz"
                jdbc-password="ofbiz"
                isolation-level="ReadCommitted"
                pool-minsize="2"
                pool-maxsize="250"
                time-between-eviction-runs-millis="600000"/>
        <!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/MySqlDataSource" isolation-level="Serializable"/> -->
    </datasource>

    <datasource name="localpostgres"
            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
            schema-name="public"
            field-type-name="postgres"
            check-on-start="true"
            add-missing-on-start="true"
            use-fk-initially-deferred="false"
            alias-view-columns="false"
            join-style="ansi"
            use-binary-type-for-blob="true"
            use-order-by-nulls="true"
            result-fetch-size="50"> <!-- Comment out the result-fetch-size attribute for jdbc driver versions older than 8.0.
            Not recommended to use those though. They are archived unsupported versions: http://jdbc.postgresql.org/download.html -->
       
        <read-data reader-name="tenant"/>
        <read-data reader-name="seed"/>
        <read-data reader-name="seed-initial"/>
        <read-data reader-name="demo"/>
        <read-data reader-name="ext"/>
        <read-data reader-name="ext-test"/>
        <read-data reader-name="ext-demo"/>
        <inline-jdbc
                jdbc-driver="org.postgresql.Driver"
                jdbc-uri="jdbc:postgresql://127.0.0.1/ofbiz"
                jdbc-username="ofbiz"
                jdbc-password="ofbiz"
                isolation-level="ReadCommitted"
                pool-minsize="2"
                pool-maxsize="250"
                time-between-eviction-runs-millis="600000"/><!-- Be warned that at this date (2009-09-20) the max_connections parameters in postgresql.conf
                is set by default to 100 by the initdb process see http://www.postgresql.org/docs/8.4/static/runtime-config-connection.html#GUC-MAX-CONNECTIONS-->

        <!-- <jndi-jdbc jndi-server-name="default" jndi-name="java:comp/env/jdbc/localpostgres" isolation-level="ReadCommitted"/>-->
        <!-- <jndi-jdbc jndi-server-name="default" jndi-name="comp/env/jdbc/xa/localpostgres" isolation-level="ReadCommitted"/> --> <!-- Orion Style JNDI name -->
        <!-- <jndi-jdbc jndi-server-name="localweblogic" jndi-name="PostgresDataSource"/> --> <!-- Weblogic Style JNDI name -->
        <!-- <jndi-jdbc jndi-server-name="default" jndi-name="jdbc/localpostgres" isolation-level="ReadCommitted"/> --> <!-- JRun4 Style JNDI name -->
        <!-- <tyrex-dataSource dataSource-name="localpostgres" isolation-level="ReadCommitted"/> -->
    </datasource>
    <datasource name="localpostolap"
            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
            schema-name="public"
            field-type-name="postgres"
            check-on-start="true"
            add-missing-on-start="true"
            use-fk-initially-deferred="false"
            alias-view-columns="false"
            join-style="ansi"
            result-fetch-size="50"
            use-binary-type-for-blob="true"
            use-order-by-nulls="true">
        <read-data reader-name="tenant"/>
        <read-data reader-name="seed"/>
        <read-data reader-name="seed-initial"/>
        <read-data reader-name="demo"/>
        <read-data reader-name="ext"/>
        <read-data reader-name="ext-test"/>
        <read-data reader-name="ext-demo"/>
        <inline-jdbc
                jdbc-driver="org.postgresql.Driver"
                jdbc-uri="jdbc:postgresql://127.0.0.1/ofbizolap"
                jdbc-username="ofbiz"
                jdbc-password="ofbiz"
                isolation-level="ReadCommitted"
                pool-minsize="2"
                pool-maxsize="250"
                time-between-eviction-runs-millis="600000"/><!-- Be warned that at this date (2009-09-20) the max_connections parameters in postgresql.conf
                    is set by default to 100 by the initdb process see http://www.postgresql.org/docs/8.4/static/runtime-config-connection.html#GUC-MAX-CONNECTIONS-->
       
        <!-- <jndi-jdbc jndi-server-name="default" jndi-name="java:comp/env/jdbc/localpostgres" isolation-level="ReadCommitted"/>-->
        <!-- <jndi-jdbc jndi-server-name="default" jndi-name="comp/env/jdbc/xa/localpostgres" isolation-level="ReadCommitted"/> --> <!-- Orion Style JNDI name -->
        <!-- <jndi-jdbc jndi-server-name="localweblogic" jndi-name="PostgresDataSource"/> --> <!-- Weblogic Style JNDI name -->
        <!-- <jndi-jdbc jndi-server-name="default" jndi-name="jdbc/localpostgres" isolation-level="ReadCommitted"/> --> <!-- JRun4 Style JNDI name -->
        <!-- <tyrex-dataSource dataSource-name="localpostgres" isolation-level="ReadCommitted"/> -->
    </datasource>
    <datasource name="localposttenant"
            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
            schema-name="public"
            field-type-name="postgres"
            check-on-start="true"
            add-missing-on-start="true"
            use-fk-initially-deferred="false"
            alias-view-columns="false"
            join-style="ansi"
            result-fetch-size="50"
            use-binary-type-for-blob="true"
            use-order-by-nulls="true">
        <read-data reader-name="tenant"/>
        <read-data reader-name="seed"/>
        <read-data reader-name="seed-initial"/>
        <read-data reader-name="demo"/>
        <read-data reader-name="ext"/>
        <read-data reader-name="ext-test"/>
        <read-data reader-name="ext-demo"/>
        <inline-jdbc
                jdbc-driver="org.postgresql.Driver"
                jdbc-uri="jdbc:postgresql://127.0.0.1/ofbiztenant"
                jdbc-username="ofbiz"
                jdbc-password="ofbiz"
                isolation-level="ReadCommitted"
                pool-minsize="2"
                pool-maxsize="250"
                time-between-eviction-runs-millis="600000"/><!-- Be warned that at this date (2009-09-20) the max_connections parameters in postgresql.conf
                    is set by default to 100 by the initdb process see http://www.postgresql.org/docs/8.4/static/runtime-config-connection.html#GUC-MAX-CONNECTIONS-->
       
        <!-- <jndi-jdbc jndi-server-name="default" jndi-name="java:comp/env/jdbc/localpostgres" isolation-level="ReadCommitted"/>-->
        <!-- <jndi-jdbc jndi-server-name="default" jndi-name="comp/env/jdbc/xa/localpostgres" isolation-level="ReadCommitted"/> --> <!-- Orion Style JNDI name -->
        <!-- <jndi-jdbc jndi-server-name="localweblogic" jndi-name="PostgresDataSource"/> --> <!-- Weblogic Style JNDI name -->
        <!-- <jndi-jdbc jndi-server-name="default" jndi-name="jdbc/localpostgres" isolation-level="ReadCommitted"/> --> <!-- JRun4 Style JNDI name -->
        <!-- <tyrex-dataSource dataSource-name="localpostgres" isolation-level="ReadCommitted"/> -->
    </datasource>

    <datasource name="localoracle"
            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
            schema-name="OFBIZ"
            field-type-name="oracle"
            check-on-start="true"
            add-missing-on-start="true"
            alias-view-columns="false"
            join-style="ansi"
            use-order-by-nulls="true">
        <read-data reader-name="tenant"/>
        <read-data reader-name="seed"/>
        <read-data reader-name="seed-initial"/>
        <read-data reader-name="demo"/>
        <read-data reader-name="ext"/>
        <read-data reader-name="ext-test"/>
        <read-data reader-name="ext-demo"/>
        <inline-jdbc
                jdbc-driver="oracle.jdbc.driver.OracleDriver"
                jdbc-uri="jdbc:oracle:thin:@127.0.0.1:1521:ofbiz"
                jdbc-username="ofbiz"
                jdbc-password="ofbiz"
                pool-minsize="2"
                pool-maxsize="250"
                time-between-eviction-runs-millis="600000"/>
    </datasource>
    <datasource name="localoracledd"
            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
            schema-name="OFBIZ"
            field-type-name="oracle"
            check-on-start="true"
            add-missing-on-start="true"
            join-style="ansi"
            use-order-by-nulls="true">
        <read-data reader-name="main"/>
        <inline-jdbc
                jdbc-driver="com.ddtek.jdbc.oracle.OracleDriver"
                jdbc-uri="jdbc:datadirect:oracle://127.0.0.1:1521;SID=ofbiz"
                jdbc-username="ofbiz"
                jdbc-password="ofbiz"
                pool-minsize="2"
                pool-maxsize="250"
                time-between-eviction-runs-millis="600000"/>
    </datasource>

    <datasource name="localsybase"
            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
            field-type-name="sybase"
            schema-name="dbo"
            check-on-start="true"
            add-missing-on-start="true"
            use-fk-initially-deferred="false"
            join-style="ansi">
        <read-data reader-name="tenant"/>
        <read-data reader-name="seed"/>
        <read-data reader-name="seed-initial"/>
        <read-data reader-name="demo"/>
        <read-data reader-name="ext"/>
        <read-data reader-name="ext-test"/>
        <read-data reader-name="ext-demo"/>
        <inline-jdbc
                jdbc-driver="com.sybase.jdbc2.jdbc.SybDriver"
                jdbc-uri="jdbc:sybase:Tds:10.1.1.10:11222/ofbiz?DYNAMIC_PREPARE=true"
                jdbc-username="ofbiz"
                jdbc-password="ofbiz1"
                isolation-level="ReadCommitted"
                pool-minsize="2"
                pool-maxsize="250"
                time-between-eviction-runs-millis="600000"/>
    </datasource>

    <datasource name="localsapdb"
            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
            field-type-name="sapdb"
            check-on-start="true"
            add-missing-on-start="true"
            fk-style="name_fk"
            use-fk-initially-deferred="false"
            join-style="ansi-no-parenthesis">
        <read-data reader-name="tenant"/>
        <read-data reader-name="seed"/>
        <read-data reader-name="seed-initial"/>
        <read-data reader-name="demo"/>
        <read-data reader-name="ext"/>
        <read-data reader-name="ext-test"/>
        <read-data reader-name="ext-demo"/>
        <inline-jdbc
                jdbc-driver="com.sap.dbtech.jdbc.DriverSapDB"
                jdbc-uri="jdbc:sapdb://localhost/OFBIZ"
                jdbc-username="ofbiz"
                jdbc-password="ofbiz"
                isolation-level="ReadCommitted"
                pool-minsize="2"
                pool-maxsize="250"
                time-between-eviction-runs-millis="600000"/>
        <!-- <jndi-jdbc jndi-server-name="default" jndi-name="comp/env/jdbc/xa/localsapdb" isolation-level="ReadCommitted"/> --> <!-- Orion Style JNDI name -->
        <!-- <jndi-jdbc jndi-server-name="localweblogic" jndi-name="SapDBDataSource"/> --> <!-- Weblogic Style JNDI name -->
        <!-- <jndi-jdbc jndi-server-name="default" jndi-name="jdbc/localsapdb" isolation-level="ReadCommitted"/> --> <!-- JRun4 Style JNDI name -->
        <!-- <tyrex-dataSource dataSource-name="localsapdb" isolation-level="ReadCommitted"/> -->
    </datasource>

    <datasource name="localfirebird"
            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
            field-type-name="firebird"
            check-on-start="true"
            use-foreign-key-indices="false"
            add-missing-on-start="true"
            alias-view-columns="false"
            join-style="ansi">
        <read-data reader-name="tenant"/>
        <read-data reader-name="seed"/>
        <read-data reader-name="seed-initial"/>
        <read-data reader-name="demo"/>
        <read-data reader-name="ext"/>
        <read-data reader-name="ext-test"/>
        <read-data reader-name="ext-demo"/>
        <inline-jdbc
                jdbc-driver="org.firebirdsql.jdbc.FBDriver"
                jdbc-uri="jdbc:firebirdsql:127.0.0.1:C:\\data\\ofbiz.gdb"
                jdbc-username="SYSDBA"
                jdbc-password="masterkey"
                isolation-level="ReadCommitted"
                pool-minsize="2"
                pool-maxsize="250"
                time-between-eviction-runs-millis="600000"/>
        <!-- Sample remote URI: jdbc-uri="jdbc:firebirdsql://localhost:3050//opt/interbase/data/ofbiz.gdb" -->
        <!-- <jndi-jdbc jndi-server-name="default" jndi-name="comp/env/jdbc/xa/localfirebird" isolation-level="ReadCommitted"/> --> <!-- Orion Style JNDI name -->
        <!-- <tyrex-dataSource dataSource-name="firebird" isolation-level="ReadCommitted"/> -->
    </datasource>
    <!--
     The following has been tested with SQL Server 2005 + MS SQL Server JDBC Driver 1.1
     Tips:
      1. Make sure your SQL Server has mixed mode authentication as per this post:
       http://aspadvice.com/blogs/plitwin/archive/2006/09/10/Login-failed-_2E002E002E00_-not-associated-with-a-trusted-SQL-server-connection.aspx
      2. Make sure you have copied JDBC driver jar to entity/lib/jdbc
      3. Make sure you have installed JDBC Driver XA support as per MSSQL_JDBC_HOME/enu/xa/xa_install.sql
      4. Make sure that you have created and authorized the ofbiz database and login
      5. Make sure that schema-name, jdbc-username, jdbc-password and databaseName are all correct!

     Notes:
     a. The reason for putting SelectMethod=cursor property in URL is explained here:
      http://forum.java.sun.com/thread.jspa?forumID=48&threadID=184797
     b. If using an old version of the driver, beware of this resource leak:
      http://support.microsoft.com/kb/820773/
    -->
    <datasource name="localmssql"
            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
            schema-name="dbo"
            field-type-name="mssql"
            check-on-start="true"
            add-missing-on-start="true"
            join-style="ansi"
            alias-view-columns="false"
            use-fk-initially-deferred="false">
        <read-data reader-name="tenant"/>
        <read-data reader-name="seed"/>
        <read-data reader-name="seed-initial"/>
        <read-data reader-name="demo"/>
        <read-data reader-name="ext"/>
        <read-data reader-name="ext-test"/>
        <read-data reader-name="ext-demo"/>
        <inline-jdbc
                jdbc-driver="com.microsoft.sqlserver.jdbc.SQLServerDriver"
                jdbc-uri="jdbc:sqlserver://localhost:1791;databaseName=ofbiz;SelectMethod=cursor;"
                jdbc-username="ofbiz"
                jdbc-password="ofbiz"
                isolation-level="ReadCommitted"
                pool-minsize="2"
                pool-maxsize="250"
                time-between-eviction-runs-millis="600000"/>
        <!-- <jndi-jdbc jndi-server-name="default" jndi-name="comp/env/jdbc/xa/localmssql" isolation-level="ReadCommitted"/> --> <!-- Orion Style JNDI name -->
    </datasource>

    <datasource name="localp6spy"
            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
            schema-name="public"
            field-type-name="postgres"
            check-on-start="true"
            add-missing-on-start="true"
            join-style="ansi">
        <read-data reader-name="tenant"/>
        <read-data reader-name="seed"/>
        <read-data reader-name="seed-initial"/>
        <read-data reader-name="demo"/>
        <read-data reader-name="ext"/>
        <read-data reader-name="ext-test"/>
        <read-data reader-name="ext-demo"/>
        <inline-jdbc
                jdbc-driver="com.p6spy.engine.spy.P6SpyDriver"
                jdbc-uri="jdbc:postgresql://127.0.0.1/ofbiz"
                jdbc-username="ofbiz"
                jdbc-password="ofbiz"
                isolation-level="ReadCommitted"
                pool-minsize="2"
                pool-maxsize="250"
                time-between-eviction-runs-millis="600000"/>
        <!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/OracleDataSource" isolation-level="Serializable"/> -->
    </datasource>

    <datasource name="localadvantage"
            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
            field-type-name="advantage"
            check-on-start="true"
            add-missing-on-start="true"
            check-indices-on-start="false"
            use-foreign-keys="false"
            use-foreign-key-indices="true"
            join-style="ansi-no-parenthesis"
            alias-view-columns="false"
            always-use-constraint-keyword="true">
        <read-data reader-name="tenant"/>
        <read-data reader-name="seed"/>
        <read-data reader-name="seed-initial"/>
        <read-data reader-name="demo"/>
        <read-data reader-name="ext"/>
        <read-data reader-name="ext-test"/>
        <read-data reader-name="ext-demo"/>
        <inline-jdbc
                jdbc-driver="com.extendedsystems.jdbc.advantage.ADSDriver"
                jdbc-uri="jdbc:extendedsystems:advantage://localhost:6262;catalog=c:\\advantage\\OFBIZ.ADD;TableType=adt"
                jdbc-username="ADSSYS"
                jdbc-password="adssys"
                isolation-level="ReadCommitted"
                pool-minsize="2"
                pool-maxsize="250"
                time-between-eviction-runs-millis="600000"/>
    </datasource>
   
    <!-- According to http://markmail.org/message/s75sf6zhtizzkqbv Since version V6R1 (AS/400, db2) there is no need for an own fieldtype.xml - just use the derby-fieldtypes like this: -->
    <!-- Beware use-indices-unique="false" is needed because of Derby bug with null values in a unique index, not sure it's needed with DB2 -->
    <datasource name="DB2"
            helper-class="org.apache.ofbiz.entity.datasource.GenericHelperDAO"
            schema-name="OFBIZ"
            field-type-name="derby"
            check-on-start="true"
            add-missing-on-start="true"
            use-pk-constraint-names="false"
            use-indices-unique="false"
            alias-view-columns="false"
            use-order-by-nulls="true"
            offset-style="fetch">
        <read-data reader-name="tenant"/>
        <read-data reader-name="seed"/>
        <read-data reader-name="seed-initial"/>
        <read-data reader-name="demo"/>
        <read-data reader-name="ext"/>
        <read-data reader-name="ext-test"/>
        <read-data reader-name="ext-demo"/>
           
            <!--   There is an open source version of the jdbc driver at sourceforge: http://sourceforge.net/projects/jt400/ -->
        <inline-jdbc
            jdbc-driver="com.ibm.as400.access.AS400JDBCDriver"
            jdbc-uri="jdbc:as400:192.168.1.10;prompt=false;libraries=ofbiz;lazyclose=true;translate binary=true"
            jdbc-username="ofbiz"
            jdbc-password="ofbiz"
            isolation-level="ReadCommitted"
            pool-minsize="2"
            pool-maxsize="250"
            time-between-eviction-runs-millis="600000"/>
    </datasource>
</entity-config>

2020년 3월 4일 수요일

Ubuntu 18.04 Mariadb-Server 설치시 의존성 문제

Ubuntu 18.04 클라이언트로 노트북 하나를 셋팅해서 사용중이다.
구닥다리 노트북에 개발 테스트용으로 한번 해보고 있는데

OfBiz를 돌려보려고 삽질중에 DB를 MariaDB로 하려고
sudo apt-get install mariadb-server 하니
mariadb-server : 의존: mariadb-server-10.1 (>= 1:10.1.44-0ubuntu0.18.04.1) 하지만 %s 패키지를 설치하지 않을 것입니다.
라고 한다.

원인은 mysql이 설치되어 있어서다.
구글링해서
https://mariadb.com/kb/en/unable-to-install-mariadb-101-on-ubuntu-1804-after-apt-remove-purge-mysql/
요런 글을 찾았고
sudo apt-get remove --purge mysql*
요걸로 싹 날리고 새로 시도하니 잘 되고 있다.

2019년 5월 16일 목요일

SVN 사용자 추가

회사 개발서버...
릴리즈 업데이트 해야 하는데...

일단 진행중인 프로젝트 때문에 잠시 보류 상태에서
신입을 위해 계정하나 새로 만들어 주고 SVN사용자에도 추가 해 주려는데

...
100만년만은 아니지만 몇년만에 하려니 생각이 안났다...ㅠㅠ
검색과 시행착오 끝에

htpasswd 대상pw파일 계정

위 처럼 입력하면 비번을 물어보고 입력하면 암호화되어 추가 되었다.

조만간 서버를 새로 갈아 엎을까 고민중인데
그때 차근차근 설정들 정리를 좀 해놔야겠다.

이젠 나이가 들어가니 정말 보조기억 장치가 필요한듯 하다.

2012년 12월 3일 월요일

ubuntu에서 apache2, tomcat연동

이건 할때마다 기억도 안나고 햇갈린다.
그래서 오늘도 퍼담아 둔다

퍼온곳은 요기
http://bs-secretroom.blogspot.kr/2012/08/ubuntu-os-apache2-tomcat6.html


우분투 Ubuntu OS 에서 apache2 tomcat6 연동하기

우분투 Ubuntu OS 에서 패키지 설치를 위해 제공해 주는
apt-get 명령어를 이용한 패키지 설치 및
상호간 연동 방법이다.
이미 나와 있는 방법들을 통해서 많이들 아는
apache2 의 80번 포트로 접속해서 jsp 파일을 띄우는 것이다.

tomcat6 가 실행되기 위해서 우선적으로 java-jdk 가 설치되어야 한다.
또한 웹 서비스를 실행하기 위해 apache2 를 설치한다.

$ sudo apt-get install openjdk-6-jdk
$ sudo apt-get install apache2 tomcat6

apache2 와 tomcat6 가 서로 연결하기 위해 추가 패키지
libapache2-mod-jk 를 설치한다.

$ sudo apt-get install libapache2-mod-jk

libapache2-mod-jk 를 설치하면서 생성된 디렉토리에서 파일 하나를 복사해서 수정한다.

$ cp /etc/libapache2-mod-jk/workers.properties /etc/apache2/
$ sudo vi /etc/apache2/workers.properties

# 우분투 12.04 server 32bit 버전 기준으로,
# openjdk-6-jdk 를 설치했을 때의
# JAVA_HOME=/usr/lib/jvm/java-6-openjdk-i386/
# JAVA_HOME 위치는 변경될 수 있으니 /usr/lib/jvm 등의 위치를 통해 분명히 확인해 두자.

$ sudo vi /etc/default/tomcat6
JAVA_HOME=/usr/lib/jvm/java-6-openjdk-i386/

vi /etc/apache2/workers.properties
이하에 나오는 내용은 파일 내 이미 있는 내용을 수정한 것이다.
내용 추가 및 수정 내용
woeker.java_home=/usr/lib/jvm/java-6-openjdk-i386/
worker.list=jspstudy
worker.jspstudy.port=8009
worker.jspstudy.host=localhost
worker.jspstudy.type=ajp13
worker.jspstudy.lbfactor=20
파일 내용 추가 및 수정 끝

$ sudo vi /etc/apache2/apache2.conf
libapache2-mod-jk 를 설치한 모듈 관련 설정을 추가해 준다.
이하 내용을 추가한다.
내용 추가 및 수정 내용
<IfModule jk_module>
JkWorkersFile /etc/apache2/workers.properties - 위에서 복사한 workers 파일 위치 지정
JkLogFile /var/log/apache2/mod_jk.log
JkShmFile /var/log/apache2/mod_jk.shm
</IfModule>
파일 내용 추가 및 수정 끝

apache2 에서는 각 웹사이트 마다 설정 파일을 따로 만들 수 있다.
기본으로 제공하는 파일을 복사해서 tomcat 연동을 위한 파일 수정을 한다.
$ sudo cp /etc/apache2/site-available/default /etc/apache2/site-available/add-tomcat
$ sudo vi /etc/apache2/site-available/add-tomcat
이 파일 역시 파일 내 있는 정보를 수정하거나 내용을 추가한다.
내용 추가 및 수정 내용
Servername jspstudy.org
DocumentRoot /srv/web/jspstudy - 위치는 개별적으로 지정한 위치를 기억하고서 지정한다.
<Directory /srv/web/jspstudy/>
   Options FollowSymLinks
   AllowOverride None
   Order allow,deny
   Allow from all
</Directory>
JkMount /*.jsp jspstudy - jspstudy 는 위에서 언급한 workers.list 이름이다.
파일 내용 추가 및 수정 끝

이제 tomcat6 에서의 파일을 수정해준다.

$ sudo vi /etc/tomcat6/server.xml

<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
위 부분의 앞뒤로 <!--, --> 이렇게 주석처리가 되어 있다.
웹사이트에서의 주석처리하는 부분인데 이 주석 부분을 삭제해서
위 내용이 나오도록 한다.

이제 각 서비스를 재시작한 후 정상적으로 올라오는지 확인해 본다.

$ sudo /etc/init.d/tomcat6 restart
$ sudo /etc/init.d/apache2 restart

웹사이트에서 접속해 본다.
http://localhost - 기본적인 apache2 서비스
http://localhost:8080 - 기본적인 tomcat6 서비스

이제 연동이 끝났으니
http://localhost/hello.jsp 파일이 정상적으로 올라오면 성공이다.

hello.jsp 파일 내용

<%@ page import="java.util.*" %>
<%@ page import="java.util.Date" %>

<html>
<body>
        <% out.print("Hello JSP"); %><br>

        <% Date toDay = new Date(); %><br>
        <%= toDay %>

</body>
</html>

여기서 toDay 부분은 서비스를 제공해주는 서버의 현재 시간이다.
이부분이 정상적으로 나오면 tomcat 서비스가 정상적인 것이다.



tomcat6 만 이용해서 80 포트 접속을 통한 서비스 시작하기
apache2 와 연동하는 주 목적은 80 포트를 이용하기 위함이다.
구글링을 하다가 아주 빠르고 간편하게 80 포트를 접속하는 방법을 찾아서 첨부한다.
$ sudo vi /etc/default/tomcat6

AUTHBIND=yes
파일 하단부에 보면 # 주석처리 되어 있다.

$ sudo vi /etc/tomcat6/server.xml
    <Connector port="80"
               protocol="HTTP/1.1"
               connectionTimeout="20000"
               URIEncoding="UTF-8"
               redirectPort="8443" />
기본값은 Connector port 가 8080 이다.

$ sudo /etc/init.d/tomcat6 restart

위에서 했던 작업이 허무할 정도로 간단하다;;;

참고로 tomcat6 메인 위치를 변경하고자 한다면
$ sudo vi /etc/tomcat6/server.xml

<Host...
로 시작하는 부분에서
appBase="[원하는 디렉토리]"

를 추가해 주자

참고 URL
http://wonchanlee.tumblr.com/post/6969537049/tomcat6-80-port-binding-on-ubuntu

2012년 4월 3일 화요일

우분투 서버 초기 설정

1. 고정IP 설정
sudo vi /etc/network/interfaces
----------------------------------------------------------------------------------
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.0.71
gateway 192.168.0.1
netmask 255.255.255.0
dns-nameservers 168.126.63.1 168.126.63.2
----------------------------------------------------------------------------------

아래 실행하여 변경 내용 반영
sudo /etc/init.d/networking restart

2. SSH설정
sudo apt-get install openssh-server
sudo /etc/init.d/ssh restart
sudo vi /etc/hosts.allow

----------------------------------------------------------------------------------
#                   See the manual pages hosts_access(5) and hosts_options(5).
#
# Example:    ALL: LOCAL @some_netgroup
#             ALL: .foobar.edu EXCEPT terminalserver.foobar.edu
#
# If you're going to protect the portmapper use the name "portmap" for the
# daemon name. Remember that you can only use the keyword "ALL" and IP
# addresses (NOT host or domain names) for the portmapper, as well as for
# rpc.mountd (the NFS mount daemon). See portmap(8) and rpc.mountd(8)
# for further information.
#
sshd 192.168.0.2

----------------------------------------------------------------------------------

3. ssh툴에서 언어 UTF-8로 변경


4. sudo apt-get install mysql-server

5. sudo vi /etc/mysql/my.cnf
bind address 찾아 주석 처리

6. FTP설정
sudo apt-get install vsftp

필요한 옵션 편집
sudo vi /etc/vsftpd.conf
local_eable=YES

서비스 재시작
sudo /etc/init.d/vsftpd restart

2024년 여섯번째 도서 리뷰 [무엇이 1등 팀을 만드는가]

한빛미디어 <나는 리뷰어다> 활동을 위해서 책을 제공받아 작성된 서평입니다. 올해의 마지막 서평이다. 무엇이 1등 팀을 만드는가.... 시작하기에 앞서 제목이 과하지 않은가 하는 생각이 든다. 1등 팀이라....예전 어느 개그 프로에서 ...