Project

General

Profile

Support #549

Updated by Daniel Curtis about 9 years ago

This is a simple guide on setting up a Trytond server on FreeBSD 9.2. 

 * Update packages and ports tree: 
 <pre> 
 pkg update && pkg upgrade 
 portsnap fetch extract 
 </pre> 

 --- 

 h1. Install MariaDB server 

 * Start by installing the mariadb-server and mariadb-client packages: 
 <pre> 
 pkg install mariadb55-{server,client} 
 </pre> 

 h2. Configure MariaDB server 

 * Copy a base MariaDB configuration to use 
 <pre> 
 cp /usr/local/share/mysql/my-small.cnf /var/db/mysql/my.cnf 
 </pre> 

 * Tuning: Copy one of the default config files and change the max packet size: 
 <pre> 
 vi /var/db/mysql/my.cnf 
 </pre> 
 #* and modify @max_allowed_packet@ to 32M 
 <pre> 
 max_allowed_packet = 32M 
 </pre> 

 * Enable and start MariaDB 
 <pre> 
 echo 'mysql_enable="YES"' >> /etc/rc.conf 
 service mysql-server start 
 </pre> 

 * Prepare Database for use by running the secure installation. +Choose a root password+ and answer +yes+ to all questions. 
 <pre> 
 mysql_secure_installation 
 </pre> 

 h3. Create MariaDB Databases and Users 

 * Login to MariaDB and create appropriate databases and users. 
 <pre> 
 mysql -u root -p 
 </pre> 
 #* and run the following SQL queries to create the *trytond* database and user: 
 <pre> 
 CREATE DATABASE trytond CHARACTER SET utf8; 

 CREATE USER 'trytond'@'127.0.0.1' IDENTIFIED BY 'SecretSecretPassword'; 

 GRANT ALL PRIVILEGES ON trytond.* TO 'trytond'@'127.0.0.1'; 

 flush privileges; 
 </pre> 

 --- 

 h1. Install Trytond 

 * Install Trytond 
 <pre> 
 pkg install trytond28 
 </pre> 

 * Install Tryton modules: 
 <pre> 
 pkg install trytond28_account trytond28_account_asset trytond28_account_be trytond28_account_invoice trytond28_account_invoice_history trytond28_account_invoice_line_standalone trytond28_account_product trytond28_account_statement trytond28_account_stock_anglo_saxon trytond28_account_stock_continental trytond28_analytic_account trytond28_analytic_invoice trytond28_analytic_purchase trytond28_analytic_sale trytond28_calendar trytond28_calendar_classification trytond28_calendar_scheduling trytond28_calendar_todo trytond28_carrier trytond28_carrier_percentage trytond28_carrier_weight trytond28_company trytond28_company_work_time trytond28_country trytond28_currency trytond28_dashboard trytond28_google_maps trytond28_ldap_authentication trytond28_ldap_connection trytond28_party trytond28_party_siret trytond28_party_vcarddav trytond28_product trytond28_product_attribute trytond28_product_cost_fifo trytond28_product_cost_history trytond28_product_measurements trytond28_product_price_list trytond28_production trytond28_project trytond28_project_invoice trytond28_project_plan trytond28_project_revenue trytond28_purchase trytond28_purchase_invoice_line_standalone trytond28_purchase_shipment_cost trytond28_sale trytond28_sale_opportunity trytond28_sale_price_list trytond28_sale_shipment_cost trytond28_sale_supply trytond28_sale_supply_drop_shipment trytond28_stock trytond28_stock_forecast trytond28_stock_inventory_location trytond28_stock_location_sequence trytond28_stock_lot trytond28_stock_product_location trytond28_stock_split trytond28_stock_supply trytond28_stock_supply_day trytond28_stock_supply_forecast trytond28_stock_supply_production trytond28_timesheet 
 </pre> 

 * Install py27-MySQLdb from ports: 
 <pre> 
 cd /usr/ports/databases/py-MySQLdb 
 make install clean 
 </pre> 
 *NOTE*: This package must be installed from ports or else the mariadb55-client package will be overwritten by the mysql55-client package. 

 h2. Configure Trytond 

 * Edit the Trytond configuration file 
 <pre> 
 vi /usr/local/etc/trytond.conf 
 </pre> 
 #* Add/Modify the following: 
 <pre> 
 jsonrpc = trytond.exmaple.com:8000 

 db_type = mysql 

 db_host = 127.0.0.1 
 db_port = 3306 
 db_user = trytond 
 db_password = SuperSecretPassword 

 admin_passwd = SecretPassword 
 </pre> 

 * Enable Trytond to start at boot: 
 <pre> 
 echo 'trytond_enable="YES"' >> /etc/rc.conf 
 </pre> 

 * Start Trytond: 
 <pre> 
 service trytond start 
 </pre> 

 --- 

 h2. Resources 

 * https://code.google.com/p/tryton/wiki/InstallationFreeBSD 
 * https://github.com/tryton/trytond 
 * http://www.dalescott.net/?p=2771

Back