The Perfect Server - Fedora 7

Discussion in 'HOWTO-Related Questions' started by markg85, Jul 1, 2007.

  1. markg85

    markg85 New Member

    Hey,

    First of all a big thanx fo Falko for making all those wonderful howto articles :)
    but i'm not making a topic here to say that alone in this forum section.

    While i was walking through the howto and landed on Page4 i run into problems..

    Firstly i found out that this command:
    Code:
    yum install quota
    
    wasn't needed for me because somethings seemed to have it installed. i installed a MINIMAL fedora through text mode and turned off nearly everything.

    Second issue:
    /etc/init.d/named start

    When that command is executed i'm getting this error:
    Code:
    [root@Fedora-Server ~]# /etc/init.d/named start
    Locating /var/named/chroot//etc/named.conf failed.
    I can't find any configuration file. You can create it by system-config-bind
    or install caching-nameserver.
                                                               [FAILED]
    [root@Fedora-Server ~]#      
    a locate on named.conf return this:
    Code:
    [root@Fedora-Server ~]# locate named.conf
    /etc/dbus-1/system.d/named.conf
    /usr/share/doc/bind-9.4.1/sample/etc/named.conf
    /usr/share/logwatch/default.conf/services/named.conf
    /usr/share/man/man5/named.conf.5.gz
    [root@Fedora-Server ~]#   
    Installing system-config-bind won't do anything usefull because that needs a graphical environment.

    And a few lines further you say:
    Code:
    I will use ISPConfig to configure BIND (zones, etc.).
    
    so i just continued there and assumed that ISPconfig will fix the issue once a named.conf has been made.

    And a little later on the page (at the end) you say:
    Code:
    mysqladmin -u root password yourrootsqlpassword
    mysqladmin -h server1.example.com -u root password yourrootsqlpassword
    i recommend to avoid using passwords in the console!!!! it is all being logged and although it's highly unlikely that someone gets on your computer as root it's still possible. (it's all written by humans afterall) so you can better replace that by:
    Code:
    mysql -u root -p
    SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPassword');
    \q
    mysqladmin -h server1.example.com -u root -p (or what works here)
    No issues for the rest.

    Now i downloaded and installed ISPconfig and i wonder why it compiled apache (1.3.xx) and php (5.2.3) and not used the apache and php that was installed with the guide... :S i don't really want to have 2 apache's running... (1 for ispconfig and one for the rest) is there any possible solution for this?

    Thanx,
    Mark.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    There are many good reasons for this setup and this has been explained several times in the forum. ISPConfig as a second apache server to make the interface accessible even when the main apache webserver is not running due to some misconfigurations to enable the user to fix it in the ISPConfig interface. If you dont want to use it like this, you will have to use another software.

    To you bind issue. Please redo the bind installation steps described in the howro. Bind will not work with ISPConfig if you do not install it properly before.
     
  3. markg85

    markg85 New Member

    Thanx for your reply. i now understand why ispconfig uses it's own apache server.
     
  4. dazblade

    dazblade New Member

    I agree this is an excellent "How To" and I am following at the moment. I too have run into problems with:

    mysqladmin -u root password yourrootsqlpassword

    After typing the above, I now cannot access mysqladmin as in this example:
    >mysqladmin ping
    mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: NO)'

    *update*
    Ok, I found a way round it, I have to type <mysqladmin -p ping> BUT the downside with this is I have to type my password for every command I use???? How can I get it to remember my password so once it is typed once, it doesn't need be typed again for future mysqladmin commands?

    *update2*
    Ok, this is now sorted. There is a file called /etc/my.cnf (Global options) and/or ~/.my.cnf (User-specific options) which should contain a group called [client], if not then just create the group and the the line <password = your_password>, so you get something like:

    Code:
    [client]
    password        = your_password
    
    The file should not be accessible to anyone but yourself, for obvious reasons. To ensure this, set the file access mode to 400 or 600. For example:
    Code:
    chmod 600 /etc/my.cnf
    

    ------------------------------------------------------------------------------------

    *update*
    Am still struggling with the below command. Is it really necessary? and if so how do I get it to work? I also get the same error if I try to access mysqladmin as a user... do I need to add some extra info into /etc/my.cnf ??

    ...and when I typed the following command:
    mysqladmin -h HostBlade.dazblade.net -u root password yourrootsqlpassword <--- I typed same password as created with 1st command
    mysqladmin: connect to server at 'HostBlade.dazblade.net' failed
    error: 'Host 'HostBlade.dazblade.net' is not allowed to connect to this MySQL server'


    I should also mention that I am a LINUX newbie so I appreciate that I have probably done something wrong or typed something incorrectly on the second command but I don't understand why I can no longer access mysqladmin since typing the first command...

    Hope someone can assist - as I can't go on any further in the tutorial until this is understood by me.....
     
    Last edited: Jul 2, 2007
  5. falko

    falko Super Moderator Howtoforge Staff

    Take a look here: http://www.howtoforge.com/forums/showthread.php?t=12455&highlight=Host+mysql+hostname
     
  6. dazblade

    dazblade New Member

    This means that the mysql.user table holds a different hostname than mybox.abc.com. Either change the hostname in the mysql.user table (for example using phpMyAdmin) and restart MySQL, or use the hostname from the mysql.user table in the mysqladmin command instead of mybox.abc.com.

    ------------------------------------

    I really appreciate the assistance, thanks. Is their not a command I can type in the shell to access and change it?;) is mysql.user just a mysql configuration file??

    Or is it the fact that I have this specific problem that I'm unable to access it using mysqladmin or any other method in the shell???:confused:

    I am loathe to install phpmyadmin just to make that change only to uninstall it again.... I'm not a fan of phpmyadmin.

    *Update*
    It appears you were correct - now just to workout how to change localhost.localdomain to myhost.mydomain and localhost to myhost.....
    Code:
    mysql> select host, user from mysql.user;/G
    +-----------------------+------+
    | host                  | user |
    +-----------------------+------+
    | localhost             |      | 
    | localhost             | root | 
    | localhost.localdomain |      | 
    | localhost.localdomain | root | 
    +-----------------------+------+
    4 rows in set (0.00 sec)
    
    *Update*
    Just used mysql administrator GUI to change the users and it has deleted the mysql.user table........WTF!!! All I did was create myhost and myhost.mydomain and deleted the localhost and localhost.localdomain...... weird thing is though it lets me login with root myhost mypassword into the GUI but when I click on user administration now, it is all greyed out.......... Now I'm getting the opposite error = error: 'Access denied for user 'root'@'localhost' (using password: YES)' - can't flippin win....

    looks like uninstalling all mysql and re-installing it.... why is it so damn difficult to perform such simple tasks? (he asks himself)

    I'll give it one more attempt if still too hard then I'll have to give up the on the idea of a server - its just taking too much time, where as in windows I could have done it all days ago.... but I hate windows even if it is simple do ANY task.... Hmmm methinks I have created a paradox, LOL lol LOL - o well enuff rambling, another day wasted - return to it tomorrow once rested....

    Uninstalled and re-installed mysql but nothing has changed...... users still does not exist and has not been recreated. In mysql administrator, when clicking on User Administration I get error: Could Not Retrieve User Privilege Information - how can it give the same error even after re-installing it........ this is crazy........ I really am going to rest now as I'm just p****d off with it.
     
    Last edited: Jul 3, 2007
  7. falko

    falko Super Moderator Howtoforge Staff

    You could try
    Code:
    apt-get --purge remove mysql-server
    to completely uninstall MySQL (if you are on Debian/Ubuntu). Afterwards, you can install mysql-server again.
     
  8. dazblade

    dazblade New Member

    :) LOL
    Thanks for that but I'm on Fedora 7 which is why I chose "The Perfect Server - Fedora 7" to follow:)

    I use "yum install" to install it and "yum remove" to remove it. After removal, I then manually removed "/var/lib/mysql/" and all its contents.

    Then performed "yum install mysql mysql-devel mysql-server" to do the reinstallation. Then did "/etc/init.d/mysqld start" and it complained that "/var/lib/mysql/mysql.sock" was missing. So I created an file called "mysql.sock" in "/var/lib/mysql/".

    Now this is happening:
    Code:
    # /etc/init.d/mysqld start
    Timeout error occurred trying to start MySQL Daemon.
    Starting MySQL:                                            [FAILED]
    
    At the moment, I have no idea why it is timing out.:confused:

    *Update*
    All honky dory now. Steep learning curve but am getting there. Just going to spend some time getting more familiar with MySQL before proceeding to the next part of server set up. Thanks for the replies and the Article, falko.
     
    Last edited: Jul 5, 2007
  9. dazblade

    dazblade New Member

    Page 5

    Hi - On page 5 it states:
    11 Postfix With SMTP-AUTH And TLS

    Now we install Postfix and Dovecot (Dovecot will be our POP3/IMAP server):

    yum install cyrus-sasl cyrus-sasl-devel cyrus-sasl-gssapi cyrus-sasl-md5 cyrus-sasl-plain postfix dovecot
    ------------------------------------------------------------------

    Now I want to use Exim instead of Postfix and TeaPop instead of/or aswell as Dovecot.

    Our systems at work use Exim & Teapop which is why it makes sense for me to use them on my own PC to improve my own knowledge.

    I'm just wondering, if I install Exim & Teapop will I need to still do all that SMTP-AUTH and TLS and Security Certificate stuff, basically everything in section 11?

    ...and if so will the commands be the same without me needing to change them except the relevant paths?
     
  10. falko

    falko Super Moderator Howtoforge Staff

    I'm not very experienced with Exim, but I guess you'll need totally different commands to set it up...
    BTW, if you plan to install ISPConfig: ISPConfig doesn't support Exim.
     

Share This Page