- Download the project into the web server folder ex.
/var/www/html/uaf
. - Set the permissions for the
files
folder accordingly to the web server you're using.
sudo mkdir /var/www/html/uaf/docroot/sites/default/files
sudo chown www-data:$USER /var/www/html/uaf/docroot/sites/default/files -R
- Create the site config file on apache.
sudo nano /etc/apache2/sites-available/dev.uaf.conf
- Paste the following content on
dev.uaf.conf
file
<VirtualHost *:80>
ServerName dev.uaf
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/uaf/docroot
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
- Activate the site.
sudo a2ensite dev.uaf.conf
sudo service apache2 restart
- Register the UAF site on the
hosts
file by adding127.0.0.1 dev.uaf
at the end of the file.
sudo nano /etc/hosts
- Create a database for the UAF site.
mysql -u root -p
CREATE SCHEMA `uaf` DEFAULT CHARACTER SET latin1;
CREATE USER 'uaf'@'localhost' IDENTIFIED BY 'YOUR PASSWORD';
GRANT ALL PRIVILEGES ON uaf.* TO 'uaf'@'localhost';
exit;
- Install the Drupal site using drush.
cd /var/www/html/uaf/docroot
sudo cp sites/default/default.settings.php sites/default/settings.php
sudo chown www-data:$USER sites/default/settings.php
drush si standard --db-url=mysql://uaf:'YOUR PASSWORD'@localhost/uaf
Take notes of your username and password.
- Adjust the config folder on
dorcroot/default/settings.php
nano docroot/sites/default/settings.php
Replace the last line (Something like:)
$config_directories['sync'] = 'sites/default/files/config_tkFzoCY46CuHdBVEcgWs7LI9ZSMoqEH_DtzGjcRpKCG6euyT_QVwRoNEel0JzO91surASw5nWA/sync';
by the following:
$config_directories = [
CONFIG_SYNC_DIRECTORY => '../config/default',
];
- Change your site UUID to be able to import the configuration.
drush config-set "system.site" uuid "653059e0-5618-4625-9969-ba298fa6acf5"
- Import the site configuration.
drush sqlq "truncate table shortcut"
drush cim
- Load the exoplanets data from NASA (Optional at this moment).
drush cc drush
drush cr
drush import-exoplanets
- Access the UAF local website using your browser.
http://dev.uaf