|
Hi,
Here is the fastest way to achieve a Magento’s install on a yum based system. Tested on Fedora Core 9 and Centos 5. Other rpm’s based system like RHEL for example should work. You need to be root to do this.
1 - For Centos (and surely RHEL), you’ll need to add a custom repository to be able to use php 5.2.x
Edit a repo file under yum’s configuration
vi /etc/yum.repos.d/remi-enterprise.repo
And paste this lines
[remi] name=Les RPM de remi pour Enterpise Linux $releasever - $basearch baseurl=http://rpms.famillecollet.com/el$releasever.$basearch/ http://remi.collet.free.fr/rpms/el$releasever.$basearch/ enabled=0 gpgcheck=1 gpgkey=http://rpms.famillecollet.com/RPM-GPG-KEY-remi failovermethod=priority
[remi-test] name=Les RPM de remi en test pour Enterpise Linux $releasever - $basearch baseurl=http://remi.collet.free.fr/rpms/test-el$releasever.$basearch/ # http://iut-info.univ-reims.fr/remirpms/test-el$releasever.$basearch/ enabled=0 gpgcheck=1 gpgkey=http://rpms.famillecollet.com/RPM-GPG-KEY-remi
2 - Install mysql
yum mysql mysql-server mysql-libs
Centos won’t need mysql-libs
I assume how know how to launch the mysql server and create a valid user and a valid database. You’ll need this informations to achieve the installation process.
3 - Install apache, php and required modules
yum install httpd php php-xml php-pear php-mhash php-mcrypt php-mysql php-pdo php-gd
4 - Install magento in the main apache html directory
cd /var/www/html tar xzvf /path/to/magento-1.x.y.tar.gz
5 - Set files perms
chown -R apache:apache magento
6 - Add a virtual host of your choice
Edit apache conf file
vi /etc/httpd/conf/httpd.conf
And, at the end add
NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot /var/www/html/magento ServerName magento.mydomain.com </VirtualHost>
Restart apache
service httpd restart
7 - Start installation process
Point your favorite browser to
http://magento.mydomain.com/
And follow the installation process
8 - Common problem
After installation process is over, you’ll be able to access the administration backend without any problem.
http://magento.mydomain.com/index.php/admin/
But you’ll only be able to access the home page of the frontend. This is because magento uses some rewrites and apache config in the .htaccess file of the /var/www/html/magento/ directory.
Default apache configuration prevents this rewrites to succeed.
To avoid this, edit
vi /etc/httpd/conf/httpd.conf
And change add these lines to your VirtualHost definition
<Directory "/var/www/html/magento"> AllowOverride Options FileInfo AuthConfig Limit Indexes </Directory>
9 - You’re done !!!
|