diff --git a/protected/README.MD b/protected/README.MD index 4f1e7ff..23bb7c8 100644 --- a/protected/README.MD +++ b/protected/README.MD @@ -8,15 +8,34 @@ Note: I use the hash sign # to note a comment, do not run it in the terminal. Note: I use the dollar sign $ for the Linux prompt commands to run. Note: I use the greater-than sign > for the MySQL prompt commands. Note: The apt-get package mgr is used by debian Linux like Ubuntu. +Note: To stay as logged in as root you may do $ sudo -i +then type exit to quit out of sudo -i from root when done as root. ``` -## Pull Git repo +## Make web group ``` -# AS a normal user NOT Root, we will sudo or doas for that from time to time: -$ mkdir -p /var/www +# You'll want a web group to be created. $ sudo groupadd www-data -$ chgrp www-data /var/www +``` + +## 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 +``` + +## Pull Git repo +``` +$ 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 +$ sudo chmod 775 /var/www $ sudo apt-get update && sudo apt-get install git +# 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 $ cd cms @@ -76,13 +95,14 @@ Admin password is: SunSet@XQWET ## Install Composer ``` +# Must be a regular user here to do composer install. $ curl -sS https://getcomposer.org/installer | php $ sudo mv composer.phar /usr/local/bin/composer ``` ## Install Composer deps ``` -# Must be a regular user belonging to www-data group. +# Must be a regular user here to do composer install. $ cd protected $ pwd # You should be in /var/www/cms/protected