понедельник, 3 октября 2011 г.

Move Magento store to another server


Actions
  • Create DB backup (phpmyadmin or etc.)
  • Import backup to server DB.
  • Copy all magento files to the server.
  • Edit config for DB connection. (app/etc/local.xml)
  • Clear Magento cache folder (var/cache/)

In phpmyadmin.
  1. open table core_config_data
  2. Find rows where column "path" equal "web/unsecure/base_url" and "web/secure/base_url".
  3. Edit these rows. Set appropriate site domain name.

воскресенье, 2 октября 2011 г.

Magento Connect Manager problems

Errors on page Magento Connect Manager(MCM):
1) "Warning: Your Magento folder does not have sufficient write permissions."
2) "Config file does not exists" or something like that
3) MCM tab "Settings" Deployment Type "Local Filesystem" is inactive

Solution (Your magento installation folder here /var/www/<domain_name>/public/):
Change folders permission
> chmod -v 777 /var/www/<domain_name>/public/
> chmod -v 777 /var/www/<domain_name>/public/downloader/

воскресенье, 18 сентября 2011 г.

Gentoo installation (x86)

> passwd (new password for root)
> /etc/init.d/sshd start
> ifconfig eth0 192.168.0.4 broadcast 192.168.0.255 netmask 255.255.255.0 up
> route add default gw 192.168.0.1
> nano -w /etc/resolv.conf
            nameserver 109.86.2.2
            nameserver 109.86.2.21
> ping google.com (check net)

> ssh root@192.168.0.4 (On another host)
> fdisk /dev/hda (check file system)
> mke2fs -j /dev/hda1
> mkreiserfs /dev/hda5
> mkswap /dev/hda2
> swapon /dev/hda2
> mount /dev/hda5 /mnt/gentoo

> mkdir /mnt/gentoo/boot
> mount /dev/hda1 /mnt/gentoo/boot
> date (check current date)
> date --set "28 Aug 2011 12:03"
> cd /mnt/gentoo
> wget http://gentoo.inode.at/releases/x86/current-stage3/stage3-i686-20110809.tar.bz2
> tar xvjpf stage3-i686-20110809.tar.bz2
> wget http://gentoo.inode.at/snapshots/portage-latest.tar.bz2
> tar xvjf /mnt/gentoo/portage-latest.tar.bz2 -C /mnt/gentoo/usr
> nano -w /mnt/gentoo/etc/make.conf (Configure compilation parameters and set gentoo mirrors)
> cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
> mount -t proc none /mnt/gentoo/proc
> mount -o bind /dev /mnt/gentoo/dev
> chroot /mnt/gentoo /bin/bash
> env-update
> source /etc/profile
> export PS1="(chroot) $PS1"
> emerge --sync
> ls -FGg /etc/make.profile
> ls /usr/portage/profiles/default/linux/x86/10.0/
> less /usr/portage/profiles/use.desc
> nano -w /etc/make.conf (set USE flags)
> nano -w /etc/locale.gen (set localization parameters)
           ru_UA.UTF-8 UTF-8                                                                                       
           en_US.UTF-8 UTF-8
> locale-gen
> ls /usr/share/zoneinfo/ (find your time zone)
> cp /usr/share/zoneinfo/Europe/Kiev  /etc/localtime
> USE="-doc symlink" emerge gentoo-sources
> ls -l /usr/src/linux (check kernel symlink)
> emerge pciutils -av
> cd /usr/src/linux
> make menuconfig (configure kernel)
> make && make modules_install
> cp arch/i386/boot/bzImage /boot/linux-2.6.39-gentoo-r3_1
> nano -w /etc/fstab (configure partitions)
> nano -w /etc/conf.d/hostname
> nano -w /etc/conf.d/net
> cd /etc/init.d
> ln -s net.lo net.eth1
> rc-update add net.eth1 default
> nano -w /etc/hosts
> passwd
> nano -w /etc/rc.conf
> nano -w /etc/conf.d/keymaps
> nano -w /etc/conf.d/clock
> emerge syslog-ng
> rc-update add syslog-ng default
> emerge vixie-cron
> rc-update add vixie-cron default
> emerge sys-apps/mlocate
> emerge reiserfsprogs (you must setup programms to maintenance)
> emerge dhcpcd
> emerge grub
> grub
      grub> root (hd0,0)
      grub> setup (hd0)
      grub> quit
> exit
> cd
> umount /mnt/gentoo/boot /mnt/gentoo/dev /mnt/gentoo/proc /mnt/gentoo
> reboot

Midnight Commander file association and execution

Set KDE file association in mc for all users.
Edit config file "/etc/mc/mc.ext"

For example we set association for video files:
**************************************************
### Video ###
........

include/video                                                                                                      
<------>Open=(kfmclient exec %f >/dev/null 2>&1 &)
**************************************************
Use this string for other application if need.

Examples for other ENV:
# for XFCE
Open=(exo-open %f >/dev/null 2>&1 &)
#for Gnome
Open=(gnome-open %f >/dev/null 2>&1 &)

среда, 7 сентября 2011 г.

Sound in Gentoo, ALSA + nVidia HDA

> lspci
00:05.0 Audio device: nVidia Corporation MCP61 High Definition Audio (rev a2)
Codec: Realtek ALC861-VD


backend Gstreamer or Xine

In home directory create file ".asoundrc"

After that in some applications may be very quiet sound.
Check PCM channel in mixer (alsamixer).

Usefull links:
http://ru.gentoo-wiki.com/wiki/HOWTO_Alsa_И_Многопоточный_Звук
http://alsa.opensrc.org/FAQ026


воскресенье, 28 августа 2011 г.

Gentoo installation (x86)

> passwd (new password for root)
> /etc/init.d/sshd start
> ifconfig eth0 192.168.0.4 broadcast 192.168.0.255 netmask 255.255.255.0 up
> route add default gw 192.168.0.1
> nano -w /etc/resolv.conf
            nameserver 109.86.2.2
            nameserver 109.86.2.21
> ping google.com (check net)

> ssh root@192.168.0.4 (On another host)
> fdisk /dev/hda (check file system)
> mke2fs -j /dev/hda1
> mkreiserfs /dev/hda5
> mkswap /dev/hda2
> swapon /dev/hda2
> mount /dev/hda5 /mnt/gentoo

> mkdir /mnt/gentoo/boot
> mount /dev/hda1 /mnt/gentoo/boot
> date (check current date)
> date --set "28 Aug 2011 12:03"
> cd /mnt/gentoo
> wget http://gentoo.inode.at/releases/x86/current-stage3/stage3-i686-20110809.tar.bz2
> tar xvjpf stage3-i686-20110809.tar.bz2
> wget http://gentoo.inode.at/snapshots/portage-latest.tar.bz2
> tar xvjf /mnt/gentoo/portage-latest.tar.bz2 -C /mnt/gentoo/usr
> nano -w /mnt/gentoo/etc/make.conf (Configure compilation parameters and set gentoo mirrors)
> cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
> mount -t proc none /mnt/gentoo/proc
> mount -o bind /dev /mnt/gentoo/dev
> chroot /mnt/gentoo /bin/bash
> env-update
> source /etc/profile
> export PS1="(chroot) $PS1"
> emerge --sync
> ls -FGg /etc/make.profile
> ls /usr/portage/profiles/default/linux/x86/10.0/
> less /usr/portage/profiles/use.desc
> nano -w /etc/make.conf (set USE flags)
> nano -w /etc/locale.gen (set localization parameters)
           ru_UA.UTF-8 UTF-8                                                                                       
           en_US.UTF-8 UTF-8
> locale-gen
> ls /usr/share/zoneinfo/ (find your time zone)
> cp /usr/share/zoneinfo/Europe/Kiev  /etc/localtime
> USE="-doc symlink" emerge gentoo-sources
> ls -l /usr/src/linux (check kernel symlink)
> emerge pciutils -av
> cd /usr/src/linux
> make menuconfig (configure kernel)
> make && make modules_install
> cp arch/i386/boot/bzImage /boot/linux-2.6.39-gentoo-r3_1
> nano -w /etc/fstab (configure partitions)
> nano -w /etc/conf.d/hostname
> nano -w /etc/conf.d/net
> cd /etc/init.d
> ln -s net.lo net.eth1
> rc-update add net.eth1 default
> nano -w /etc/hosts
> passwd
> nano -w /etc/rc.conf
> nano -w /etc/conf.d/keymaps
> nano -w /etc/conf.d/clock
> emerge syslog-ng
> rc-update add syslog-ng default
> emerge vixie-cron
> rc-update add vixie-cron default
> emerge sys-apps/mlocate
> emerge reiserfsprogs (you must setup programms to maintenance)
> emerge dhcpcd
> emerge grub
> grub
      grub> root (hd0,0)
      grub> setup (hd0)
      grub> quit
> exit
> cd
> umount /mnt/gentoo/boot /mnt/gentoo/dev /mnt/gentoo/proc /mnt/gentoo
> reboot

пятница, 12 августа 2011 г.

LDOCE5 on linux arch x86_64

Longman Dictionary of Contemporary English 5 on linux arch x86_64
> uname -a
Linux solar 2.6.38-gentoo-r6 #13 SMP Mon Jul 11 00:10:55 EEST 2011 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ AuthenticAMD GNU/Linux

1) Mount the iso (or cdrom):
> mount -o loop -t iso9660 /<path_to_iso>/ldoce5.iso /mnt/cdrom
2) Enter to cdrom folder:
> cd /mnt/cdrom
3) Execute the command:
> linux32 ./linux/setup.sh

You will see instalation window. Install, and use it! :)
Otherwise google search in help... :(