MYNEWUSER var set.

main
Robert 2 years ago
parent 647f633b33
commit ac528db879
  1. 19
      protected/README.MD

@ -21,20 +21,21 @@ $ sudo groupadd www-data
## Make a Regular user account, if only the root account exists currently. ## Make a Regular user account, if only the root account exists currently.
``` ```
# Log in as Root user here # Log in as Root user here
# replace newuser with a name you desire like jellybeansara # replace jellybeansara with a user account name you desire like fredsmith
$ sudo adduser newuser $ MYNEWUSER=jellybeansara
$ sudo usermod -aG www-data newuser $ sudo adduser $MYNEWUSER
$ sudo usermod -aG sudo newuser $ sudo usermod -aG www-data $MYNEWUSER
$ sudo usermod -aG sudo $MYNEWUSER
``` ```
## Git clone repo to pull it ## Git clone repo to pull it
``` ```
$ sudo mkdir -p /var/www $ sudo mkdir -p /var/www
$ sudo chgrp www-data /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. $ if [ -z "$MYNEWUSER" ]; then MYNEWUSER="$USER"; fi
$ sudo chown $USER /var/www $ sudo chown $MYNEWUSER /var/www
$ sudo chmod 775 /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: # AS a normal user NOT Root, we will sudo or doas for that from most of the time:
$ cd /var/www $ cd /var/www
$ git clone https://git.mysnippetsofcode.com/bobs/cms $ 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 # Lets create a new user account for mysql
$ mysql -u root -p$MROOT $ 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'; > GRANT ALL ON cms.* TO 'zoombox'@'localhost';
> create database cms; > create database cms;
> exit > exit
@ -93,7 +94,7 @@ DB_TYPE=mysql
DB_HOST=127.0.0.1 DB_HOST=127.0.0.1
DB_NAME=cms DB_NAME=cms
DB_USERNAME=zoombox 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 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... (for Nano editor) Press ctrl+x to Save and Exit. Y to save. Enter to the default filename...

Loading…
Cancel
Save