|
1 |
| -1. Log in to the Magento server as, or switch to, a user who has permissions to write to the Magento file system. One way to do this is to [switch to the Magento file system owner]({{ page.baseurl }}/install-gde/prereq/file-sys-perms-over.html). |
| 1 | +1. Log in to the Magento server as, or switch to, a user with permissions to write to the Magento file system. See [switch to the Magento file system owner]({{ page.baseurl }}/install-gde/prereq/file-sys-perms-over.html). |
2 | 2 |
|
3 |
| -If you use the bash shell, you can also use the following syntax to switch to the Magento file system owner and enter the command at the same time: |
| 3 | + If you use the bash shell, you can use the following syntax to switch to the Magento file system owner and enter the command at the same time: |
4 | 4 |
|
5 |
| -```bash |
6 |
| -su <Magento file system owner> -s /bin/bash -c <command> |
7 |
| -``` |
| 5 | + ```bash |
| 6 | + su <Magento file system owner> -s /bin/bash -c <command> |
| 7 | + ``` |
8 | 8 |
|
9 |
| -If the Magento file system owner does not allow logins you can do the following: |
| 9 | + If the Magento file system owner does not allow logins, you can do the following: |
10 | 10 |
|
11 |
| -```bash |
12 |
| -sudo -u <Magento file system owner> <command> |
13 |
| -``` |
| 11 | + ```bash |
| 12 | + sudo -u <Magento file system owner> <command> |
| 13 | + ``` |
14 | 14 |
|
15 | 15 | 1. To run Magento commands from any directory, add `<magento_root>/bin` to your system `PATH`.
|
16 | 16 |
|
17 |
| -Because shells have differing syntax, consult a reference like [unix.stackexchange.com](http://unix.stackexchange.com/questions/117467/how-to-permanently-set-environmental-variables). |
| 17 | + Because shells have differing syntax, consult a reference like [unix.stackexchange.com](http://unix.stackexchange.com/questions/117467/how-to-permanently-set-environmental-variables). |
18 | 18 |
|
19 |
| -bash shell example for CentOS: |
| 19 | + Sample bash shell for CentOS: |
20 | 20 |
|
21 |
| -```bash |
22 |
| -export PATH=$PATH:/var/www/html/magento2/bin |
23 |
| -``` |
| 21 | + ```bash |
| 22 | + export PATH=$PATH:/var/www/html/magento2/bin |
| 23 | + ``` |
24 | 24 |
|
25 |
| -{:.bs-callout .bs-callout-info} |
26 |
| -You can also run the commands in the following ways: |
| 25 | + Optionally, you can run the commands in the following ways: |
27 | 26 |
|
28 |
| -- `cd <magento_root>/bin` and run them as `./magento <command name>` |
29 |
| -- `<magento_root>/bin/magento <command name>` |
30 |
| -- `<magento_root>` is a subdirectory of your web server's docroot. [Need help locating the docroot?]({{ page.baseurl }}/install-gde/basics/basics_docroot.html) |
| 27 | + - `cd <magento_root>/bin` and run them as `./magento <command name>` |
| 28 | + - `<magento_root>/bin/magento <command name>` |
| 29 | + - `<magento_root>` is a subdirectory of your web server docroot. [Need help locating the docroot?]({{ page.baseurl }}/install-gde/basics/basics_docroot.html) |
0 commit comments