четверг, 31 мая 2012 г.

Fedora & drupal7 + mysql install



Nothing difficult. Its my recipt and its case of taste how you can configure your development environment.
Lets install http server and mysql:
 yum groupinstall 'Web Server' 'MySQL Database'   

Drupal7 and phpmyadmin:
  yum install drupal7 phpmyadmin   

Mysql server start:
 systemctl start mysqld.service   

Password for mysql server root user:
 mysqladmin -u root password $PASSWORD   

Selinux disable.
In my opinion its less problems if selinux disabled at development workstation. But I do not recommend to disable it on production sites.
Disable link.

Configure drupal.conf:
 gedit /etc/httpd/conf.d/drupal7.conf   

Uncomment lines below to have site access by yourself: 
 Allow from 127.0.0.1   

Configure php.ini file. Rise up memory limit, file upload limit and enter your timezone.
 gedit /etc/php.ini   

I prefer working with localhost, where your development sites links looks like:
  • example.tst
  • commerce.tst
I am using drupal multisite feature and host drupal file into /home/www/sites directory instead of  default way.
Lets create required directory, symbol link, drupal sites files to new directory, add a $username and apache users to each groups and own drupal files by current user.
  rm /usr/share/drupal7/sites   
  mkdir /home/www   
  mkdir /home/www/sites   
  ln -s /home/www/sites /usr/share/drupal7   
  cp -f -r /etc/drupal7/* /home/www/sites  
  mkdir /home/www/sites/example.tst  
  cp -f -r /home/www/sites/default/* /home/www/sites/example.tst  
  gpasswd -a $username apache   
  gpasswd -a apache $username   
  cd /home   
  chown $username www -R   
  chgrp $username www -R   

Lets add custom localhost:
 gedit /etc/hosts   

That line:
 127.0.0.1     example.tst   

Lets add apache virtual host:
 gedit /etc/httpd/conf/httpd.conf   
 
Scroll down to virtual hosts section, and uncomment line:
 NameVirtualHost *:80   

Then add new localhost to apache server:
 <VirtualHost *:80>  
   ServerAdmin username@example.com   
   DocumentRoot /usr/share/drupal7   
   ServerName example.tst   
  </VirtualHost>   

Lets start apache:
 systemctl start httpd.service   

Now we can check, enter to your browser

Easy way to create databases is at:

Thats it.

Комментариев нет:

Отправить комментарий