Install ClamAV and Scan Viruses with ClamAV

Install ClamAV and Scan Viruses with ClamAV

Installing ClamAV in UBUNTU sudo apt-get install clamav After installation you have to update ClamAV sudo freshclam For scan viruses you have to use below mentioned command. clamscan OPTIONS File/Folder Below mentioned command will check all files in root and displaying the name of each file: clamscan -r / Below mentioned command will check all files in root but only display infected files and ring a bell when found: clamscan -r --bell -i / Below mentioned command will check all files in root but only display infected files when found and have this run in the background: clamscan -r -i / & Below mentioned command will check files in the all users home directories: clamscan -r /home Below mentioned command will check files in the USER home directory and move infected files to another folder: clamscan -r --move=/home/USER/VIRUS /home/USER Below mentioned command will check files in the USER home directory and remove infected files (WARNING: Files are gone.): clamscan -r --remove /home/USER To see all available help options: clamscan --help Note: To see running background process use below mentioned command....
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:...
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...
Enable gzip and leverage cache on nginx server.

Enable gzip and leverage cache on nginx server.

Enable gzip and leverage cache on nginx server Enable gzip and leverage cache on nginx server. It will help to improve magento store speed and optimize content delivery by compressing content into gzip. Login on server with root access and create the below mentioned file. For gzip compression. vi /etc/nginx/conf.d/gzip.conf add the below mentioned code in file. gzip on; gzip_disable "MSIE [1-6]\.(?!.*SV1)"; gzip_proxied any; gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript image/x-icon image/bmp image/svg+xml; gzip_vary on; For leverage cache. Add the below mentioned code in server section in location ~* \.(js|css|png|jpg|jpeg|gif|ico)(\?ver=[0-9.]+)?$ { expires 1y; } Example server { listen 80; server_name localhost; location / { root /usr/share/nginx/html; index index.html index.htm; } location ~* \.(js|css|png|jpg|jpeg|gif|ico)(\?ver=[0-9.]+)?$ { expires 1y; } location ~* \.(pdf)$ { expires 30d; }...