Project

General

Profile

Support #557

Updated by Daniel Curtis about 9 years ago

{{>toc}} 

 This is a simple guide for setting up an instance of BeansBooks on a FAMP server, for help setting up the environment read through Issue #432. 

 h2. Downloading BeansBooks 

 * Make the BeansBooks directory: 
 <pre> 
 mkdir /usr/local/www/beans.example.com && cd /usr/local/www/beans.example.com 
 </pre> 

 * Clone BeansBooks 
 <pre> 
 git clone --recursive https://github.com/system76/beansbooks.git beans.example.com 
 cd beans.example.com 
 </pre> 

 h3. Configure BeansBooks 

 * Copy the example.htaccess file to .htaccess within your working directory 
 <pre> 
 cp example.htaccess .htaccess 
 </pre> 
 #* If you are not planning on hosting with SSL, then we need to comment out two lines in the @.htaccess@ file. Open the file for editing: 
 <pre> 
 vi .htaccess 
 </pre> 
 #* Look for the following two lines, and add a @#@ character before them: 
 <pre> 
 #RewriteCond %{HTTPS} !=on 
 #RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] 
 </pre> 

 * Update the permissions on two directories before proceeding: 
 <pre> 
 chmod 770 -R application/logs 
 chmod 770 -R application/cache 
 </pre> 

 * Create a configuration file: 
 <pre> 
 touch application/classes/beans/config.php 
 chmod 660 application/classes/beans/config.php 
 </pre> 

 * Change the ownership to the apache24 user: 
 <pre> 
 chown -R www:www /usr/local/www/beans.example.com 
 </pre> 

 h3. Configure MySQL 

 * Log into the MySQL console: 
 <pre> 
 mysql -h localhost -u root -p 
 </pre> 
 #* Create the *beans* user with the *beansdb* password and the *beans* database: 
 <pre> 
 CREATE USER 'beans'@'localhost' IDENTIFIED BY 'beansdb';    
 CREATE DATABASE IF NOT EXISTS    `beans` CHARACTER SET utf8 COLLATE utf8_general_ci; 
 GRANT ALL PRIVILEGES ON `beans`.* TO 'beans'@'localhost'; 

 flush privileges: 
 exit 
 </pre>  

 h2. Configure Apache24 VirtualHost 

 * Edit the apache24 config: 
 <pre> 
 vi /usr/local/etc/apache24/httpd.conf 
 </pre> 
 #* And add the following @VirtualHost@ block: 
 <pre> 
 <VirtualHost *:80> 
     ServerName beans.example.com 
     ServerAlias beans.example.com 

     DocumentRoot /usr/local/www/beans.example.com             
     <Directory /usr/local/www/beans.example.com> 
         Options FollowSymLinks 
         AllowOverride All 
         Require all granted 
     </Directory> 
 </VirtualHost> 
 </pre> 

 * Restart apache24: 
 <pre> 
 service apache24 restart 
 </pre> 

 * Now navigate to http://beans.example.com to complete the setup using the setup wizard. 

 h2. Resources 

 * https://github.com/system76/beansbooks

Back