$cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=13.10
DISTRIB_CODENAME=saucy
DISTRIB_DESCRIPTION="Ubuntu 13.10"
NAME="Ubuntu"
VERSION="13.10, Saucy Salamander"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 13.10"
VERSION_ID="13.10"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
2. change to root
$su -
3. Create database:
$mysql -h DBHOST -u root -pPASSWORD
mysql>CREATE DATABASE magento;
mysql>grant usage on *.* to magento@localhost identified by 'magento';
mysql>grant all privileges on magento.* to magento@localhost;
4. download and install Magento to an Apache sub directory, the Apache root directory is usually in /var/www/html/ Check this link for more detail:
This is almost the same as above, except you don’t need to know the directory name. You will only have to replaceDBHOST, DBNAME, DBUSER, and DBPASS.
- wget http://www.magentocommerce.com/downloads/assets/1.9.0.0/magento-1.9.0.0.tar.gz
- tar -zxvf magento-1.9.0.0.tar.gz
- wget http://www.magentocommerce.com/downloads/assets/1.9.0.0/magento-sample-data-1.9.0.0.tar.gz
- tar -zxvf magento-sample-data-1.9.0.0.tar.gz
- mv magento-sample-data-1.9.0.0/media/* magento/media/
- mv magento-sample-data-1.9.0.0/magento_sample_data_for_1.9.0.0.sql magento/data.sql
- mv magento/* magento/.htaccess* .
- chmod -R o+w media var
- mysql -h DBHOST -u DBUSER -pDBPASS DBNAME < data.sql
- chmod o+w var var/.htaccess app/etc
- rm -rf magento/ magento-sample-data-1.9.0.0/ magento-1.9.0.0.tar.gz magento-sample-data-1.9.0.0.tar.gz data.sql
Running the Web-Based Installer to Finish the Installation |
After you have installed Magento via SSH, you can proceed through the web-based installer. You’ll use the same database details in that as well.
You can actually bypass the web-based installer and use the Command Line Interface (CLI) instead.
Alternatively, there’s an SSH script you can use that automates both the main steps of this article and the CLI installer.
Permissions not correct/insufficient |
In case not all permissions are set correctly, you can run these commands. The code highlighter is stripping the off the end. Should be {} backslash;
- find . -type f -exec chmod 644 {} \;
- find . -type d -exec chmod 755 {} \;
which will give files the 644 and directories the 755 permissions respectively. While you can change the directories to 777, this should never be done. It is a big security risk.
Change owner to www-data |
chown -R www-data.www-data www
the default in ubuntu is www-data
Install php5 modules:
apt-get --reinstall install php5-mcrypt
apt-get --reinstall install php5-curl
apt-get --reinstall install php5-gd
Check if modules are installed:
dpkg --get-selections | grep php5
If confirmed the modules are installed, run following
sudo ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available
sudo php5enmod mcrypt
sudo service apache2 restart
If you want to use rewrite and you see "magento: the requested URL MAGENTO/FURNITURE was not found on this server", need to go to /etc/apache2/apache2.conf and set AllowOverrides to All, then run
a2enmod rewrite
Flush Caches
Check this link for create a php script to flush caches in command lines.
http://www.yameveo.com/development/magento/flush-every-magento-cache-from-the-command-line
No comments:
Post a Comment