隨筆-75  評(píng)論-193  文章-5  trackbacks-0
            2012年4月4日
          var fixgeometry = function() {
              /* Some orientation changes leave the scroll position at something
               * that isn't 0,0. This is annoying for user experience. */
              scroll(0, 0);
              /* Calculate the geometry that our content area should take */
              var header = $(".header:visible");
              var footer = $(".footer:visible");
              var content = $(".content:visible");
              var viewport_height = $(window).height();
              
              var content_height = viewport_height - header.outerHeight() - footer.outerHeight();
              
              /* Trim margin/border/padding height */
              content_height -= (content.outerHeight() - content.height());
              content.height(content_height);
            }; /* fixgeometry */
            $(document).ready(function() {
              $(window).bind("orientationchange resize pageshow", fixgeometry);
            });
          posted @ 2013-01-28 10:59 The Matrix 閱讀(5208) | 評(píng)論 (1)編輯 收藏
          http://java.dzone.com/articles/hibernate-tuning-queries-using?page=0,0 
          posted @ 2012-05-14 14:28 The Matrix 閱讀(1225) | 評(píng)論 (0)編輯 收藏
          環(huán)境:
              
              Centos6.2(安裝在Vmware7.0中)
              Magento1.6.2
              Apache Httpd Server 2.2.15
              MySql 5.1.61
              PHP5.3.3

          安裝過(guò)程:

              apache http、mysql、php及相關(guān)擴(kuò)展安裝:
              其中apache http、Mysql、php都是利用centos的添加/刪除軟件功能進(jìn)行安裝。同時(shí)使用該功能安裝"php-xml"、"php-gd"、"php-pdo"、"php-mbstring"、"php-mysql"擴(kuò)展。
              使用chkconfig配置httpd和mysql為系統(tǒng)服務(wù)。命令如下:
              chkconfig httpd on
              chkconfig -add mysqld
              chkconfig mysqld on
              使用chkconfig --list 可以查看所有的服務(wù)配置狀態(tài)
              使用service httpd start、service mysqld start啟動(dòng)httpd和mysqld服務(wù)。可以通過(guò)service httpd restart重啟相關(guān)服務(wù)。
              此時(shí)訪問(wèn)本機(jī)的http://localhost可以看到apache的歡迎界面,同時(shí)編輯index.php文件,其內(nèi)容如下:
              <?php
                  phpinfo();
              ?>
              并將該文件置于/var/www/html目錄下,訪問(wèn)http://localhost/index.php,此時(shí)應(yīng)該不能看到php版本信息,僅能看到index.php的靜態(tài)文本內(nèi)容。
              修改/etc/httpd/conf/httpd.conf文件,修改如下:
              DirectoryIndex index.html index.html.var ->  DirectoryIndex index.html index.htm index.php
              增加:
              AddType application/x-httpd-php .php
              AddDefaultCharset -> AddDefaultCharset off  (解決中文亂碼問(wèn)題)
              增加一段VirtualHost描述,如下(在配置文件的最后):
              <VirtualHost *:80>
                  DocumentRoot /var/www/smallfive
                  ServerName smallfive
                  ServerAlias smallfive.com *.smallfive.com
              </VirtualHost>
              此時(shí)訪問(wèn)http://localhost/index.php,應(yīng)該一切正常

              設(shè)置數(shù)據(jù)庫(kù):
              使用mysqladmin -u root password 'newpassword'設(shè)置mysql數(shù)據(jù)庫(kù)的默認(rèn)密碼
              讓數(shù)據(jù)庫(kù)更安全:
              mysql -u root -p    進(jìn)入mysql
              mysql> DROP DATABASE test;                刪除test數(shù)據(jù)庫(kù)
              mysql> DELETE FROM mysql.user WHERE user = '';       刪除匿名帳戶(hù)
              mysql> FLUSH PRIVILEGES;                 重載權(quán)限
              創(chuàng)建magento數(shù)據(jù)庫(kù)
              mysql> CR   訪問(wèn)magento數(shù)據(jù)庫(kù),確保一切正常

              配置Magento:
              解壓縮magento1.6.2版本至/var/www/smallfive/magento目錄
              解壓命令:
             EATE DATABASE magento;
              mysql> GRANT ALL PRIVILEGES ON magento.* TO 'root'@'localhost' IDENTIFIED BY 'newpassword'; 
            tar zxvf magento1.6.2.tar.gz
              此時(shí)訪問(wèn)http://localhost/magento,可根據(jù)magento的設(shè)置進(jìn)行配置
             
              注意如下問(wèn)題:
              1、確保當(dāng)前用戶(hù)擁有對(duì)/var/www/smallfive/magento可讀可寫(xiě)權(quán)限
              2、還需安裝mcrypt庫(kù),安裝這個(gè)庫(kù)比較繁瑣,mcrypt依賴(lài)于Libmcrypt庫(kù)和mhash庫(kù),我們需要下載Libmcrypt庫(kù)和mhash庫(kù)安裝它們,然后再編譯Mcrypt。
              在編譯之前,先做好如下準(zhǔn)備工作:
                  a、安裝phpize:yum -y install php-devel
                  b、安裝C++腳本編譯模塊:
                      yum -y install gcc gcc-g++
                      yum -y install gcc gcc-c++
              安裝mcrypt庫(kù)過(guò)程,如下:
                  a、下載libmcrypt和mhash庫(kù)
                      Libmcrypt:http://sourceforge.net/project/showfiles.php?group_id=87941&package_id=91774&release_id=487459
                      mhash:http://sourceforge.net/project/showfiles.php?group_id=4286&package_id=4300&release_id=645636
                  b、將上述兩個(gè)下載后,分別解壓,并執(zhí)行如下命令編譯:
                      ./configure
                      make && make install
                  c、下載php對(duì)應(yīng)的源代碼,解壓,
                      進(jìn)入php源代碼的 /ext/mcrypt目錄
                      執(zhí)行phpize命令
                      ./configure –with-php-config=/usr/bin/php-config
                      make && make install
                  d、在php.ini文件中增加如下內(nèi)容:
                      extension=/usr/lib/php/modules/mcrypt.so
                      mcrypt.so文件路徑在php-config文件中可以找到
                  e、service httpd restart
             
              end!
               
              參考文章:
              http://www.eexu.com/article.asp?id=1730
              http://www.ruiwant.com/centos-6-0%E4%B8%8Bmagento%E7%8E%AF%E5%A2%83%E9%85%8D%E7%BD%AE%E6%80%BB%E7%BB%93.html
              http://zixun.www.net.cn/qita/2344.html
              http://os.qudong.com/Linux/2010/0210/64441.html
          posted @ 2012-04-04 17:09 The Matrix 閱讀(3140) | 評(píng)論 (1)編輯 收藏
          <2012年4月>
          25262728293031
          1234567
          891011121314
          15161718192021
          22232425262728
          293012345

          隨筆分類(lèi)(72)

          隨筆檔案(67)

          文章分類(lèi)(5)

          搜索

          •  

          最新評(píng)論

          閱讀排行榜

          評(píng)論排行榜

          主站蜘蛛池模板: 庄浪县| 黎城县| 松桃| 康平县| 遵义市| 青冈县| 广南县| 积石山| 固镇县| 宁乡县| 长沙县| 湘阴县| 昌乐县| 运城市| 报价| 曲水县| 沙坪坝区| 丹巴县| 方正县| 河北省| 鲁山县| 襄汾县| 五家渠市| 大渡口区| 内黄县| 孟连| 厦门市| 佛教| 东平县| 疏勒县| 岳阳县| 绵竹市| 平谷区| 嘉祥县| 麟游县| 华宁县| 定结县| 宜君县| 江安县| 南川市| 武汉市|