Thứ Sáu, 15 tháng 1, 2016

Kinh nghiem thiet lap server magento

Our experience: We only host Magento stores.
It is sadly a very, very common misconception with Magento that you should even use a separate DB server, and worse, that you should use your most powerful server as the DB server.
Unless you are in a clustered configuration with multiple web servers, we never advocate using a separate database server for Magento.
I'm going to back this up with the latest stats from some servers.
I have taken the load average from a small Magento website (4,000 unique visitors per day). You can see for yourself that the separate DB server uses very little CPU and resources in general. In fact, the only thing it does require is a lot of RAM.
MySQL is absolutely not the bottleneck for any Magento installation. But if you must use two servers....
... I am going to provide this recommendation on the basis your site has around 10,000 daily unique visitors. BUT in order for an accurate reply, you should really post:
  1. Your target level of traffic, visits, hits
  2. Your full server specifications
For your webserver
  1. You want as many, and as fast CPUs as possible (the more cores, the greater the concurrency support - the faster the clock speed, the faster the individual page load times)
  2. You need a proportional amount of RAM to CPU, usually 1GB per core is a good guide
  3. I/O is not an issue, so RAID1 7200RPM+ disks will suffice (WD RE4 or WD 3000 HLFS)
For your DB server
  1. You do not need many cores, dual core would be more than enough. But again, higher the clock speed, the faster the individual queries.
  2. You want as much RAM as possible. Magento uses InnoDB and InnoDB craves RAM to run well.
  3. I/O and general IOPS make/break a DB server - so you want a fast disk set-up, but for a 10k visitor store, RAID1 7200RPM+ disks will suffice (WD RE4 or WD 3000 HLFS).
You could also load balance between web traffic between the two servers, but the configuration for this is way beyond the scope of this reply.
MySQL Queries
Database server load
Database Server Load
Web server load
Web server load

Thứ Sáu, 24 tháng 7, 2015

Cai dat magento connector odoo 8



tạo thư mục để lưu addon connector

mình tạo

/root/addon-magento


chạy lệnh trong centos
git clone https://github.com/OCA/connector.git --branch 8.0 
git clone https://github.com/OCA/connector-ecommerce.git --branch 8.0
git clone https://github.com/OCA/connector-magento.git --branch 8.0
git clone https://github.com/OCA/e-commerce.git --branch 8.0
git clone https://github.com/OCA/product-attribute.git --branch 8.0
git clone https://github.com/OCA/sale-workflow.git --branch 8.0
sau đó thêm đường dẫn thư mục addon vào file odoo-server.conf
tôi dùng centos 6 nên file nằm trong /etc/odoo-server.conf


addons_path=/root/addon-magento/connector
addons_path=/root/addon-magento/connector-ecommerce
addons_path=/root/addon-magento/connector-magento
addons_path=/root/addon-magento/e-commerce
addons_path=/root/addon-magento/product-attribute
addons_path=/root/addon-magento/sale-workflow 

Cài một số module còn thiếu Ví dụ module sau
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum install python-simplejson
yum install python-lxml
pip install magento

sau khi cài, sẽ có 1 thư mục nằm trong thư mục module của python, bạn vào thư mục module của python và copy nó sang thư mục của odoo
ví dụ thư mục modul python của tôi là
/usr/local/lib/python2.7/site-packages
tôi copy thư mục "magento" sang thư mục module của odoo
/opt/odoo

cài đặt module trong magento: vào econnect và tìm module của openlab

Openlabs_OpenERPConnector

Cấu hình magento web service

Đăng nhập vào Magento admin panel, sau đó vào System > Web-Services > SOAP/XML-RPC - Roles.
Tạo role named openerp và chọn kết nối All resources.
In System > Web-Services > SOAP/XML-RPC - Users,
Tạo tên sử dụng bất kỳ với API key (mật khẩu), ở đây ví dụ tôi chọn user là "openerp", và API key là "vudung"
In User Role, chọn openerprole.


Thứ Hai, 20 tháng 7, 2015

Cac loi thuong gap khi cai dat va su dung magento


Disable cache khi không vào được admin panel
vào phpmyadmin, chạy lệnh
UPDATE `core_cache_option` SET value=0;
Sau đó xóa thử mục cache trong /var/cache

openerp Error! You cannot define the decimal precision of 'Account' as greater than the rounding factor of the company's main currency

Hi;
Delete or Cut and Paste the folder "decimal_precision" (paste it anywhere, you can restore it later).
try to login, if it's OK, restore the folder to it's location under .../addons/..., and correct your configuration as indicated in the error message: Decrease the Decimal Precision of 'account' you have changed before or increase the rounding factor of the company currency.
You can change it by opening: Settings ----> Technical ---> Database Structure ----> Decimal Accuracy (for Account)
Account Dec Precision
And under : Settings ---> Companies ---> Companies ----> Your Company ---> Configuration (TAB) and do as follow
image description

Ok, let's do it another way.
If you are familar with pgAdminIII:
(Instead of pgAdminIII, you can use any other tools to browse and edit your database Tables)
Connect to your database, edit the table decimal_precision
decimal_precision table
Save your modifications and restart your server.
Best regards