-
Notifications
You must be signed in to change notification settings - Fork 1
Frontend Installation
See complete install protocol for SLES 15
See complete install protocol for ubuntu server 12.04
Download
Choose version of Drupal. Currently (Sept 2nd, 2024), choose drupal-7.101 for SLES 15.6
cd /opt/toscience
wget http://ftp-origin.drupal.org/files/projects/drupal-7.XX.tar.gz
tar xzf drupal-7.XX.tar.gz
rm drupal-7.XX.tar.gz
ln -s drupal-7.XX drupal
Configure
chmod a+w ~/drupal/sites/default
cp ~/drupal/sites/default/default.settings.php ~/drupal/sites/default/settings.php
chmod a+w ~/drupal/sites/default/settings.php
mysql -u root -p
CREATE DATABASE drupal;
CREATE USER drupal IDENTIFIED BY 'admin'; # Choose a safer password
GRANT ALL ON drupal.* TO 'drupal'@'localhost' IDENTIFIED BY 'admin';
FLUSH PRIVILEGES;
Replace in Line 7 of /opt/toscience/drupal/.htaccess
7c7
< Order allow,deny
---
> Require all granted
Change settings.php to respect the database and the user for Drupal:
vim /opt/toscience/drupal/sites/default/settings.php
$databases = array (
'default' =>
array (
'default' =>
array (
'database' => 'drupal',
'username' => 'drupal',
'password' => '*',
'host' => 'localhost',
'port' => '',
'driver' => 'mysql',
'prefix' => '',
),
),
);
Add public images, stylesheets, javascripts etc. from to.science.api:
cd ~/drupal
ln -s ~/git/to.science.api/public/
Check permissions
In order to upload files from Drupal do
mkdir ~/drupal/sites/default/files
sudo su; chown wwwrun:wwwrun /opt/toscience/drupal/sites/default/files/
mkdir ~/drupal/sites/default/files/languages
chown wwwrun:wwwrun ~/drupal/sites/default/files/languages
Create a private file system path
mkdir /opt/toscience/private
sudo su
chown wwwrun:wwwrun /opt/toscience/private
chmod 755 /opt/toscience/private
Navigate to http://localhost/admin/config/media/file-system and choose
Private file system path = /opt/toscience/private
Save the configuration. Then edit it again and choose
Default download method = "Private local files served by Drupal."
Save the configuration again.
Install
Browse to Drupal http://localhost/install.php and select “Minimal Installation”. Navigate to the frontpage.
Installiere deutsche Sprachdatei ~/drupal/profiles/minimal/translations/drupal-7.94.de.po .
Achtung, Support für Drupal 7 endet am 05. Januar 2025. Man soll nach Drupal 10 migrieren.
E-Mail-Adresse der Website: toscience@hbz-nrw.de
Benutzerkonto für die Wartung der Website: admin
Passwort für Frontend-Admin-User wählen!
Installation Absichern
chmod 755 ~/drupal/sites/default
chmod 755 ~/drupal/sites/default/settings.php
Follow these instructions.
Configuration against a toscience api takes place at
http://localhost/edoweb/config/storage.
Please set the api host to the full url of your toscience api installation, e.g. https://api.localhost.
If you have installed to.science.api as is, it will come with a faked user authentication that provides three users:
toscience-admin, toscience-editor and toscience-reader.
With fake user authentication, the api will accept any password for the three users, so you can set all three passwords to an arbitrary string.
Use ADMIN_USER and ADMIN_PASSWORD that you have defined in to.science.install/variables.conf.
Configure accounts at
https://localhost/edoweb/config/accounts .
Use ADMIN_PASSWORD from variables.conf for all API users. Use LABELS_PASSWORD for Etikett Password.
To remove or reinstall drupal simpley delete the drupal directory and drop the database
rm -rf ~/local/opt/regal/drupal;
mysql -u root -p
DROP DATABASE drupal;
To recreate the database.
CREATE DATABASE drupal;
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES, CREATE TEMPORARY TABLES ON drupal.* TO 'drupal'@'localhost' IDENTIFIED BY 'admin';
Drush Installation
sudo su
apt-get install php-pear
pear channel-discover pear.drush.org
pear install drush/drush
drush version
System Update
cd ~/local/opt/regal/drupal
drush rf
drush up
See: https://drupal.org/node/1494290
1. Make a backup of your Drupal instance.
mysqldump -u root -p drupal > drupal-`date`.sql
Restore command is
mysql -u root -p drupal < drupal-`date`.sql
2. Download the latest release of your current Drupal version.
Extract the [tar ball or zip] Drupal package.
curl http//ftp.drupal.org/files/projects/drupal-7.101.tar.gz |tar xz
3. Set your site on maintenance mode at http://localhost/admin/config/development/maintenance . For more information read how-to-put-drupal-7-in-maintenance-mode/ .
4. Delete all the files & folders inside your original Drupal instance except for /sites folder and any custom files you added elsewhere.
Copy all the folders and files except /sites from inside the extracted Drupal package [tar ball or zip package] into your original Drupal instance. If the update release includes changes to settings.php replace old settings.php in …/sites/default/ with the new one, and edit site-specific entries (eg database name, user, and password) If you modified files such as .htaccess or robots.txt re-apply those changes to the new files.
mv drupal-7.101 ~/opt/regal
rm -rf ~/local/opt/regal/drupal-7.101/sites
cp -r ~/local/opt/regal/drupal/sites ~/local/opt/regal/drupal-7.101/
rm ~/local/opt/regal/drupal
ln -s ~/local/opt/regal/drupal-7.101/ ~/local/opt/regal/drupal
cd ~/drupal
ln -s /opt/toscience/git/to.science.api/public
Make sure there is a file (in your appropriate language)
drupal/profiles/minimal/translations/drupal-7.101.de.po
Copy it from another toscience instance, if not present.
5. Login to your site as administrator or as user no 1
6. Run update.php by navigating to http://localhost/update.php
7. Follow the process to update your Drupal instance.
If there occur errors, get more details about them here: https://localhost/?q=admin/reports/dblog .
Remedy the errors.
8. Disable maintenance mode