You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
1.4 KiB
70 lines
1.4 KiB
# cms
|
|
|
|
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:
|
|
```
|
|
# 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';
|
|
> create database cms;
|
|
```
|
|
## Import the tables.sql file:
|
|
```
|
|
$ mysql -u cms -p cms < tables.sql
|
|
enter this password when prompted: SJ6G*WyaV7PvvEts@vxjm
|
|
```
|
|
|
|
The config.php file is in the protected/src folder.
|
|
```
|
|
define( "BLOG_NAME", "Widgetz Newz" ); // Display Name for Titles
|
|
```
|
|
|
|
## Create the .env file in root of Project to configure your secrets!
|
|
```
|
|
$ nano .env
|
|
DB_TYPE=mysql
|
|
DB_HOST=127.0.0.1
|
|
DB_NAME=cms
|
|
DB_USERNAME=zoombox
|
|
DB_PASSWORD=SJ6G*WyaV7PvvEts@vxjm
|
|
ADMIN_USERS=zug:SunSet@XQWET,zig:546Poker@xzyWhy
|
|
```
|
|
|
|
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 php8.3-gd php8.3-mysql
|
|
``` |