diff --git a/README.md b/README.md index ee59add4..e4363759 100644 --- a/README.md +++ b/README.md @@ -85,38 +85,72 @@ More details about [configuring project](docs/en/configuring_project.md). Installing ---------- -* Go to the directory in which you want to install PHP Censor, for example: `/var/www`; +1. Go to the directory in which you want to install PHP Censor, for example: `/var/www`: -* Download PHP Censor from this repository and unzip it (to `/var/www/php-censor.local` for example); +```bash +cd /var/www +``` -* Go to the PHP Censor directory: `cd /var/www/php-censor.local`; +2. Create project by Composer: -* Install dependencies using Composer: `composer install`; +```bash +composer create-project corpsee/php-censor php-censor.local --keep-vcs +``` -* Create empty database for application; +Or download [latest archive](https://github.com/corpsee/php-censor/releases/latest) from Github, unzip it and run +`composer install`. -* Install Beanstalkd queue (`aptitude install beanstalkd`); +3. Create empty database for application (Mysql/MariaDB or Postgres); -* Install PHP Censor itself: `./bin/console php-censor:install`; +4. Install Beanstalkd Queue (Optional, if you are going to use queue with Worker): -* [Add a virtual host to your web server](docs/en/virtual_host.md), pointing to the `public` directory within your new +```bash +aptitude install beanstalkd # For deb-based +``` + +5. Install PHP Censor itself: + +```bash +cd ./php-censor.local + +# Interactive installation +./bin/console php-censor:install + +# Non-interactive installation +./bin/console php-censor:install --url='http://php-censor.local' --db-type=pgsql --db-host=localhost --db-name=php-censor --db-user=php-censor --db-password=php-censor --db-port=null --admin-name=admin --admin-password=admin --admin-email='admin@php-censor.local' --queue-use=1 --queue-host=localhost --queue-name=php-censor + +# Non-interactive installation with prepared config.yml file +./bin/console php-censor:install --config-from-file=yes --admin-name=admin --admin-password=admin --admin-email='admin@php-censor.local' +``` + +6. [Add a virtual host to your web server](docs/en/virtual_host.md), pointing to the `public` directory within your new PHP Censor directory. You'll need to set up rewrite rules to point all non-existent requests to PHP Censor; -* [Set up the PHP Censor Worker](docs/en/workers/worker.md), or [a cron-job](docs/en/workers/cron.md) to run PHP -Censor builds; - -More details about [installation](docs/en/installing.md). +7. [Set up the PHP Censor Worker](docs/en/workers/worker.md) (Need configured Queue) or +[a cron-job](docs/en/workers/cron.md) to run PHP Censor builds; Updating -------- -* Go to your PHP Censor directory (to `/var/www/php-censor.local` for example); +1. Go to your PHP Censor directory (to `/var/www/php-censor.local` for example): -* Pull the latest code. This would look like this: `git pull`; +```bash +cd /var/www/php-censor.local +``` -* Update the PHP Censor database: `./bin/console php-censor-migrations:migrate`; +2. Pull the latest code by Git: -* Update the Composer dependencies: `composer install` +```bash +git pull -r +``` + +3. Update the Composer dependencies: `composer install` + +4. Update the PHP Censor database scheme: + +```bash +./bin/console php-censor-migrations:migrate +``` Migrations ---------- diff --git a/docs/en/README.md b/docs/en/README.md index 9f596185..9dfed15a 100644 --- a/docs/en/README.md +++ b/docs/en/README.md @@ -4,13 +4,13 @@ PHP Censor documentation Getting Started --------------- -* [Installing PHP Censor](installing.md) +* Installing PHP Censor (See [README](../../README.md)) * [Adding a Virtual Host](virtual_host.md) * [Run builds using a worker](workers/worker.md) * [Run builds using cronjob](workers/cron.md) * [Adding PHP Censor Support to Your Projects](configuring_project.md) * [Setting up Logging](logging.md) -* [Updating PHP Censor](updating.md) +* Updating PHP Censor (See [README](../../README.md)) * [Configuring PHP Censor](configuring.md) Using PHP Censor diff --git a/docs/en/installing.md b/docs/en/installing.md deleted file mode 100644 index 90011f59..00000000 --- a/docs/en/installing.md +++ /dev/null @@ -1,25 +0,0 @@ -Installing PHP Censor -===================== - -What you'll need ----------------- - -* PHP 5.6.0+ -* A web server (Nginx or Apache) -* [Composer](https://getcomposer.org/download/) -* [Git](http://git-scm.com/downloads) -* A DB server to connect to (MySQL/MariaDB or PostgreSQL). -* The following functions need to be enabled: `exec()`, `shell_exec()` and `proc_open()` in php.ini. -* PHP must have OpenSSL support enabled. - -Installing PHP Censor Manually ------------------------------- - -* Go to the directory in which you want to install PHP Censor, for example: `/var/www` -* [Download PHP Censor](https://github.com/corpsee/php-censor/releases/latest) and unzip it. -* Go to the PHP Censor directory: `cd /var/www/php-censor` -* Install dependencies using Composer: `composer install` -* Install PHP Censor itself: `./bin/console php-censor:install` -* [Add a virtual host to your web server](virtual_host.md), pointing to the `public` directory within your new PHP -Censor directory. You'll need to set up rewrite rules to point all non-existent requests to PHP Censor. -* [Set up the PHP Censor Worker](workers/worker.md), or [a cron-job](workers/cron.md) to run PHP Censor builds. diff --git a/docs/en/updating.md b/docs/en/updating.md deleted file mode 100644 index 8510f9e3..00000000 --- a/docs/en/updating.md +++ /dev/null @@ -1,11 +0,0 @@ -Updating PHP Censor -=================== - -Updating PHP Censor to the latest release, or even dev-master updates is something that will need to be done from time to time. Most of this may be self-explanatory, but for clarity and completeness, it should be added to the documentation. - -1. Go to your PHP Censor root folder in a Terminal. -2. Pull the latest code. This would look like this: `git pull` -3. Update the PHP Censor database: `./bin/console php-censor-migrations:migrate` -4. Update the composer and its packages: `composer self-update && composer update` -5. Return to the PHP Censor admin screens and check your desired plugins are still installed correctly. -7. Run a build to make sure everything is working as expected.