|
|
|
|
@ -1,12 +1,24 @@ |
|
|
|
|
# cms |
|
|
|
|
|
|
|
|
|
Original Author: Matt Doyle |
|
|
|
|
Original Author: Matt Doyle <https://www.elated.com/cms-in-an-afternoon-php-mysql/> |
|
|
|
|
|
|
|
|
|
Updates: Robert S. |
|
|
|
|
|
|
|
|
|
## Pull repo |
|
|
|
|
``` |
|
|
|
|
$ cd /var/www |
|
|
|
|
$ git clone https://git.mysnippetsofcode.com/bobs/cms |
|
|
|
|
$ cd cms |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
## SETUP from MySQL Root run: |
|
|
|
|
``` |
|
|
|
|
Change this password SJ6G*WyaV7PvvEts@vxjm below! |
|
|
|
|
# Install the server: |
|
|
|
|
$ sudo apt-get install mysql-server |
|
|
|
|
$ sudo systemctl start mysql |
|
|
|
|
$ sudo systemctl enable mysql |
|
|
|
|
|
|
|
|
|
# Change this password SJ6G*WyaV7PvvEts@vxjm used below! |
|
|
|
|
$ mysql -u root -p |
|
|
|
|
> CREATE USER 'zoombox'@'localhost' IDENTIFIED BY 'SJ6G*WyaV7PvvEts@vxjm'; |
|
|
|
|
> GRANT ALL ON cms.* TO 'zoombox'@'localhost'; |
|
|
|
|
@ -23,9 +35,9 @@ The config.php file is in the protected/src folder. |
|
|
|
|
define( "BLOG_NAME", "Widgetz Newz" ); // Display Name for Titles |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
## Create the .env secrets file |
|
|
|
|
## Create the .env file in root of Project to configure your secrets! |
|
|
|
|
``` |
|
|
|
|
$nano .env |
|
|
|
|
$ nano .env |
|
|
|
|
DB_TYPE=mysql |
|
|
|
|
DB_HOST=127.0.0.1 |
|
|
|
|
DB_NAME=cms |
|
|
|
|
@ -34,9 +46,25 @@ DB_PASSWORD=SJ6G*WyaV7PvvEts@vxjm |
|
|
|
|
ADMIN_USERS=zug:SunSet@XQWET,zig:546Poker@xzyWhy |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
## PHP Deps |
|
|
|
|
Note: the admin username is: zug |
|
|
|
|
|
|
|
|
|
Admin password is: SunSet@XQWET |
|
|
|
|
|
|
|
|
|
## Install Composer |
|
|
|
|
``` |
|
|
|
|
$ curl -sS https://getcomposer.org/installer | php |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
## Install Composer deps |
|
|
|
|
``` |
|
|
|
|
$ cd protected |
|
|
|
|
$ pwd |
|
|
|
|
# You should be in /var/www/cms/protected |
|
|
|
|
$ composer install |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
## PHP deps |
|
|
|
|
``` |
|
|
|
|
PHP gd and mysql must be installed: |
|
|
|
|
$ sudo apt-get install php8.3-gd |
|
|
|
|
$ sudo apt-get install php8.3-mysql |
|
|
|
|
$ sudo apt-get install php8.3 php8.3-gd php8.3-mysql |
|
|
|
|
``` |