# Drupal setup



## balanga (Feb 9, 2017)

I'm starting this thread with the aim of putting together a Drupal howto. I have setup Drupal on several occasions but always stumble upon a few problems along the way.

My aim is to provide an uptodate guideline on setting up Drupal to work with PostgreSQL, PHP and Apache running on FreeBSD.

The current versions I'm working with are:-

FreeBSD 11.0-RELEASE
Apache 2.4.25
Php   5.65
PostgreSQL  9.6
Drupal 8


I would like to try to use php 7.0 but that would be too pioneering for me. At the moment I'd like to concentrate on getting Drupal up and running. It is running on a remote VPS, but I didn't make any notes on exactly what I did so have not managed to set it up locally. It is current installed but am unable to run the setup script for some reason. When going to 192.168.1.50/drupal
I get 
	
	



```
The 192.168.1.50 page isn’t working
192.168.1.50 is currently unable to handle this request.
```
This happens when trying to run http://192.168.1.50/drupal/core/install.php

Just for reference I found the following links useful.

https://loga.us/2015/01/16/apache-php-mysql-drupal7-freebsd10-part-1/
https://loga.us/2015/01/15/apache-php-mysql-drupal7-freebsd10-part-2/
https://loga.us/2015/01/22/apache-php-mysql-drupal7-freebsd10-part-3/

http://thegreyblog.blogspot.co.uk/2014/10/installing-drupal-on-freebsd.html

http://linoxide.com/linux-how-to/install-drupal-7-ssl-freebsd-10-2/

https://cwharton.com/blog/2016/10/postgresql-and-freebsd-quick-start/


----------



## balanga (Feb 11, 2017)

cat pkglist

```
apache24
postgresql96-server
postgresql96-client
drupal8
php56
mod_php56
php56-ctype
php56-tokenizer
```

`xargs pkg install -y <pkglist

sysrc apache24_enable=yes
sysrc postgresql_enable=yes

service postgresql initdb
service postgresql start

su postgres

createuser -P user_test
createdb db_test -O user_test`


----------



## balanga (Feb 11, 2017)

`chown www:www /usr/local/www/drupal8/sites/default`


----------



## balanga (Feb 18, 2017)

Need to enable rewrite_module in Apache's httpd.conf.


This is needed when various subdirectories under Drupal8 cannot be accessed:-

https://www.drupal.org/node/2134281


----------

