#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2001
    Posts
    14
    Rep Power
    0

    FreeBSD server setup without X, right?


    Hi,

    If one is learning FreeBSD to be able to setup and run web, database and other types of servers on the internet, should (and can) one do so *without* installing and using XFree86/X-windows?

    ??????????????????????????????????????????????????????
    Are there any problems one is likely to run into doing (and learning) *everything* via the command line -- no GUI or KDE/GNOME desktop to help in the early newbie stages?
    ??????????????????????????????????????????????????????

    Is the same true for one learning programming in the unix environment -- using GNU type tools? I'm new to unix.

    What are the best resources for a newbie in learning FreeBSD with an eye towards server administration?

    Thanks a bunch,

    Louis
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2001
    Posts
    14
    Rep Power
    0

    Hi, what I need to know is can you set up servers OK without GUI?


    Hi,

    I understand that a serious server won't have a GUI.

    What I'm wondering is, can one set up a FreeBSD server with whatever servers are desired installed correctly and securely -- web (i.e. Apache or AOLserver), database (i.e. PostgreSQL), mail (i.e. Sendmail or Qmail), DNS or whatever -- COMPLETELY via comand line without using X windows (i.e XFree86) at all?

    I'm interested in FreeBSD primarily as a public internet server OS; but also as a desktop for software development -- separate boxes, of course!
  4. #3
  5. No Profile Picture
    Gödelian monster
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jul 1999
    Location
    Central Florida, USA
    Posts
    2,307
    Rep Power
    62
    In fact, your question is a reverse of the actuality. You can't properly set up FreeBSD without using the comand line. You will have to spend a little more time learning BSD than your standard Linux, but it will be worth it.

    FreeBSD has what is probably the best command-line installer and configuration program you will ever see. It is essentially a GUI, but without the need for X-window display, since it runs in character mode on a regular terminal, or telnet/ssh session.

    When you install FreeBSD normally, you are never prompted to go into X mode. It stays in the command-line interface the whole way. Whenever you want to do post-install configuration of FreeBSD, just run /stand/sysinstall, and you have all the choices laid out for you again, in simple, direct menu style.

    But, if you are hoping that FreeBSD will hold your hand all the way through installation, without doing any reading and preparation, you will be disappointed. You will have to learn a about the system startup scripts, editing configuration files, etc... and how to properly run DNS. The user 'freebsd' in these forums is a guru in that area. Just search past posts by freebsd, and you will see.

    BTW, don't just use Google, use www.google.com/bsd -- yes, Google has a BSD-specific search engine, as well as www.google.com/linux
    The real n-tier system:

    FreeBSD -> PostgreSQL -> [any_language] -> Apache -> Mozilla/XUL

    Amazon wishlist -- rycamor (at) gmail.com
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2001
    Posts
    14
    Rep Power
    0
    Hi rycamor (and others),

    Thank you for sharing. I have no fear of the command line. I've installed FreeBSD 4.5 RELEASE from CD a couple of times already -- but without X since my current video card isn't supported by the 3.3.6 version of XFree86 that FreeBSD comes with.

    I want to learn how to install, configure, run and maintain various types of servers and services over the public internet on a FreeBSD box. Everything from Apache, AOLserver, PostgreSQL, mail, DNS, firewall boxes, intrusion detection systems -- lots of stuff.

    What I'm wondering is -- after installation (and after doing the 50-100 post install steps freebsd states one needs to do to one's system right after installation) -- can one install, configure and set up COMPLETELY, CORRECTLY AND SECURELY whatever web servers and services one wants to run on a server without ever having installed X?

    I've read that one shouldn't have X running on a server box due to security reasons alone; that possible holes in X may allow a cracker to gain root.

    So I'm wondering...do those who set up securely configured servers to put on the internet -- be they web, database, mail or whatever kind of servers -- NEVER install or use Xwindows (i.e. XFree86) and just do EVERYTHING form the command line; i.e. everything from initial install to plugging in the production ready server to the internet. Does does one HAVE TO install X, use it, then either disable it or delete it before putting the box online? Or is X windows NOT AT ALL necessary to one who sets up and administers public FreeBSD servers?

    If one CAN do everything involved in server setup, configuration and maintenence without installing or using X, SHOULD one never install X; is one missing out on some productivity gained from doing software installation, setup, configuration and maintenence using XFree86's X windows -- and then either deleting or disabling XFree86 before putting the box on the public internet?

    Thank you one and all for sharing. I'm a newbie to *nix; but have been doing mainframe development for 13 years and am NOT afraid to learn. Heck, I've spent my last two weekends doing just that -- all weekend. This coming weekend will be the same.


    Thanks again,

    Louis
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2001
    Posts
    310
    Rep Power
    13
    What I'm wondering is, can one set up a FreeBSD server with whatever servers are desired installed correctly and securely -- web (i.e. Apache or AOLserver), database (i.e. PostgreSQL), mail (i.e. Sendmail or Qmail), DNS or whatever -- COMPLETELY via comand line without using X windows (i.e XFree86) at all?

    Yes, that's why FreeBSD normal don't install X by default.. You don't need X at all!! X is only for desktop user who want to have the GUI such as movie and others.. Without X installed, it's more secure because X does cause some security issue and the worst system resource hog.
  10. #6
  11. No Profile Picture
    Gödelian monster
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jul 1999
    Location
    Central Florida, USA
    Posts
    2,307
    Rep Power
    62
    Let me reiterate: in general, the reverse of your question is true: if one relies on graphical widgets, and graphical installers to install server-software on FreeBSD (and I don't even know if this is possible with FreeBSD), it is almost certain that the software will NOT be installed "COMPLETELY, CORRECTLY AND SECURELY".

    The question betrays that you somehow think you might be missing something if you don't have X. Let me state it again: X is not necessary to install any and all server-related software securely and properly. For anyone who actually takes the time to learn how FreeBSD works, X will do more to slow you down than speed you up. There. Feel better?

    Now, in the world of commercial Linux (RedHat), and proprietary Unixes, such as Solaris, they tend to push you toward having X run by default even for servers. This is so they can give you their neat little "value-added" widgets, which are supposed to make it easier to get up and running, and configure your box. One of the reasons they feel the need for this is because many of them have bastardized the logical organization of a true Unix. Thus, since things might not be where you expect them, the widget saves the day. Not so with the BSD's, which are created from the ground up with the concept of a simple, logical organization of applications and libraries, and with the concept that the user should be in complete control of the machine. Yes, perhaps with some of the above-mentioned versions, you can get started a little sooner, but when you start trying to customize the box for your needs, you will get frustrated very fast.

    The only things X can do for you are graphical things. Sometimes those graphical things can be useful, but they are more appropriate for a workstation than a server. X can enhance your command-line usage, by letting you have multiple terminals open, etc... but it is certainly not necessary. Much of the time, I administrate my FreeBSD boxes from a Win2000 workstation, using the SSH terminal emulator from www.ssh.com. This lets me have as many command-line windows as I want open, without affecting server performance hardly at all. Other times, I run from a FreeBSD or Linux workstation, again with multiple terminal windows open, connecting to the server.

    Now, here are the only two special cases I can think of:

    1. You find that you must have a graphical text editor, such as Kwrite , and it is a pain to constanctly edit your scripts on the workstation and then transfer them to the server. Then, you might want to install a very minimal X window client, where you never actually run X from the server, but you connect to it over the network, using your workstation to actually display the desktop (usually, NFS is the better answer to this). This is only useful on a local, fast network, or your screen updates will lag. If you are behind a firewall, and/or forwarding through SSH, then the security risk is not too bad.

    2. If you install Apache and PHP, and you want to do server-side graphics creation with the GD image library, and using Freetype (true-type font library for Unix), this requires that certain X libraries be installed. In this case, you can just install the 'base' X library, along with libjpeg, and libpng, without ever having to actually run X, or make it work with your video card.)

    Happy BSD'ing.
    The real n-tier system:

    FreeBSD -> PostgreSQL -> [any_language] -> Apache -> Mozilla/XUL

    Amazon wishlist -- rycamor (at) gmail.com
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2001
    Posts
    310
    Rep Power
    13
    Originally posted by rycamor

    The only things X can do for you are graphical things. Sometimes those graphical things can be useful, but they are more appropriate for a workstation than a server. X can enhance your command-line usage, by letting you have multiple terminals open, etc... but it is certainly not necessary. Much of the time, I administrate my FreeBSD boxes from a Win2000 workstation, using the SSH terminal emulator from www.ssh.com. This lets me have as many command-line windows as I want open, without affecting server performance hardly at all. Other times, I run from a FreeBSD or Linux workstation, again with multiple terminal windows open, connecting to the server.
    You still can do multi-terminal in command-line too by use tty, but you are right about it is certainly not necessary...
  14. #8
  15. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,616
    Rep Power
    4247

    I've had to install X on FreeBSD in only one case....


    Just happened that a package we had to install (this was around 1.5 years ago) happened to have a GUI installer written in Java, if I recall correctly. There didn't appear to be an installer that worked in text mode, so we installed X and then installed the product. Oddly enough, the product itself didn't need X to run, after it was installed and configured -- go figure!
  16. #9
  17. funky munky
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jul 2001
    Location
    UK
    Posts
    1,446
    Rep Power
    16
    I don't think you should install X if you want to learn about programming, installing a secure web connected server environment and in general just want to learn about UNIX on a good OS like FreeBSD. However if you want to design web sites that are heavy on graphics (or indeed which are designed to look good in browsers that support graphics) and you only have one machine and you're intent on running a UNIX machine then you might want to consider installing X windows.

    From what you've said however it sounds as though you're familiar with the command line and aren't worried about doing a bit of reading and as such I'd highly recommend running one FreeBSD machine and one Windows machine. Configure the BSD machine as a router and make sure you always connect to the net via this machine. Whenever you want to design webpages, browse the net in graphics, play games, etc etc, use the windows machine to connect via the BSD machine.

    At the end of the day you never need to turn the monitor on on the FreeBSD machine at all and just connect to it from the windows machine via ssh (this is what I prefer unless I need to make changes which require me to be on the actual bsd machine). Personally I find X very annoying due to the lack of standards - ironically the OSS standards seem to have had an adverse effect in the case of X whereby the lack of a single standard leads to too many different windows managers, each ok in their own right, but none-the-less over bloated (even in comparison to windows). Only a personal opinion though and no disrespect to those who work on the X windows systems.

    I found that I learnt a lot more about UNIX/BSD from working solely from the command-line - you certainly DON'T need X to learn, I think it's a better thing if you can learn to do everything you need to do from the command line. With this I'd say learning languages like sh (shell scripting) and perl in a generic editor like vi is a good way to learn nix sysadmin stuff - knowing how to use vi helps because you're almost guaranteed to have vi available on any NIX system you ever work on. Also learning how to read man pages is a skill in itself I think! It seems to be the case that since I've had only freebsd in console mode, I've become much more accustomed to finding info out from manpages quicly and efficiently.

    Another tip is install the BSD Fortune prog! lol But seriously there are a lot of good tips in the freebsd-tips fortune file!

    The shell you use is important as well - find one you like and then read the man page for it as best you can, perhaps trying to create shell scripts for the tasks you find yourself performing often (ie listing users that match a certain string and printing out the last x commands they executed was something I knocked up quickly and easily in vi using perl).
  18. #10
  19. Wiking
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Sep 2000
    Location
    Sweden
    Posts
    3,608
    Rep Power
    26
    As much as I agree with the posts here, don't forget that X is not intended to be solely used as a local graphical desktop... http://www.x.org/about_x.htm

    //NoXcuz
    UN*X is sexy!
    who | grep -i blonde | date; cd ~; unzip; touch; strip; finger; mount; gasp; yes; uptime; umount; sleep
  20. #11
  21. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2002
    Posts
    409
    Rep Power
    13
    I install X, but I turn it on when I need it. Which is usually to do
    some http downloads.

    But 95% of the time I use the command line, and keep X off.
  22. #12
  23. No Profile Picture
    OpenBSD dude
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2002
    Posts
    5
    Rep Power
    0
    Originally posted by Ted Striker
    I install X, but I turn it on when I need it. Which is usually to do
    some http downloads.

    But 95% of the time I use the command line, and keep X off.
    This is what I was gonna say...lol I agree. Install it on your box. You may want it or even need it at one time or another. Unless of course you are using very small disk....but I kinda doubt thats a problem with the cost of drives today.
    But of course you can FULLY administer your BSD box with the command line. Thats the way it should be done (opinion there). Thats why OpenSSH is so cool!!!!!!!!

IMN logo majestic logo threadwatch logo seochat tools logo