Using the CentOS 6 instruction for RHEL 6

Discussion in 'Tips/Tricks/Mods' started by dannypb, Feb 19, 2014.

  1. dannypb

    dannypb New Member

    Hi,

    Here are my notes from installing 2 servers now as ispconfig lamp servers on Red Hat Enterprise Linux 6 64 bit. You may not like some of my methods, such as using the older RH subscription method, but it works. It is also the only way to get the additional software channels unless you install xwindows, but I didn't cuz gui's are evil!

    I hope this helps someone:


    Start with http://www.howtoforge.com/perfect-server-centos-6.2-x86_64-with-apache2-ispconfig-3 (TY Falko! and I mean it!)

    Page 2
    when selecting customize now or customize later, select customize now, and add emacs to the packages. (I added this step to start an emacs vs vi holy war :) )

    Page 3 installing EPEL
    ver. 6.5 is not available. use the line
    "wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm"
    instead of
    "wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm"

    Page 3 section 7 when importing additional repositories do the line:
    "rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt"
    instead of
    "rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt"
    since the import file has moved

    Page 3 before installing yum_priorities you have to subscribe your server with RHN and enable an additional software channel
    rhn_register to register as RHN Classic on the command line
    go to https://access.redhat.com/home
    sign in
    Subscriptions>Your Subscriptions> Overview
    RHN Classic
    click server name
    click software tab
    click Software Channels
    click the box next to: RHEL Server Optional (v. 6 64-bit x86_64)
    scroll to bottom and click the Change Subscriptions button
    log out, then do the yum_priorities

    Page 3 before running yum update
    you will need to remove some packages that will cause an error in the yum update.
    go ahead and run:
    yum shell
    > install matahari
    > remove matahari-service
    > remove matahari-lib
    > remove matahari-host
    > remove matahari-agent
    > remove matahari-net
    > run
    > exit

    page 4 section 10
    the three wget files were not found.
    Use the ones you already have on the current servers. or find them somewhere else :(

    Page 5 ruby download
    the wget link is bad. use:
    "wget http://fossies.org/unix/www/apache_httpd_modules/mod_ruby-1.3.0.tar.gz"

    Page 7
    the latest version of ispconfig has a bug in RHEL with fcgi that will prevent it from working without significant research so....
    get the version I know is stable: "wget http://www.ispconfig.org/downloads/ISPConfig-3.0.4.6.tar.gz"
    then finish up accordingly
    when it tells you to leave the server name blank, enter your server name for ispconfig to see the server and change its settings within the web interface later.

    Page 7 After the ispconfig installation finishes
    if you did not enter a hostname when the installation asks, "Full qualified hostname (FQDN) of the server, eg server1.domain.tld [server1.example.com]:", you will get a postfix error. The ispconfig installer adds a bunch of lines at the end of the /etc/postfix/main.cf file. if you did not enter it you will need to add the hostname at:
    myhostname =
    at the end of the file. There is a commented out one in the middle of the file. If you put the hostname there and uncomment it, it wont matter since the hostname is reset to blank at the end of the file. Also the mydestination = parameter will start with a comma, as the ispconfig installer will add the blank hostname to the beginning of that line. The steps are:
    emacs /etc/postfix/main.cf
    Search for the "mydestination =" line
    place your hostname before the comma, or delete the comma. (keep in mind what Till says below in response)
    scroll to botton of the document and find the line: myhostname =
    Add your hostname there: myhostname = yourhostname.net
    restart postfix with "/etc/init.d/postfix restart"


    To use a virtual IP in ispconfig you need to manually add the device
    in RHEL: cd /etc/sysconfig/network-scripts/
    cp ifcfg-eth0 ifcfg-eth0:0
    emacs ifcfg-eth0:0
    change the device name from eth0 to eth0:0
    change the IP to the new IP
    remove the HWADDR line
    save

    copy for other ip addresses you want to add.

    /etc/init.d/network restart

    I hope I didn't miss anything important. It can be a little frustrating working through it all and not knowing the differences needed for RHEL. I hope this helps someone.
     
    Last edited: Feb 19, 2014
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Thank you for posting the instructions for rhel. I will move your post to the tipps & trick forum.

    I have one suggestion regarding the postfix config step:

    The hostname of the server as used in the postfix configuration of the server in mydestination and myhostname should be a subdomain. e.g. server1.yourdomain.tld and not just yourdomain.tld. the reason is that postfix will not deliver emails for yourdomain.tld correctly when you try to add it as email domain in ispconfig. the email setup in ispconfig is a virtual user / domain setup and you may not list a domain in postfix in mydestination / myhsotname and as virtual domain.
     
  3. dannypb

    dannypb New Member

    I will remove it then. What I put in there for me was my actual server name, that is not a website domain. I just hated looking at the comma with nothing before it though. I'm not a sys admin, I'm a programmer.
     
  4. dannypb

    dannypb New Member

    Oh and by the way, The issue I was having with ispconfig 3.0.5 I think it was.... was with fcgi. I also noticed on my 3.0.4 server that some of the php code was causing errors, until I switched the site from fast cgi to suphp.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Adding the system hostname is fine. If the servername is not used for a website or email domain, then it can be a 2nd level domain as well. I just wanted to note the behaviour of postfix, in case that someone gets in troble with it :)

    Suphp should not be used anymore, its outdated and dead slow, we support it just for legacy reasons in ispconfig. I use fcgi-php or php-fpm (which is basically a newer version of the fcgi interface) for all websites without any problems. Maybe you can switch the site to fcgi and then take a look into the error.log of the website and post the error message that you get then, so we can fix that issue. Possible problem. Most likely one of the fcgi parameters needs to be adjusted, e.g. something like this: http://www.faqforge.com/linux/fix-h...-exceeds-maxrequestlen-error-on-debian-linux/
     
  6. dannypb

    dannypb New Member

    well thank you Till.

    The error I was getting in 3.0.5 was causing the https://myip:8080 main page to fail. When I troubleshot it, it was a fcgi error I think, but I needed to move on and used the 3.0.4.6 version that was already running on another server. I read also many people were having the same issues after updating from 3.0.4 to 3.0.5.

    The main error I received in the 3.0.4 fcgi page was due to a open_basedir issue after we moved our main website to the new ispconfig server from a plesk server. I cleaned up some relative path issues in that site and switched back to fast cgi, and everything seems to work, although I'm sure fcgi is not configured properly. I'm not yet even sure where the config files are.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    The setup of the ispconfig vhost in 3.0.4.6 used mod_php, this was nots secure enough and we switched to php-fcgi. Your system was just missing some packages, thats why the error occurred. The solution would have been to install all packages that are listed in the current perfect setup guides. I did this on many client systems that I updated and never had a problem.
     
  8. dannypb

    dannypb New Member

    I may have found my issue. Upon installing a third server I found a line I didn't update in the php.ini file. I missed the instruction, "and uncomment cgi.fix_pathinfo=1".
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    If you still get issues, please post the errors and i will help to find the resson.
     

Share This Page