3

I'm well experienced with WAMP, now it's time for LAMP.
I have very little knowledge with linux, just finished setting up the OS.
My questions are, basically:

  1. is there any difference between installing lamp package, and installing the A.M.P one by one?
  2. what are the permissions that I should give each folder? (www and its sub-folders)
  3. the windows hosts file, in linux how it is done?
  4. is there any "control panel" like in windows tray?

And one more question:
What should i know, considering my preferred FW is cakePHP?

thanks

2 Answers 2

3

First of all, be sure to check the Ubuntu Server guide, it has a lot of information on installing a web server, database and LAMP applications.

  1. As noted below (contrary to what I wrote first) Ubuntu does have a lamp package.

It installs the following packages:

libdbi-perl
apache2
apache2-bin
apache2-data
ssl-cert
libapr1
libaprutil1
libaprutil1-dbd-sqlite3
libaprutil1-ldap
apache2-mpm-prefork
libwrap0
libmysqlclient18
mysql-server
libaio1
libapache2-mod-php5
php5-common
php5-cli
libdbd-mysql-perl
libhtml-template-perl
mysql-common
libterm-readkey-perl
tcpd
mysql-client-5.5
mysql-client-core-5.5
mysql-server-5.5
mysql-server-core-5.5
php5-readline
php5-json
php5-mysql

Basically all you need. If you'd install packages by hand, you'd basicall need the same packages anyway. Note that many Apache modules are installed separately. So, if you'd want to integrate OpenID authentication in Apache for example, you need to install the libapache2-mod-auth-openid package. Luckily Ubuntu has a way to detect dependencies between packages, so you don't need to install everything be hand. If you find out you are missing some functionality you can use apt-cache search keyword (see this question), or, if you have the package aptitude installed: aptitude search keyword.

For example, if I want to find the PHP Pear package I do:

$ aptitude search php |grep pear
v   pear-phpunit-channel
i A php-pear

which shows me the php-pear package (note, the i at the beginning of the line means the package is installed. Similarly, when looking for the PHP GD package I type:

$ aptitude search php |grep gd
i A php5-gd                         - GD module for php5
p   php5-gd:i386                    - GD module for php5
p   php5-gdcm                       - Grassroots DICOM PHP5 bindings
p   php5-gdcm:i386                  - Grassroots DICOM PHP5 bindings
p   php5-vtkgdcm                    - Grassroots DICOM VTK PHP bindings
p   php5-vtkgdcm:i386               - Grassroots DICOM VTK PHP bindings

Here the php5-gd package seems the most promising (and is installed).

  1. After a default install, all permissions should be set correctly. Permissions are set during package installation.
  2. Normally name resolution should be done via DNS, not a local hosts file. Or are you talking about a small home server? In that case have a look at /etc/hosts.
  3. Not in the same sense as Windows has. Which Ubuntu version did you install, Ubuntu Server or one of the desktop editions? Assuming you installed Ubuntu Server, there is no graphical user interface installed. On Linux configuration is done via text files, which can be found in the /etc/ directory. For example, Apache is configured via files in /etc/apache2, MySQL in /etc/mysql and PHP in /etc/php5.
4
  • I stand corrected :-)
    – ph0t0nix
    Nov 4, 2014 at 9:31
  • @Rinzwind: done :-)
    – ph0t0nix
    Nov 4, 2014 at 9:54
  • To answer his addendum about cakePHP, he should see book.cakephp.org/3.0/en/installation.html -- it covers the requirements, and provides Linux commands needed to install it and its dependencies
    – Doktor J
    Aug 25, 2016 at 19:58
  • perfectly working :) Jan 12, 2017 at 12:10
1

The lamp-server^ task package is just a package that depends on a whole bunch of individual packages. It is exactly the same as installing those packages separately. You can see what it would install with:

apt-cache depends lamp-server^

The directory and permissions structure is largely up to you. Some people change the configuration to point to use a different user and point to a different directory, some people add their user to the www-data group so they can write directly to /var/www. I personally do a mix of both.

The Linux equivalent of %SystemRoot%\system32\drivers\etc\hosts is /etc/hosts. I think they stole that one from us ☺

Not sure what you mean by a control panel. There are various web-gui things like Webmin and Cpanel for managing systems. I would advocate learning how to do things the proper way over SSH. If you're unwilling to do that, it might suggest you're not suited for maintaining a server. I don't mean that in an unkind way but server maintenance is an ongoing job and a web-facing web-admin script is only going to help some of the time. It's more likely to be an ingress vector than a saviour in the long run.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .