Magento Forum

Fast and furious Fedora / Centos install guide
 
asrenzo
Member
 
Avatar
Total Posts:  42
Joined:  2008-02-25
France
 

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 !!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Rafterman
Jr. Member
 
Total Posts:  16
Joined:  2008-06-05
 

Hi this helped me alot, I have RHEL5 with rackspace.co.uk

Following the instructions towards the bottom of the post, ie adding the virtual server in you apache server via rackspace webmin, should make sure everything runs fine.

 
Magento Community Magento Community
Magento Community
Magento Community
 
vadimc
Sr. Member
 
Avatar
Total Posts:  87
Joined:  2008-10-25
London
 

i have a brand new centos install and i am getting:

pdo_mysql extension is not installed

I followed this quick quide: http://karoshiethos.com/2008/07/24/installing-pdo_mysql-on-centos/

and it still doesnt work.

the php info file says:

PDO
PDO support enabled
PDO drivers sqlite2, sqlite

pdo_sqlite
PDO Driver for SQLite 3.x enabled
PECL Module version (bundled) 1.0.1 $Id: pdo_sqlite.c,v 1.10.2.6.2.3 2007/12/31 07:20:10 sebastian Exp $
SQLite Library 3.3.7

anyone can suggest a fix please?

 
Magento Community Magento Community
Magento Community
Magento Community
 
vadimc
Sr. Member
 
Avatar
Total Posts:  87
Joined:  2008-10-25
London
 

sorry, i fixed it following this thread: http://www.directadmin.com/forum/showthread.php?t=27756
smile thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
ndarkstar
Jr. Member
 
Total Posts:  2
Joined:  2008-10-09
 

For Fedora 10 it’s almost the exact same method.  You won’t need the custom repository since F10 has all of the packages you’ll need.  Since Fedora 10 has selinux enabled by default, you’ll need to set a boolean with the following command:

setsebool -P httpd_enable_cgi 1

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mike Plant
Jr. Member
 
Total Posts:  11
Joined:  2008-05-06
 

Thanks! Worked for me perfectly on Fedora Core 8 on Amazon Web Services. Gotta love yum install!

This is a Magento 5 Minute Installation.

 
Magento Community Magento Community
Magento Community
Magento Community
 
sajmmon
Jr. Member
 
Total Posts:  2
Joined:  2010-11-07
 

Additional feedback:

because of the security context mechanism (SELinux) one might experience file permission problems, which are not observed in other distributions. More about SELinux in Fedora can be found in (http://fedoraproject.org/wiki/SELinux/SecurityContext).

If your Apache root is: /var/www/html and your Downloader or Full Release is in: /var/www/html/magento try the following as a root user

# semanage fcontext -a -t httpd_sys_rw_content_t ‘/var/www/html/magento’
# restorecon -v ‘/var/www/html/magento’
# service httpd restart

Cheers
Szymon Chojnacki
http://www.ipipan.eu/~sch/

 
Magento Community Magento Community
Magento Community
Magento Community
 
joshgeake
Jr. Member
 
Total Posts:  11
Joined:  2011-05-12
 

I wrote a post on installing Magento 1.5.1 on CentOS 5.6 x64 including all the annoying bits with PHP 5.1 to PHP 5.3 and phpMyAdmin - Installing Magento 1.5.1 on CentOS 5.6 x64 Hopefully someone will find it useful!

 
Magento Community Magento Community
Magento Community
Magento Community
 
jmazzella
Jr. Member
 
Total Posts:  29
Joined:  2011-07-21
 

I saw that the tread started back in 2008, will the Yum installs load the current recommended dependent software for the current production version of Magento on CentOS 6?

Thanks,
John

 
Magento Community Magento Community
Magento Community
Magento Community
 
joshgeake
Jr. Member
 
Total Posts:  11
Joined:  2011-05-12
 

See here http://www.geakeit.co.uk/installations/install-magento-1-6-on-centos.html

 
Magento Community Magento Community
Magento Community
Magento Community
 
Template fans
Guru
 
Total Posts:  446
Joined:  2009-11-02
 

Very helpful. Thank you.

 
Magento Community Magento Community
Magento Community
Magento Community
 
rijalul
Jr. Member
 
Total Posts:  3
Joined:  2012-05-12
 

information is very useful, thank you.

 
Magento Community Magento Community
Magento Community
Magento Community
 
alamsyahrizki
Jr. Member
 
Total Posts:  1
Joined:  2013-01-16
 

it’s nice posting guys

 
Magento Community Magento Community
Magento Community
Magento Community
 
patrolg
Jr. Member
 
Total Posts:  3
Joined:  2013-11-04
 

For centos 6.X apache 2.X php 5.3.X
If you have installed magento into var/www/html/magento (or whatevername) and want to create a virtual host for it --> IT WILL NEVER WORK. The virtual host by itself will not work and all your link will not work
All pages will be 404..

Copy (do not move) your installation to /var/www/whatvername
/var/www directory was specially created for YOUR websites

You need to create a virtual host as the same as the main default server.
<VirtualHost *:80>
DocumentRoot /var/www/html
ServerName XXX.XXX.XXX.XXX:80 (<-- your ip address of your webserver)
<Directory \"/var/www/html\">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

AND THEN you can create your virtual host for magento.
<VirtualHost *:80>
ServerName domain.com
ServerAlias http://www.domain.com
DocumentRoot /var/www/magento
.....
</VirtualHost>

Note: if creating a virtual host on an existing webserver.. the main goes away.
http://httpd.apache.org/docs/2.2/vhosts/name-based.html

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top