Occasionally I need to open .ai (Adobe Illustrator) and .cdr (Coreldraw) files on Fedora, and I found Inkscape is good enough for me. I won’t edit these files so I don’t know Inkscape full capacity.
Author: 芳草苑主
-
Speed bottleneck of the web server
非常典型的多层架构:
第一层 Nginx
第二层 php fastcgi
第三层 memcached
第四层 MySqlApache 有个 mod_php,相当于合并了第一层和第二层,Nginx 没有 module for php,这不是什么问题,分层更利于扩展。第三层的加入完全是为了减轻数据库压力,提高性能。目前第2,3,4层之间的优化差不多到极限了(或者说到我能力的极限了),但第1,2层之间尚有潜力可挖。
not_in_use.php 和 not_in_use.html 都是一个静态文件,没有数据库操作。但 php 文件必须由 Nginx 经由 php fastcgi (使用 unix socket)产生,html 则由 Nginx 直接访问文件系统,就单因素分析,php fastcgi 是普通文件系统速度的34%,所以要想办法绕开 php fastcgi。以下测试在数据中心主机上直接运行 ApacheBench。
测试一:
$ ab -kc 100 -n 500 http://magento/not_in_use.php
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/Benchmarking magento (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Finished 500 requestsServer Software: nginx/0.6.36
Server Hostname: magento
Server Port: 80Document Path: /not_in_use.php
Document Length: 7686 bytesConcurrency Level: 100
Time taken for tests: 0.336355 seconds
Complete requests: 500
Failed requests: 0
Write errors: 0
Keep-Alive requests: 0
Total transferred: 4089329 bytes
HTML transferred: 4004406 bytes
Requests per second: 1486.52 [#/sec] (mean)
Time per request: 67.271 [ms] (mean)
Time per request: 0.673 [ms] (mean, across all concurrent requests)
Transfer rate: 11871.39 [Kbytes/sec] receivedConnection Times (ms)
min mean[+/-sd] median max
Connect: 0 11 17.8 3 58
Processing: 13 49 17.9 50 94
Waiting: 3 45 18.8 46 88
Total: 25 60 14.2 61 94Percentage of the requests served within a certain time (ms)
50% 61
66% 70
75% 72
80% 74
90% 79
95% 80
98% 84
99% 86
100% 94 (longest request)=======================================================
测试二:
$ ab -kc 100 -n 500 http://magento/not_in_use.html
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/Benchmarking magento (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Finished 500 requestsServer Software: nginx/0.6.36
Server Hostname: magento
Server Port: 80Document Path: /not_in_use.html
Document Length: 7686 bytesConcurrency Level: 100
Time taken for tests: 0.115725 seconds
Complete requests: 500
Failed requests: 0
Write errors: 0
Keep-Alive requests: 500
Total transferred: 3959000 bytes
HTML transferred: 3843000 bytes
Requests per second: 4320.59 [#/sec] (mean)
Time per request: 23.145 [ms] (mean)
Time per request: 0.231 [ms] (mean, across all concurrent requests)
Transfer rate: 33406.78 [Kbytes/sec] receivedConnection Times (ms)
min mean[+/-sd] median max
Connect: 0 3 7.3 0 22
Processing: 7 17 4.1 18 23
Waiting: 7 16 4.0 17 23
Total: 7 20 9.9 18 41Percentage of the requests served within a certain time (ms)
50% 18
66% 20
75% 22
80% 37
90% 39
95% 40
98% 41
99% 41
100% 41 (longest request) -
Fedora update made my system unbootable
今天 Fedora 的一个更新后提示我 logout and relogin,结果我 logout 后死机。重启,进度条到100%后还是死机。
幸好我注意到这个更新是关于 ntfs 的,马上把 /etc/fstab 里我添加的几个条目注释掉,系统又可以启动了。我再细察了/etc/fstab,关于 cifs 的加载,原先写得不是很规范,缺少 sec=none 参数,造成 Fedora 更新后不能启动。
-
Run opentaps as a service
为了让 Opentaps 在系统启动后自动启动,我在 /etc/rc.d/rc.local 里添了一行
/path/to/opentaps/startofbiz.sh
在 Opentaps 1.0.4 版之前用这个方法启动 Opentaps 没发现大的问题,但 1.0.4 版运行 startofbiz.sh 的当前目录必须为 opentaps 的目录,不能再用上述办法启用 Opentaps。再说上述办法并不是正统的以 service 运行 Opentaps,所以我又重新寻找一个能让 Opentaps 自启动的办法。其实也很简单:
- 适当编辑 rc.ofbiz 的参数 (rc.ofbiz 似乎是在 DOS 下写就的,我用了一次 dos2unix 才让它运行起来)
cp /path/to/opentaps/rc.ofbiz /etc/init.d/ofbiz
chmod 755 /etc/init.d/ofbiz
chkconfig --add ofbiz
chkconfig --level 235 ofbiz on
service ofbiz start
-
Tough Parallels Plesk
Parallels Plesk 对我来说是鸡肋。1&1 送了这玩意一年的许用证,一年以后我还用 1&1 吗?我如果用了 Parallels Plesk 就怕象吃鸦片上瘾,以后如果离开 1&1,别人家如果不送 Parallels Plesk 就要花钱买,那时我会觉得很懊恼。
1&1 既然送了 Parallels Plesk,我也在 Parallels Plesk Panel 里转了一圈,觉得它算是一款好的商业软件,只不过不对我的胃口罢了。正因为如此,我没删 Parallels Plesk,只是将 psa service 停止了。
如此相安无事过了几个星期,今天突然发现 opentaps 不能启动了。一查,8443 端口被占用了,我马上想到是 Parallels Plesk 又复活了,难道 psa 还有一个守护进程?Parallels Plesk 这么设计大概为了保证 Panel 的 up time,但有点病毒作风,再加我也搞不清它的机理,看来要把它删了一了百了。
-
Broadcom wlan driver for linux
我的 Compaq V6133eu 集成的是 Broadcom bcm4322 无线网卡。Compaq V6133eu 安装了 Fedora 11 以后,就是这个无线网卡不能工作。HP 和 Broadcom 对 linux 用户支持都不到位,HP 那儿找不到 Broadcom wlan driver for linux,Broadcom 把 Broadcom wlan driver for linux 隐藏得很深,我搜了 N 次以后才找到。我嫌安装步骤过于繁琐,踌躇着还没动手,这时 Fodera 提示我 Firmware update。难道是 Fedora 刚刚增加了 Broadcom wlan driver for linux?Firmware update 后重启,无线网卡已经开始工作了,省却我手动安装的繁琐。
-
I love Webmin & Virtualmin
用过 Webmin 和 Virtualmin 以后,我觉得这个组合最适合我管理主机了,有了 Webmin 和 Virtualmin,根本就用不着 cPanel 或 Plesk。
Virtualmin GPL 的官方说不支持 Fedora,可它已经跑在我的 Fedora 11 上了。我的经验是在 Fedora 上 用 install.sh 来安装 Virtualmin GPL 确实会出现错误无法进行下去。错误提示是:
error: open of
error: open of HTML failed: No such file or directory
error: open of PUBLIC failed: No such file or directory但换个方式安装 Virtualmin GPL 就成功了—— 登录 Webmin,在 Webmin Configuration -> Webmin Modules 里以安装 Module 的方式上传 virtual-server-3.703.gpl.wbm.gz。非常的简单!
Webmin 还解决我在 CentOS 的一个老大难问题——之前我一直未能成功地在 CentOS 上安装 CPAN FCGI。在 Webmin 里找到安装 perl CPAN module 的界面,输入模块名称 FCGI,一下子就装好了。感觉非常的幸福!
-
Mount FTP file system on CentOS
有了 SFTP 以后,FTP 几乎没有用武之地了,研究 FTP 大多是因为某些软件或服务器只支持 FTP。
1&1 独立主机附赠一个跟硬盘容量相等的 FTP 备份空间,此 FTP 只能由 root server 访问,但 1&1 并没有提供现成的备份软件(1&1 营销上的失误)。FTP 备份空间对我来说用处不大,但 250 G 的空间空着也是浪费,于是我自创了我的备份方案,此中关键点是如何在 CentOS 上加载 FTP 文件系统。
经一番搜索,找到 curlftpfs,用它可以加载 FTP 文件系统,但 Fedora 可以直接 yum install curlftpfs,CentOS 里没有,得用 DAG repository,所以第一步:安装 DAG repository。
rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS//rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
第二步:安装 curlftpfs
yum install curlftpfs
第三步:没有第三步,已经可以使用 curlftps 了。如果要加载 FTP 文件系统
curlftpfs ftp://ftp_host/sub_dir mount_point -o user="ftp_username:ftp_password", uid=user_id, gid=group_id, allow_other
如果在启动时自动加载 FTP 文件系统,在 /etc/fstab 中添加一行
curlftpfs#ftp_uername:ftp_password@ftp_host/sub_dir mount_point fuse rw,uid=user_id, gid=group_id,user,allow_other 0 0
(很多关于 curlftpfs in fstab 的介绍使用了 noauto,这样的话,还需执行mount mount_point
才能真正加载)卸载 FTP 文件系统
fusermount -u mount_point
-
Magento extensions worth my trying
I went through Magento Community Extensions, and short listed the following extensions worth my trying.
This module will provide a LiveChat support in Magento.
It don’t depends third party platform
It don’t require to fill a form before start a conversation
It identify automatically registered user
It provide information about the current page of the customer
It can provide useful information about transformation rate
Conversation are archived and available forever
It support multiple site
It support multiple operator
LiveChat behaviour can be customised with advanced configuration options
Apppearence can be easily customised with cssThis module was designed as an alternative to Magento Live Chat module. This module will help you integrate your Magento store with Google Talk. YALC – will allow you to use Google Talk service to support your customers. The main advantages of the module Luxe YALC module is:
1. Reliability. Server, even at the most reliable hosting services less reliable than Google.
2. Speed. Since the entire load on the transmission of messages rests with the Google Talk service is the work of IM does not affect the speed and load on your server.
3. Privacy. Communication takes place completely anonymously, ie, your client can not even your Google Account.
4. You can chat simultaneously with an unlimited number of users.
5. Increased number of users does not affect the speed of chat.
6. Free of charge. All you need – register Google Account for your support service.
7. You do not have to constantly keep running a third-party chat client. You can use for chat your favorite IM
8. All chat history is stored in Google Account, so you can always revert to it if you have forgotten. Google search helps you quickly find the needle message.I do not agree with “Server, even at the most reliable hosting services less reliable than Google”. In April I noticed Google Chatback had been down for several days. My server can be more reliable than that record. Anyway, it does not devalue this extension.
Magento Community Modules – Chinese Simplified (China) Language Pack
Chinese Simplified (China) Language Pack
Customer Groups Configurable Catalog
This extension enables you to hide categories and products from customers depending on the customer group.
Points and rewards module
Magento Easy Lightbox Community Module
This small extension will help to convert default magento store view switcher into nice flag buttons. Installation and configuration will take approximately 5 minutes. No files are replaced and no codding experience needed to install!
Magento Easy Catalog Images Community Module
A Blog build from scratch to work seamlessly in magento.
Log in on front as any customer using universal password for administration purposes
Drupal extension is a set of Core API extensions that offers a full access for Drupal modules to Orders, Catalog and so on.
This extension, will offer you to TOTALLY bypass Magento front office, using Drupal instead.
When a new user is created a Magento user is automatically created also.
Orders can be created from Drupal, cart is managed from Drupal.
Catalog is syncrhonized, so each Magento Product is a Drupal node that you can push into Views, etc….Replaces the standard single column drop down with a multi-column dropdown as used on sites like www.asos.com This style of menu is ideally suited to sites with a large number of categories/sub-categories. Templates and skins are provided for the default and modern themes
Allow your customers to purchase and use Gift Certificates.
Adds reCAPTCHA to “Send Email to a Friend”, “Contact Us” and “Account Creation” pages.
Google Maps Store Locator
Magento Community Modules – English (United Kingdom) Language Pack
Magento Community Modules – English (United Kingdom) Language Pack
In Magento every product has a fixed attibute set. This module enables you to switch it.
-
Preinstalled package groups of a hosting server
Godaddy CentOS:
Installed Groups:
MySQL Database
Editors
System Tools
Text-based Internet
Legacy Network Server
DNS Name Server
FTP Server
Network Servers
Web Server
Windows File Server
Mail Server
PostgreSQL Database
Yum Utilities1&1 CentOS:
Installed Groups:
DNS Name Server
Editors
Legacy Network Server
Legacy Software Development
Legacy Software Support
Mail Server
MySQL Database
PostgreSQL Database
System Tools
Text-based Internet
Web Server
Yum Utilities