Changes

From SME Server
Jump to navigationJump to search
no edit summary
Line 19: Line 19:     
5. Point your browser to 'http://yourserver:8000' and login with user/pass: admin:admin
 
5. Point your browser to 'http://yourserver:8000' and login with user/pass: admin:admin
 +
 +
 +
==MySQL backend==
 +
By default eHour uses an internal database (Derby). However you can use MySQL as the backend database too. Please note that if you want to use/change to MySQL, all existing data will not be used/transferred. It will still be available in the Derby database.
 +
 +
A. Create a new MySQL database (e.g. ehour) (see [http://wiki.contribs.org/Useful_Commands#Create_a_Database_and_its_User here] how to)
 +
 +
B. Download the MySQL schema for ehour [https://raw.github.com/tedeling/ehour/20120613-RELEASE-1.0/eHour-persistence-mysql/src/sql/install/fresh.mysql.sql here]
 +
 +
C. Import the downloaded MySQL schema into the ehour database
 +
mysql ehour < fresh.mysql.sql
 +
 +
D. Allow MySQL Local Network Access
 +
config setprop mysqld LocalNetworkingOnly no
 +
expand-template /etc/my.cnf
 +
sv t /service/mysqld 
 +
 +
E. Create ehour SME Server db entries (Only required if you want to access ehour from the outside world)
 +
config set ehour service
 +
config setprop ehour TCPPort 8000
 +
config setprop ehour access public
 +
config setprop ehour status enabled
 +
signal-event remoteaccess-update
 +
 +
F. Edit the ehour config file to use the MySQL database
 +
/opt/ehour/home/conf/ehour.properties
 +
Set the database to MySQL and remove the # signs in front of the MySQL lines and change the MySQL user and password
 +
ehour.standalone.port=8000
 +
# derby, mysql and postgresql are supported. When derby is selected you can ignore the ehour.database lines
 +
ehour.database=mysql
 +
#
 +
# for mysql uncomment the following lines (and make sure postgresql lines below are commented out)
 +
ehour.database.driver=com.mysql.jdbc.Driver
 +
ehour.database.url=jdbc:mysql://localhost:3306/ehour?zeroDateTimeBehavior=convertToNull&amp;useOldAliasMetadataBehavior=true
 +
ehour.database.username=[mysql user]
 +
ehour.database.password=[mysql password]
 +
#
 +
# for postgresql uncomment the following lines (and make sure mysql lines above are commented out)
 +
#ehour.database.driver=org.postgresql.Driver
 +
#ehour.database.url=jdbc:postgresql://localhost:5433/ehour
 +
#ehour.database.username=sa
 +
#ehour.database.password=sa
 +
#
 +
ehour.db.version=0.8.4
 +
#
 +
ehour.configurationType=DEPLOYMENT
 +
#
 +
ehour.translations=%ehour.home%/resources/i18n
 +
 +
G. Add '/opt/ehour/ehour start' to /etc/rc.d/rc.local (This can be improved by adding ehour to runlevel 7)
     

Navigation menu