Printer Setup using print server
box
Printing to non-default printer
Start/Stop/Restart Print Service
(LPD)
Various System Status Programs
Create User Accounts via command
line
Change Gnome Terminal to Other user
account
Partial Backup (By directory Name)
“Page Not Found” on file uploads
via php scripts
Known Differences between gcc and
cc code
Compiling code that uses #include
<asm/io.h>
Compiling code that uses math.h
library
Getting IO Port Programs to run
under user accounts
{This is how MY machine is configured. It might not work the same way for you}
Boot from CD
|
At prompt |
Response |
|
BOOT: |
<ret> |
|
ENGLISH |
<NEXT> |
|
Model | layout | Deadkeys |
<NEXT> |
|
Mouse |
2 button PS/2 <Next> |
|
Welcome |
<NEXT> |
|
Installation Type |
Server <NEXT> |
|
Partition |
Auto <NEXT> |
|
Auto Partition |
<Next> |
|
Warning |
<NEXT> |
|
Disk Setup |
<Next> |
|
Boot Loader |
LILO <NEXT> |
|
Firewall |
Allow Incoming: SSH, WWW, FTP <NEXT> |
|
Language Support |
<NEXT> |
|
Time Zone |
Select Chicago (Central) <NEXT> |
|
Root password |
Type in password two times <next> |
|
Packages |
Default AND: GNOME WEB SQL <NEXT> |
|
Video Card |
<Next> |
|
About to Install |
<next> |
|
Long Wait |
|
|
Create Boot disk |
Skip <Next> |
|
Monitor |
<next> |
|
Graphics Config |
1024x768 True Color <Test> <exit> |
On first boot it will “FIND NEW HARDWARE” set up the Ethernet connection but ignore the sound card.
Be aware when it continues that when it hits eth0 it will take a while (making you think it locked up)……DO NOT reboot the machine, wait it out.
When the computer comes up, log in and go to the Service Configuration program and turn on HTTPD and turn off LPD.
shutdown –h now
To turn on a service (ie httpd) use the following program in Gnome:
Programs | System | Service Configuration
/var/log/secure
To show the last login for each user (this is a program not a text log):
/var/log/lastlog
Use the following program in Gnome:
Programs | utilities | Gnome Search tool
To put output of ll, ls, df, du in human readable form, use the –h flag.
EG:
-h, --human-readable
print sizes in human readable format (e.g., 1K 234M 2G)
Use the following command to obtain the size of a directory or group of directories:
du –hc dir
the –h puts the output in human readable format (see above) and the –c gives you a total (useful if you want the total of a tree)
Use the following command to obtain the usage of all mounted disks:
df -h
To set up locate first do a: locate –u (this sets up the index file)
Then to search do: locate search_string
Use the following program in Gnome:
Applets | utilities | screen shooter
To set up printer, use the following Gnome program:
Programs | system | Printer Configuration
|
1) Opening screen |
|
Hit next |
|
2) Setup the print Queue name and type |
|
For Queue Name I used SOL-HP500C SOL-HP1120C For Queue Type use unix Printer |
|
3) Configure a Unix Print Queue |
|
For Server use the current printer IP as defined by the DHCP server For Queue use: lpt1 lpt2 as per SOL print server connections |
|
4) Select a Print Driver |
|
Self explanatory |
|
5) Finish |
|
Shows the configuration as set. |
|
||
Two known problems with this setup procedure:
lp –d printer_name filename
Where printer_name is the name used in step 2 of ‘Printer setup using print server box
/etc/init.d/lpd start|stop|restart
Use the following program in Gnome:
Programs | internet | RH Network Monitor
|
Will give you a window like this: Eth0 -> Ethernet card Loopback -> 127.0.0.1 Red (Top graph) -> Transmit Green (Bottom graph) -> Receive |
|
Use the following program in Gnome:
Programs | System | GnoRPM
Similar to windows “Add Programs”
dig <ip-address>
host <ip-address>
Use the diff command:
diff [options] from-file to-file
Pwd
Use the “touch” command to change the file modify time by using:
Touch –w –t [CC]YYMMDDhh[.ss] [optional]
ps –aux
top [^C to end]
When transferring files to user accounts when logged in as root, the file will be owned by root and in the root group. To change it to allow the user to modify these files type:
chown –R ownername *; chgrp –R groupname *
NOTE: the –R means that all files in the current directory and ALL SUB DIRECTORIES will be changed to the new owner and group
To create a user account from a shell prompt:
1. At the shell prompt, log in as root.
2. Type useradd followed by a space and the username for the new account at the command line and press [Enter].
3. Now type passwd followed by a space and the username again.
4. The shell prompt should display New UNIX password. This is asking you to type the password for the new account.
5. Type the password again for confirmation.
[above from: http://www.redhat.com/docs/manuals/linux/RHL-7.1-Manual/getting-started-guide/s1-creating-account.html ]
To give a user ROOT permissions:
Open the file /etc/passwd
The format of each line is as follows:
Name:Password: UserID(UID):PrincipleGroup(GID):Gecos:
HomeDirectory:Shell
Change the uid and gid of the user to 0
passwd –x –1 username
1)
SSH
into your server as 'admin' and gain root access by
su -
2) Copy and paste this line to edit the file
pico -w /etc/ssh/sshd_config
3) Find the line
#Protocol 2, 1
4) Uncomment it and change it to look like
Protocol 2
5) Next, find the line
#PermitRootLogin yes
6)Uncomment it and make it look like
PermitRootLogin no
7) Save the file
ctrl 'x' then 'y' then enter
8) Restart SSH
Above
from: http://forum.ev1servers.net/printthread.php?threadid=18437
To turn off pico word wrap start pico with
pico –w
Use:
su username (default username is root)
(su does not stand for Super User, it stands for Substitute User)
To backup the server, I created a script that saves the most pertinent directories. The script is as follows:
#!/bin/sh
tar -zcvpf backup-`date '+%d-%B-%Y'`.tar.gz /root /etc /home /var/www
this will create a file named “backup-dd-MONTH-yyyy.tar.gz”. I saved the script as backup.sh
Say you wanted to do a backup of /home directory and place all users with the beginning initials a-m in one tar file. Here is how you can do it:
find /home/[a-m]* –type f -print |tar –zcvf filename.tgz –T –
and yes you need the ending – (not sure why).
[a-m] is NOT case sensitive!
To restore using a backup created using the above script, be logged in as root and in the / directory. Use the following command:
tar –xvzf file_name_of_backup(including_full_path)
If you only want to restore a file or directory from the backup use the above line but add the directory or file to restore:
tar –xvzf file_name_of_backup(including_full_path) name_to_restore
eg:
tar –xvzf /usr/backup/backup-05-July-2003.tar.gz home
will restore only the home directory and all sub directories of home (because –v is verbose)
tar –ztvf name_of_file
To automatically backup the system do the following:
#!/bin/sh
find /usr/backup -name 'backup*.tar.gz' -mtime +28
-exec /bin/rm {} \;
tar -zcpf /usr/backup/backup-`date '+%d-%B-%Y'`.tar.gz /root /etc /home /var/www
0 21 * * 1 sh /usr/backup.sh
This will run the script backup.sh every Monday at 9pm and remove backup files older than 28 days.
The following was taken from http://medgen.univr.it/~ciano/download/documentation/crontab.html
Crontab is a program that allows users to
create jobs that will run at a given time. Each individual user has their own
crontab and the entire system has a crontab that can only be modified by those
with root access. If you are adding a crontab for an individual user you must
sign on as that user first. (ex. su userid)
The syntax of this file is very rigid.
There are six fields to a file, each separated by a space. The first five
fields specify exactly when the command is to be run; the sixth field is the
command itself. The first five fields are:
minute hour day month weekday command
Minute - Minutes after the hour (0-59).
Hour - 24-hour format (0-23).
Day - Day of the month (1-31).
Month - Month of the year (1-12).
Weekday - Day of the week. (0-6; the 0 refers to Sunday).
Asterisks (*) specify when commands are
to be run in every instance of the value of the field. For instance, an
asterisk in the Month field would mean that the command should be run every
month. In addition, multiple events can be scheduled within a field by
separating all instances with commas - with no space between.
crontab -e
Edits the current crontab or creates a new one. *
crontab -l
Lists the contents of the crontab file.
crontab -r
Removes the crontab file.
You must first sign on as the individual user you
are adding the crontab for. Do not create crontab while you are signed on as
"su" under root or you will change the root crontab. After you sign
on as root su as individual user.
su userid (ex su nercols)
Change editor to Joe from VI:
EDITOR=joe
export EDITOR