Category: Ubuntu

How to install SSL certificate on ubuntu(Magento)

Step1) Change to the Apache SSL Certificate directory:

cd /etc/apache2/ssl

OR

If it doesn’t exist then create it:

sudo mkdir /etc/apache2/ssl

Step2). You need three files:

– The public key provided by the Certificate Authority
– The Private key from your server which you created and submitted to the Certificate Authority
– The Intermediate or Chain Certificate provided from your Certificate Authority

Move them all to the /etc/apache2/ssl directory and name them appropriately

Step3) . Modify your virtual hosts file and add the config to listen on port 443:

<VirtualHost *:443>

ServerName your_domain.com
DocumentRoot /var/www/html/path_to_your_site
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/your_domain_public.crt // The Public Key provided from the Certificate Autority
SSLCertificateKeyFile /etc/apache2/ssl/your_domain_private.key // The key you created initially (probably using OpenSSL and submitted to the Certificate Authority)
SSLCertificateChainFile /etc/apache2/ssl/your_domain_intermediate.crt // The Intermediate Certificate provided from the Certificate Autority

<Directory /var/www/html/path_to_your_site/>
AllowOverride All
</Directory>

</VirtualHost>

Step4) Restart the Apache service using

Now you should be able to navigate to load your site using HTTPS but depending on your CMS or Shopping Cart platform you may need to make a config change in the admin area to force it to use HTTPS.

Magento

To change this in Magento navigate to:

System->Configuration->General->Web->Unsecure and System->Configuration->General->Web->Secure

Screenshot-from-2015-05-30-144137.png

 

Advertisement

Setup a Mosquitto Password

sudo service mosquitto stop
cd /usr/local/bin
If you already Created a Password & want to change that then using below Command
mosquitto_passwd -D /etc/mosquitto/passwd username
Below Command is for New Password Creation
mosquitto_passwd -c /etc/mosquitto/passwd username
Password
Re-Enter
sudo nano /etc/mosquitto/mosquitto.conf
allow anonymous false
#Default authentication and topic access control

#password_file /etc/mosquitto/passwd
 sudo service mosqquitto start
 sudo service mosquitto status

How to Install Mosquitto On Ubuntu

Step 1. Run following command on ec2 instance:-

sudo apt-get install mosquito

sudo apt-get update
 sudo apt-get install pkg-config cmake openssl libc-ares-dev libssl-dev python-mosquitto

sudo apt-get install gcc make g++ libssl-dev

wget http://mosquitto.org/files/source/mosquitto-1.4.7.tar.gz

tar xzf mosquitto-1.4.7.tar.gz

cd mosquitto-1.4.7

cmake .
 sudo make install

sudo mkdir /etc/mosquitto

sudo mv /usr/local/etc/mosquitto/mosquitto.conf /etc/mosquitto/mosquitto.conf

Step 2. Run following commands create service mosquitto:-

sudo nano /etc/init/mosquitto.conf

Add following lines to file:-

start on net-device-up
 respawn
 exec /usr/local/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf

Step 3. Add user to mosquitto:-

cd /usr/local/bin

sudo mosquitto_passwd -c /etc/mosquitto/passwd password

 

Upgrading Magento 1.8 To 1.9.2.1

Having had the opportunity to work on a new build using Magento 2 the architecture of the application has changed significantly, to me it has definitely increased the difficulty of getting a Magento project up and running but in return offers a more granular and organised application to work with.

With this view I think it’s unlikely that you would upgrade your site to v2. Magento have not given an upgrade path to 2.0 and I doubt they will, so it’s probably worth waiting for the opportunity to re-design the site before moving over to the new platform.

Magento have committed to 3 years from general release of 2.0 so that gives you till around 2019 to move over. In the meantime that means they will continue to provide security patches and support for the 1.x platform.

Step 1- Enable maintenance mode

cd /magento_folder
 #for example: cd /var/www/magento
 touch maintenance.flag

Step 2: Manually you can take backup of your database and directories

Make sure you take the full backup of your store’s database and directories.

Step 3: Commence the upgrade process

cd /magento_folder
 rm -rf  var/cache/*   var/session/*
 chmod -R 777 /magento_folder
 chmod 550 ./mage
 ./mage mage-setup .
 ./mage config-set preferred_state stable
 ./mage list-installed

#In case, modules are not listed, use the below given command to upgrade further:

./mage install http://connect20.magentocommerce.com/community Mage_All_Latest --force

#And if your Magento modules are listed – use the following commands:

./mage list-upgrades
 ./mage upgrade-all

#Once the upgrade process is done, you’ll see a list of modules – ‘already installed’, ’package upgraded’, make sure your permissions are set back to normal:

php shell/indexer.php reindexall
 chmod -R 644 ./*
 find . -type d -exec chmod 755 {} \;
 chmod 550 ./mage

Step 4: Go live with your website

cd /magento_folder
 rm -f maintenance.flag