Tech Support banner

Status
Not open for further replies.
1 - 10 of 10 Posts

·
Registered
Joined
·
1,545 Posts
Discussion Starter #1
I'm taking an online crash course in SQL and PHP. As it is a crash course and I'm not experienced in these subjects, the instructor didn't seem clear about what is the relation between the need of creating a database and doing this right on a server. (why we can't make a database and put that on a server later?!) I was simply instructed to install wamp or lamp and start doing things what they are teaching.
I understand (or I may be wrong) installing LAMP would be turning my computer to a server... So I asked the instructor is it safe to do these on personal computer? what about the incoming connections?
In answer I was said, it's a local server, it won't connect to internet. Now the whole concept nothing makes sense. :confused:

Can help me out by explaining ?
 

·
Alternative Computing, Moderator
Joined
·
2,754 Posts
The idea of having a server is that one computer (which is on all the time has services which other computers can use).
So in this case its a databse using SQL
To create a databse you would need to install sql so if its already installed on the server easier to create it on the server.

A local server just meams one in the same building so if you had several computers in the same building or office, one would be configured as the databse.

If you need to access it from outside your own building or another town, etc then it makes sense to have the server on the internet so it can be accessed remotely.
Hope that makes sense, someone may offer better explanation
 

·
Registered
Joined
·
1,545 Posts
Discussion Starter #3
The idea of having a server is that one computer (which is on all the time has services which other computers can use).
So in this case its a databse using SQL
To create a databse you would need to install sql so if its already installed on the server easier to create it on the server.

A local server just meams one in the same building so if you had several computers in the same building or office, one would be configured as the databse.

If you need to access it from outside your own building or another town, etc then it makes sense to have the server on the internet so it can be accessed remotely.
Hope that makes sense, someone may offer better explanation
It was already way way better than what my instructor explained. Thank you very much.

But clear me this thing please -

I'm currently learning to make sql database, dml etc and later I will learn php. Now according the course, these all will happen in "phpmyadmin". Now the thing is, I have only my personal computer at home, no other computer is locally connected to my network. I also wasn't instructed to do anything different or special to keep my computer separate from remote connection (as you said like outside the building) than installing LAMP only. So does this setup make any sense on my pc?

Also am I totally safe from incoming intrusive attacks or connections? I plan to get a separate harddisk to do the web-dev practice once my course is finished. So please tell me also how can I revert back my pc from server to desktop. I'm just paranoid to turn my personal pc open as a server.
 

·
Alternative Computing, Moderator
Joined
·
2,754 Posts
You really need more than one device (computer, laptop, netbook, tablet mobile phone, raspberry pi or other single board computer to create a network).

If you have any of the other devices mentioned then you have a network. With just one computer you can run a server but you wont be able to access the server (unless you have another device)

To go between server and desktop.
This is easier than you may expect. All you do is create a new user account on Ubuntu.
On the new user account set up a different password. When you log out as normal user log into the alternate account. On the alternate account install php and sql. Now only when you log into the alternate account you can start the my sql server. This way you can stop the server, log out and log into your normal account as a desktop user.

Security.
If you open any ports to the internet then you must also take security precautions. The first is to make sure that only limited users have access to your computer. Strong passwords are essential and it is also good to run a firewall. ufw or gufw can be setup to
block all ports except those you specify.

If you have a router then generally your router will have some sort of inbuilt firewall.
 

·
Registered
Joined
·
1,545 Posts
Discussion Starter #7
You really need more than one device (computer, laptop, netbook, tablet mobile phone, raspberry pi or other single board computer to create a network).

If you have any of the other devices mentioned then you have a network. With just one computer you can run a server but you wont be able to access the server (unless you have another device)

To go between server and desktop.
This is easier than you may expect. All you do is create a new user account on Ubuntu.
On the new user account set up a different password. When you log out as normal user log into the alternate account. On the alternate account install php and sql. Now only when you log into the alternate account you can start the my sql server. This way you can stop the server, log out and log into your normal account as a desktop user.

Security.
If you open any ports to the internet then you must also take security precautions. The first is to make sure that only limited users have access to your computer. Strong passwords are essential and it is also good to run a firewall. ufw or gufw can be setup to
block all ports except those you specify.

If you have a router then generally your router will have some sort of inbuilt firewall.
That sounds like an ingenious way to run it. I searched a lot before posting here, and most solutions resorted to using vm.
So about the new user thing: should I do it from command line or graphical interface in ubuntu? I just want to be sure both of them does the same work i.e.assigning privilege to user accounts.

And I don't know about opening or blocking port. Instruct me in details please.

Yesterday I found some more free websites to learn in details about SQL and they are already seeming more promising than my paid-instructor :p
 

·
Registered
Joined
·
1,545 Posts
Discussion Starter #8
Also, this ticked me later...aren't all the apps will be available for both the accounts which are installed as sudo?

In that case, how should I install LAMP so that it will be accessible to only one account... both the accounts will be affected... no?
 

·
Alternative Computing, Moderator
Joined
·
2,754 Posts
You can create a new account from graphiical or command line, whichever is easier.

Lets say your normal account is for user 'john' and you create a new account
called 'tux'. You install a LAMP stack for user tux.

If you log out and in again as user john, the account john can not run apacahe or the Lamp stack as it has been configured only for user tux. Hope that helps.

There are system wide files for all users, but certain configurtaion files per user, thats why it will fail for a different user.
 

·
Registered
Joined
·
1,545 Posts
Discussion Starter #10
You can create a new account from graphical or command line, whichever is easier.

Lets say your normal account is for user 'john' and you create a new account
called 'tux'. You install a LAMP stack for user tux.

If you log out and in again as user john, the account john can not run Apache or the Lamp stack as it has been configured only for user tux. Hope that helps.

There are system wide files for all users, but certain configuration files per user, thats why it will fail for a different user.
Alright then! Thanks a lot. I'm little late to visit the answer and hence did my sql assignment on a live usb. But I will setup the server that way too. Thanks. :)
 
1 - 10 of 10 Posts
Status
Not open for further replies.
Top