📺 Develpreneur YouTube Episode

Video + transcript

Debian 12 Getting Started - LAMP - WordPress

2023-11-07 •Youtube

Detailed Notes

This is a short series to help you get started on Debian 12 with a LAMP stack to install WordPress on our server. This tutorial covers creating a user for working on your server that is the admin or root. We also set the login up in the sudoers registry so they can login. We wrap up this episode with the Apache 2 install and launching our web server.

You can learn more through our online classes at https://school.develpreneur.com and register for free. Registration will add you to our email list, and you will periodically receive coupons for courses and notifications of the latest releases.

Transcript Text
[Music]
well hello and welcome back we are going
into our next series of things we're
doing and uh we're going to go do a
modern lamp stack uh essentially we are
updating a website that's a um it's a
WordPress site we're going from an older
version of PHP older operating system
all that good stuff we're moving it onto
a new server so I figured hey we could
cover a couple of these key things this
episode we're going to focus on creating
a lamp stack uh this is in dbn 12 you're
uh you if you're in
another distribution of some point then
um you know it may vary a little bit we
are going to start actually though with
um first thing we want to do is so right
now as I saw I am the admin user this is
a uh an Amazon
AWS um not sure I forget it's like a T3
T4 size something like that uh one of
their little servers one of their ec2
servers we have some examples of that if
you want to see how those things are
spun up uh you can also look at the
launch internet business uh series we go
through that it's a little bit older uh
that one's a couple years ago that we
first did that um but it's roughly the
same you do have to this is going to
take a little bit if you have if you do
not have an AWS account uh they do have
a free tier so you don't have to
actually pay anything to get going with
it I think you do have to have a credit
card but also when you first spend that
account up it's going to take you it
seems like usually about a day they may
have gotten better with just getting
everything in place so that you can
actually start utilizing some of the AWS
Services if you haven't I highly
recommended you try that out uh
particularly because for the first year
basically and some other some things
it's uh just as long as you keep it a
low usage it's free it's a great way to
get out there and get yourself
comfortable with the uh the world of
cloud computing if nothing else that
being said we're on dban 12 the default
user the default root user is admin
which is who I am right now I don't want
to be that person I don't want to be
that user while I'm doing a lot of this
work even though I will do stuff as root
I will use pseudo but what we want to do
is we want to create a
user and I'm going to call my user Rob
and we're going to create a user and
we're going to give them root
abilities oops
and I have to start right away with a
pseudo there we go if you don't know
what pseudo is it is basically doing
things as root so pseudo allows you to
say hey even though like in this case I
am user admin I'm not the actual root
root and so in order to treat a command
as a root level command I can do pseudo
assuming that I'm part of that group
which admin happens to be in this uh in
this
instance so I'm creating a new new user
called Rob and I'm going to give myself
a
password and I'm going to do it
again and then you can do and you can
skip through this if you want but I'm
going to give my full name I don't have
a room number um I'm not going to bother
with a work phone or home phone or other
yep so now Rob is there so if I logged
out um let me I'd have to go figure out
uh let's not do that right now um so I
could do a pseudo Su
Rob and now I'm Rob and if I go to my
home home Rob I don't have anything
there so let me exit back out of being
Rob now I'm back to being admin so the
other thing I want to do is I want to
allow Rob to be able to do root level
stuff currently so let me go back to
that uh if I'm Rob if I'm the Rob user
and I I try to do pseudo I don't know
just LS and it's going to ask me for my
password anyways but then it's going to
say hey Rob is not in the sudoers file
so I need to create that so let me back
out
to admin
again and in this case so we're going to
have to add this user to a group for the
uh pseudo users and we do that through
user mod which is we're going to use
that as a pseudo and we're going to add
them to the group pseudo and the
username is
Rob so now if I do
that just make sure who I am I'm just
admin if I
do and so I'm logging in Su is log in as
another basically log is a different
user so I'm coming in as
Rob as we mentioned earlier so now I can
do a pseud LS It'll ask me for my
password and then boom I can see stuff
and now I'm in the admin even though I'm
here so now what I can
do as Rob is I can do a pseudo CP do
slash
admin all prod admin
all need to do that all prod to
dot um I'm going to remove
that okay so now I've got
that so now I have a
user that I can log
in and I will be that so I'm going to do
I'm just going to log back in as Rob
just to be
sure uh oh I'm not able to do it without
a key so now I got to go
back so one of the things I need to do
is that I need to adjust this because by
default the
AWS configuration uses a key the way it
was set up it uses a a public private
key so you don't have an actual uh you
don't have the ability to actually log
in directly without a key so what we
have to do is we need to go find and
probably
SSH ssh oh let's go
here so now uh it's probably all owned
by root yeah so I need a pseudo
VI
sshd config yep and what I'm going to
find in here is I'm going to find
password uh let's see pass that's not it
password oration there we
go so right now it doesn't allow
password authentication so what I want
to do is make that a yes and and write
that
file wh there we go let's make sure he's
there uh yep okay I got it
saved then I need to restart
my sshd which is my tunneling
demon uh demon being or Damon if you
want to call it that but it's basically
my tunneling service my um secure Shell
Shell service boom and
now uh let's see so now I can go here
now I should be able log in as
me there we
go so I've been able to create a user
add them to the sudoers the sudu sudu
sudo however you want to call it uh list
and so now I can as myself CU I am Rob
I'm going to come in instead of using my
root or my admin account I'm going to be
installing the lamp stack as a user
which is what you really want to do you
don't want to be in as as root all the
time that is not uh we'll say that is
not cool that is not Kosher and not the
thing you want to do uh let's go ahead
because we can keep this we will with
this let's get started with
our um with our WordPress install so the
first thing we first thing we need to
do is this is the lamp stack so lamp is
Linux Apache MySQL now Maria dat data
Maria DB and PHP so first thing we need
to do is we need to do our um PHP and
I'm going to steal this
here because it's just a bunch of stuff
that's a bit of a
pain and I will put these in the show
notes uh but basically what's going to
happen hopefully this will all work in
one shot we will find out
out I got permission denied there okay
let's see let's do these one at a
time see make sure I got those okay so I
installed everything and this is
basically get a couple of basic things
set
up uh as far a couple your um General
libraries and stuff that you need to do
so you can install things let's see if
this will do that o I need to do
pseudo let's do this
way dang
it let me get my typing done there we go
okay so that's
there and then what I want to do is so
I'm pulling down this
package and then I'm going to see if I
can make that
work okay and so now I should
have and so what I'm going to do is I've
got the packages down for PHP and stuff
set up so I should be able now to do I'm
going to do PHP and Apache which are all
these are all fairly straightforward
because all I need to do is just install
the general Apache uh Apache and then
PHP uh MySQL so that can connect to the
database and PHP curl and some things
like that uh let's see okay so it
doesn't have it doesn't like the
php7 whoops because it is let's try
this okay let's see if it installs that
okay new installation for
7.4 okay it doesn't like the
package for
PHP let's see what if I do just PHP what
is it going to give me
it is PHP 8 okay so you know what let's
go with that if it's going to do that we
were using an older one but that's okay
let's get the
latest and so now we're doing PHP 8.2 as
we'll see here in a second well several
seconds as it's going through there so
I've moved it up a little bit apologies
for that uh what we're going to do is
we're going to pull the
latest pH but PHP but we do need to
bring some additional libraries are and
the way we're going to do these as we
saw
before and we're just going to do these
I think all of these still exist so
we're going to find out in just a
second is you give it the major minor
release number you can usually do and
I'm not going to try it here let's do
this first and then we'll come back to
the other a lot of times you can do it
without a version and it's just going to
give you the latest version uh available
on your
drro there we go let's see if this will
work um sometimes you need the version
it's one of those it's like it's one of
those annoying things for installing PHP
but so for here now if we do
PHP d v I believe it's that wh is it
DV there we go so we are
running PHP
8.2.6 so we have that let's uh we do
have uh did we I think we did install
paty 2 let's see
uh ET
C we do have we do not oh let's do
VAR doesn't look like he is there okay
so let's try that let's go back to
uh app install Apache
2 there we go okay so he's there oh it's
already okay so we do have it
installed so now what we want to do is I
think we'll pause for now so we've got
the basics in there I don't know if this
is actually
running
um let's see I think this is how it
wants to start oh system control
sorry system
CTO
patchy to
start let's try
this I always forget the order okay so
now if I go to this server it probably
is not going to be
visible because I don't have that Port
open yet I don't
think oh I do so there we go and we now
have
our default page so we have on our
server we have Apache running
and I can do stuff like this it's we're
not going to get too far into this but
let's just say I go whoops all right
well we'll track that down at another
point to get to the document route for
now we actually have something running
and uh we'll go from there so next time
around we're going to continue on and
we're going to get the uh the database
installed so go out there and have
yourself a great day a great week and we
will talk to you next time well hello
this is Rob from develop andur building
better developers and we have a
mastermind class class that will be
starting or actually several Mastermind
classes starting in 2024 check us out at
technology mastermind2 4.com we've got
all the information you need including
some pricing early bird discounts up to
50% off but those are things that you're
going to have to act soon there is an
application process so go ahead and sign
up today thanks a
[Music]
lot
Transcript Segments
0

[Music]

6.839

well hello and welcome back we are going

9.599

into our next series of things we're

11.679

doing and uh we're going to go do a

13.44

modern lamp stack uh essentially we are

16.68

updating a website that's a um it's a

20.08

WordPress site we're going from an older

22.92

version of PHP older operating system

25.76

all that good stuff we're moving it onto

27.439

a new server so I figured hey we could

30

cover a couple of these key things this

32

episode we're going to focus on creating

33.719

a lamp stack uh this is in dbn 12 you're

37.84

uh you if you're in

39.559

another distribution of some point then

43.28

um you know it may vary a little bit we

45.28

are going to start actually though with

48.399

um first thing we want to do is so right

50.32

now as I saw I am the admin user this is

53.76

a uh an Amazon

56

AWS um not sure I forget it's like a T3

58.92

T4 size something like that uh one of

61.6

their little servers one of their ec2

64.199

servers we have some examples of that if

67.08

you want to see how those things are

68.32

spun up uh you can also look at the

70.4

launch internet business uh series we go

73.84

through that it's a little bit older uh

75.799

that one's a couple years ago that we

76.88

first did that um but it's roughly the

80.159

same you do have to this is going to

81.96

take a little bit if you have if you do

84.04

not have an AWS account uh they do have

86.96

a free tier so you don't have to

88.759

actually pay anything to get going with

90.64

it I think you do have to have a credit

92.759

card but also when you first spend that

94.72

account up it's going to take you it

96.399

seems like usually about a day they may

98.119

have gotten better with just getting

100.119

everything in place so that you can

101.56

actually start utilizing some of the AWS

104.28

Services if you haven't I highly

106.56

recommended you try that out uh

108.2

particularly because for the first year

109.759

basically and some other some things

112.159

it's uh just as long as you keep it a

113.799

low usage it's free it's a great way to

117.28

get out there and get yourself

118.28

comfortable with the uh the world of

119.96

cloud computing if nothing else that

123.399

being said we're on dban 12 the default

125.92

user the default root user is admin

127.92

which is who I am right now I don't want

129.959

to be that person I don't want to be

131.44

that user while I'm doing a lot of this

132.879

work even though I will do stuff as root

135.44

I will use pseudo but what we want to do

138.48

is we want to create a

140.599

user and I'm going to call my user Rob

143.4

and we're going to create a user and

144.48

we're going to give them root

147.48

abilities oops

150.599

and I have to start right away with a

152.2

pseudo there we go if you don't know

154.319

what pseudo is it is basically doing

156.76

things as root so pseudo allows you to

160.56

say hey even though like in this case I

162.64

am user admin I'm not the actual root

165.48

root and so in order to treat a command

168.92

as a root level command I can do pseudo

171.599

assuming that I'm part of that group

174.48

which admin happens to be in this uh in

177.959

this

178.76

instance so I'm creating a new new user

182.319

called Rob and I'm going to give myself

184.799

a

186.799

password and I'm going to do it

189.56

again and then you can do and you can

192

skip through this if you want but I'm

193.319

going to give my full name I don't have

194.64

a room number um I'm not going to bother

197.36

with a work phone or home phone or other

201.04

yep so now Rob is there so if I logged

205.599

out um let me I'd have to go figure out

209.04

uh let's not do that right now um so I

211.08

could do a pseudo Su

214.439

Rob and now I'm Rob and if I go to my

220

home home Rob I don't have anything

222.76

there so let me exit back out of being

227.04

Rob now I'm back to being admin so the

229.64

other thing I want to do is I want to

230.68

allow Rob to be able to do root level

232.879

stuff currently so let me go back to

235.239

that uh if I'm Rob if I'm the Rob user

239.4

and I I try to do pseudo I don't know

241.879

just LS and it's going to ask me for my

244.2

password anyways but then it's going to

246.2

say hey Rob is not in the sudoers file

249

so I need to create that so let me back

251.68

out

252.879

to admin

255.04

again and in this case so we're going to

258

have to add this user to a group for the

261.28

uh pseudo users and we do that through

263.32

user mod which is we're going to use

266.16

that as a pseudo and we're going to add

269

them to the group pseudo and the

272.4

username is

273.72

Rob so now if I do

278.12

that just make sure who I am I'm just

280.919

admin if I

282.44

do and so I'm logging in Su is log in as

286.08

another basically log is a different

287.6

user so I'm coming in as

289.6

Rob as we mentioned earlier so now I can

292.6

do a pseud LS It'll ask me for my

295.639

password and then boom I can see stuff

298.84

and now I'm in the admin even though I'm

300.52

here so now what I can

302.32

do as Rob is I can do a pseudo CP do

307.08

slash

308.919

admin all prod admin

313.68

all need to do that all prod to

319.479

dot um I'm going to remove

325.52

that okay so now I've got

328.479

that so now I have a

331.84

user that I can log

334.759

in and I will be that so I'm going to do

338.56

I'm just going to log back in as Rob

340.039

just to be

349.8

sure uh oh I'm not able to do it without

353.08

a key so now I got to go

357.88

back so one of the things I need to do

361.12

is that I need to adjust this because by

363.8

default the

365.52

AWS configuration uses a key the way it

368.68

was set up it uses a a public private

370.68

key so you don't have an actual uh you

373.72

don't have the ability to actually log

375.16

in directly without a key so what we

377.639

have to do is we need to go find and

382.12

probably

384.52

SSH ssh oh let's go

388.4

here so now uh it's probably all owned

391.52

by root yeah so I need a pseudo

394.639

VI

396.56

sshd config yep and what I'm going to

399.919

find in here is I'm going to find

406.44

password uh let's see pass that's not it

410.199

password oration there we

411.919

go so right now it doesn't allow

414.599

password authentication so what I want

416.44

to do is make that a yes and and write

419.8

that

422.4

file wh there we go let's make sure he's

427.039

there uh yep okay I got it

430.24

saved then I need to restart

435.319

my sshd which is my tunneling

440.4

demon uh demon being or Damon if you

443.24

want to call it that but it's basically

444.479

my tunneling service my um secure Shell

447.56

Shell service boom and

452.36

now uh let's see so now I can go here

456.599

now I should be able log in as

460.4

me there we

462.319

go so I've been able to create a user

465.84

add them to the sudoers the sudu sudu

469.52

sudo however you want to call it uh list

472.52

and so now I can as myself CU I am Rob

477.159

I'm going to come in instead of using my

478.599

root or my admin account I'm going to be

481.159

installing the lamp stack as a user

484.52

which is what you really want to do you

485.68

don't want to be in as as root all the

487.84

time that is not uh we'll say that is

490.72

not cool that is not Kosher and not the

493.68

thing you want to do uh let's go ahead

496.159

because we can keep this we will with

498.319

this let's get started with

500.599

our um with our WordPress install so the

504.24

first thing we first thing we need to

506.72

do is this is the lamp stack so lamp is

510.599

Linux Apache MySQL now Maria dat data

515.08

Maria DB and PHP so first thing we need

518.399

to do is we need to do our um PHP and

522.599

I'm going to steal this

525.64

here because it's just a bunch of stuff

528.92

that's a bit of a

531.64

pain and I will put these in the show

533.959

notes uh but basically what's going to

535.959

happen hopefully this will all work in

537.48

one shot we will find out

544.399

out I got permission denied there okay

547.399

let's see let's do these one at a

551.04

time see make sure I got those okay so I

554.8

installed everything and this is

555.8

basically get a couple of basic things

558.12

set

559.64

up uh as far a couple your um General

564.36

libraries and stuff that you need to do

565.92

so you can install things let's see if

567.64

this will do that o I need to do

572.12

pseudo let's do this

575.56

way dang

577.44

it let me get my typing done there we go

581.24

okay so that's

583.36

there and then what I want to do is so

586.8

I'm pulling down this

589.48

package and then I'm going to see if I

592.32

can make that

596

work okay and so now I should

601.44

have and so what I'm going to do is I've

603.48

got the packages down for PHP and stuff

605.519

set up so I should be able now to do I'm

607.64

going to do PHP and Apache which are all

610.44

these are all fairly straightforward

612.64

because all I need to do is just install

614.6

the general Apache uh Apache and then

618.079

PHP uh MySQL so that can connect to the

620.92

database and PHP curl and some things

623.36

like that uh let's see okay so it

625.68

doesn't have it doesn't like the

630.76

php7 whoops because it is let's try

640.519

this okay let's see if it installs that

643.12

okay new installation for

647.88

7.4 okay it doesn't like the

651.24

package for

654.079

PHP let's see what if I do just PHP what

658.04

is it going to give me

660.44

it is PHP 8 okay so you know what let's

664.32

go with that if it's going to do that we

666.839

were using an older one but that's okay

668.32

let's get the

670.76

latest and so now we're doing PHP 8.2 as

675.2

we'll see here in a second well several

677.399

seconds as it's going through there so

678.839

I've moved it up a little bit apologies

680.519

for that uh what we're going to do is

682.6

we're going to pull the

683.72

latest pH but PHP but we do need to

686.76

bring some additional libraries are and

689.44

the way we're going to do these as we

691.2

saw

692.2

before and we're just going to do these

694.079

I think all of these still exist so

695.76

we're going to find out in just a

697.24

second is you give it the major minor

700.2

release number you can usually do and

703.92

I'm not going to try it here let's do

705.6

this first and then we'll come back to

706.68

the other a lot of times you can do it

707.959

without a version and it's just going to

709.44

give you the latest version uh available

712.12

on your

714.04

drro there we go let's see if this will

717.959

work um sometimes you need the version

721.079

it's one of those it's like it's one of

723.04

those annoying things for installing PHP

725.04

but so for here now if we do

727.839

PHP d v I believe it's that wh is it

732.079

DV there we go so we are

734.959

running PHP

738.12

8.2.6 so we have that let's uh we do

744

have uh did we I think we did install

746.44

paty 2 let's see

749.839

uh ET

750.92

C we do have we do not oh let's do

759.199

VAR doesn't look like he is there okay

763.16

so let's try that let's go back to

766.56

uh app install Apache

771.04

2 there we go okay so he's there oh it's

775.32

already okay so we do have it

777.839

installed so now what we want to do is I

781.88

think we'll pause for now so we've got

783.839

the basics in there I don't know if this

785.88

is actually

787

running

789.36

um let's see I think this is how it

791.839

wants to start oh system control

798

sorry system

800.399

CTO

801.92

patchy to

807.76

start let's try

811.839

this I always forget the order okay so

814.72

now if I go to this server it probably

817.12

is not going to be

818.639

visible because I don't have that Port

822.44

open yet I don't

828.399

think oh I do so there we go and we now

831.88

have

833.079

our default page so we have on our

836.199

server we have Apache running

839.399

and I can do stuff like this it's we're

842.72

not going to get too far into this but

844.04

let's just say I go whoops all right

846.079

well we'll track that down at another

847.519

point to get to the document route for

849.04

now we actually have something running

851.72

and uh we'll go from there so next time

853.36

around we're going to continue on and

855.24

we're going to get the uh the database

857.12

installed so go out there and have

858.92

yourself a great day a great week and we

861.12

will talk to you next time well hello

864.199

this is Rob from develop andur building

866

better developers and we have a

868

mastermind class class that will be

869.32

starting or actually several Mastermind

871.12

classes starting in 2024 check us out at

873.88

technology mastermind2 4.com we've got

877.199

all the information you need including

878.56

some pricing early bird discounts up to

880.88

50% off but those are things that you're

883.24

going to have to act soon there is an

885.6

application process so go ahead and sign

888.16

up today thanks a

891.67

[Music]

897.68

lot