Tip Title Tip Text
Stop/Start services from shell

To stop or start services from the shell, login as root from the linux computer or use the su - command and provide the root password if you are using a telnet session. Remember when you type commands in a shell you have to hit the Enter/Return key on your keyboard.

Type: cd /etc/rc.d/init.d to change directories to the services directory.

To see a list of command line options for the service you wish to manage.
Type: ./svcd where svcd is the name of the service.

For example to get a list of service management options for the Apache web server (httpd).
Type: ./httpd
On my version of Apache I saw:
Usage: httpd {start|stop|restart|condrestart|reload|status|fullstatus|graceful|help|configtest}

Managing Linux Daemons: Setting Startup Daemons

Login as root

type ntsysv

You will see a list of server daemons (programs that run when the computer starts). Items with a [*] to their left are designated to start when the linux system boots.

Login as root To login as root you can either type the root username and password at the console of the linux computer, or you can login as yourself under telnet, Type su -  and provide the root user's password when prompted. SU spawns a new shell so when your done doing Super User tasks, be sure to type exit, or logoff to end your shell account. Notice that you will return back to your own shell login and can continue your terminal session from there.
Check if a given package is installed

From a shell window.

Type: rpm -qa | grep pkgname where svcname is the package name you're searching for. For example to see if the web server daemon (httpd) is installed type: rpm -qa | grep httpd. My system showed the following packages are installed:

[root@linux init.d]# rpm -qa | grep httpd
httpd-2.0.40-8
httpd-manual-2.0.40-8
redhat-config-httpd-1.0.1-13

Get help on using a shell command The linux MAN pages were designed to offer a text based help file for all linux/unix commands. It's a great starting point to learn various commands and their values. To view the manual page for a given command type: man commandname this will bring up the manual page. The page up and page down key will navigate you through the manual page. Type: q at any time to quit the manual page viewer.
Mount a Windows Share

Use the SMB mount to map a windows share (like \\server\myshare) to a linux mountpoint (like //mnt/myshare). To start I usually create a folder for my workgroup or domain (winDOM) by typing: mkdir /windom

Then under that folder create a folder that represents the share (you can go to the server level, but I like the abstraction), type mkdir /windom/myshare

Now use the SMB command to assign the share on the windows server (winserver) to the mountpoint you created.
Type: smbmount //winserver/myshare /mydom/myshare -o username=domuser1,password=domuserpwd

domuser1 is a valid domain user in mydom
domuserpwd is a valid domain password to authenticate and use the share

 

Home

2008 5/18/2008 12:12:36 PM