I wanted to create and host a simple website using LAMP and Drupal. I read an article in a Linux magazine a while back on how to do this, but can’t seem to find any instructions. Can someone direct me to a site or link that has step by step instructions on setting up lamp and drupal?
For drupal there is a short description at
http://www.ghacks.net/2009/02/10/install-drupal-on-a-lamp-
server/
I was a little bit short on time when I posted, so here is the
second pointer for the lamp:
http://www.susegeek.com/internet-browser/install-configure-lamp-
apachemysqlphp-in-opensuse-110/
It is fairly trivial to setup lamp for opensuse, hope this helps
you and please ask again if there are special problems.
For the record, I’ve read the how-to’s for the last two days for Apache (got that to work), PHP (not sure), and MySQL (definitely NOT working). I’ve followed many links that seem to explain how to get a LAMP stack installed. I’ve been able to see and correct some of the typos (for example, where HTML renders two hyphens in a command as a dash).
BUT, MySQL beats me. Nothing seems to happen for me the way it’s described in the how-to, posting, or manual (did you know the MySQL manual is over 3300 pages?). Installed apps don’t appear in the expected directory locations (figured that out in Apache 2.2 on openSuSE 11.1). Responses aren’t as described (e.g., rcmysql status returns “dead” rather than the expected unused).
phpMyAdmin may be the worst: the file Documents.html refers to programs and scripts that don’t seem to exist or work (the Setup script index.php only opens as a text file using the process described).
Is there something special or unusual about oS 11.1 that makes the available notes inapplicable? Is there a source other than the two cited in this thread?
Pardon me if my frustration is showing.
Were you trying to install a non-SUSE LAMP stack? That’s doing things the hard way. SUSE provides LAMP and it just works. After that you just add drupal. You can also get a phpMyAdmin package from software.suse.org.
Tried the AMP components installed with Yast2, both through s/w manager and the command line. Tried installing them individually and as a “web and LAMP server” pattern. Is it the pattern install that you were thinking of when you said it ‘just works’? How much of the current installations must I clean out to give a new pattern install a good chance of success?
phpMyAdmin was downloaded from that site. Will install from software.suse.org.
If you have some foreign packages you should probably remove all the directories and files it created.
Yes it just works, but you have to enable the services (apache2, mysql, php module) in YaST, this does not happen when the package is installed, unlike some other distros less cautious about security.
Gotcha. Will start over with the YaST2 LAMP pattern first. I believe I know how to enable the services by changing the status for run levels 2, 3, and 5.
As a test, installed the LAMP pattern on another machine (a notebook) also running openSuSE 11.1. The apps installed, I enabled them in Yast, and rcmysql and rcapache2 report they are running. That’s a better start that my previous effort, so will try the same approach on the server. PHP isn’t in the process list, but I believe I recall reading that it is invoked only when needed to interpret scrips.
Thanks, Flux Capacitor (Just watched “Back to the Future” again this week
You enable PHP in the list of Apache modules, not in the services list. The PHP interpreter is not a service, it’s a module loaded by Apache.
Be aware that openSUSE 11.2 ships with PHP 5.3. I don’t know if Drupal has fixed up the problems that caused it to not run under 5.3, but require 5.2.
I’m thinking the MAN pages are like Gradma’s special desert receipes, which never contained every step in the process or left out an ingredient.
Started from scratch with a fresh install of 11.1 (11.2 doesn’t seem to work in this machine). Then did the patches (tons of them) and used the Yast LAMP pattern to install AMP.
Following the MySQL manual (without reading all 3300 pages) I ran the mysql_install_db. I suspect that running it a regular user (non-root) other than u= mysql caused a problem. When I later tried to create user mysql in Yast, I couldn’t because that name was in use–but it didn’t show up on the Yast list of user.
So, can anyone take me back to square -1 and tell me how I should be logged in for each of these installs? It is not obvious to one who hasn’t done it before. I’d do it as root all the way and avoid restrictions from permissions, but the MySQL manual says don’t do that. My frustration is seeping out–have to go mop it up.
Thanks in advance.
The MySQL service should run as Linux account mysql. There is no need for you to tamper with that.
Understand that the user you are logged in to mysql is not related to the Linux user. MySQL has its own usernames and passwords.
After installing AMP from YaST, you should set a admin password for mysql using the command mysql_secure_installation. This will prompt you for an admin password.
# mysql_secure_installation
Thereafter, whenever you need to create a database for a PHP web app, you do:
$ mysql -u root -p
Password: (the admin password for mysql that you set, won't echo)
mysql> create database drupal;
mysql> grant all on drupal.* to drupaluser@localhost identified by 'somepassword';
mysql> \q
(As mentioned, the root here is not related to the Linux root. The $, Password and mysql> are prompts of course, you don’t type those in.)
Thereafter you can login as drupaluser to mysql. Or go ahead with the drupal installation.
$ mysql -u drupaluser -p
Password: (somepassword typed in here, won't echo)
mysql> show tables;
mysql> ...
mysql> \q
So except to run mysql_secure_installation, you never do anything as the Linux root user. If you tried to run mysqld manually as root, you may have messed up the permissions of the database files.
Some web apps will do the database creation themselves. In which case the admin password required is that you set for mysql_secure_installation.
Left something out. When logging in as drupaluser, you need to specify the database either on the command line:
$ mysql -u drupaluser -p drupal
or to issue a
mysql> use drupal;
before you can do stuff on the drupal DB.
and )@ken_yap
a non-SUSE LAMP stack? That’s doing things the hard way
I don’t really agree with that, but see later for why it is still questionable.
I’m not totally sure whether the OP is asking about a source of the software or a tutorial, but…
You could get, eg, the Bitnami Drupal stack, and, at least in my experience, get something installed quickly and it would all work first time. But, you’ll get an installation that you don’t really understand (eg, how to do anything with mySQL or Apache and what the passwords are) and which has, IMHO, some potential security issues. OTOH, you’ll probably get a more up-to-date Drupal than you’ll get from the straightforward suse-repo install.
I’m currently using the Bitnami stack for an internal-only trial install, and, for that, it is probably a good way of making a quick and dirty comparison of different CMS systems. In these limited circumstances it is probably acceptable, but it would be a different matter for production use.
The reason using a non-SUSE LAMP stack is doing it the hard way is because you are fighting the native system. You are for example responsible for your own updates of the packages (MySQL, Apache, and most importantly, PHP, which has more holes than cheese). If you try to install some other PHP package on it, e.g. squirrelmail, then you have to figure out that yourself.
I reckon the major cause people have problems with the SUSE LAMP stack is because they are following tutorials meant for other LAMP combos and they take steps that are inappropriate (editing the module list in httpd.conf) or unnecessary. Then they complain about how come the Apache config files are all split up when the tute says it’s all in one file httpd.conf and so on.
But I think it’s also partly that there either isn’t enough documentation or enough publicity given to documentation of the way LAMP is organised in SUSE. When you see how the components of LAMP in SUSE fit together, it’s really not complicated at all, and very little needs to be edited.
Whenever I need to install a service on a distro, any distro not just SUSE, I try to understand how it is meant to be configured, what the logic is, in that distro. Trying to do it the way you “have always done it” in another distro may work, or may lead to a lot of frustration.