Magento E-Commerce Solution On Debian Etch
Magento E-Commerce Solution On Debian EtchVersion 1.0 This document describes how to set up Magento on Debian Etch. The resulting system provides a professional open-source e-commerce solution with a many features. Please note, that Magento is currently in a preview release and not recommended for use in production environments. But at least it's worth to glance at it. This howto is a practical guide without any warranty - it doesn't cover the theoretical backgrounds. There are many ways to set up such a system - this is the way I chose.
1 PreparationSet up a standard Debian Etch system and update it. I used the following configuration for the attached virtual machine: Hostname: server1.example.com
2 Needed PackagesFirst we install some needed packages to prepare the system for magento. apt-get install apache2 apache2-prefork-dev mysql-server-5.0 php5 php5-dev php5-mysql php5-mcrypt php5-mhash php5-curl php-pear re2c make
3 APC CacheIt's recommended to use APC as a bytecode cache (other bytecode caches are currently not supported). Install it via: pecl install apc Select "yes" when you're asked if you want to use apxs to set compile flags. Afterwards we have to add APC to the php.ini - before you should make a backup. cp /etc/php5/apache2/php.ini /etc/php5/apache2/php.ini.orig vi /etc/php5/apache2/php.ini Add the following line: extension=apc.so Now you have to restart apache. /etc/init.d/apache2 restart
4 MySQL PreparationIn this step we prepare a database for magento.
4.1 Root PasswordFirst we have to assign a password to the SQL root user. mysqladmin -u root password %sql_root_password% Note: I used the password howtoforge in the attached vm.
4.2 Magento DatabaseNext we create a database for magento. mysqladmin -u root -p create magento
4.3 Database UserNow we create a new user for the magento database. mysql -u root -p GRANT CREATE, ALTER, INDEX, DROP, CREATE TEMPORARY TABLES, SELECT, INSERT, UPDATE, DELETE ON magento.* TO 'magento_admin'@'localhost' IDENTIFIED BY '%magento_admin_password%'; Note: I used the password secret in the attached vm. quit;
5 Get MagentoTime to download and unpack magento. Additionally we have to change the rights. cd /var/www/
6 SSL CertificateWe create a SSL certificate for the SSL-vhost. Please note that this self signed certificate is only for testing purposes. mkdir /etc/apache2/ssl/
7 Magento VHostsWe'll create two vhosts - one for http-connections and one for https-connections.
7.1 HTTPvi /etc/apache2/sites-available/magento It should look like this: NameVirtualHost 192.168.0.100:80
<VirtualHost 192.168.0.100:80>
ServerName www.example.com
ServerAdmin webmaster@example.com
DocumentRoot /var/www/magento/
<Directory /var/www/magento/>
AllowOverride All
</Directory>
ErrorLog /var/log/apache2/magento_error.log
CustomLog /var/log/apache2/magento_access.log combined
LogLevel warn
</VirtualHost>
7.2 HTTPSvi /etc/apache2/sites-available/magento_ssl It should look like this: NameVirtualHost 192.168.0.100:443
<VirtualHost 192.168.0.100:443>
ServerName www.example.com
ServerAdmin webmaster@example.com
DocumentRoot /var/www/magento/
SSLEngine on
SSLCertificateKeyFile ssl/server.cert.key
SSLCertificateFile ssl/server.cert.crt
SSLProtocol all
SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
<Directory /var/www/magento/>
AllowOverride All
SSLRequire %{SSL_CIPHER_USEKEYSIZE} >= 128
</Directory>
ErrorLog /var/log/apache2/magento_error.log
CustomLog /var/log/apache2/magento_access.log combined
LogLevel warn
</VirtualHost>
Add the HTTPS listen port to the apache configuration. vi /etc/apache2/ports.conf Add the following line: Listen 443
7.3 Modules & SitesAfter that we enable the new sites, ... a2ensite magento ... the rewrite module ... a2enmod rewrite ... and the ssl module. a2enmod ssl Now we have to restart apache. /etc/init.d/apache2 restart
|



print: 


Recent comments
12 hours 19 min ago
12 hours 23 min ago
16 hours 25 min ago
1 day 3 hours ago
1 day 5 hours ago
1 day 14 hours ago
2 days 13 hours ago
2 days 15 hours ago
2 days 19 hours ago
4 days 55 min ago