What stuff has done with Magento

2015/09/09 17:14
阅读数 131




useradd user

yum update

yum clean

yum install yum-utils 


yum install php php-mysql

yum install httpd

yum install mysql-server

service mysqld start


= Fix php5.1 upgrade to php5.4w

rpm -Uvh http://mirror.webtatic.com/yum/el5/latest.rpm

yum remove php php-mysql

yum install yum-plugin-replace

yum replace php-common --replace-with=php54w-common

yum install php54w

yum install php54w-mcrypt

yum install php54w-gd

yum install php54w-soap

yum install php54w-mbstring

yum install php54w-devel # for phpredis extension

= disable iptables

iptables -F


cat /etc/sysconfig/iptables | see the rules

iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 21 -j ACCEPT

iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 20 -j ACCEPT

iptables -A INPUT -j RH-Firewall-1-INPUT

iptables -A FORWARD -j RH-Firewall-1-INPUT

iptables -A RH-Firewall-1-INPUT -i lo -j ACCEPT

iptables -A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT

iptables -A RH-Firewall-1-INPUT -p 50 -j ACCEPT

iptables -A RH-Firewall-1-INPUT -p 51 -j ACCEPT

iptables -A RH-Firewall-1-INPUT -p udp --dport 5353 -d -j ACCEPT

iptables -A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT

iptables -A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT

iptables -A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

iptables -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT

iptables -A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited

/*modprobe ip_conntrack_ftp

iptables -I INPUT  -p tcp -m tcp --dport 21 -m conntrack --ctstate ESTABLISHED -j ACCEPT -m comment --comment "Allow ftp connections on port 21"

iptables -I OUTPUT -p tcp -m tcp --dport 21 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT -m comment --comment "Allow ftp connections on port 21"

iptables -I INPUT  -p tcp -m tcp --dport 20 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT -m comment --comment "Allow ftp connections on port 20"

iptables -I OUTPUT -p tcp -m tcp --dport 20 -m conntrack --ctstate ESTABLISHED -j ACCEPT -m comment --comment "Allow ftp connections on port 20"


iptables -I INPUT -m state --state NEW,ESTABLISHED -m tcp -p tcp --dport 80 -j ACCEPT

iptables -I INPUT -m state --state NEW,ESTABLISHED -m tcp -p tcp --dport 20022:20023 -j ACCEPT

service iptables save

= settings

chown -R 777 magento/media

php_value memory_limit 512M in .htaccess

= install git

yum -y install zlib-devel openssl-devel cpio expat-devel gettext-devel gcc

wget https://www.kernel.org/pub/software/scm/git/git-

make configure

./configure --with-expat --with-openssl --with-curl

make && make install

= upgrade mysql

yum remove mysql-*

yum remove libmysqlclient15-5.0.95-5.w5.x86_

download mysql-community-release-el5-{version-number}.noarch.rpm from http://dev.mysql.com/doc/mysql-repo-excerpt/5.6/en/linux-installation-yum-repo.html

rpm -Uvh mysql-community-release-el5-5.noarch.rpm

yum install mysql-community-server 

yum install -y dovecot

yum install -y perl-DBD-MySQL

yum install -y php54w-mysql

= remove index.php in url

in /etc/conf/httpd.conf, in section <Directory "/var/www/html">, change AllowOverride None to AllowOverride All

edit magento/.htaccess and uncomment the line: RewriteBase /magento/

in admin console, 

In System->Configuration->Web->Search Engines Optimizations, select Yes

In System->Configuration->Web->Secure->Use Secure Urls in the fontend, select Yes

= admin console settings

System->Configuration->System->Advanced->Advanced->Disable Modules Output

System->Configuration->System->Advanced->Developer->Log Settings

set Mage::setIsDeveloperMode(true); and ini_set('display_errors', 1); in file index.php

System->Cache Management

System->Index Management

= Access control to catogeroy

System->Category->Customer Groups Access Control http://www.zetaprints.com/magentohelp/magento-access-control-for-dynamic-imaging/

= install extenstion

System->Magento Connect

== phpMyAdmin

cd /var/www/html && mv phpMyAdmin pma

product video link




Installed http://www.magentocommerce.com/magento-connect/youtube-video-gallery-1.html

Disable Mage_Notification module to off the noti of callout 

Set logo

System->Configuration->General->design->Logo Image Src

Change color

Install ruby and rubygems and compass

curl -sSL https://get.rvm.io | bash

srouce /etc/profile.d/rvm.sh

rvm install 1.9.3

rvm use 1.9.3 --default 

gem install compass

Change color => compass watch . && edit skin/frontend/rwd/default/scss/_var.scss

log all sql

edit lib/Varien/Db/Adapter/Pdo/Mysql.php, on these $_debug $_logAllQueries  http://magento.stackexchange.com/questions/25113/how-to-log-all-magento-sql

Install Redis

wget https://github.com/antirez/redis/archive/2.8.21.tar.gz

tar zxf redis-2.8.21.tar.gz

make && sudo make install

cd utils

./install_server.sh # the last answer is "/usr/local/bin/redis-server"

sudo chkconfig redis_6379 on

sudo service redis_6379 start

Install phpRedisAdmin

git clone git://github.com/ErikDubbelboer/phpRedisAdmin.git

cd phpRedisAdmin

git clone https://github.com/nrk/predis.git vendor

Install Cm_RedisSession

enable Cm_RedisSession module

/app/etc/modules/Cm_RedisSession.xml active -> true

rm -rf var/cache

System > Cache Management, Flush Magento Cache

update app/etc/local.xml

Install Cm_Cache_Backend_Redis && phpredis && modman

modman init

modman clone https://github.com/colinmollenhour/Cm_Cache_Backend_Redis

lib Credis && Cm_Cache_Backend_Redis are already installed, just copy these files to respective directory

run php stats.php to show the usage of tags in redis

Install tmux

1. yum install glibc-static

2. install ncurse : ./configure && make && sudo make install

3. install tmux : ./configure --enable-static CFLAGS="-I/usr/local/include -I/usr/local/include/ncurses" LDFLAGS="-L/usr/local/lib -L/usr/local/include -L/usr/local/include/ncurses" LIBEVENT_CFLAGS="-I/usr/local/include" LIBEVENT_LIBS="-L/usr/local/lib -levent"

reference: http://pyther.net/2014/03/building-tmux-1-9a-statically/

Install ranger

1. yum install ncurses-devel

2. cd Python-2.7.3 && ./configure && make && sudo make

3. wget http://nongnu.org/ranger/ranger-stable.tar.gz

4. cd ranger-1.7.1/ && python setup.py install

0 收藏
0 评论
0 收藏