The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Setup / Install instructions for cPanel on FreeBSD

Discussion in 'General Discussion' started by hicom, Jul 23, 2003.

  1. hicom

    hicom Well-Known Member

    Joined:
    May 23, 2003
    Messages:
    272
    Likes Received:
    0
    Trophy Points:
    16
    I've last revised install instructions on January 22nd, 2006:

    Since I couldn't find detailed information about setup of cPanel on FreeBSD, I thought to share my experience. This is a step-by-step for newbies, please feel free to add or comment onto it

    Notice: I shall not be held responsible for any information provided here, and I recommend an experienced administrator to manage your server. These steps should not be processed on current production systems.

    These instructions are based on FreeBSD 4.x/5.x & cPanel 9.x

    All command line executions starts with ">>"

    The following is needed to properly installed FreeBSD: perl 5.8.x (need to upgrade the perl that comes with FreeBSD 4.x before proceeding)

    Partition FreeBSD steps:
    =================

    Partitioning is very important to be done properly. You need to take into account your current capabilities and your expectations in the future. So evaluate your needs carefully. As well, FreeBSD partition sizes different from Linux.

    This is how much you'll be USING after the installation of FreeBSD, cPanel and source / ports:

    SWAP (double your memory size)MB
    / 50MB
    /tmp 256MB
    /var 48MB
    /usr 1,927MB

    This is my recommended minimal parition size assuming you have 40GB+ hard drive:

    SWAP (double your memory size)MB
    / 256MB - 512MB (root , boot)
    /tmp 512MB-1024MB (store temp files sometimes large)
    /var 5,000MB+ (location for your mySQL db, logs)
    /usr 10,000MB+ (your local files, system files, cPanel files, fantastico..etc)
    /home (rest of hard drive)

    1)
    To perform the following steps, you need to have installed the source code for your Kernel and the FreeBSD ports. If you've not done that during the installation, or if the source code still was not installed, you need to enter the setup console and install it as the following:

    You can check if you have the source by going to:

    >> cd /usr/src/sys/i386
    If you are able to change to the above directory, then sources are installed

    Logged in as root type:

    >>/stand/sysinstall

    choose "Configure"
    choose "Distributions"
    hit the space bar on "src"
    this will take you to the src screen then hit the space bar on "all"
    hit the space bar on "exit"
    hit the space bar on "ports"
    Press the tab key until you highlight "Ok" and hit Enter.
    Exit out of the SysInstall




    2)

    You need to enable quotas on the system and re-compile the kernel (be very careful with these steps):

    Your default kernel is located at (this is for 32-bit machines only):

    /usr/src/sys/i386/conf

    If you are using 64-bit OS and installed 5.4 amd64 version, your kernel is:
    /usr/src/sys/amd64/conf

    go to that path and run the following:

    >>cp GENERIC MYKERNEL
    >>edit MYKERNEL

    add the following lines to your MYKERNEL file

    # To enable quotas on the system
    options QUOTA

    Hit ESC then (a) to exit and save.

    To compile the Kernel type the following:

    >>/usr/sbin/config MYKERNEL

    it will do some work then put you back to the prompt type:

    >>cd ../compile/MYKERNEL
    (This is on FreeBSD 5.x, for FreeBSD 4.x use "cd ../../compile/MYKERNEL")

    >>make depend

    Will take a minute or so

    >>make

    Will take another minute

    >>make install

    This should finish with no errors, if there are errors, go and check your MYKERNEL file for anything added or deleted improperly. It could also lead to a hardware conflict if kernel doesn't compile properly.

    Now we need to edit /etc/rc.conf:

    >>edit /etc/rc.conf

    add the following line to the end of the file:

    enable_quotas="YES"


    To disable checking quotas at startup (recommended):

    check_quotas="NO"


    We need to set the quotas on the partition for /home (if you've created one or /usr if you didn't create a partition for it):

    >>edit /etc/fstab

    And add the following to your /usr or /home partition (which ever you're using), under the OPTIONS column add:

    rw, userquota,groupquota

    Press ESC to exit and (a) to save

    Then reboot the system. If all works fine, you should be able to type:

    >>quota -v
    and it will display current quotas.




    3)

    Final step is to install the cPanel. If you've not created /home partition, then create a folder inside the /usr partition by:

    >>cd /usr
    >>mkdir /home
    >>cd home

    Installation of cPanel:

    >>fetch http://layer1.cpanel.net/latest

    It will take few minutes to download depending on your connection speed.

    >>sh latest

    The process of installing cPanel will take about 30 minutes or more depending on your processor and connection speed.



    5)

    Setup cPanel, after the installation is complete reboot the machine and try to access it from the web using the public IP address you've been provided

    http://<your.IP.address.here>:2086/


    Your login is: root
    Your password is the same as the root password for your local system.



    6)

    After you setup the server and Apache is configured properly, you'll need to install FrontPage extensions (for some reason this wasn't installed for me with cPanel. I didn't submit a bug about it though....can anyone confirm?).

    Go to the ports collection

    >>cd /usr/ports/www
    >>cd frontpage
    >>make install

    Reboot the system once installation is done.


    7) It seems that BIND on some FreeBSD systems comes not configured properly. So this is what need to do to enable BIND:

    >>edit /etc/namedb/named.conf

    look for the line:
    Change these to:
    Exit and save the file, then restart BIND from within WHM.

    I hope these information are of good value, from my demo testing, this is what you need to setup FreeBSD properly with no need for additional configurations. If something else needed, please share it with the rest of us.
     
    #1 hicom, Jul 23, 2003
    Last edited: Jan 22, 2006
  2. inteltechs

    inteltechs Active Member

    Joined:
    Mar 2, 2003
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    it's freebsd 5.1

    wonder if anyone knows how to fix it.

    ==> Checking to see if you have the latest version.....Compare: Cpanel-7.2.1-RELEASE_125-FreeBSD-i386-libc.tar.gz != Cpanel--FreeBSD-i386-libc
    Nope! You have
    ==> Fetching the main installation program; please be patient...
    Receiving /usr/local/cpanel/cptmp/cp3installer.61 (10121943 bytes): 100%
    10121943 bytes transferred in 9.5 seconds (1.01 MBps)
    done.
    ==> Checking hostname.....done.
    ==> Requesting License File..../usr/local/cpanel/cpkeyclt: not found
    done.
    ==> Cleaning up temporary files...
    done.
    ==> Running installer...
    No matching processes were found
    /usr/local/cpanel/cptmp/cp3installer.61063: 1: Syntax error: word unexpected (expecting ")")
    ==> Cleaning up installer...done.
    Scanning suexec_log...Done

    cPanel.net Support Ticket Number:
     
  3. jw

    jw Member

    Joined:
    Aug 16, 2001
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Does that on all FreeBSD versions. I filled out a ticket 2 days ago, but they haven't done anything.

    cPanel.net Support Ticket Number:
     
  4. inteltechs

    inteltechs Active Member

    Joined:
    Mar 2, 2003
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    finally, thanks cpanel.

    WHM 7.4.0 cPanel 7.4.0-R4
    FreeBSD 5.1-RELEASE - WHM X v2.1

    it's working beautifully on my FreeBSD 5.1 :)

    cPanel.net Support Ticket Number:
     
  5. psimon

    psimon Registered

    Joined:
    Aug 4, 2003
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Athens
    Installation Error FreeBSD 4.7 - latest

    We 've repeatedly tried to setup the 'latest' distribution above FreeBSD 4.7 installed according to the instructions on this thread.Unfortunately we had no success.Please check the installation log attached.

    We will appreciate any help very much.

    cPanel.net Support Ticket Number:
     

    Attached Files:

  6. Wolvie

    Wolvie Active Member

    Joined:
    Aug 30, 2003
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Why do i need a reboot???!!!

    cPanel.net Support Ticket Number:
     
  7. JamesSmith

    JamesSmith Well-Known Member

    Joined:
    Sep 17, 2003
    Messages:
    185
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    UK, Luton
    Hi.

    Just to add something about the kernel recompile.

    You said:

    cd ../compile/MYKERNEL


    But it should be:

    cd ../../compile/MYKERNEL

    cPanel.net Support Ticket Number:
     
  8. hicom

    hicom Well-Known Member

    Joined:
    May 23, 2003
    Messages:
    272
    Likes Received:
    0
    Trophy Points:
    16
    You're right,
     
    #8 hicom, Sep 19, 2003
    Last edited: Aug 22, 2005
  9. JamesSmith

    JamesSmith Well-Known Member

    Joined:
    Sep 17, 2003
    Messages:
    185
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    UK, Luton
    I tried your way on a 4.8 install im setting up right now, it says no such directory.

    So I did it the usual way and it works.

    cPanel.net Support Ticket Number:
     
  10. X-Istencedotcom

    X-Istencedotcom Well-Known Member

    Joined:
    Apr 14, 2003
    Messages:
    223
    Likes Received:
    0
    Trophy Points:
    16
    just a note, its not /home, but /usr/home that you want.

    This is because in a normal install all that /home is is a symlink to /usr/home.

    cPanel.net Support Ticket Number:
     
  11. X-Istencedotcom

    X-Istencedotcom Well-Known Member

    Joined:
    Apr 14, 2003
    Messages:
    223
    Likes Received:
    0
    Trophy Points:
    16
    New way of compiling for FreeBSD 4.8 and FreeBSD 5.1 and up.

    Note, the old way is supported, but deprecated.

    cd /usr/src/sys/i386/conf/
    cat GENERIC > HOSTNAME
    edit HOSTNAME
    cd /usr/src
    make buildkernel KERNCONF=HOSTNAME
    make installkernel KERNCONF=HOSTNAME

    Another thing, instead of installing the src from sysinstall, use cvsup instead. read up on http://www.bsdguides.org/guides/freebsd/misc/update_ports_tree.php

    But add to the end of your supfile, src-all so it will download the entire source as this is needed :).

    cPanel.net Support Ticket Number:
     
  12. eperdeme

    eperdeme Well-Known Member

    Joined:
    Oct 15, 2003
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Manchester, UK
    cPanel Access Level:
    DataCenter Provider
    5.1-10

    Does cpanel still work "flawlessly" on FreeBSD5.1-10 (btw anybody not -10 go patch openssh) :)
     
  13. bjarne

    bjarne Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    135
    Likes Received:
    0
    Trophy Points:
    16
    Somethings

    Thanks for the tips - they realy was helpful

    I did a 4.8 install and it looks preatty good.

    A couple of things:

    1. Expect is not getting installed, and you need this one to copy accounts from a difrent server.

    2. A symlink from linux path to bsd path of Mysql is needed to be made for all mysql stuff to be added propper. Also Horde will break because of this - I think.
    (as WHM for FreeBSD is from Linux there typical are som linux paths that breaks the system if diferent on FreeBSD.)

    Also accoring to cpanel support wwget latest is for Linux only, so download the isntaller and run it from the server.

    BTW There are no working Mailscanner install for FreeBSD so don't try the autinstaller from layer one, it will mess up Exim.
     
    #13 bjarne, Nov 7, 2003
    Last edited: Dec 1, 2003
  14. eperdeme

    eperdeme Well-Known Member

    Joined:
    Oct 15, 2003
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Manchester, UK
    cPanel Access Level:
    DataCenter Provider
    works!

    Ah cool well Cpanel latest -Stable works pritty good on FreeBSD 5.1-10, few problems but they can be fixed with /scripts, pritty obviouse tho its ported linux version. Some of the scripts that come with it do chmod user:group _R whilst on FBSD it needs to be chmod -R user:group etc. ProFTPD also sometimes like to kill itself and send me lovely emails etc, but apart from minor problems it works and for £1,000 I would expect it to.
     
  15. GlobalPN

    GlobalPN Member

    Joined:
    Apr 6, 2003
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    Is there anyway to reinstall CPanel/WHM without losing the customers information?
     
  16. denisdekat09

    denisdekat09 Well-Known Member

    Joined:
    Mar 2, 2002
    Messages:
    265
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    San Francisco
    Great post, I am now going to switching from RedHat over to freeBSD going forth, as it was what I use to do anyways. I am curious if anyone ran into this. I noticed the redhat versions of WHM and Cpanel are more recent/advanced, should I expect freeBSD to be generally behind in features? Does it take long? Also, I noticed that moving sites from my redhat servers to freeBSD were all failing in checksum :( I have been able to do the old backup tarball trick to recreate the account and it seems to work so far. Does any one have any thoughts or comments on this? So far all else seems just as good and better wityh freeBSD :)
     
  17. eperdeme

    eperdeme Well-Known Member

    Joined:
    Oct 15, 2003
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Manchester, UK
    cPanel Access Level:
    DataCenter Provider
    No no no no, yes no....Ok the FreeBSD version of Cpanel is like the Linux version but alot less poorly coded(ported) to work on FreBSD. I do not have any "problems" that are fatal to running the web services, but our last major update was months ago, Aug 30, whilst the Linux has had updates/fixed every week or so. There's a few bugs in the FreeBSD port of cpanel/whm and it likes to try and use Linux style system layout to store files(/var for apps /etc for logs). I'm gona hope now RedHats gona funky and pay to use the dev's are gona conentrate on the FreeBSD port, but we can only hope. So to sum up, it does work but not as good, as cleanly as Linux.
     
  18. denisdekat09

    denisdekat09 Well-Known Member

    Joined:
    Mar 2, 2002
    Messages:
    265
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    San Francisco
    Well I can only hope Cpanel gets more into freeBSD as a result of this. Or Debian (but that did not look complete either). I have zero faith in Fedora, and why develop for something so new, when freeBSD is so proven....

    Anyways...
     
  19. wyatt12

    wyatt12 Member

    Joined:
    Mar 19, 2002
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    few comments

    Hi,

    I used your step by step tutorial tonight to install on FreeBSD 4.9 ... and it all went pretty well... here are my notes...

    Before your Step #3::::

    I would suggest installing cvsup-without-gui
    and update the ports collection. Documentation is here:
    http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports-using.html (CVSup Method)

    Also, rsync is also not installed upon first load of FreeBSD. So you have to install from ports collection.

    cd /usr/ports/net/rsync
    make install



    During Installation of Cpanel:::

    Cpanel installation hangs on frontpage installation. It hangs looking for a file... looks like it hangs because it has asssumed fp has already been installed, even though it hasn't.



    After Cpanel Installation::::


    I installed FP after cpanel installation was done using:

    cd /usr/ports/www/frontpage
    make install


    Everything seems to have installed and looks like its working.


    Regards,


    Wyatt
     
  20. sloop

    sloop Well-Known Member
    PartnerNOC

    Joined:
    May 4, 2003
    Messages:
    68
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    north carolina
    For step #3, I had a problem with the wget port being unable to find the correct diff file..

    After running CVS to update the ports collection, go to /usr/ports/www/links and do a make install clean. then go to /usr/ports/distfiles and run

    /usr/local/bin/links http://neva.vlink.ru/ftp/ftp/

    then download the wget diff file and then try to install the wget port.
     
Loading...

Share This Page