Issues while following CentOS 5.6 x86_64 [ISPConfig 3] Guide

Discussion in 'Installation/Configuration' started by mjhasbach, May 23, 2011.

  1. mjhasbach

    mjhasbach New Member

    I recently used the "The Perfect Server - CentOS 5.6 x86_64 [ISPConfig 3]" guide to configure a new VPS @ VolumeDrive.

    This is my third time using "The Perfect Server" guides to configure a server, twice with CentOS, and once with Ubuntu. I haven't really ran into any problems until now.

    The first issue is, when configuring quota, I have no idea how I should configure /etc/fstab. My fstab looks like this:

    Code:
    none    /dev/pts        devpts  rw      0       0
    One line...that's it. I've never seen such a simple looking fstab. I have very little knowledge with fstab, but did some research and tried to configure it a few different ways. Regardless of what I do, when I reach this step in the tutorial:

    Code:
    mount -o remount /
    I am told:

    Code:
    mount: permission denied
    Strange that I am denied permission when I am running as root...

    So my first two questions are: how can I solve the permission denied issue, and how should I configure fstab to work with quota?


    The next issue that I am having is, when pure-ftpd is started via:

    Code:
    /etc/init.d/pure-ftpd start
    It returns:

    Code:
    Starting pure-ftpd: 421 Configuration error: Invalid SQL configuration file: /etc/pure-ftpd/pureftpd-mysql.conf
    I've tried configuring this file a few different ways to no avail. Here's what it looks like right now:

    Code:
    ##############################################
    #                                            #
    # Sample Pure-FTPd Mysql configuration file. #
    # See README.MySQL for explanations.         #
    #                                            #
    ##############################################
    
    
    # Optional : MySQL server name or IP. Don't define this for unix sockets.
    
    # MYSQLServer     <omitted>
    
    
    # Optional : MySQL port. Don't define this if a local unix socket is used.
    
    # MYSQLPort       3306
    
    
    # Optional : define the location of mysql.sock if the server runs on this host.
    
    # MYSQLSocket      /var/lib/mysql/mysql.sock
    
    
    # Mandatory : user to bind the server as.
    
    MYSQLUser       ispconfig
    
    
    # Mandatory : user password. You must have a password.
    
    MYSQLPassword   <omitted>
    
    
    # Mandatory : database to open.
    
    MYSQLDatabase   dbispconfig
    
    
    # Mandatory : how passwords are stored
    # Valid values are : "cleartext", "crypt", "md5" and "password"
    # ("password" = MySQL password() function)
    # You can also use "any" to try "crypt", "md5" *and* "password"
    
    MYSQLCrypt      crypt
    
    
    # In the following directives, parts of the strings are replaced at
    # run-time before performing queries :
    #
    # \L is replaced by the login of the user trying to authenticate.
    # \I is replaced by the IP address the user connected to.
    # \P is replaced by the port number the user connected to.
    # \R is replaced by the IP address the user connected from.
    # \D is replaced by the remote IP address, as a long decimal number.
    #
    # Very complex queries can be performed using these substitution strings,
    # especially for virtual hosting.
    
    
    # Query to execute in order to fetch the password
    
    MYSQLGetPW      SELECT password FROM ftp_user WHERE active = 'y' AND server_id = '1' AND username="\L"
    
    
    # Query to execute in order to fetch the system user name or uid
    
    MYSQLGetUID     SELECT uid FROM ftp_user WHERE active = 'y' AND server_id = '1' AND username="\L"
    
    
    # Optional : default UID - if set this overrides MYSQLGetUID
    
    #MYSQLDefaultUID 1000
    
    
    # Query to execute in order to fetch the system user group or gid
    
    MYSQLGetGID     SELECT gid FROM ftp_user WHERE active = 'y' AND server_id = '1' AND username="\L"
    
    
    # Optional : default GID - if set this overrides MYSQLGetGID
    
    #MYSQLDefaultGID 1000
    
    
    # Query to execute in order to fetch the home directory
    
    MYSQLGetDir     SELECT dir FROM ftp_user WHERE active = 'y' AND server_id = '1' AND username="\L"
    
    
    # Optional : query to get the maximal number of files 
    # Pure-FTPd must have been compiled with virtual quotas support.
    
    MySQLGetQTAFS  SELECT quota_files FROM ftp_user WHERE active = 'y' AND server_id = '1' AND quota_files != '-1' AND username="\L"
    
    
    # Optional : query to get the maximal disk usage (virtual quotas)
    # The number should be in Megabytes.
    # Pure-FTPd must have been compiled with virtual quotas support.
    
    MySQLGetQTASZ  SELECT quota_size FROM ftp_user WHERE active = 'y' AND server_id = '1' AND quota_size != '-1' AND username="\L"
    
    
    # Optional : ratios. The server has to be compiled with ratio support.
    
    MySQLGetRatioUL SELECT ul_ratio FROM ftp_user WHERE active = 'y' AND server_id = '1' AND ul_ratio != '-1' AND username="\L"
    MySQLGetRatioDL SELECT dl_ratio FROM ftp_user WHERE active = 'y' AND server_id = '1' AND dl_ratio != '-1' AND username="\L"
    
    
    # Optional : bandwidth throttling.
    # The server has to be compiled with throttling support.
    # Values are in KB/s .
    
    MySQLGetBandwidthUL SELECT ul_bandwidth FROM ftp_user WHERE active = 'y' AND server_id = '1' AND ul_bandwidth != '-1' AND username="\L"
    MySQLGetBandwidthDL SELECT dl_bandwidth FROM ftp_user WHERE active = 'y' AND server_id = '1' AND dl_bandwidth != '-1' AND username="\L"
    
    # Enable ~ expansion. NEVER ENABLE THIS BLINDLY UNLESS :
    # 1) You know what you are doing.
    # 2) Real and virtual users match.
    
    # MySQLForceTildeExpansion 1
    
    
    # If you upgraded your tables to transactionnal tables (Gemini,
    # BerkeleyDB, Innobase...), you can enable SQL transactions to
    # avoid races. Leave this commented if you are using the
    # traditionnal MyIsam databases or old (< 3.23.x) MySQL versions.
    
    MySQLTransactions On

    What appears to be wrong with this configuration file?


    The next issue that I am having is that, after logging into ISPConfig and clicking on the "Monitor" tab, all tabs under "Hardware Information", "Server State" (except "Show Overview"), and "Logfiles" show the following message:

    Code:
    Data from: ????-??-?? ??:??
    
    No data about <xyz> available at the moment. Please check again later.
    I've only had this happen once before on another server, and it was only for "Show fail2ban-Log" IIRC.


    I would like to say thanks to Falco. Your guides have helped me greatly in the past.

    Thanks in advance!

    EDIT: One more major problem...
    There are no /var/www/clients or /var/www/<domain name> directories being created after adding clients and sites.

    This is turning out to be a really rough install...
     
    Last edited: May 23, 2011
  2. falko

    falko Super Moderator Howtoforge Staff

    Is this a physical server or a virtual machine? If the latter, what virtualization technique are you using?
     
  3. mjhasbach

    mjhasbach New Member

    Virtual machine. OpenVZ.
     
  4. mjhasbach

    mjhasbach New Member

    Due to the time sensitive nature of this install, I just went ahead and completely wiped the VPS and installed Ubuntu 11.04. I then used "The Perfect Server - Ubuntu 11.04 [ISPConfig 3]" guide to configure the VPS. It was COMPLETELY painless. Thanks again falko.

    I still, however, have this issue when reaching the quota section of the tutorial (I skipped this step):

    Code:
    # mount -o remount /
    mount: permission denied
    Also, I still do not know how to best configure my /etc/fstab file. It now looks like this:

    Code:
    proc  /proc       proc    defaults    0    0
    none  /dev/pts    devpts  rw          0    0

    One last thing...

    As stated earlier, my server is an OpenVZ container. I assume that this is something that I am going to have to contact my host about (something I cannot do myself)? What are the repercussions of not doing this??
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    As your server is a vps, there is no need to configure quota inside the vps. So you can skip that step.

    You dont have to execute these steps if pure-ftpd works fine. Please check that with:

    netstat -tap | grep ftp

    after you installed ispconfig. If pure-ftpd does not srat, then you can also compile it as altenative as it is described in the ispconfig faq.
     
  6. peterpallesen

    peterpallesen New Member

    More pure-ftpd problems

    I got problems with pure-ftpd as well ...

    [root@ispconfig3 ~]# service pure-ftpd start
    Starting pure-ftpd: [FAILED]


    /var/log/messages only says:
    Jul 27 09:54:30 ispconfig3 pure-ftpd: (?@?) [ERROR] Unable to switch capabilities : Operation not permitted


    I'm installing this in an OpenVZ container.
     
    Last edited: Jul 27, 2011
  7. peterpallesen

    peterpallesen New Member

    Another problem in section 17 - bind-chroot

    [root@ispconfig3 ~]# yum install bind-chroot
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    * base: centos.maulvi.net
    * extras: centos.maulvi.net
    * rpmforge: fr2.rpmfind.net
    * updates: centos.maulvi.net
    Excluding Packages from Red Hat Enterprise Linux 5 - x86_64 - ATrpms
    Finished
    Reducing Red Hat Enterprise Linux 5 - x86_64 - ATrpms to included packages only
    Finished
    Excluding Packages from Red Hat Enterprise Linux 5 - x86_64 - ATrpms testing
    Finished
    Reducing Red Hat Enterprise Linux 5 - x86_64 - ATrpms testing to included packages only
    Finished
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package bind-chroot.x86_64 30:9.3.6-16.P1.el5 set to be updated
    --> Finished Dependency Resolution

    Dependencies Resolved

    =================================================================================================
    Package Arch Version Repository Size
    =================================================================================================
    Installing:
    bind-chroot x86_64 30:9.3.6-16.P1.el5 base 46 k

    Transaction Summary
    =================================================================================================
    Install 1 Package(s)
    Upgrade 0 Package(s)

    Total download size: 46 k
    Is this ok [y/N]: y
    Downloading Packages:
    bind-chroot-9.3.6-16.P1.el5.x86_64.rpm | 46 kB 00:01
    Running rpm_check_debug
    Running Transaction Test
    Finished Transaction Test
    Transaction Test Succeeded
    Running Transaction
    Installing : bind-chroot 1/1

    Installed:
    bind-chroot.x86_64 30:9.3.6-16.P1.el5

    Complete!
    [root@ispconfig3 ~]# chmod 755 /var/named/
    [root@ispconfig3 ~]# chmod 775 /var/named/chroot/
    [root@ispconfig3 ~]# chmod 775 /var/named/chroot/var/named/
    [root@ispconfig3 ~]# chmod 775 /var/named/chroot/var/run/
    [root@ispconfig3 ~]# chmod 777 /var/named/chroot/var/run/named/
    [root@ispconfig3 ~]# cd /var/named/chroot/var/named/
    [root@ispconfig3 named]# ln -s ../../ chroot
    [root@ispconfig3 named]# touch /var/named/chroot/var/named/named.local
    [root@ispconfig3 named]# cp /usr/share/doc/bind-9.3.6/sample/var/named/named.root /var/named/chroot/var/named/named.root
    [root@ispconfig3 named]# touch /var/named/chroot/etc/named.conf.local
    [root@ispconfig3 named]# vi /var/named/chroot/etc/named.conf
    (edited as per the text)
    [root@ispconfig3 named]# chkconfig named on
    [root@ispconfig3 named]# service named start
    Starting named:
    Error in named configuration:
    /var/named/chroot/var/named/named.local:1: unknown option '$TTL'
    /var/named/chroot/var/named/named.local:3: unknown option 'Serial'
    /var/named/chroot/var/named/named.local:4: unknown option 'Refresh'
    /var/named/chroot/var/named/named.local:5: unknown option 'Retry'
    /var/named/chroot/var/named/named.local:6: unknown option 'Expire'
    /var/named/chroot/var/named/named.local:7: unknown option 'Minimum'
    /etc/named.conf:30: unexpected token near end of file
    [FAILED]
     
  8. peterpallesen

    peterpallesen New Member

    Webserver won't interpret PHP

    I also can't seem to get Apache to interpret php.

    I ran the yum line on page 4 - yum install ntp httpd mysql-server php php-mysql php-mbstring php-mcrypt phpmyadmin - and everything installed fine. Restarted httpd (of course). Created a test index.php under /var/www/html with <? phpinfo(); ?> in it in order to test php functionality. Entering the IP of the server (it's a local test server) in my browser, http://192.168.1.101/index.php, just brings up the uninterpreted text.
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    This will not work of course as the file is in a wrong place. You can not test a ispconfig server like that.

    To test your server, create a website in ispconfig, enable php in the website settings in ispconfig and then place the php file in the web folder that was created by ispconfig for that site.
     
  10. peterpallesen

    peterpallesen New Member

    Hm, why not, I haven't got to the point of installing ispconfig yet.

    I noticed the problem when I was at the end of point 22 "Now you can type in http://server1.example.com/webmail or http://192.168.0.100/webmail in your browser to access SquirrelMail." When I did that nothing came up in Chrome, but when I did a "view source" all the php code was there.
     
  11. falko

    falko Super Moderator Howtoforge Staff

    Does the PHP code start with the long (<?php) or the short PHP (<?) open tag? If it's the short one, you must configure PHP to accept the short one (in your php.ini).
     
  12. peterpallesen

    peterpallesen New Member

    I'm not sure what Squirrelmail does but my test script was the short form. As you suggested I tried changing it to the long form but it made no difference.

    I think php.ini defaults to allowing the short version anyway.
     
  13. falko

    falko Super Moderator Howtoforge Staff

    Can you check in your Apache configuration if PHP is enabled?
     
  14. peterpallesen

    peterpallesen New Member

    The standard /etc/httpd/conf.d/php.conf file is there. Presumably php is enabled, as it is normally when you install Centos as a standard LAMP server.

    I followed the howto and don't know if something in the howto would have disabled php, I can't imagine how though.

    Could it have something to do with suexec?
     
    Last edited: Jul 29, 2011
  15. peterpallesen

    peterpallesen New Member

    Yep, the problem was /etc/httpd/conf.d/suphp.conf. Needed to comment everything except the LoadModule line as per the howto, then it was ok.
     

Share This Page