This repository has been archived by the owner on Dec 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Installation Guidelines
sc84647 edited this page Nov 16, 2017
·
14 revisions
These instructions currently assume you are using Ubuntu 16.10.
- Clone locally, e.g. to ~/Code
$ cd ~/Code
$ git clone https://github.com/therestartproject/fixometer
$ cd fixometer
- MySQL
sudo apt install mysql-server
- PHP
Use PHP5 or later (e.g. 7.1 is default with Ubuntu 17.10) e.g.
sudo apt install php5 php5-mysql php5-gd php5-curl php5-xmlrpc
- Apache
Probably installed with the PHP install, however:
sudo apt install apache2
- Create new database - e.g.
fixometer_dev
. Use command line or phpmyadmin.
$ mysql -u root -p
mysql> create database fixometer_dev;
- create a DB user for it
$ mysql -u root -p
mysql> create user 'fixometer_root'@'localhost' identified by 'str0ngp4ssw0rd!';
mysql> grant all privileges on fixometer_dev.* to 'fixometer_root'@'localhost';
- Apply the database schema revisions in order
cat `ls -1 data/migrations/*.sql | sort -n` | mysql -u root -p fixometer_dev
- be aware of definer views
- they are tied to specific username
- create symlink to source files in /var/www/
sudo ln -s /home/<username>/Code/fixometer /var/www/fixometer.dev
- create conf in sites-enabled
sudo vim /etc/apache2/sites-available/fixometer.dev.conf
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName fixometer.dev
ServerAlias www.fixometer.dev
DocumentRoot /var/www/fixometer.dev
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /var/www/fixometer.dev>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
</Directory>
</VirtualHost>
- add to available sites and reload
$ sudo a2ensite fixometer.dev
- Make sure mod_rewrite is enabled
$ sudo a2enmod rewrite
- Reload apache2 config:
$ sudo service apache2 reload
- add to /etc/hosts
sudo vim /etc/hosts
Add
127.0.0.1 fixometer.dev
- Copy
config/config.example.php
toconfig/config.php
and amend as necessary.
You will likely want to change the environment to development
while working on the code:
define( 'SYSTEM_STATUS', 'development');
To set up the link to the Wordpress front-end, you will need to amend the credentials for the Wordpress user:
/** Wordpress Remote Publishing endpoint **/
define('WP_XMLRPC_ENDPOINT', 'http://wordpress.yavin/xmlrpc.php');
define('WP_XMLRPC_USER', 'xml-bot');
define('WP_XMLRPC_PSWD', 'dna%ba$MXF^x6#UW$fuigUkX');
- Copy
config/database.example.php
toconfig/database.php
and amend as necessary:
define('DBTYPE', 'mysql');
define('DBUSER', 'fixometer_root');
define('DBPASS', 'str0ngp4ssw0rd!');
define('DBNAME', 'fixometer_dev');
define('DBHOST', 'localhost');
- Create an initial user with the 'Root' role in the database
- you can then log in with this user to create other users
Images can be uploaded for group and user profiles. In order to do enable this, create an uploads
directory under public
and ensure that it is owned by the www-data
user (or at least that it has write access to it).
$ sudo chown www-data uploads/