摘要: 第一次优化 [2013.4.24]增加access日志以查看爬虫的访问情况第二次优化 [2013.5.6]首页去除随机商品和随机文章首页指向的不重要页面使用nofollowrobots.txt中Disallow管理页面和用户页面修改不规范的url:/filters/select/all//和/filters/select//all/第三次优化 [2013.5.12]删除统计代码的display:none删除所有注释代码第四次优化 [2013.5.13]增加google analysis统计代码jilinmei.com使用nginx 301重定向到www.jilinmei.com第五次优化 [2 阅读全文
posted @ 2013-05-14 23:02 scige 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 原因是系统默认安装的libxml 2.6.26已经过时了,需要安装新的版本$ sudo yum remove -y libxml2-devel libxslt-devel从ftp://xmlsoft.org/libxml2/下载最新的libxml2和libxslt比如libxml2-2.9.0.tar.gz和libxslt-1.1.28.tar.gz依次安装libxml2和libxslt$ ./configure ; make ; sudo make install重新安装nokogiri,就可以解决问题$ sudo gem install nokogiri --with-xml2-lib=/ 阅读全文
posted @ 2013-04-12 14:26 scige 阅读(236) 评论(0) 推荐(0) 编辑
摘要: Rails 3.2.6$rake assets:precompile提示如下错误rake aborted!You have already activated rake 10.0.4, but your Gemfile requires rake 0.9.2.2. Using bundle exec may solve this./home/。。。。。。/config/boot.rb:6:in `<top (required)>'/home/。。。。。。/config/application.rb:1:in `<top (required)>'/home 阅读全文
posted @ 2013-04-11 15:24 scige 阅读(523) 评论(0) 推荐(0) 编辑
摘要: dedecms v5.7 sp11. 配置virtual hostsudo yum install phpsudo /etc/init.d/httpd restart2. 修改/etc/php.iniallow_url_fopen = Offsafe_mode = Off3. php扩展支持sudo yum install php-mysqlsudo yum install php-gdsudo /etc/init.d/httpd restart4. 按照安装步骤要求设置每个目录权限chmod 777 -R uploads/5. 设置mysql用户权限使用root用户太危险6. 安装问题问题: 阅读全文
posted @ 2013-04-08 13:54 scige 阅读(472) 评论(0) 推荐(0) 编辑
摘要: 安装php,支持mysql和fpm$ apt-get install mysql-server$ apt-get install php5-cli php5-cgi php5-common php5-curl php5-dev php5-gd php5-mcrypt php5-mhash$ apt-get install php5-mysql libmysqld-dev$ apt-get install php5-fpmphp使用默认配置即可修改nginx配置,/opt/nginx/nginx.conf配置中增加一个虚拟主机 server { listen 80; server_name bl 阅读全文
posted @ 2013-03-23 20:10 scige 阅读(1531) 评论(0) 推荐(0) 编辑
摘要: 直接拷贝一份虚拟主机的配置即可 server { listen 80; server_name www.jilinmei.com; root /home/xxx/site_1; passenger_enabled on; } server { listen 80; server_name blog.jilinmei.com; root /home/xxx/site_2; passenger_enabled on; }重启nginx后生效$ sudo service nginx restart 阅读全文
posted @ 2013-03-23 18:17 scige 阅读(872) 评论(0) 推荐(0) 编辑
摘要: ./configuresudo apt-get install xutils-devmake出现错误parse.c:113: error: conflicting types for ‘adns__parse_domain’internal.h:569: note: previous declaration of ‘adns__parse_domain’ was here把adns下internal.h中第568—571行adns_status adns__parse_domain(adns_state ads, int serv, adns_query qu, vbuf *vb, parse 阅读全文
posted @ 2013-03-15 21:35 scige 阅读(224) 评论(0) 推荐(0) 编辑
摘要: Active Record迁移到mongoid1. 修改文件:config/application.rbrequire 'rails/all' 修改为require "action_controller/railtie"require "action_mailer/railtie"require "active_resource/railtie"require "rails/test_unit/railtie"注释 config.active_record.whitelist_attributes 阅读全文
posted @ 2013-01-11 15:54 scige 阅读(332) 评论(0) 推荐(0) 编辑
摘要: 测试驱动rspec-rails:BDD测试框架 初始化:rails generate rspec:installcapybara:模拟浏览器器行为factory_girl_rails:生成数据database_cleaner:清除数据库数据simplecov:覆盖率测试faker:生成假数... 阅读全文
posted @ 2012-12-10 22:11 scige 阅读(1261) 评论(0) 推荐(0) 编辑
摘要: 新建备份用户新建定时备份用户和权限(localhost)use mysql;insert into user(Host,User,Password) values("localhost","backupuser",password("123456"));flush privileges;grant all privileges on db_name.* to backupuser@localhost identified by '123456';flush privileges;grant RELOAD, SUPER, 阅读全文
posted @ 2012-12-07 23:18 scige 阅读(398) 评论(0) 推荐(0) 编辑