Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Alternative Operating Systems > Need some help getting a Linux box up and running

Need some help getting a Linux box up and running
Thread Tools
Fresh-Faced Recruit
Join Date: Mar 2006
Status: Offline
Reply With Quote
Dec 10, 2008, 03:59 AM
 
I'm somewhat familiar with Linux. I have to set up a headless RedHat box at work and I could use some help with a couple of things. I'm using RedHat Enterprise 4.

• Is there an easy way to create a new user account on the CLI? If I need to set up a new account for somebody I'd like to able to do so through an simple ssh session to the headless Linux box.

• Is there a package to run a VNC server (not MS RD or NX!) so we can log on to this headless machine? Of course we can already do so through ssh and I know about X forwarding, but if we are interested in an entire X session VNC would be nicer. And we already have VNC clients on our Macs and Win machines.

• I had a second internal drive built in to do backups of the user homes. Periodically I want to copy over the user homes to designated folders on the second drive. I guess rsync would be the fastest and easiest way to do this. I have root access so I'd like to know the proper sudo rsync command to back stuff up (let's say ~someGuy/ to /dev/sdb1/backups/someGuy) while preserving permissions, attributes, dates, etc. I'd also like to know the proper sudo rsync command if I need to restore a user account from the backup (i.e. get all the stuff from //dev/sdb1/backups/someGuy and copy it back to ~someGuy).

I'd appreciate any help you guys can give me with this.
     
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Dec 10, 2008, 07:51 AM
 
1) adduser or useradd, can't remember which, then passwd to set the password for that user
2) tightvnc
3) rsync -av /source /destination. I'd put this in a cronjob so that you don't have to do this manually. If you do, take out the v so that it doesn't spew out output, and set yourself up to receive mail from the cronjobs so that you will be alerted when there is some sort of failure (although there are obviously fewer things that can go wrong with a directory to directory backup). You can also use a script that makes use of cpio if you want Time Machine-like backup snapshots.
     
Yawn  (op)
Fresh-Faced Recruit
Join Date: Mar 2006
Status: Offline
Reply With Quote
Dec 10, 2008, 09:41 AM
 
Thanks for your help.

Originally Posted by besson3c View Post
1) adduser or useradd, can't remember which, then passwd to set the password for that user
Actually both work like a charm. Thanks.

2) tightvnc
Is there a GUI front-end like fink for the Mac? RH seems to offer some kind of add/remove package thing but it's stupid. You can't search for packages. And you have to select an app group just to be able to see which apps are in that group. If there were something like fink I could have searched for the tightvnc package.

I googled it and found an rpm for download. Unfortunately that won't install because it claims there are two dependencies missing. Again, since I don't have something like fink I can't find out how to install those dependencies. I tried system-install-packages libc.so.6 (that was one of the missing things) but it didn't work.

Anyway, I also noticed that RH contains a built-in VNC server. I configured it and it worked. Unfortunately only while the user was logged in. I then logged in as root and configured the VNC server there hoping that would let me access VNC all the time. But no dice. Is there any way to configure this built-in VNC server so it's always running even wne not a single user is logged in? The VNC server built into OS X also lets me do that and it's really convenient so I can then log in to different accounts remotely.

3) rsync -av /source /destination. I'd put this in a cronjob so that you don't have to do this manually. If you do, take out the v so that it doesn't spew out output, and set yourself up to receive mail from the cronjobs so that you will be alerted when there is some sort of failure (although there are obviously fewer things that can go wrong with a directory to directory backup). You can also use a script that makes use of cpio if you want Time Machine-like backup snapshots.
No a regular backup that doesn't blindly copy unchanged files is fine. If I want some "version control" I guess I could still chose unique destination folders like
sudo rsync ~someGuy /dev/sdb1/backups/someGuy/20081210-8AM

If I need to set up a user account from scratch would it be sufficient to recreate the someGuy account and then do a
rsyc -av /dev/sdb1/backups/someGuy ~someGuy
     
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status: Offline
Reply With Quote
Dec 10, 2008, 03:00 PM
 
Don't you mean FinkCommander?

Fink doesn't have a GUI. It's like RPM. It sounds like you're looking for a graphical frontend to RPM and I don't know of any others than the one included with Redhat.
     
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Dec 10, 2008, 03:55 PM
 
Originally Posted by Yawn View Post
Is there a GUI front-end like fink for the Mac? RH seems to offer some kind of add/remove package thing but it's stupid. You can't search for packages. And you have to select an app group just to be able to see which apps are in that group. If there were something like fink I could have searched for the tightvnc package.

I googled it and found an rpm for download. Unfortunately that won't install because it claims there are two dependencies missing. Again, since I don't have something like fink I can't find out how to install those dependencies. I tried system-install-packages libc.so.6 (that was one of the missing things) but it didn't work.

Anyway, I also noticed that RH contains a built-in VNC server. I configured it and it worked. Unfortunately only while the user was logged in. I then logged in as root and configured the VNC server there hoping that would let me access VNC all the time. But no dice. Is there any way to configure this built-in VNC server so it's always running even wne not a single user is logged in? The VNC server built into OS X also lets me do that and it's really convenient so I can then log in to different accounts remotely.
FIrst of all, I would suggest not being dependent on Red Hat's GUIs, as the CLI environment will generally get you more mileage in Linux in general. I never run a GUI on any of my servers.

In RHEL 5 you can do a "yum search <package name>" to search for the package you are interested in. In RHEL 4 you can do a "up2date --showall | grep <package name>". There may be another way to do this, but this is what I've always done.

What I would do to keep your VNC server always running is to run it as root and fork it into the background, something like:

Code:
sudo vncserver &
No a regular backup that doesn't blindly copy unchanged files is fine. If I want some "version control" I guess I could still chose unique destination folders like
sudo rsync ~someGuy /dev/sdb1/backups/someGuy/20081210-8AM

If I need to set up a user account from scratch would it be sufficient to recreate the someGuy account and then do a
rsyc -av /dev/sdb1/backups/someGuy ~someGuy
Yes. rsync -a creates a carbon copy of the original... rsync -a --delete will delete files from the destination that do not exist in the source directory if you need an exact carbon copy.
     
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Dec 10, 2008, 03:59 PM
 
Originally Posted by Simon View Post
Don't you mean FinkCommander?

Fink doesn't have a GUI. It's like RPM. It sounds like you're looking for a graphical frontend to RPM and I don't know of any others than the one included with Redhat.

And the reason that you don't find GUIs for everything in Linux is that it is not designed to be OS X Server or Windows. Seriously, if you want to use Linux your time is better spent learning the CLI tools rather than trying to find a GUI you can rely upon. Fortunately there is a lot of consistency and logic to the way the command line tools are designed, once you get the hang of them.

While that may sound archaic, there are many virtues to a rich command line environment that would make a seasoned Linux admin far more productive and efficient than somebody given the most elegantly designed set of GUIs in the world.
     
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status: Offline
Reply With Quote
Dec 11, 2008, 01:35 AM
 
You're preaching to the choir, besson3c.

Personally I finds I'm a lot faster with the CLI tools than with the GUI tools. That said, there's nothing wrong with trying to find good GUI tools under Linux. It's just that there aren't many. And I have to agree with the OP that Redhat's built-in package manager GUI stinks. They would have rather not included one at all than that piece of junk.

And if I understand the OP correctly he's not really interested in a GUI for installing packages but rather in some kind of a listing of packages with a context search. If you don't know what a package is called you might find such a database convenient.
     
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Dec 11, 2008, 07:27 AM
 
Originally Posted by Simon View Post
You're preaching to the choir, besson3c.

Personally I finds I'm a lot faster with the CLI tools than with the GUI tools. That said, there's nothing wrong with trying to find good GUI tools under Linux. It's just that there aren't many. And I have to agree with the OP that Redhat's built-in package manager GUI stinks. They would have rather not included one at all than that piece of junk.

And if I understand the OP correctly he's not really interested in a GUI for installing packages but rather in some kind of a listing of packages with a context search. If you don't know what a package is called you might find such a database convenient.
Yeah, but how is using a GUI any more convenient than doing a yum search <search term> to search through the same data set just as a GUI would?
     
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status: Offline
Reply With Quote
Dec 11, 2008, 07:36 AM
 
As I said, I agree with that. I find searching in a shell no problem.
     
Yawn  (op)
Fresh-Faced Recruit
Join Date: Mar 2006
Status: Offline
Reply With Quote
Dec 11, 2008, 10:45 AM
 
sudo vncserver & seemed like a nice idea until I noticed that as soon as the user logs out (doesn't matter if it's root or any other user) the vncserver is stopped. That sucks. I need a vncserver that's always on even when all that's running on the RedHat box is the login screen.

This machine is going to be headless. I need to be able to reboot it and log in through vnc remotely w/o any user ever logging in through the local GUI. On OS X this is easy. On Windows this is easy. There must be an easy way on Linux.
     
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Dec 11, 2008, 10:48 AM
 
Found this Googling for "redhat run vnc server":

http://www.redhat.com/magazine/006apr05/features/vnc/


Check out the "Setting up a persistent desktop" section.
     
Yawn  (op)
Fresh-Faced Recruit
Join Date: Mar 2006
Status: Offline
Reply With Quote
Dec 16, 2008, 02:59 AM
 
I think this RedHat Enterprise 4 is just too old. But unfortunately we can't go to 5 for other reasons.

Anyway, persistent VNC serving doesn't work because my RedHat install doesn't know any of the mentioned commands
chkconfig vncserver on
service vncserver start
My RedHat doesn't have a chkconfig or service command.
(Last edited by Yawn; Dec 16, 2008 at 03:06 AM. )
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:34 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2