|
|
|
|
@ -21,20 +21,21 @@ $ sudo groupadd www-data |
|
|
|
|
## Make a Regular user account, if only the root account exists currently. |
|
|
|
|
``` |
|
|
|
|
# Log in as Root user here |
|
|
|
|
# replace newuser with a name you desire like jellybeansara |
|
|
|
|
$ sudo adduser newuser |
|
|
|
|
$ sudo usermod -aG www-data newuser |
|
|
|
|
$ sudo usermod -aG sudo newuser |
|
|
|
|
# replace jellybeansara with a user account name you desire like fredsmith |
|
|
|
|
$ MYNEWUSER=jellybeansara |
|
|
|
|
$ sudo adduser $MYNEWUSER |
|
|
|
|
$ sudo usermod -aG www-data $MYNEWUSER |
|
|
|
|
$ sudo usermod -aG sudo $MYNEWUSER |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
## Git clone repo to pull it |
|
|
|
|
``` |
|
|
|
|
$ sudo mkdir -p /var/www |
|
|
|
|
$ sudo chgrp www-data /var/www |
|
|
|
|
# If not Root user do next command, else if root replace $USER with newuser name like jellybeansara. |
|
|
|
|
$ sudo chown $USER /var/www |
|
|
|
|
$ if [ -z "$MYNEWUSER" ]; then MYNEWUSER="$USER"; fi |
|
|
|
|
$ sudo chown $MYNEWUSER /var/www |
|
|
|
|
$ sudo chmod 775 /var/www |
|
|
|
|
$ sudo apt-get update && sudo apt-get install git |
|
|
|
|
$ sudo apt-get update && sudo apt-get install git openssl |
|
|
|
|
# AS a normal user NOT Root, we will sudo or doas for that from most of the time: |
|
|
|
|
$ cd /var/www |
|
|
|
|
$ git clone https://git.mysnippetsofcode.com/bobs/cms |
|
|
|
|
@ -62,7 +63,7 @@ $ echo "MySQL cms database user zoombox account password is now: $CMSPWD" |
|
|
|
|
|
|
|
|
|
# Lets create a new user account for mysql |
|
|
|
|
$ mysql -u root -p$MROOT |
|
|
|
|
> CREATE USER 'zoombox'@'localhost' IDENTIFIED BY 'Enter_the_password_used_by_CMSPWD_zoombox_in_the_step_above'; |
|
|
|
|
> CREATE USER 'zoombox'@'localhost' IDENTIFIED BY 'Enter_the_Password_for_user_zoombox_in_the_step_above_here'; |
|
|
|
|
> GRANT ALL ON cms.* TO 'zoombox'@'localhost'; |
|
|
|
|
> create database cms; |
|
|
|
|
> exit |
|
|
|
|
@ -93,7 +94,7 @@ DB_TYPE=mysql |
|
|
|
|
DB_HOST=127.0.0.1 |
|
|
|
|
DB_NAME=cms |
|
|
|
|
DB_USERNAME=zoombox |
|
|
|
|
DB_PASSWORD=Enter_the_password_used_by_MYSQL_CMSPWD_user_zoombox_account_for_cms_DB |
|
|
|
|
DB_PASSWORD=Enter_the_Password_for_user_zoombox_here |
|
|
|
|
ADMIN_USERS=zug:SunSet@XQWET,zig:CHANGE_ME_AS_WELL_MAKE_ONE_UP_HERE |
|
|
|
|
``` |
|
|
|
|
(for Nano editor) Press ctrl+x to Save and Exit. Y to save. Enter to the default filename... |
|
|
|
|
|