Link to home
Start Free TrialLog in
Avatar of Daniel Wilson
Daniel WilsonFlag for United States of America

asked on

rPath LAMP appliance -- how do I set up a web site on the thing?

I have installed the VMWare player and the rPath LAMP appliance.

My goal is to work on PHP / MySQL sites in a local sandbox before I deploy them to my public server.

I have logged into the thing & set up its networking.  I can connect to its HTTP-driven administration.

What I can't do includes:
* Putting any PHP files on the thing
* Setting a MySQL password so that I can connect to PhpMyAdmin
* Modifying the Apache config file (whatever they call that thing) so to add another site

Obviously I'm missing something key ... because out of the box it is very pretty but quite useless.

What am I missing?

Thanks!
Avatar of za_mkh
za_mkh
Flag of United Kingdom of Great Britain and Northern Ireland image

Why are you using VMWare Player for this? Why don't you rather 'import' your appliance on the VMWare Server Platform (Free!) ... you will have more options as  the VM will then be like just like any other 'physical' instance which means you should be able to do what you want to do?
http://www.vmware.com/products/server/
 
Avatar of Daniel Wilson

ASKER

>>Why are you using VMWare Player for this?
Because that was what something I read said to use.  I'm a developer, not a Linux admin!

You think the Server Platform will solve this for me?  If so, I'll get it & try!

Thanks.
Well, if your your platform for your desktop operating system is linux or Windows, there is a VMWare Server edition for you. Now me, I'm not a linux user per se except for what I need to do for ESX and my Smoothwalls, so can't tell you what VMWare Server is on linux, but on windows it's not to bad and is quite easy to install - next next next ;-)
I think it will give you more options than VMWare Player.
Windows desktop.
Developing PHP stuff for Linux server.

I'll set up VMWare Server (Another 1/2 GB to download) and let you know.  thanks for the suggestion.
Regardless of using VMWare player or VMWare server the image is your issue, not the host.  If you have setup the networking I suggest you read http://www.rpath.org/project/lamp/ and http://wiki.rpath.com/wiki/Appliance:LAMP_Appliance.

Point your browser to http://<your_ip>/phpMyAdmin/, and login with the user name web and the password you set in the Agent's wizard.

Login to the console and type mysqladmin -u root password NEWPASSWORD
If one is already set, which I don't think it is you would use mysqladmin -u root -p'oldpassword' password newpass

To upload the files to your website you need to login to the console and set a password for the user "web".  Once you have done this you can FTP the files, which means you will need an ftp client to get the files on there.
WizRd-Linux, you're getting me closer, but some things are not working the way the wiki says they should.
  1. According to the HTTP interface ("agent"), there was no "web" user. So I created a "web" user and set its password.
  2. I cannot log into phpMyAdmin with the "web" user.
  3. I cannot log into the console with "root" and an empty password.  I get an Insufficient Permission message.
  4. When I FTP to the machine, before I ever get a chance to present credentials, I get kicked with an error 500
C:\Users\Daniel>ftp Lamp1
Connected to Lamp1.
500 OOPS: vsftpd: cannot locate user specified in 'ftp_username':ftp
Connection closed by remote host.

Any idea what I'm doing wrong?

Thanks!
Okay, it would "appear" that the image is broken, because vm images are supposed to work out of the box.

To get you going though, you will need to be able to login as root, or if the management console provides you with enough privs you can fix it that way.

You need to edit /etc/vsftpd.conf and figure out what the parameter ftp_username is in this configuration file and how it is used.  If you can just post the whole configuration file I can help from there.

As for the root password, the only way to fix something like that is to reboot the VM and during the grub process you need to edit the boot parameters, there is a specific line that starts with kernel <blah blah blah> add the number 1 to the end of this line and continue the boot process.  Step by Step guide: http://www.debuntu.org/recover-root-password-single-user-mode-and-grub

Ignore the debian / ubuntu references its grub we are working with, not the actual OS.

The web user might not have enough permissions or be part of the correct group for phpMyAdmin, or might not actually have an account in phpMyAdmin for that matter to be able to login.  Once we fix everything else we can work on the phpMyAdmin issue, not huge right at the moment given your other issues.

At least you seem to have some management capabilities, keep going...
The web interface gives me a place to change the root password.  But even after doing so, I still can't log into the console with it.  Even after a reboot of the VM, I still can't.

Or maybe I'm not really getting a console login presented to me. This appears to be an Agent login.  And pressing ctrl-alt-F2 does nothing.

LAMP-Appliance-Login.gif
OK, I got to single-user mode, set the root password.
here's what 's in /etc/vsftpd/vsftpd.conf that's not commented out:

anonymous_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
listen=YES

Everything else starts with # ... which I am willing to say comments it out.

See anything suspicious?

Thanks!


user_list and ftpusers both claim to list users who are not allowed to connect to ftp.

That might be related to my getting bounced, but why wouldn't it let me enter a user name?
The issue wouldn't actually be with either of these files.  They only take effect after you have attempted to login with both a username and password, then it drops your session.

In the vsftpd.conf file add ftp_username=nobody.  Restart vsftpd and test...

Also check /etc/hosts.allow file for "vsftpd: ALL : ALLOW"


"nobody" is one of the user names specifically disallowed in the files I mentioned last night.  Are you sure that's the ftp_username I should use?  Instead of "web" for example?

Thanks!
Added  "vsftpd: ALL : ALLOW" to /etc/hosts.allow
and "ftp_username=web" to vsftpd.conf

Now I can FTP to it (after a reboot)!

It is anonymous-only, which seems a little funny.  And when I try a mkdir I get Permission Denied.

Same thing when I try a PUT command.

Where am I still messing things up?

Thanks!
If you check who is running the vsftpd daemon when you connect to it you should find that it is being ran by web.  This isn't a huge problem, but should be tidied up at some stage.

If you try to login with the username "web" and the correct password are you actually denied access?  If so check the ftpusers and user_list files in /etc/ to make sure that web isn't being denied access.
C:\Users\Daniel>ftp lamp1Connected to Lamp1.220 (vsFTPd 2.0.6)User (Lamp1:(none)): web530 This FTP server is anonymous only.Login failed.

That's what I mean by it being anonymous only.  I can log in as "anonymous". But then I have no write permissions.

>>you should find that it is being ran by web.  This isn't a huge problem, but should be tidied up at some stage.

Is that why you recommended this line?
 vsftpd.conf file add ftp_username=nobody

ASKER CERTIFIED SOLUTION
Avatar of WizRd-Linux
WizRd-Linux
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for all your help.  I'll probably post a new question to finish this up once I get back to it.