PDA

View Full Version : Trying to add existing directories as SAMBA shares



chiefnz
05-05-2008, 11:32 AM
Hi guys,

I have just installed Ubuntu Linux Server 8.0.4 LTS. Install was a breeze I have to say. I've been using a step by step guide to setup a server which I found on the net... you can see it HERE (http://jonpeck.blogspot.com/2006/11/how-to-configure-80-fileserver-in-45.html)

I am up to step 16, I get a reply back from the netstat command.

I skipped step 17 and 18 as I'm not using TorrentFlux

In step 20 I cannot access the
http://hostname/phpmyadmin it gives me a 404 error.

I can't seem to figure this out though...

I have 2x 120GB SATA drives which I store my data on. I have specific folders setup on these hard drives. How do I get those folders setup in SAMBA so that the other computers on the network can access the shares.

Can any one help please?

Cheers,

chiefnz
05-05-2008, 12:34 PM
Just to add

I can actually see the Ubuntu box in the relevant workgroup in My Network Places under Windows Explorer.

I shows Printers and Faxes when I double click on the Ubuntu machine which is displayed as quantum server (Samba, Ubuntu) (Quantum)

I'm Googling to see if I can find any command line stuff I need to add the existign folders on the hard drive to SAMBA as shares.

Cheers,

Erayd
05-05-2008, 12:39 PM
Have you restarted apache after installing phpmyadmin? You will either need to do this, or tell apache to reload its config. After doing this /phpmyadmin/ should work.

For sharing existing folders, you'll need to define these in /etc/samba/smb.conf.

chiefnz
05-05-2008, 01:00 PM
Ok I used the following command to restart Apache

/etc/init.d/apache2 restart

This is the output from the command

* Restarting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
httpd (pid 4781?) not running
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
[fail]


Where to from here?

Speedy Gonzales
05-05-2008, 01:20 PM
This site may help (https://help.ubuntu.com/community/ApacheMySQLPHP)

Troubleshooting

If you get this error:

apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

then use a text editor such as "sudo nano" at the command line or "gksudo gedit" on the desktop to edit

/etc/apache2/httpd.conf

and add

ServerName localhost

at the end of the file.

Note: The Ubuntu/Debian setup uses config snippets in the /etc/apache2/conf.d directory rather than the httpd.conf file. Instead of using httpd.conf edit a new file /etc/apache2/conf.d/fqdn and add the line in there.

chiefnz
05-05-2008, 02:03 PM
Thanks Speedy that has fixed the ServerName error message when Ubuntu starts up.

I still can't access
http://hostname/phpmyadmin
???

Also the httpd.conf file is empty with the exception of...

"ServerName localhost" entry

Cheers,

Speedy Gonzales
05-05-2008, 02:38 PM
Would you have to do something similar to this ? (http://jonpeck.blogspot.com/2006/11/how-to-configure-80-fileserver-in-45.html)

chiefnz
05-05-2008, 03:45 PM
That is the guide I'm using.. see reference in first post.

Cheers,

Speedy Gonzales
05-05-2008, 04:02 PM
Did you read the comments underneath on the site you posted??

Aha! I figured out what the problem was with phpmyadmin not working.

It's in the installation... when you have the option of choosing DNS/LAMP packages, it's not enough to merely move the cursor to the LAMP box and hit "Enter." You have to hit the space bar while the cursor is on LAMP, so that the option actually gets selected for installation.

chiefnz
05-05-2008, 05:30 PM
Yep I did that...

I'm aware of the space bar action to put an "X" in the option you want.

chiefnz
05-05-2008, 07:27 PM
Ok...

after doing a complete re-install of Ubuntu and selecting every Apache option I can now get to the following without any hassles



http://hostname:901/shares

http://hostname/phpmyadmin


The bad news is that for some reason I do not see as many options when I go to hostname:901/shares as I did on the previous install

I recall a tab/button where I could change the workgroup name etc but now I can't... I think it's because I'm logged in with my normal user account but I don't know how to logout so that I can login as SAMBA root?

Cheers,