Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| computers:truenas:famp [25-Oct-2021 11:18] – [PHP Software] Steve Joynt | computers:truenas:famp [02-Feb-2025 16:14] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 16: | Line 16: | ||
| < | < | ||
| # Tailor each of these examples for your own situation | # Tailor each of these examples for your own situation | ||
| - | JAIL_NAME=" | + | DOMAIN_NAME=" |
| + | JAIL_NAME=" | ||
| RELEASE_NAME=" | RELEASE_NAME=" | ||
| - | DOMAIN_NAME=" | ||
| LAN_IP=" | LAN_IP=" | ||
| GATEWAY_IP=" | GATEWAY_IP=" | ||
| DNS_IP=" | DNS_IP=" | ||
| PHP_VER=" | PHP_VER=" | ||
| + | |||
| </ | </ | ||
| - | 3. Delete any old jail with the same name - e.g. if you're setting this same jail up again. Most people do not need to perform this step. Be careful you don't delete a jail that you still want to keep! | + | 3. Delete any old jail with the same name - e.g. if you're setting this same jail up again. Most people do not need to perform this step. **Be careful you don't delete a jail that you still want to keep!** |
| < | < | ||
| iocage destroy --force " | iocage destroy --force " | ||
| + | |||
| </ | </ | ||
| Line 44: | Line 46: | ||
| defaultrouter6=none \ | defaultrouter6=none \ | ||
| resolver=" | resolver=" | ||
| + | |||
| </ | </ | ||
| Line 50: | Line 53: | ||
| jexec " | jexec " | ||
| "echo \" | "echo \" | ||
| + | |||
| </ | </ | ||
| Line 56: | Line 60: | ||
| jexec " | jexec " | ||
| pkg update | pkg update | ||
| + | |||
| </ | </ | ||
| Line 65: | Line 70: | ||
| -j " | -j " | ||
| -install apache24 | -install apache24 | ||
| + | |||
| </ | </ | ||
| Line 71: | Line 77: | ||
| jexec " | jexec " | ||
| "echo \" | "echo \" | ||
| + | |||
| </ | </ | ||
| Line 77: | Line 84: | ||
| jexec " | jexec " | ||
| sysrc apache24_enable=YES | sysrc apache24_enable=YES | ||
| + | |||
| </ | </ | ||
| Line 83: | Line 91: | ||
| jexec " | jexec " | ||
| service apache24 start | service apache24 start | ||
| + | |||
| </ | </ | ||
| Line 92: | Line 101: | ||
| -j " | -j " | ||
| install mysql80-client mysql80-server | install mysql80-client mysql80-server | ||
| + | |||
| </ | </ | ||
| Line 98: | Line 108: | ||
| jexec " | jexec " | ||
| sysrc mysql_enable=YES | sysrc mysql_enable=YES | ||
| + | |||
| </ | </ | ||
| Line 104: | Line 115: | ||
| jexec " | jexec " | ||
| service mysql-server start | service mysql-server start | ||
| + | |||
| </ | </ | ||
| Line 109: | Line 121: | ||
| < | < | ||
| echo " | echo " | ||
| + | |||
| </ | </ | ||
| Line 115: | Line 128: | ||
| jexec " | jexec " | ||
| mysql_secure_installation | mysql_secure_installation | ||
| + | |||
| </ | </ | ||
| Line 128: | Line 142: | ||
| jexec " | jexec " | ||
| mysql_config_editor set --host=localhost --user=root --password | mysql_config_editor set --host=localhost --user=root --password | ||
| + | |||
| </ | </ | ||
| Use the random password generated at step 4. | Use the random password generated at step 4. | ||
| Line 158: | Line 173: | ||
| php${PHP_VER:? | php${PHP_VER:? | ||
| php${PHP_VER:? | php${PHP_VER:? | ||
| + | |||
| </ | </ | ||
| Line 164: | Line 180: | ||
| jexec " | jexec " | ||
| cp / | cp / | ||
| + | |||
| </ | </ | ||
| You may want to amend the configuration manually | You may want to amend the configuration manually | ||
| Line 169: | Line 186: | ||
| jexec " | jexec " | ||
| vi / | vi / | ||
| + | |||
| </ | </ | ||
| Line 186: | Line 204: | ||
| </ | </ | ||
| END | END | ||
| + | |||
| </ | </ | ||
| Line 192: | Line 211: | ||
| jexec " | jexec " | ||
| apachectl configtest | apachectl configtest | ||
| + | |||
| </ | </ | ||
| Line 198: | Line 218: | ||
| jexec " | jexec " | ||
| apachectl restart | apachectl restart | ||
| + | |||
| </ | </ | ||
| ====== Create a Database for your Web Site ====== | ====== Create a Database for your Web Site ====== | ||
| - | 1. Define | + | 1. Make some decisions and define some variables. |
| < | < | ||
| - | DB_NAME=" | + | DB_NAME=" |
| - | DB_USER=" | + | DB_USER=" |
| DB_PASS=" | DB_PASS=" | ||
| - | echo "${DB_PASS:? | + | set | grep "^DB_" |
| </ | </ | ||
| Make a note of this information. You'll need to configure your web site with the same details. | Make a note of this information. You'll need to configure your web site with the same details. | ||
| Line 215: | Line 237: | ||
| echo " | echo " | ||
| | jexec " | | jexec " | ||
| + | |||
| </ | </ | ||
| Line 221: | Line 244: | ||
| echo " | echo " | ||
| | jexec " | | jexec " | ||
| + | |||
| </ | </ | ||
| Line 227: | Line 251: | ||
| echo "GRANT ALL ON ${DB_NAME:? | echo "GRANT ALL ON ${DB_NAME:? | ||
| | jexec " | | jexec " | ||
| + | |||
| </ | </ | ||
| + | |||
| + | ====== Install your Web Site files ====== | ||
| + | |||
| + | Tip: To make it easier to find your Document Root folder in future, it's probably best to create a symbolic link. | ||
| + | < | ||
| + | jexec " | ||
| + | ln -s / | ||
| + | |||
| + | </ | ||
| + | |||
| + | You can find your Document Root folder here... | ||
| + | < | ||
| + | cd / | ||
| + | |||
| + | </ | ||
| + | |||