1 / 3
Caption Text
2 / 3
Caption Two
3 / 3
Caption Three margin testing

Sunday, November 1, 2009

Migrate or create a clone of a ZenCart site on new host

Migrate or create a clone of a ZenCart site on new host | Learn Web Design Online .com

This tutorial will show explain how to migrate a ZenCart shop from one host to another host. This might be necessary when moving to another web host. Or you may want to make a "clone" of a production live shop on a development test server for testing and development work.

"Cloning" is essentially the same a "migrating" except you do not delete the store from the old host.

In either case, to set up a new shop on a new host with all the information and look-and-feel of the old shop on the old host, take a look at this ZenCart article.

The thing you have to remember is that you never overwrite the two configure files that are on the servers. The config files belong to the server in which they were created; they do not move from one server to another. The two configure files are includes/configure.php and admin/includes/configure.php.

If Cloning on a Development Server

Remember that your new host will have all the same database values of your old host. If you are cloning the shop for testing purposes, remember to change the admin email and also the order email notifications of the development shop to your own. And also uninstall all the payment modules on the development shop so that visitors do not accidentally happen upon it and try to buy something.

Testing and Possible Errors

You need to test thoroughly the new shop after the migration, especially going through the checkout process and make a real purchase. Sometimes it may look fine, but have problem in a few pages. If you get warnings like "header already sent", see this thread about possible file corruption. Sometime due to the heavy file transferring back and forth or via webhost web editors, some extra lines or space may got added or deleted. Also check the two config files for that and possible missing PHP end tags.

General Steps for Migrating ZenCart

1. Note the IP addresses of the old host and new host. Sometimes when switching domain name servers, you may need to access the site via the IP.

2. Turn on "Down for Maintenance" for the shop on the old host.

3. Backup the file system and the database on the old host.

4. Setup database in the new host and install default ZenCart of the same version of your shop on the new host. And also use the same database prefix. This gets the installer to write out the two config files correctly on your new host. Test the default ZenCart shop on the new host.

5. Delete all the ZenCart files on the new host, EXCEPT for the two config files. Then copy all the ZenCart files from the old host to the new host, EXCEPT for the two config files.

6. If you had renamed your admin folder as you should have as explained here, then move the admin/includes/configure.php file to the same location in your in renamed admin folder. Edit this configure.php file according to the above link to have path referencing your renamed admin folder.

7. Set the two configure files to be permission 444.

8. Set the directories that is specified in the ZenCart install instructions to 777.

9. Drop all tables of the ZenCart database on the new host. Then import the SQL database file of the old host to the new database on the new host.

10. Run the Fix Cache Key utility

11. Set the new server path of your new host in ZenCart Admin -> Configuration -> Logging.

12. Turn on your new shop and test. If all goes well, do a full-backup. You don't want to lose all the hard work done in the migration.

13. If doing a migration (instead of a clone), delete the ZenCart files and database on the old host. Make sure you are not deleting the ZenCart on your new host. You may need to access the old host via the IP address. If doing a DNS name server change, you may also want to look into the mail system to see if any emails had fallen through the crack during the switchover.

Drop all tables in a MySQL database

Drop all tables in a MySQL database

After finding a reference on the MySQL Lists (http://lists.mysql.com/mysql/193430) I started playing with the idea. I didn't want to have to dump into one file and then run that query. Also - the problem with the above concept is that it drops the table and then recreates it - not what i wanted!

I then looked into using the pipe and grep features in Linux. Now I was getting somewhere! A few tweaks later and this is what I got:

  1. mysqldump -u[USERNAME] -p[PASSWORD] --add-drop-table --no-data [DATABASE] | grep ^DROP | mysql -u[USERNAME] -p[PASSWORD] [DATABASE]

In the above, [USERNAME], [PASSWORD] & [DATABASE] are all the details for your database. You might not need the username and password fields - depends on your setup!

Hide Removable Drive Icons from Your Ubuntu Desktop

Hide Removable Drive Icons from Your Ubuntu Desktop :: the How-To Geek

I prefer a clean desktop with no icons cluttering it up, but by default Ubuntu adds icons to the desktop for every single removable drive that you attach to your system.

Having recently transitioned to using Ubuntu full-time at home (instead of just part-time), this was one of the first things I wanted to disable. Sadly there's no option in the default configuration screens, so we'll have to use the "registry editor" for Ubuntu, called gconf-editor.

Just type in gconf-editor into the Alt+F2 run dialog to open the app.

Now browse down to the following key:

apps \ nautilus \ desktop

You should see a key in the right-hand pane called volumes_visible. Remove the checkbox from it, and the icons will instantly disappear from the desktop. Remember that you can always access the drives from the "Computer" icon, or easily in the file browser.

I'm much happier now with my beautiful desktop.

Saturday, October 31, 2009

How to Automount NTFS Drives on Ubuntu

HowTo: Automount NTFS Drives - Ubuntu Forums

Fire up a terminal, to do this click Applications > Accessories > Terminal
Then type (or copy/paste) the following - 1 line at a time
Code:
sudo aptitude update sudo aptitude install ntfs-config
Ok so when that returns you to user@pcname, that should be it installed

Next, make sure you have NO drives mounted (they'll usually appear on your desktop). And then run the program from Applications > System Tools

Note: In Ubuntu 9.04 (Jaunty) it appears that the configuration tool has moved to System > Administration.

Enter your password when prompted - and then choose the drives that you want to be automounted. Click Apply.

Now simply make sure that "Enable Write Support for Internal Drives" and click OK.

Enjoy your automounted NTFS Drives

Google网站性能优化工具Page Speed

Google网站性能优化工具Page Speed-月光博客

  和Yahoo的YSlow一样,Google的开源网站优化工具Page Speed,是一个基于Firebug的FireFox插件,和YSlow一样,Page Speed可以帮助用户改善网站性能的工具。在运行它之后,可以看到一个帮助你的网站加载速度加快的建议列表,它会根据列表中的每一项检查你的网站并标明是否通过。

  Page Speed在运行时会分析一些Web服务器配置和服务器上下载下来的代码,还会创建一个结果列表,其中包括如何改进网页的建议。分析基于一个分为五类的最佳实践列表:

  * 优化缓存——让你应用的数据和逻辑完全避免使用网络

  * 减少回应时间——减少一连串请求-响应周期的数量

  * 减小请求大小——减少上传大小

  * 减小有效负荷大小——减小响应、下载和缓存页面的大小

  * 优化浏览器渲染——改善浏览器的页面布局

  这些实践考虑了页面加载时间,以及发出页面请求到客户端看到结果之间的时间。页面加载时间包括创建TCP连接、解析DNS名称、发送请求、获取(包括来自于缓存的)资源、执行脚本、渲染。

  点击访问:Google Page Speed

Friday, October 30, 2009

Using Webilder to set desktop wallpaper on Ubuntu

Howto Set Flickr images as Ubuntu desktop wallpaper | Ubuntu Geek

Webilder delivers stunning wallpapers to your Linux desktop, directly from Flickr and Webshots. You choose what keywords (tags) to watch for, and photos are automatically downloaded to your computer. Webilder can also change the wallpaper every few minutes.

Webilder Features

  • download flickr photos that match tags (for example: beach,party)
  • download photos from flickr users of your choice.
  • download most interesting photos from flickr.
  • download amazing daily proshots from Webshots (requires Webshots account).
  • automatically download new photos for you.
  • change your wallpaper every few minutes.
  • import webshots collections (wbz or wbc formats).

Install Webilder in Ubuntu

First you need to edit the /etc/apt/sources.list file

sudo gedit /etc/apt/sources.list

and add the following source list which is suitable for you save the file and exit

For Ubuntu Intrepid (i386, amd64, powerpc of sparc) Users

deb http://debian.websterwood.com/ intrepid main
deb-src http://debian.websterwood.com/ intrepid main

For Ubuntu Hardy (i386, amd64, powerpc of sparc) Users

deb http://debian.websterwood.com/ hardy main
deb-src http://debian.websterwood.com/ hardy main

For Ubuntu Gusty (i386, amd64, powerpc of sparc) Users

deb http://debian.websterwood.com/ gusty main
deb-src http://debian.websterwood.com/ gusty main

For Ubuntu Feisty (i386, amd64, powerpc of sparc) Users

deb http://debian.websterwood.com/ feisty main
deb-src http://debian.websterwood.com/ feisty main

For Ubuntu Edgy (i386, amd64, powerpc of sparc) Users
deb http://debian.websterwood.com/ edgy main
deb-src http://debian.websterwood.com/ edgy main

For Ubuntu Dapper (i386, amd64, powerpc or sparc) Users

deb http://debian.websterwood.com/ dapper main
deb-src http://debian.websterwood.com/ dapper main

Now you need to update the source list using the following command

sudo apt-get update

Install Webilder using the following command

If you are using GNOME Desktop use the following command

sudo apt-get install webilder webilder-gnome

If you are using KDE Desktop use the following command

sudo apt-get install webilder webilder-kde

This will complete the installation process

Adding Webilder to your Desktop Panel

For GNOME Users

Right-click on the GNOME panel you should see the following screen here you need to choose "Add to Panel"

Once you choose Add to Panel option you should see the following screen here under utility you need select "Webilder Webshots Applet" and click on add

Now you should see one small camera icon marked with Red added to your desktop panel

For KDE Users

From the graphics menu, start KWebilder. Go to the preferences Window, to the Advanced Tab, and select KDE wallpapers settings

Now you need to download photos from flicker for this right click on Webilder on your desktop panel and select "Download Photos" option you can see this in the following screen

Downloading Photos are in progress

Once dowload finished your desktop will start refreshing wallpapers by default 5 min if you want to change this option you need to right click on Webilder on your desktop panel and select "Preferences"

You should see the following option here you can select what time your wallpaper need to be refresh or photos download option

Thursday, October 29, 2009

Q and A - How to Defrag a Linux System

Q and A - How to Defrag a Linux System - Question - NYTimes.com

By J.D. BIERSDORFER
Published: October 28, 2009

Q. I recently bought a netbook with Ubuntu as its operating system and would like to know if there is any simple way to defragment the drive. The help manual for the system talks only about a complete start-over with reinstalling the OS, rather than defragmenting it.

A. Ubuntu Linux uses a different file system, or method of storing and organizing data, than other operating systems do. Most Ubuntu systems use the ext3 file system, which does not need regular defragmentation like a Windows system does.

Windows uses either the NTFS or FAT file systems, which do not always store all the pieces of a file near each other on the hard drive. Running the built-in Disk Defragmenter program reorganizes these fragmented file parts near each other for faster access by the system.

The ext3 system used by Ubuntu Linux, however, keeps all the parts of a file together (or nearby), making regular defragmentation unnecessary. A page on the Community Ubuntu Documentation site has a full explanation at bit.ly/4iKt4.

It's not impossible to defragment a Linux system, however; the Web Upd8 blog has some tips for doing so at bit.ly/4r2yS1. A newer version of the Linux file system, ext4, includes a built-in defragmenting program.

Personal Tech invites questions about computer-based technology, by e-mail to QandA@nytimes.com. This column will answer questions of general interest, but letters cannot be answered individually.

Featured Post

Windows和Ubuntu双系统完全独立的安装方法

http://www.ubuntuhome.com/windows-and-ubuntu-install.html  | Ubuntu Home Posted by Snow on 2012/06/25 安装Windows和Ubuntu双系统时,很多人喜欢先安装windows,然...