Update install/update documentation

This commit is contained in:
Hypolite Petovan 2018-11-12 14:15:26 -05:00
parent 714c37f811
commit e03e10e032
3 changed files with 63 additions and 23 deletions

View file

@ -1,36 +1,30 @@
# Friendica Directory Install # Friendica Directory Install Instructions
## Get the source code ## 1. Get the source code
If you want to install Friendica Directory in `/path/to/friendica-directory` For a planned install of Friendica Directory in the `/path/to/friendica-directory` folder.
### Using Composer ### Using Git and Composer
Composer is a popular dependency management tool for PHP projects. [Getting Started with Composer](https://getcomposer.org/doc/00-intro.md). Git is a popular version control management tool.
[Getting Started with Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).
```
cd /path/to
composer create-project friendica/friendica-directory --no-dev
```
### Using Git
Git is a popular version control management tool. [Getting Started with Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).
You'll also need Composer to grab the project dependencies. You'll also need Composer to grab the project dependencies.
Composer is a popular dependency management tool for PHP projects.
[Getting Started with Composer](https://getcomposer.org/doc/00-intro.md).
``` ```
cd /path/to cd /path/to
git clone https://github.com/friendica/friendica-directory git clone https://github.com/friendica/friendica-directory friendica-directory
cd friendica-directory cd friendica-directory
composer install composer install
``` ```
### Using an archive ### Using a stable release archive
On the [Friendica Directory Github Releases page](https://github.com/friendica/friendica-directory/releases), you can find the latest source archive named `friendica-directory-<version>.zip`. On the [Friendica Directory Github Releases page](https://github.com/friendica/friendica-directory/releases), you can find the latest source archive named `friendica-directory-<version>.zip`.
Simply unpack the archive in `/path/to/friendica-directory`. Simply unpack the archive in `/path/to/friendica-directory`, the dependencies are already included.
## Set up a database and a user ## Set up a database and a user
@ -45,7 +39,7 @@ Sample commands from the MariaDB console for a local install:
> GRANT ALL ON `friendica-directory`.* TO 'friendica-directory'@'localhost' IDENTIFIED BY "password"; > GRANT ALL ON `friendica-directory`.* TO 'friendica-directory'@'localhost' IDENTIFIED BY "password";
``` ```
## Initialize database schema ## 2. Initialize database schema
Using the details gathered from the previous step, follow the instructions in the Friendica Directory Install Wizard. Using the details gathered from the previous step, follow the instructions in the Friendica Directory Install Wizard.
@ -54,7 +48,7 @@ cd /path/to/friendica-directory
bin/console install bin/console install
``` ```
## Configure your web server ## 3. Configure your web server
The document root of Friendica Directory is `/public`. The document root of Friendica Directory is `/public`.
@ -68,7 +62,7 @@ In your Virtual Host file, set your document root as follow:
DocumentRoot /path/to/friendica-directory/public/ DocumentRoot /path/to/friendica-directory/public/
``` ```
## Set up the background task ## 4. Set up the background task
Friendica Directory relies on a background task running every minute to keep the directory up to date. Friendica Directory relies on a background task running every minute to keep the directory up to date.
@ -79,8 +73,8 @@ Add this line to your crontab:
* * * * * cd /path/to/friendica-directory && php bin/cron.php * * * * * cd /path/to/friendica-directory && php bin/cron.php
``` ```
## Seed your directory ## 5. Seed your directory
Your directory is ready, but empty. To start filling it, you can: Your directory is ready, but empty. To start filling it, you can:
- Set your hostname as the main directory in [Friendica](https://github.com/friendica/friendica)'s admin settings - Set your host name as the main directory in [Friendica](https://github.com/friendica/friendica)'s admin settings.
- Add existing directories in your polling queue: `bin/console directory-add https://dir.friendica.social` - Add existing directories in your polling queue: `bin/console directory-add https://dir.friendica.social`.

View file

@ -21,6 +21,10 @@ This is an opt-in directory, meaning that each node can choose not to submit its
Please refer to the provided [installation instructions](INSTALL.md). Please refer to the provided [installation instructions](INSTALL.md).
## Update from a previous version
Please refer to the provided [update instructions](UPDATE.md).
## See also ## See also
- [Project Concepts](docs/Concepts.md) - [Project Concepts](docs/Concepts.md)

42
UPDATE.md Normal file
View file

@ -0,0 +1,42 @@
# Friendica Directory Update Instructions
## 1. Update the source code
If you installed Friendica Directory in `/path/to/friendica-directory`.
### Using Git
```
cd /path/to/friendica-directory
git pull
composer install
```
### Using an archive
1. Create a temporary folder to unpack the new archive.
2. Copy your old `config/local.json` to the new folder.
3. Swap the folder names.
4. Remove the temporary folder.
Sample Linux commands:
```
cd /path/to
mkdir friendica-directory-new
unzip friendica-<version>.zip friendica-directory-new
cp friendica-directory/config/local.json friendica-directory-new/config
mv friendica-directory friendica-directory-old
mv friendica-directory-new friendica-directory
rm -r friendica-directory-old
```
## 2. Update the database structure
The database structure may have changed since the last update, fortunately a console command allows to run the migration scripts up to the latest version:
```
cd /path/to/friendica-directory
bin/console dbupdate
```
You're all set!