Search

May 6, 2015

INSTALL MAGENTO IN LINUX


Read more:
https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-magento-on-ubuntu-14-04

sudo apt-get update
sudo apt-get install apache2

sudo apt-get install mysql-server php5-mysql
sudo mysql_install_db
sudo mysql_secure_installation

sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt libcurl3 php5-curl php5-gd

sudo nano /etc/apache2/mods-enabled/dir.conf
Change line: DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm

sudo nano /etc/apache2/sites-available/magento.conf

< VirtualHost *:80 >
    DocumentRoot /var/www/html
   < Directory /var/www/html/  >

        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
   <  / Directory >
< / VirtualHost >



sudo a2ensite magento.conf
sudo a2dissite 000-default.conf

sudo a2enmod rewrite
sudo php5enmod mcrypt

mysql -u root -p
CREATE DATABASE magento;
CREATE USER magento_user@localhost IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON magento.* TO magento_user@localhost IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
exit

Copy magento folder to this path /var/www/html/

Permission folder
sudo find /var/www/html/magentoInstallationFolder/ -type d -exec chmod 775 {} \;
sudo find /var/www/html/magentoInstallationFolder/ -type f -exec chmod 664 {} \;

sudo find -type d -exec chmod 775 {} \;
sudo find -type f -exec chmod 664 {} \;

Set Writable for 3 folders in root magento: var, media, app/etc
sudo chmod -R 777 var/  media/ app/etc/ downloader/

Apr 10, 2015

LOOPBACK TUTORIAL

==================================
INSTALL LOOPBACK

1. Check version Node, NPM, Python
npm -v
node -v
python --version (~ 2.7.x)

2. Install Loopback
sudo npm install -g strongloop
slc --version
==================================

==================================
CREATE FIRST APP

1. Download example project
sudo slc loopback:example

2. Create first app
slc loopback:test
Name of your app: test-app
Name of directory: test-dir

3. Next step

3.1 Change directory to your app
cd test-dir

3.2 Create a model in your app
slc loopback:model

3.3 Optionak: enable StrongOps monitoring
slc strongops

3.4 Run the app
slc run
==================================

==================================
CREATE MODELS

1. cd to folder contain app, example:
cd loopback-app

2. Use command:
slc loopback:model

==================================

==================================
CONFIG DATABASE REDIS

1. Setup dependencies in package.json:
{
  ...
  "dependencies": {
    "loopback-datasource-juggler": "~1.0.0",
    "loopback-connector-redis": "latest"
  },
  ...
}

2. In folder contain package.json file, use command:
sudo npm install

==================================
RUN (START/STOP) APP

1. Use command: SLC ARC
slc arc
Click App Controller -> START or STOP

2. Use command:
SLC START APP_NAME
SLC STOP APP_NAME




==================================

==================================

==================================

==================================