Install and configure solr Manually with Magento

Install and configure solr Manually with Magento

Install and configure solr Manually with Magento Install solr in UBUNTU with command line. Please find below mentioned command for installation. sudo apt-get -y install openjdk-7-jdk cd /opt sudo http://archive.apache.org/dist/lucene/solr/4.7.2/solr-4.7.2.tgz sudo tar -xvf solr-4.7.2.tgz sudo cp -R solr-4.7.2/example /opt/solr cd /opt/solr java -jar start.jar Now check solr running on your server or not with http://yourip:8983 sudo vi /etc/default/jetty Copy the below mentioned text into the file and press ESC the :wq and enter. NO_START=0 # Start on boot JAVA_OPTIONS="-Dsolr.solr.home=/opt/solr/solr $JAVA_OPTIONS" JAVA_HOME=/usr/java/default JETTY_HOME=/opt/solr JETTY_USER=solr JETTY_LOGS=/opt/solr/logs Create one more file sudo vi /opt/solr/etc/jetty-logging.xml Copy the below mentioned text into the file and press ESC the :wq and enter. <?xml version="1.0"?> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd"> <!-- =============================================================== --> <!-- Configure stderr and stdout to a Jetty rollover log file --> <!-- this configuration file should be used in combination with --> <!-- other configuration files. e.g. --> <!-- java -jar start.jar etc/jetty-logging.xml etc/jetty.xml --> <!-- =============================================================== --> <Configure id="Server" class="org.mortbay.jetty.Server"> <New id="ServerLog" class="java.io.PrintStream"> <Arg> <New class="org.mortbay.util.RolloverFileOutputStream"> <Arg><SystemProperty name="jetty.logs" default="."/>/yyyy_mm_dd.stderrout.log</Arg> <Arg type="boolean">false</Arg> <Arg type="int">90</Arg> <Arg><Call class="java.util.TimeZone" name="getTimeZone"><Arg>GMT</Arg></Call></Arg> <Get id="ServerLogName" name="datedFilename"/> </New> </Arg> </New> <Call class="org.mortbay.log.Log" name="info"><Arg>Redirecting stderr/stdout to <Ref id="ServerLogName"/></Arg></Call> <Call class="java.lang.System" name="setErr"><Arg><Ref id="ServerLog"/></Arg></Call> <Call class="java.lang.System" name="setOut"><Arg><Ref id="ServerLog"/></Arg></Call> </Configure> Now create solr user and permission : sudo useradd -d /opt/solr -s /sbin/false solr sudo chown solr:solr -R /opt/solr create solr startup : sudo wget -O /etc/init.d/jetty https://cheppers.com/sites/default/files/attachments/jetty_0.txt sudo chmod a+x /etc/init.d/jetty sudo update-rc.d jetty defaults sudo /etc/init.d/jetty start Now configuring the magento for...
Disable Magento compiler

Disable Magento compiler

Disable Magento compiler (Magento 1.x) You can disable the compiler from ssh using terminal in ubuntu or in windows using putty. login to server with ssh and go to magentoroot\shell and use below mentioned commands. php -f compiler.php clear php -f compiler.php disable You can also run the command from php files if you not have ssh create a php file called cmpdisable.php and write below mentioned code and upload it in magentoroot folder and heat url www.yoursite.com/cmpdisable.php echo exec('./shell/php -f compiler.php clear'); echo exec('./shell/php -f compiler.php disable'); Note : this is only work if your server allowed exec php method. if this will not help then use below mentioned process open file magentoroot/includes/config.php file to disable compilation in Magento, edit includes/config.php and comment this code. #define('COMPILER_INCLUDE_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR.'src'); #define('COMPILER_COLLECT_PATH', dirname(__FILE__).DIRECTORY_SEPARATOR.'stat'); Hope this will help you to disable the compilation....
Install ftp on Amazon Ec2

Install ftp on Amazon Ec2

Install ftp on Amanzon Ec2 You can install ftp to your Amazon ec2 instance and able to provide access to other developer to work parallel on same in instance. sudo apt-get install proftpd Configration of ftp sudo vi /etc/proftpd/proftpd.conf Add passive port range PassivePorts 1024 1048 Add public ip MasqueradeAddress 1.1.1.1 Full configration file # # /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file. # To really apply changes reload proftpd after modifications. # # Includes DSO modules Include /etc/proftpd/modules.conf # Set off to disable IPv6 support which is annoying on IPv4 only boxes. UseIPv6 off # If set on you can experience a longer connection delay in many cases. IdentLookups off ServerName "Debian" ServerType standalone DeferWelcome off MultilineRFC2228 on DefaultServer on ShowSymlinks on TimeoutNoTransfer 600 TimeoutStalled 600 TimeoutIdle 1200 DisplayLogin welcome.msg DisplayChdir .message true ListOptions "-l" DenyFilter *.*/ # Use this to jail all users in their homes DefaultRoot ~ # Users require a valid shell listed in /etc/shells to login. # Use this directive to release that constrain. RequireValidShell on # Port 21 is the standard FTP port. Port 21 # In some cases you have to specify passive ports range to by-pass # firewall limitations. Ephemeral ports can be used for that, but # feel free to use a more narrow range. PassivePorts 1024 1048 # If your host was NATted, this option is useful in order to # allow passive tranfers to work. You have to use your public # address and opening the passive ports used on your firewall as well. MasqueradeAddress 174.129.218.53 # This is useful for masquerading address with dynamic IPs:...
Install nginx php-fpm magento 2

Install nginx php-fpm magento 2

Install nginx php-fpm magento 2 Setup dedicated server or Amazon ec2 instance for magento 2. Install nginx, php-fpm and MySql server and setup virtual host configuration. Installation of server. $sudo apt-get update $sudo apt-get install nginx -y Installing php, php-fpm supported extension for magento 2 sudo apt-get -y update sudo add-apt-repository ppa:ondrej/php5-5.6 sudo apt-get -y update sudo apt-get -y install php5 php5-mhash php5-mcrypt php5-curl php5-cli php5-mysql php5-gd php5-intl php5-xsl Installing MySql 5.6 apt-add-repository ppa:ondrej/mysql-5.6 apt-get -y update apt-get -y install mysql-server If you get error : Sub-process /usr/bin/dpkg returned an error code (1) Increase the memory limit of swap Create a 4G swap file: sudo fallocate -l 4G /swapfile Change its permission to only root could access and change: sudo chmod 600 /swapfile Make it swap: sudo mkswap /swapfile Activate: sudo swapon...
Create user on AWS ec2 instance Linux

Create user on AWS ec2 instance Linux

Create user on AWS ec2 instance Linux Create a user for providing access to other developer or use for virtual host in linux. It will also use for providing limited access for user like only read access, read or write access etc. $sudo adduser aman It will ask for new password for the user aman. Note: this password is used to login password for the user when you are using terminal. Granting permission for user aman $sudo visudo Add below mentioned line in the file #User privilege for aman aman ALL=(ALL:ALL) ALL And press CTRL+X for exit, it will ask for save modified changes, Y for the saving modified file. Creating user authorisation to the sever with public key. $su aman $cd home/aman $ssh-keygen -b 1024 -f aman -t dsa $mkdir .ssh $chmod 700 .ssh $cat aman.pub > .ssh/authorized_keys $chmod 600 .ssh/authorized_keys $sudo chown aman:ubuntu .ssh $sudo chown aman:ubuntu .ssh/authorized_keys Note: In above step aman is user and ubuntu is the defult user group. Now you need to download the key “aman” and use it for connecting ssh or...