Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 17th December 2007, 11:58
FXT FXT is offline
Junior Member
 
Join Date: Jul 2007
Posts: 22
Thanks: 3
Thanked 0 Times in 0 Posts
Default Questions and Problem when following Dapper Drake Perfect Setup

Hi there!

I've been following the perfect setup howto for ubuntu server 6.06 lts here to get a server with ispconfig and joomla running.

Edit: All this is happening in a VMWare VM on an XP host. I'm doing all this via putty from another XP box on the LAN.

I have a few questions:

(1)
I am running this server on my LAN, with the possibility of later making it accessible to the internet (via my router's DMZ or specific port forwarding). If I don't plan on using DynDNS or something comparable, how would i go about changing /etc/hosts?
Following the howto to the letter, I would get this:

Code:
127.0.0.1       localhost.localdomain localhost
192.168.1.222   servebox.example.com  servebox

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
What purpose does the "servebox.example.com" have, is it even necessary? I don't plan on having this machine reachable via DNS, just IP.

According to the howto, both "hostname" and "hostname -f" should output "servebox.example.com". Is that really correct? "hostname" only outputs "servebox" for me.

(2)
I'm running into a problem after installing mysql according to the howto. It might very well be related to the question above. It all works according to plan until i set the root password with:

Code:
mysqladmin -u root password newpasswordhere
The next step

Code:
mysqladmin -h servebox.example.com -u root password newpasswordhere
gives the following error:

Code:
mysqladmin: connect to server at 'servebox.example.com' failed
error: 'Host 'servebox.example.com' is not allowed to connect to this MySQL server'
I'd like to proceed with the install, but i'm stuck here.

Any help is appreciated.

(3) Just thought of another question. Why do we want mysqld to listen on other interfaces than localhost? Anything that accesses the DB should be on the machine, anyway.

Last edited by FXT; 17th December 2007 at 12:32.
Reply With Quote
Sponsored Links
  #2  
Old 18th December 2007, 16:51
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,744 Times in 2,577 Posts
Default

Quote:
Originally Posted by FXT
What purpose does the "servebox.example.com" have, is it even necessary? I don't plan on having this machine reachable via DNS, just IP.
It's not necessary, but saves a DNS lookup if your system uses servebox.example.com somewhere.

Quote:
Originally Posted by FXT
According to the howto, both "hostname" and "hostname -f" should output "servebox.example.com". Is that really correct? "hostname" only outputs "servebox" for me.
Run
Code:
echo "servebox.example.com" > /etc/hostname
/etc/init.d/hostname.sh start
Now both hostname and hostname -f should show servebox.example.com.

Quote:
Originally Posted by FXT
(2)
I'm running into a problem after installing mysql according to the howto. It might very well be related to the question above. It all works according to plan until i set the root password with:

Code:
mysqladmin -u root password newpasswordhere
The next step

Code:
mysqladmin -h servebox.example.com -u root password newpasswordhere
gives the following error:

Code:
mysqladmin: connect to server at 'servebox.example.com' failed
error: 'Host 'servebox.example.com' is not allowed to connect to this MySQL server'
I'd like to proceed with the install, but i'm stuck here.

Any help is appreciated.
Follow the steps in chapter 8 on http://www.howtoforge.com/perfect_se...pensuse10.3_p4 , beginning with As you've seen in the netstat output, MySQL is not only listening on localhost to fix the hostname in the MySQL database.

Quote:
Originally Posted by FXT
(3) Just thought of another question. Why do we want mysqld to listen on other interfaces than localhost? Anything that accesses the DB should be on the machine, anyway.
If all applications that need the database are on the same host, then MySQL doesn't need to listen on all interfaces.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 5th January 2008, 23:38
FXT FXT is offline
Junior Member
 
Join Date: Jul 2007
Posts: 22
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Thank you for your answer, Falko. I couldn't check up on this over Christmas, thus the late reply.

hosts file question:

Quote:
Originally Posted by falko
It's not necessary, but saves a DNS lookup if your system uses servebox.example.com somewhere.
So If my server will not have a domain name, but just a non-routable LAN address, I should basically leave /etc/hosts alone (which i'm guessing is preferable)?
Or is it necessary to just change the file contents from the perfect setup like so:

Code:
127.0.0.1       localhost.localdomain localhost
192.168.1.222   servebox

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
This is an important clarification for me, whether to change anything in that file and if so, what exactly. As of the time of this post, I have restarted the perfect setup and not modified /etc/hosts/ at all.

Quote:
Originally Posted by falko
Run
Code:
echo "servebox.example.com" > /etc/hostname
/etc/init.d/hostname.sh start
Now both hostname and hostname -f should show servebox.example.com.
Assuming I do not have to change /etc/hosts, the hostname command should output only "servebox", correct?

MySQL Problem:

Quote:
Originally Posted by falko
Follow the steps in chapter 8 on http://www.howtoforge.com/perfect_se...pensuse10.3_p4 , beginning with As you've seen in the netstat output, MySQL is not only listening on localhost to fix the hostname in the MySQL database.
Quote:
Originally Posted by falko
If all applications that need the database are on the same host, then MySQL doesn't need to listen on all interfaces.
I have not modified /etc/mysql/my.cnf as per the perfect setup howto, because i only want mysql to listen on localhost. Given that change from the setup, is the command

Code:
mysqladmin -h server1.example.com -u root password yourrootsqlpassword
even necessary? In my case, the correct syntax would be:

Code:
mysqladmin -h servebox -u root password yourrootsqlpassword
?

My user DB looks like this:

Code:
+-----------+------------------+------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+
| Host      | User             | Password         | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv | Show_db_priv | Super_priv | Create_tmp_table_priv | Lock_tables_priv | Execute_priv | Repl_slave_priv | Repl_client_priv | Create_view_priv | Show_view_priv | Create_routine_priv | Alter_routine_priv | Create_user_priv | ssl_type | ssl_cipher | x509_issuer | x509_subject | max_questions | max_updates | max_connections | max_user_connections |
+-----------+------------------+------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+
| localhost | root             | 4db6dbb76d899aa6 | Y           | Y           | Y           | Y           | Y           | Y         | Y           | Y             | Y            | Y         | Y          | Y               | Y          | Y          | Y            | Y          | Y                     | Y                | Y            | Y               | Y                | Y                | Y              | Y                   | Y                  | Y                |          |            |             |              |             0 |           0 |               0 |                    0 |
| servebox  | root             |                  | Y           | Y           | Y           | Y           | Y           | Y         | Y           | Y             | Y            | Y         | Y          | Y               | Y          | Y          | Y            | Y          | Y                     | Y                | Y            | Y               | Y                | Y                | Y              | Y                   | Y                  | Y                |          |            |             |              |             0 |           0 |               0 |                    0 |
| localhost | debian-sys-maint | 0167e3a23156214d | Y           | Y           | Y           | Y           | Y           | Y         | Y           | Y             | Y            | Y         | Y          | Y               | Y          | Y          | Y            | Y          | Y                     | Y                | Y            | Y               | Y                | N                | N              | N                   | N                  | N                |          |            |             |              |             0 |           0 |               0 |                    0 |
+-----------+------------------+------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+
Does that make sense?

I'd like to continue the perfect setup now, and was wondering whether i should hold off until this mysql thing is solved or whether i can just go on installing. Is this something that can be fixed later? I know mySQL should be up and running by the time i install ISPConfig, at the latest.

Sorry for the long post, but this is mostly new to me, and i need help getting to grips with it.
Reply With Quote
  #4  
Old 6th January 2008, 01:06
volksman volksman is offline
Senior Member
 
Join Date: May 2007
Posts: 124
Thanks: 2
Thanked 16 Times in 14 Posts
Default

Quote:
Originally Posted by FXT
So If my server will not have a domain name, but just a non-routable LAN address, I should basically leave /etc/hosts alone (which i'm guessing is preferable)?
Or is it necessary to just change the file contents from the perfect setup like so:

Code:
127.0.0.1       localhost.localdomain localhost
192.168.1.222   servebox

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
This is an important clarification for me, whether to change anything in that file and if so, what exactly. As of the time of this post, I have restarted the perfect setup and not modified /etc/hosts/ at all.
I'm pretty sure if you are using IP only then no modifications are needed to /etc/hosts. However either way it is really a moot point because as Falko said all this does is save or fake a DNS look up. This will not make or break your setup.

Quote:
Originally Posted by FXT
MySQL Problem:

I have not modified /etc/mysql/my.cnf as per the perfect setup howto, because i only want mysql to listen on localhost. Given that change from the setup, is the command

Code:
mysqladmin -h server1.example.com -u root password yourrootsqlpassword
even necessary? In my case, the correct syntax would be:

Code:
mysqladmin -h servebox -u root password yourrootsqlpassword
?

My user DB looks like this:

Code:
+-----------+------------------+------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+
| Host      | User             | Password         | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv | Show_db_priv | Super_priv | Create_tmp_table_priv | Lock_tables_priv | Execute_priv | Repl_slave_priv | Repl_client_priv | Create_view_priv | Show_view_priv | Create_routine_priv | Alter_routine_priv | Create_user_priv | ssl_type | ssl_cipher | x509_issuer | x509_subject | max_questions | max_updates | max_connections | max_user_connections |
+-----------+------------------+------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+
| localhost | root             | 4db6dbb76d899aa6 | Y           | Y           | Y           | Y           | Y           | Y         | Y           | Y             | Y            | Y         | Y          | Y               | Y          | Y          | Y            | Y          | Y                     | Y                | Y            | Y               | Y                | Y                | Y              | Y                   | Y                  | Y                |          |            |             |              |             0 |           0 |               0 |                    0 |
| servebox  | root             |                  | Y           | Y           | Y           | Y           | Y           | Y         | Y           | Y             | Y            | Y         | Y          | Y               | Y          | Y          | Y            | Y          | Y                     | Y                | Y            | Y               | Y                | Y                | Y              | Y                   | Y                  | Y                |          |            |             |              |             0 |           0 |               0 |                    0 |
| localhost | debian-sys-maint | 0167e3a23156214d | Y           | Y           | Y           | Y           | Y           | Y         | Y           | Y             | Y            | Y         | Y          | Y               | Y          | Y          | Y            | Y          | Y                     | Y                | Y            | Y               | Y                | N                | N              | N                   | N                  | N                |          |            |             |              |             0 |           0 |               0 |                    0 |
+-----------+------------------+------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+
Does that make sense?

I'd like to continue the perfect setup now, and was wondering whether i should hold off until this mysql thing is solved or whether i can just go on installing. Is this something that can be fixed later? I know mySQL should be up and running by the time i install ISPConfig, at the latest.

Sorry for the long post, but this is mostly new to me, and i need help getting to grips with it.
Unless I'm missing something with ISPConfig I think this is again a moot point. If you are running everything on one server and never allowing remote mySQL connections then yeah localhost is fine and your connect string can be as simple as:

Code:
mysql -u root -p
However ISPConfig may use a host in its connect string, this can likely be easily modified to localhost.

I've only used ISPConfig briefly once before. It seems like a bit of overkill for an IP based setup like yours. You sure you need it?
Reply With Quote
  #5  
Old 6th January 2008, 13:36
FXT FXT is offline
Junior Member
 
Join Date: Jul 2007
Posts: 22
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Thank you for your reply, volksman!

Quote:
Originally Posted by volksman
I'm pretty sure if you are using IP only then no modifications are needed to /etc/hosts. However either way it is really a moot point because as Falko said all this does is save or fake a DNS look up. This will not make or break your setup.
OK, so after some deliberation I've decided to leave /etc/hosts alone for good. If it has the same functionality as in Windows, leaving it alone will be the best thing. Thank you for the input.


Quote:
Originally Posted by volksman
Unless I'm missing something with ISPConfig I think this is again a moot point. If you are running everything on one server and never allowing remote mySQL connections then yeah localhost is fine and your connect string can be as simple as:

Code:
mysql -u root -p
However ISPConfig may use a host in its connect string, this can likely be easily modified to localhost.
So going from your explanation, the problem I was inquiring about isn't really a problem in my setup, where MySQL is localhost only.
I have just ignored MySQL after its installation for now, and will tackle it again should it become necessary.
When I get to the setup of ISPConfig, I'll most likely have to ask again.

Quote:
Originally Posted by volksman
I've only used ISPConfig briefly once before. It seems like a bit of overkill for an IP based setup like yours. You sure you need it?
I decided after talking with someone who will be using this machine with me, to make it publicly accessible. I'll forward the necessary ports for its operation to the VM's fixed LAN IP. So it will not be strictly IP based. I have a "abcd.dyndns.org" domain and plan on using it for this machine.

I want to have a tool that will allow me to take care of administrative stuff from a nice interface, with no chance of mistyping in config files, and no need for excessive command line interaction. Web based administration just sounds nice and convenient.


I do have new question, that came up when continuing:

I continued with the setup, and am currently going through the Postfix configuration. During that configuration, I have to specify "Mail Name". Now, i might be overthinking this, but do I have to specify "servebox.dyndns.org" (servebox being the machine name), or do I specify "abcd.dyndns.org". The example given in the howto would only apply, if the machine was directly reachable on a public IP and the domain was hosted on it? I'm leaning towards "abcd.dyndns.org", but I'd like to make sure.
For instance, how would I change this line:
Code:
Other destinations to accept mail for? (blank for none) <-- server1.example.com, localhost.example.com, localhost
for correct functionality?
Reply With Quote
  #6  
Old 7th January 2008, 14:10
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,744 Times in 2,577 Posts
Default

Quote:
Originally Posted by FXT
I continued with the setup, and am currently going through the Postfix configuration. During that configuration, I have to specify "Mail Name". Now, i might be overthinking this, but do I have to specify "servebox.dyndns.org" (servebox being the machine name), or do I specify "abcd.dyndns.org". The example given in the howto would only apply, if the machine was directly reachable on a public IP and the domain was hosted on it? I'm leaning towards "abcd.dyndns.org", but I'd like to make sure.
For instance, how would I change this line:
Code:
Other destinations to accept mail for? (blank for none) <-- server1.example.com, localhost.example.com, localhost
for correct functionality?
It doesn't matter which hostname you use as long as its DNS record is pointing to your server's (public) IP address.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 8th January 2008, 10:57
FXT FXT is offline
Junior Member
 
Join Date: Jul 2007
Posts: 22
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Thanks for the answer, I'm progressing nicely with this setup now, albeit slowly...

When configuring MySQL before, I created a password for the user "root", and only "root". That is a MySQL-specific user, correct? As in, not the system's root user? Would it make sense to create new MySQL users for ISPConfig, a CMS, etc, all with their own credentials and databases?
Reply With Quote
  #8  
Old 8th January 2008, 15:41
volksman volksman is offline
Senior Member
 
Join Date: May 2007
Posts: 124
Thanks: 2
Thanked 16 Times in 14 Posts
Default

Personally I would. That way if someone gets in they don't get access to everything (depending on the privileges you grant to each additional user).
Reply With Quote
  #9  
Old 8th January 2008, 22:27
FXT FXT is offline
Junior Member
 
Join Date: Jul 2007
Posts: 22
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by volksman
Personally I would. That way if someone gets in they don't get access to everything (depending on the privileges you grant to each additional user).
OK, so I will create a specific user for ISPConfig. Does this syntax look right:

Code:
mysql -u root -p

create database db_ispconfig;

GRANT ALL PRIVILEGES ON db_ispconfig.* TO 'ispconfig_user'@'localhost'
IDENTIFIED BY 'ispconfig_user_password' WITH GRANT OPTION;

quit;
Reply With Quote
  #10  
Old 8th January 2008, 22:55
volksman volksman is offline
Senior Member
 
Join Date: May 2007
Posts: 124
Thanks: 2
Thanked 16 Times in 14 Posts
 
Default

Looks good to me!
Reply With Quote
The Following User Says Thank You to volksman For This Useful Post:
FXT (12th January 2008)
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
general ruby on rails and server setup questions Ovidiu Server Operation 8 24th August 2007 09:53
Mail Server Problem - DNS Questions bfriend Installation/Configuration 1 1st August 2007 09:39
Email Questions & Problem koltz General 6 25th February 2007 00:07
Multiple ISPConfig & DNS Questions and Problems bfriend Installation/Configuration 3 6th January 2007 06:14
Installation questions with ISPconfig using ubuntu dapper drake darkomen Installation/Configuration 14 1st November 2006 19:36


All times are GMT +2. The time now is 14:07.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.