Fedora and Redhat study notes

八月 29, 2009 由 tingan

Display hardware information
To display information about your computer’s hardware from the Fedora live CD open a
Terminal window (from the main menu, select Applications 􀃆 System Tools 􀃆 Terminal).
Then, from the Terminal window, type the following command:
Check hardware
$ /sbin/lspci -vv | less
Press the spacebar to page through the list of PCI devices on your computer (press q to exit).
Note the model names and numbers of any hardware that doesn’t seem to be working. Next
plug in any USB devices you want to use (USB flash drives, cameras, Webcams, and so on)
and type the following:
$ /sbin/lsusb
If you would like a more graphical way of displaying hardware information, and you have an
active Internet connection, you can install the Hardware Browser to your running Fedora live
CD. To install Hardware Browser, type the following:
# su -
# yum install hwbrowser
Video card — To check your video card, open the Display Settings window (select
System 􀃆 Display). Select the Hardware tab to see your video card type and monitor. If
you prefer to use the command line to check what video card was detected, type the
following from a Terminal window:
# grep Chipset /var/log/Xorg.0.log
You can try other hardware devices as well by opening whatever applications you need to
access the device (a Web browser, a file manager, and so on). Many USB devices (digital
cameras, pen drives, and so on) will be detected and often displayed on the desktop. Running
the lsmod and modinfo commands can help you determine which devices were loaded for
those modules. Here are a few other quick commands for checking out your computer:
• cat /proc/interrupts — Shows what interrupts are in use.
• cat /proc/cpuinfo — Shows CPU information.
• cat /proc/bus/usb/devices — Shows attached and detected USB devices.
• /sbin/lspci — Shows listing of PCI devices found (-vv for more verbose info).
• cat /proc/cmdline — See command line options the system booted with.
• cat /proc/ioports — Shows ioports in use and the devices using them.
• less /var/log/messages — Page through the log of system start-up messages.
The following procedure describes how to do those things.
1. Check partitions. To determine which partition contains your Windows file system, use
the fdisk command as follows:
# fdisk -l
2. Get NTFS support. If you have a VFAT file system, you can skip this step. If you have
an NTFS file system, and NTFS support is not already installed, you can install the
necessary drivers and tools to be able to mount and use your NTFS file system in Linux
by running the following yum command as root user from a Terminal window:
# yum install ntfsprogs ntfs-3g
Assuming you have an active connection to the Internet, this will install the NTFS
support you need to access your NTFS partitions from Linux.
3. Mount Windows file system. You can access your Windows file system from Linux
using the mount command. Assuming your Windows partition is an NTFS file system on
/dev/sda1 (as in the example above), you could type the following to create the
Windows mount point and mount the file system there:
# mkdir /mnt/win
# chmod 755 /mnt/win
# mount -oro -t ntfs /dev/sda1 /mnt/win
# chmod 755 /mnt/win
# ls /mnt/win

To see how each partition is being used on your current system, type the following:
# df –hChecking system activity
In addition to being a multiuser operating system, Linux is also a multitasking system.
Multitasking means that many programs can be running at the same time. An instance of a
running program is referred to as a process. Linux provides tools for listing running processes,
monitoring system usage, and stopping (or killing) processes when necessary.
The most common utility for checking running processes is the ps command. With ps, you
can see which programs are running, the resources they are using, and who is running them.
The following is an example of the ps command:
$ ps au
To set an environment variable temporarily, you can simply type a variable name and assign it
to a value. Here is an example:
$ AB=/usr/dog/contagious/ringbearer/grind/ ; export AB
This example causes a long directory path to be assigned to the AB variable. The export AB
command says to export the value to the shell so that it can be propagated to other shells you
may open. With AB set, you can go to the directory by typing the following:
$ cd $AB
$ export XYZ=/home/xyz/bin
You can override the value of any environment variable. This can be temporary by simply
typing the new value. Or you can add the new export line to your $HOME/.bashrc file. One
useful variable to update is PATH. Here is an example:
$ export PATH=$PATH:/home/xyz/bin
There are several ways to place an active program in the background. One mentioned earlier is
to add an ampersand (&) to the end of a command line. Another way is to use the at command
to run commands in a way in which they are not connected to the shell. (See Chapter 12 for
more information about the at command.)
To stop a running command and put it in the background, press Ctrl+z. After the command is
stopped, you can either bring it to the foreground to run (the fg command) or start it running
in the background (the bg command).
Starting background processes
If you have programs that you want to run while you continue to work in the shell, you can
place the programs in the background. To place a program in the background at the time you
run the program, type an ampersand (&) at the end of the command line. For example:
$ find /usr > /tmp/allusrfiles &
To check the background commands, use
$jobs
Moving commands to the foreground and background
Continuing with the example, you can bring any of the commands on the jobs list to the
foreground. For example, to edit myfile again, type:
$ fg %1
You can skip the percent sign, %, if you wish. As a result, the vi command opens again, with
all text as it was when you stopped the vi job.
Type the following:
$ bg %5
After that, the job runs in the background. Its jobs entry appears as follows:
[5] Running nroff -man man4/* >/tmp/man4 &
Several configuration files support how your shell behaves. Some of the files are executed for
every user and every shell. Others are specific to the user who creates the configuration file.
Here are the files that are of interest to anyone using the bash shell in Linux:
• /etc/profile— This file sets up user environment information for every user. It is
executed when you first log in. This file provides values for your path, as well as setting
environment variables for such things as the location of your mailbox and the size of
your history files. Finally, /etc/profile gathers shell settings from configuration
files in the /etc/profile.d directory. Note that you can override all of these settings
in other start-up files.
• /etc/bashrc — By default, this file is executed for every user who runs the bash
shell, each time a bash shell is opened. It sets the default prompt and may add one or
more aliases. Values in this file can be overridden by information in each user’s
~/.bashrc file.
• ~/.bash_profile — This file is used by each user to enter information that is
specific to his own use of the shell. It is executed only once, when the user logs in. By
default, it sets a few environment variables and executes the user’s .bashrc file. You
can instead create a file named ~/.bash_login to serve the same purpose as
~/.bash_profile.
• ~/.bashrc — This file contains the information that is specific to your bash shells. It
is read when you log in and also each time you open a new bash shell. This is the best
location to add environment variables and aliases so that your shell picks them up.
• ~/.bash_logout — This file executes each time you log out (exit the last bash shell).
By default, it simply clears your screen.
To change the /etc/profile or /etc/bashrc files, you must be the root user. Users can
change the information in the $HOME/.bash_profile, $HOME/.bashrc, and
$HOME/.bash_logout files in their own home directories.
When you try to create a file, by default it is given the permission rw-r–r–. A directory is
given the permission rwxr-xr-x. These default values are determined by the value of
umask. Type umask to see what your umask value is. For example:
$ umask
022
The umask value represents the permissions that are not given on a new file. It masks the
permissions value of 666 for a file and 777 for a directory. The umask value of 022 results in
permission for a directory of 755 (rwxr-xr-x). That same umask results in a file permission
of 644 (rw-r–r–). (Execute permissions are off by default for regular files.) The default
umask value on Fedora is 0002.
TIP: Here’s a great tip for changing the permission for lots of files at once. Using the -R options of
chmod, you can change the permission for all of the files and directories within a directory structure at
once. For example, if you want to open permissions completely to all files and directories in the
/tmp/test directory, you can type the following:
$ chmod -R 777 /tmp/test
This command line runs chmod recursively (-R) for the /tmp/test directory, as well as any files or
directories that exist below that point in the file system (for example, /tmp/test/hat,
/tmp/test/hat/caps, and so on). All would be set to 777 (full read/write/execute permissions).
CAUTION: The -R option of chmod works best if you are opening permissions completely or adding
execute permission (as well as the appropriate read/write permission). The reason is that if you turn off
execute permission recursively, you close off your ability to change to any directory in that structure. For
example, chmod -R 644 /tmp/test turns off execute permission for the /tmp/test
directory, and then fails to change any files or directories below that point.
Third-party Fedora repositories — Because of licensing issues and patent questions,
some software that is popular to use with Fedora is not included in Fedora itself. For
example, commercial DVD movie and MP3 music players are not included in Fedora.
There are third-party Fedora repositories, however, that make that software available. In
particular, http://rpmforge.net, http://rpm.livna.org,
http://dag.wieers.com, http://freshrpms.net,
http://dribble.org.uk, and http://ATRPMs.net are popular third-party
repositiories. You can download packages directly from these sites or (preferably) set up
yum so you can download and install packages more easily.

The yum package is included on the Fedora DVD that comes with this book. To use yum to
install RPM software packages, follow these basic steps:
1. Determine the software package you want. Yum is delivered with the current Fedora
repository already configured. Use yum or PackageKit search tools (described later) to
find packages you want. Or add more repositories for yum to search to your
/etc/yum.conf file or /etc/yum.repos.d directory (also described later). (Many
software repositories offer RPM packages that automatically configure entries in the
yum.repos.d directory to point to those repositories.)
2. Configure yum. You have the option to configure the /etc/yum.conf file to set
options that relate to how you use your yum repositories, as described in the next section.
Then add any repositories, outside of Fedora , that you want to get packages from.
Several popular Fedora software repositories offer RPMs that install the information yum
needs to access those repositories.
3. Run yum. The yum command can be used to download and install any package from the
yum repository, including any packages the one you want depends on.
NOTE: You can clean out a lot of the data cached by yum with the command yum clean all.
Keep in mind that these repositories change over time, as new ones are added, some are
neglected and others are consolidated. The locations of repository directories and GPG keys
can change without notice. In fact, the RPM Fusion Project (http://rpmfusion.org) is
gearing up to merge the Dribble, Freshrpms and Livna repositories.
NOTE: I recommend only adding repositories you need. Adding unnecessary respositories can slow down
the performance of yum.
• Livna.org (http://rpm.livna.org) — Begun as an extension of the Fedora.us
site, rpm.livna.org contains RPM software packages that are outside of the Fedora
Project. This is a good place to get audio and video players (such as xine, mplayer,
ffmpeg, ogle, and so on) that may not meet the licensing requirements adhered to by Red
Hat, Inc. By installing the livna-release RPM, yum is configured to access the
rpm.livna.org repository. Look for the Fedora 10 livna-release RPM at the following
URL:
http://rpm.livna.org/rlowiki/
• Dag (http://dag.wieers.com/packages) — This site contains more than 45,000
RPMs from more than 2400 different projects. Currently, the repository has not been
updated for the latest Fedora release and there is no RPM to automatically set up access
that repository from yum. You can, however, look for Dag packages from the merged
RPMForge.net site.
• FreshRPMs (http://freshrpms.net) — Another site with a good selection of
high-quality RPMs is FreshRPMs.net. This site has a good selection of audio and video
players that are outside of the mainstream Fedora repositories. By installing the
freshrpms-release RPM, yum is configured to access the FreshRPMs repository.
• Dribble (http://dribble.org.uk) — RPM packages focused on fun software are
contained in the Dribble repository. Many of the packages are for games and console
game emulators. Look for a dribble-release package, which you can use to automatically
enable the Dribble repository for your Fedora system, at this URL:
http://dribble.org.uk/listrpms1.html
• ATRPMs (http://atrpms.net/dist/f10) — This site has RPMs containing
many drivers for video cards, wireless cards, and other hardware not included with
Fedora. If you want to try out a personal video recorder, this site also has RPMs for the
MythTV project. By installing the atrpms-package-config RPM, yum is configured to
access the ATRPMs.net repository. Look for the Fedora 10 atrpms-package-config RPM
at the following URL:
http://atrpms.net/dist/f10
• RPMforge.net (http://rpmforge.net) — This site represented a merge of three
separate repositories that offered Fedora RPM packages: http://dag.wieers.com,
http://freshrpms.net, and http://dries.ulyssis.org. This repository is
transitioning to the RPMrepo project (http://www.rpmrepo.org). During the
transition, RPMforge offers packages for RHEL and CentOS
(https://rpmrepo.org/RPMforge/Using).

Using yum for listing packages
Besides downloading and installing new RPM packages, yum can also be used to list available
packages as well as those that are already installed. The following examples illustrate some
uses of yum.
If you want to see a list of all packages that are available for download from the repositories
you have configured, type the following:
# yum list | less
Adding the less command to the end lets you scroll through the list of software (it could be
long, depending on which repositories you point to). If you try to install a package and it fails
with a message like package xyzpackage needs xyzfile (not provided), you
can check for packages that include the missing file using the provides option as follows:
# yum provides missingfile
With the provides option, yum will search your repositories for whatever file you enter
(instead of missingfile) and return the name of any packages it finds that include that file.
To search software descriptions in repositories for a particular string, use the search option.
For example, the following command searches for arcade in any package description (this
search will find some games):
# yum search arcade
Because yum packages are not automatically deleted after being installed, you might want to
go through on occasion and clean them out. To clear out packages from subdirectories of the
/var/cache/yum directory, type the following:
# yum clean packages
If you would like to check to see RPMs that were installed from repositories outside of the
main Fedora repository, you can do so using the list extras option. Here is an example:
# yum list extras
Getting manual updates with yum
At any time you can check whether updates are available for RPM packages installed on your
Fedora or RHEL system. Before doing updates with yum, however, you should always update
yum itself first:
# yum update yum
(including virus scanners like klamav and clamscan) are already available for any Linux
system that chooses to include them. (For more information refer to
http://www.clamav.net and http://klamav.sourceforge.net.)
Available emulation programs include:
• DOSBox (http://www.dosbox.com), for running many classic DOS applications
that won’t run on new computers. (Install it from Fedora by typing yum install
dosbox as root.)
• DOSEMU, also for running classic DOS applications. (Refer to the DOSEMU site at
http://dosemu.sourceforge.net for information. Select the Stable Releases link
to find RPM binaries of DOSEMU that run in Fedora.)
• WINE, which lets you run Windows 3.1, Windows 95, Windows 98, Windows 2000,
Windows NT, and Windows XP binaries. Windows NT and XP programs are not as well
supported. However, because many Windows applications are written to work in earlier
Windows systems (why limit their market just to use a couple of XP-specific calls?),
they will run just fine in WINE as well. Check the documentation for the Windows
application. If it only requires Windows 95 or Windows 98, it will often run in WINE
Running Microsoft Windows applications in Linux
There are several promising approaches you can take to get your Windows applications to
work during a running Linux session. Here are a few of them:
• WINE — The WINE project (http://www.winehq.org) has been making great
strides in getting applications that were created for Microsoft Windows to run in Linux
and other operating systems. WINE is not really an emulator because it doesn’t emulate
the entire Windows operating system. Instead, because it implements Win32 application
programming interfaces (APIs) and Windows 3.x interfaces, the WINE project is more
of a “Windows compatibility layer.” WINE doesn’t require that Windows be installed. It
can, however, take advantage of Windows .dll files if you have some to add.
• Win4Lin — Win4Lin (http://www.win4lin.com) is a commercial product for
running a Windows system in Linux. You can try the software free for 14 days.
QEMU — QEMU (http://bellard.org/qemu/) is an open source project that
acts as a processor emulator. It can either emulate a full system or work in user mode
emulation (where it can be used to test processes compiled for different CPUs). In full
system emulation, QEMU can run a variety of operating systems, including Windows
3.11, 95, 98SE, ME, 2000, and possibly XP.
The rest of this section describes how to get and use WINE to run Windows applications in
Linux. To get WINE for your Fedora system, you can go to the following places:
• WINE in Fedora—As of Fedora 7, WINE became part of the main Fedora software
repository. The wine and wine-core packages are needed to use WINE. Additional
WINE support comes in the following packages: wine-capi (ISDN support), wine-cms
(color management), wine-esd (ESD sound support), wine-jack (JACK sound support),
wine-ldap (LDAP support), wine-nas (NAS sound support), wine-tools (useful Windows
utilities), and wine-twain (scanner support). Add wine-docs for further documentation or
wine-devel, for WINE development components.
• Cedega — A commercial version of WINE called Cedega (formerly called WineX) is
available from TransGaming, Inc. (http://www.transgaming.com). TransGaming
focuses on running Windows games in Linux, using WINE as its base. See Chapter 7 for
descriptions of Cedega.
• CodeWeavers — If you need Microsoft Office or Web browser plug-ins, CodeWeavers
(http://www.codeweavers.com) offers CrossOver Linux. Although CrossOver
Linux costs some money, it offers friendly interfaces for installing and managing the
Windows software. A 30-day free trial is available.
Running Windows Applications in WINE
For WINE to let you run Microsoft Windows applications, it needs to have an environment set
up that looks like a Microsoft Windows system. The following section takes you through the
steps of installing and configuring the wine RPM available from Fedora. You can install wine
over the Internet by typing the following:
# yum install wine wine-tools wine-core wine-docs
Although you only need the wine and wine-core packages, wine-tools offers some nice
graphical tools for working with your WINE environment and wine-docs offers some useful
documents in the /usr/share/doc/wine-docs* directory for developing software and
using WINE. The yum command line shown above will also pull in other wine packages from
the Fedora repository (such as those that include additional support for sound, scanners, and
other features mentioned earlier).
The location of the basic Microsoft Windows operating-system directories for WINE is the
$HOME/.wine/drive_c directory for each user, which looks like the C: drive to wine. The
$HOME/.wine directory is created automatically in your home directory the first you run
Wine Configuration (select Applications 􀃆 Other 􀃆 Wine 􀃆 Wine Configuration) or type the
winecfg command:
$ winecfg
This opens the Wine configuration window, where you can do most of your activities to add
applications, configure the operating system, and integrate with the desktop. Figure 5-5 shows
an example of the Wine configuration window.
Text processing with Groff
The nroff and troff text formatting commands were the first interfaces available for
producing typeset quality documents with the UNIX system. They aren’t editors; rather, they
are commands that you send your text through, with the result being formatted pages:
• nroff ⎯ Produces formatted plain text and includes the ability to do pagination,
indents, and text justification, as well as other features.
• troff ⎯ Produces typeset text, including everything nroff can do, plus the ability to
produce different fonts and spacing. The troff command also supports kerning.
The groff command is the front end for producing nroff/troff documentation. Because
Linux man pages are formatted and output in Groff, most of the examples here help you create
and print man pages with Groff.
People rarely use primitive nroff/troff markup. Instead, there are common macro
packages that simplify the creation of nroff/troff-formatted documents:
• man — The man macros are used to create Linux man pages. You can format a man
page using the -man option to the groff command.
• mm — The mm macros (memorandum macros) were created to produce memos, letters,
and technical white papers. This macro package includes macros for creating a table of
contents, lists of figures, references, and other features that are helpful for producing
technical documents. You can format an mm document using the -mm groff option
me — The me macros were popular for producing memos and technical papers on
Berkeley UNIX systems. Format an me document using the -me groff option
There are also a variety of graphics formats. Fedora and RHEL come with lots of utilities to
convert documents and graphics from one format to another. The following is a list of
document and graphics conversion utilities:
• dos2unix — Converts a DOS text file to a UNIX (Linux) text file. A reason you might
want to use this command is that DOS text files include double-character carriage
returns, whereas Linux (UNIX) text files have a single-character linefeed.
• fax2ps — Converts TIFF facsimile image files to a compressed PostScript format. The
PostScript output is optimized to send to a printer on a low-speed line. This format is
less efficient for images with a lot of black or continuous tones. (In those cases, tiff2ps
might be more effective.)
• fax2tiff — Converts fax data (Group 3 or Group 4) to a TIFF format. The output is
either low-resolution or medium-resolution TIFF format.
• gif2tiff — Converts a GIF (87) file to a TIFF format.
• man2html — Converts a man page to an HTML format.
• pal2rgb — Converts a TIFF image (palette color) to a full-color RGB image.
• pdf2dsc — Converts a PDF file to a PostScript document DSC file. The PostScript file
conforms to Adobe Document Structuring Conventions (DSC). The output enables
PostScript readers (such as Ghostview) to read the PDF file a page at a time.
• pdf2ps — Converts a PDF file to a PostScript file (level 2).
• pfb2pfa — Converts Type 1 PostScript font (binary MS-DOS ) to ASCII-readable.
• pk2bm — Converts a TeX pkfont font file to a bitmap (ASCII file).
• ppm2tiff — Converts a PPM image file to a TIFF format.
• ps2ascii — Converts PostScript or PDF files to ASCII text.
• ps2epsi — Converts a PostScript file to Encapsulated PostScript (EPSI). Some word
processing and graphic programs can read EPSI. Output is often low quality.
• ps2pdf — Converts a PostScript file to Portable Document Format (PDF).
• ps2pk — Converts a Type 1 PostScript font to a TeX pkfont.
• ras2tiff — Converts a Sun raster file to a TIFF format.
• tiff2bw — Converts an RGB or Palette color TIFF image to a grayscale TIFF image.
• tiff2ps — Converts a TIFF image to PostScript.
• unix2dos — Converts a UNIX (Linux) text file to a DOS text file.
Using text-based Web browsers
If you become a Linux administrator or power user, over time you will inevitably find yourself
working on a computer from a remote login or where there is no desktop GUI available. At
some point while you are in that state, you will probably want to check an HTML file or a
Web page. To solve the problem, Fedora and RHEL include several text-based Web browsers.
With text-based Web browsers, any HTML file available from the Web, your local file system,
or a computer where you’re remotely logged in can be accessed from your shell. There’s no
need to fire up your GUI or read pages of HTML markup if you just want to take a peek at the
contents of a Web page. Besides letting you call up Web pages, move around with those pages,
and follow links to other pages, some of these text-based browsers even display graphics right
in a Terminal window!
Which text-based browser you use is a matter of which you are more comfortable with.
Browsers that are available include:
• links — With links (elinks package), you can open a file or a URL, and then traverse
links from the pages you open. Use search forward (/string) and back (?string)
features to find text strings in pages. Use up and down arrows to go forward and back
among links. Then press Enter to go to the current link. Use the right and left arrow keys
to go forward and back among pages you have visited. Press Esc to see a menu bar of
features to select from.
While links doesn’t allow you to display images inline, if you select an image it will be
displayed on your desktop in gThumb image viewer (by default). You also have the
option of saving the image to your local hard disk.
lynx,w3m
Using Remote Login, Copy, and Execution
This section describes some features for allowing users to use resources across a network.
They are the telnet, ssh, ftp, and wget commands.
$ su
Password: ******
#
When you are prompted, type in the root user’s password. The prompt for the regular user ($)
will be changed to the super user prompt (#). At this point, you have full permission to run any
command and use any file on the system. However, one thing that the su command doesn’t do
when used this way is read in the root user’s environment. As a result, you may type a
command that you know is available and get the message “command not found.” To fix this
problem, you can use the su command with the dash (-) option instead, as follows:
$ su -
Password: ******
#
You still need to type the password, but after you do that, everything that normally happens at
login for the root user will happen after the su command is completed. Your current directory
will be root’s home directory (probably /root), and things like the root user’s PATH variable
will be used. If you became the root user by just typing su, rather than su -, you would not
have changed directories or the environment of the current login session.
TIP: When you become super user during someone else’s session, a common mistake is to leave files or
directories in the user’s directories that are owned by root. If you do this, be sure to use the chown or
chmod command to make the files and directories you modify open to the user that you want to own them.
Otherwise, you will probably get a phone call in a short time, asking you to come back and fix it.
You can also use the su command to become another user than root. For example, to have the
permissions of a user named chum, you could type the following:
$ su – chum
Even if you were root user before you typed this command, you would only have the
permission to open files and run programs that are available to chum. As root user, however,
after you type the su command to become another user, you don’t need a password to
continue. If you type that command as a regular user, you must type the new user’s password.
Besides opening a shell session using su (to run a bunch of commands as root), you can
instead just apply root permission to a single command or window. This approach is
considered more secure than leaving a shell open with root permission if you are just doing
one administrative task. For example:
• GUI admin tools — When you run GUI administration tools as a regular user, you are
usually prompted for the root password (as described the section “Using graphical
administration tools” later in this chapter). If a GUI administration tool fails and doesn’t
prompt you for a password, refer to the sidebar “Becoming Super User in X.”
• sudo command — You can run the visudo command to configure a user in
/etc/sudoers to be allowed to run administrative commands. After that is done, that
user can run the sudo command, followed by a single administrative command, to run
that command as root would. When that single command completes, the root permission
to run that command ends as well.

• Server Settings — This submenu accesses the following server configuration windows:
• Domain Name System (system-config-bind) — Create and configure zones if your
computer is acting as a DNS server.
• FTP (system-config-vsftpd) — Configure the vsftpd FTP server. You may also see this
under the System Tools menu under the Applications menu.
• HTTP (system-config-httpd) — Configure your computer as an Apache Web server.
You may also see this under the System Tools menu under the Applications menu.
• NFS (system-config-nfs) — Set up directories from your system to be shared with other
computers on your network using the NFS service.
• Authentication (authconfig-gtk) — Change how users are authenticated on your
system. Usually, Shadow Passwords and MD5 Passwords are selected. However, if your
network supports LDAP, Kerberos, SMB, NIS, or Hesiod authentication, you can select
to use any of those authentication types.
• Boot Loader (system-config-boot) — Configure the default boot entry and timeout
value (in seconds) for your GRUB boot loader.
• Date & Time (system-config-date) — Set the date and time or choose to have an NTP
server keep system time in sync. Figure 10-2 shows the Date/Time Properties window.
Display (system-config-display) — Change the settings for your X desktop, including
color depth and resolution for your display. You can also choose settings for your video
card and monitor.
• Firewall (system-config-firewall) — Configure your firewall to allow or deny services
to computers from the network.
• Keyboard (system-config-keyboard) — Choose the type of keyboard you are using,
based on language.
• Language (system-config-language) — Select the default language used for the system.
• Logical Volume Management (system-config-lvm) — Display and manage logical
volumes and related disk partitions.
• Network (system-config-network) — Manage your current network interfaces, as well
as add interfaces.
• Printing (system-config-printer) — Configure local and network printers.
• Root Password (system-config-rootpassword) — Change the root password.
• Samba (system-config-samba) — Configure Windows (SMB) file sharing. (To
configure other Samba features, you can use the SWAT window. SWAT is described in
Chapter 18.)
• Services (system-config-services) — Display and change which services are running on
your Fedora or RHEL system at different run levels.
• Users & Groups (system-config-users) — Lets you add, display, and change user and
group accounts for your Fedora or RHEL system
The following tools associated with system administration can be started from the System
Tools menu (Applications 􀃆 System Tools):
• Configuration Editor (gconf-editor) — Change settings associated with your GNOME
desktop system.
Disk Usage Analyzer (gnome-utils) — Displays and analyzes data on the use of your
computer’s hard disks.
• Hardware (hwbrowser) — View information about your hard drives, network devices,
sound cards, and other hardware. (Install the hwbrowser package to see this item.)
• Kickstart (system-config-kickstart) — Create a Kickstart configuration file that can be
used to install multiple Fedora or RHEL systems without user intervention.
• System Log (gnome-system-log) — Displays messages (by date) for log files stored in
the /var/log directory.
• System Monitor (frysk-gnome) — Shows information about running processes and
resource usage.

无线网卡 iwl3945 jaunty jackalope 无线驱动 不能上网

六月 15, 2009 由 tingan

ubuntu 9.04(代号Jaunty Jackalope)正式发布了,速度和易用性都大有提高,然而兼容性却有所下降。在我这里(ibm thinkpad t60),至少有三大问题没有解决。一是无线网卡上网问题,二是ati显卡驱动问题,三是新的通知机制问题。
ati显卡到正式发布了受限驱动还是没有跟上,glxgears只有可怜的200FPS,不过我不用compiz 3D特效,这台机也主要用来开发,倒是关系不大。
新的通知机制没有效果,我怀疑是新的通知机制不够成熟,似乎还比较多问题。不过这个也没有太大影响,就是一个效果而已。
我的无线网卡是Intel PRO/Wireless 3945ABG。(可以用sudo lshw -C network查看)。无线网卡在7.04-8.10都很正常。而到了9.04就比较恼火,每次重启后,无线网卡的灯都不亮,然后nm-applet也没有找到任何的无线网络。dmesg看了一下,似乎是所谓的killswitch的问题。在网上搜索了一下,碰到类似问题的人不少,但是没有看到真正的解决办法,只有临时的解决办法:
首先关闭、开启一次无线网络(似乎只是开机才需要。如果是重启,似乎不用这一步。),然后sudo rmmod iwl3945;
sudo modprobe iwl3945;sudo service hal restart;(这里的iwl3945要用上面的方法找出来),等一下,无线网卡就生效了。(有时还要禁用、启用无线网卡)
不行的话多试几次。但是也有可能死机。希望接下来的几个月,ubuntu 9.04可以修复这个bug。
2009年5月5日更新:
    这个问题ms是network-manager的问题,我在本机改用wicd就好了。等在家里的电脑再试试看看。

這篇文章是我新伙伴-天黑黑(T61)在Ubuntu無線環境下寫的,所以聰明的大家可以猜到上次反應的問題已經解決了! 解決經過如下:

  1. 在synaptic裡安裝ndiswrapper,(系統->管理->synaptic-> Ctrl-F搜尋ndiswrapper->安裝)
  2. 在/etc/modprobe.d/blacklist 裡加入一行blacklist ath_pci
  3. 執行Windows Wireless Driver (系統->管理->Windows Wireless Driver)
  4. 指定無線網卡的驅動INF檔,成功後離開程式
  5. install到modprobe (執行指令ndiswrapper -m 以及 modprobe ndiswrapper)
  6. 試試可行否? 如果不行重開機後移除Windows Wireless Driver驅動重裝一次
  7. 在/etc/modules裡加ndiswrapper這樣每次開機都可以自動載入

解决Ubuntu 9.04无线网络的不稳定问题

六月 10, 2009 由 tingan

还是一位论坛上的朋友告诉我可能是MTU的设置问题。如果MTU设置太大,就容易出现丢包的情况。要知道,我使用8.10版本的时候也是在同一个网络,同一台机器上,环境是完全相同的,出现MTU的设置问题实在是意料之外啊!

那么,在Ubuntu环境下如何查看和设置MTU呢?其实只要使用ifconfig这个命令就可以解决。

要查看MTU的值,输入:ifconfig,然后回车。在输出里面你可以看到每个网卡的MTU。

要设置MTU的值,输入:sudo ifconfig wlan0 mtu 1000。我的这个命令是把无线网络的MTU设置为1000了,你可以根据自己的实际情况选择适合自己的值。

现在我的无线网络还是使用XP的无线驱动,很稳定。希望你也成功!

ubuntu中退出Compiz

五月 23, 2009 由 tingan

metacity –replace  or  ‘kwin –replace &;’

Shifting the order of the titlebar buttons
The installation script will move the “traffic lights”, the minimize, maximize
and close buttons, on the left hand side of the titlebar in Metacity
(instructions for using the Emerald/Compiz Fusion theme appear in Section
3). If you want to make the change manually, press Alt+F2 and type in gconf-editor.
Press Enter or click Run and a new window should appear. In the sidebar, go to / →
apps → metacity → general. Back on the right hand side, double click on
button_layout. Delete the value that’s there and type in
menu:minimize,maximize,close. Then Click OK and close the application
Configuration Editor. The buttons will now be on the left side of titlebar. To restore
the buttons to the original layout, just replace the string with
close,minimize,maximize:menu.

PHP 开发工具

五月 18, 2009 由 tingan

编程工具

phpdesigner, Komodo IDE, PhpEdit, Netbeans, Eclipse PDT, ZendStudio,Emacs、KVIM、Arachnophilia、Bluefish、NEdit、Gedit、Kate、Quanta Plus

调试工具

zend debugger, xdebugger

Profiling 工具

Kcachegrind

ubuntu中安装PHP,Apache,MySQL

五月 18, 2009 由 tingan

1、安装Apache服务
sudo apt-get install apache2

然后按照提示即完成apahce的安装了。这里 可以打开http://127.0.0.1,即可看于是It works

首先我直接用apt-get安装了apache2,php5,pear以及mysql5, 为了方便后续的安装,还加上了make和libmysqlclient

sudo apt-get install apache2-mpm-prefork
sudo apt-get install php5 ,php-xml-parser php-fpdf php-image-graph

sudo apt-get install curl libcurl3 libcurl3-dev php5-curl php5-xmlrpc

sudo apt-get install php-soap

sudo apt-get install php5-dev
sudo apt-get install php5-pear
sudo apt-get install mysql-server-5.0
sudo apt-get install make
sudo apt-get install libmysqlclient15-dev
pdo在ubuntu的apt里头似乎还找不到安装源,所以通过pecl来安装这个扩展,非常简单 —- 如果海底光纤能连通的话:

pecl install pdo

增加一行:

extension=pdo.so

到文件:

/etc/php/apache2/php.ini
/etc/php/cli/php.ini

接下来安装pdo_mysql碰到一些问题, 直接跑pecl install pecl_mysql会出现一些错误,搜索了一下发现是pecl本身的问题,下面是个比较简单的解决办法:

wgethttp://pecl.php.net/get/PDO_MYSQL-1.0.2.tgz
tar xzvf PDO_MYSQL-1.0.2.tgz
cd PDO_MYSQL-1.0.2

注释掉configure里头判断是否已经安装pdo扩展的代码片段,继续跑:

phpize
./configure
make
make install

然后再次添加下面一行到前面提到的两个php.ini

extension=pdo_mysql.so

重启apache之后, php5 + pdo_mysql就在ubuntu上安装好了, documentroot是/var/www

后记
更简单的解决办法是运行:

PHP_PDO_SHARED=1 pecl install pdo_mysql

2、安装php5
sudo apt-get install php5 php5-gd php-pear

#apt-get install curl php5-url php5-mcrypt
sudo apt-get install libapache2-mod-php5

sudo /etc/init.d/apache2 restart

OK之后,我们来查看一下是否生效了。
gksudo gedit /var/www/testphp.php

入探针
保存运行
http://127.0.0.1/testphp.php

3、安装mysql
sudo apt-get install mysql-server

安装完成按提示设置root密

4、让apache、php支持mysql
sudo apt-get install libapache2-mod-auth-mysql
sudo apt-get install php5-mysqlsudo /etc/init.d/apache2 restart

至此apache2+php 5.2.4.2+mysql5.0.51的环境就完成了。

1.Ubuntu 8.04下安装LAMP
系统->系统管理->新立得软件包管理器, 打开新立得,编辑 –> 使用任务分组标记软件包 –> 勾选 LAMP Server。

安装过程中会提示设置mysql的root用户的密码。

配置文件在/etc/apache2目录

在/etc/apache2/httpd.conf加入一行:ServerName 127.0.0.1

2.Ubuntu 8.04下安装phpmyadmin
sudo apt-get install phpmyadmin

安装后在/etc/apache2/conf.d目录自动创建虚拟目录配置文件phpmyadmin.conf

安装后直接输入http://localhost/phpmyadmin登录,创建一个wpmu数据库

3.启动mod_rewrite模块
sudo a2enmod rewrite

4.Ubuntu 8.04下安装WPMU
(1)从官方主页下载WPMU,解压到~/blog目录(/home//blog)

(2)修改目录属性:chmod 755 /home//blog /home//blog/wp-content

(3)配置WPMU虚拟目录。修改/etc/apache2/httpd.conf或者在/etc/apache2/conf.d创建wpmu.conf文件,加入如下内容:

Alias /blog /home//blog
/blog>
Options Indexes FollowSymLinks
DirectoryIndex index.php
AllowOverride FileInfo Options
(4)修改/etc/hosts文件(因为wpmu必须采用域名格式)

修改127.0.0.1 localhost
127.0.0.1 www.my.com my.com localhost

(5)在firefox输入:http://my.com/blog。安装WPMU

OK。
(UMELINK原创)

Ubuntu php 环境简单配置备忘(二/成功)

一、安装apache2+php5+mysql
sudo apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-server
二、设置mysql密码
mysqladmin -u root password 新密码

三、安装phpmyadmin
sudo apt-get install phpmyadmin
测试:http://localhost/phpmyadmin/

Installation in ubuntu 8.04 phpmyadmin

1)apt-get install phpmyadmin

2)sudo gedit /etc/apache2/apache2.conf

3)Add the following line of code inside apache2.conf:
Include /etc/phpmyadmin/apache.conf

4)Now restart Apache:
sudo /etc/init.d/apache2 restart

四、其它操作:
编辑测试页:()
sudo gedit /var/www/testphp.php

启动Apache
$ sudo /usr/sbin/apache2ctl start
停止Apache
$ sudo /usr/sbin/apache2ctl stop
重启Apache
$ sudo /etc/init.d/apache2 restart

如果只是用于本地开发,加强安全性,设置如下:
$ gksudo “gedit /etc/apache2/ports.conf”
$ password:
更改ports.conf
Listen 127.0.0.1:80
保存文件之后,并重启apache。这时,只有通过127.0.0.1才能访问Apache。

安装包

/etc/apt/sources.list file.

deb http://packages.dotdeb.org stable all
deb-src http://packages.dotdeb.org stable all
# apt-get update

install MySQL4

# apt-get install mysql-server-4.1 mysql-client-4.1 libmysqlclient14-dev

install MySQL5

# apt-get install mysql-server-5.0 mysql-client-5.0 libmysqlclient15-dev

Set a root MySQL password like this:

# mysqladmin -u root password yourrootsqlpassword

Debian provides a fastcgi enabled version of PHP.

# apt-get install php4-cgi
# apt-get install php5-cgi

Other php5 package

php5-curl php5-gd php5-imap php5-mhash, php5-xdebug
php5-pear php5-dev php5-ming php5-common
php5-cli php5-pspell php5-odbc php5-mcrypt
php5-tidy php5-ldap php5-gmp php5-snmp
php5-sybase php5-mysql php5-mysqli php5-pgsql
# apt-get install php5-cgi libgdmg1 php5-curl php5-gd

php.ini

Add cgi.fix_pathinfo = 1

ubuntu 中flash中文乱码的解决

五月 17, 2009 由 tingan

ubuntu/linux flash中文乱码 的解决
打开配置文件:
cd /etc/fonts/conf.d/
sudo gedit 49-sansserif.conf

修改edit节点,将<string>sans-serif</string>
改为 <string>sans</string>

<match target=”pattern”>
<test qual=”all” name=”family” compare=”not_eq”>
<string>sans-serif</string>
</test>
<test qual=”all” name=”family” compare=”not_eq”>
<string>serif</string>
</test>
<test qual=”all” name=”family” compare=”not_eq”>
<string>monospace</string>
</test>
<edit name=”family” mode=”append_last”>
<string>sans-serif</string> 这里改为<— <string>sans</string>
</edit>
</match>
ubuntu装好之后, 为浏览器firefox安装flash插件, 后来发现中文会变成方框。

如何解决?

输入:
cd /etc/fonts/conf.d/

为了安全,备份一下:

sudo cp 49-sansserif.conf 49-sansserif.conf_backup

输入如下指令:

sudo gedit ./49-sansserif.conf

此时文件显示内容。

将其中的第1、2、4个后面的sans-serif或者serif用你自己系统中支持中文的字体的名字代替,注意字体名字的大小写

比如:我的系统中安装了微软雅黑,我则用微软雅黑代替上述所说的字段,结果如下:

<match target=”pattern”>
<test qual=”all” name=”family” compare=”not_eq”>
<string>微软雅黑</string>
</test>
<test qual=”all” name=”family” compare=”not_eq”>
<string>微软雅黑</string>
</test>
<test qual=”all” name=”family” compare=”not_eq”>
<string>monospace</string>
</test>
<edit name=”family” mode=”append_last”>
<string>微软雅黑</string>
</edit>
</match>

Php Xdebug extension

五月 15, 2009 由 tingan

The Xdebug extension helps you debugging your script by providing a lot of valuable debug information. The debug information that Xdebug can provide includes the following:

  • stack traces and function traces in error messages with:
    • full parameter display for user defined functions
    • function name, file name and line indications
    • support for member functions
  • memory allocation
  • protection for infinite recursions

Xdebug also provides:

PECL Installation

As of Xdebug 0.9.0 you can install Xdebug through PEAR/PECL. This only works with with PEAR version 0.9.1-dev or higher and some UNIX.

Installing with PEAR/PECL is as easy as:

# pecl install xdebug

but you still need to add the correct line to your php.ini: (don’t forget to change the path and filename to the correct one — but make sure you use the full path)

zend_extension="/usr/local/php/modules/xdebug.so"Xdebug is incompatible with the Zend Optimizer and Zend Studio   Debugger extensions. If these extensions are enabled in   php.ini, they will not be imported into the copy created   by Komodo for debugging. When configuring Remote PHP Debugging, these extensions   should be manually commented out in php.ini.

Komodo 安装

五月 11, 2009 由 tingan

今年jolt获奖的软件,专攻动态语言,想要一个python IDE,于是开始感兴趣起来。

http://www.activestate.com/Products/Komodo/?tn=1下载试用版

在它的网页上注册得到一个20天的License文件。

将试用版解压缩到一个目录
tar zxvf komodo-professional-3.5.2-227956-linux-libcpp5-ix86.tar.gz

进入目录执行

sudo install.sh

缺省安装是/opt/Komodo

安装完成后执行
/opt/Komodo-3.5/bin/komodo -v

会提示段错误,无法运行。网上好多人都说有BUG.分析一下,还是SCIM捣乱。

sudo vi /opt/Komodo-3.5/bin/komodo

第二行加上:GTK_IM_MODULE=xim

存盘退出。

将邮件得到的License权限改为755
chmod chmod 755 EvalLicense-KomodoProfessional-Linux

执行一下。会在 ~/.ActiveState/下生成一个ActiveState.lic文件。

将~/.komodo 改成你当前用户:
sudo chown <user>:<group> -R .komodo

好了,现在进入 应用程序-》编程
发现有一个ActiveState Comodo 3.5
执行,就可以了。

这是个试用版的License.如果购买了正版的Lic文件。直接拷贝到~/.ActiveState/下即可。

功能很强大,尤其python GUI Builder.太舒服了。可惜太贵了。。。

备份KOMODO 的配置文件

KOMODO IDE是我使用的比较多的一款IDE开发工具,不过基本上除了用它编写PERL外,还没做过其它代码的编写。
通常的,当我们费力把一个开发工具的配置做到自己满意的时候,如果不能把这些配置文件导出或者备份,也就意味着如果你的机器重装或者想在两台机器上使用同样的配置话,你就不得不在花时间来处理这些重复的事。
IDE上我是没有找到导出配置的选项的,所以我只能寻找配置文件覆盖的方法来做。
KOMODO 的个人配置文件其实是放在C:\Documents and Settings\你安装KOMODO时所用的账户\Application Data\ActiveState下的。不过你在该目录下可能看到多个KOMODO的版本号目录,这些我们都不用管,你只需要找到你目前使用KOMODO 的版本,进入后会找到一个名为schemes的目录,如果你自己定义过配置文件的话,目录下会有相对应的文件,例如.kkf的文件是你的热键配置, 而.ksf则是你的风格配置。有了这些,下步你该知道怎么做了吧!
Good engoy !
将ActiveState.lic, bean.nfo. file_id.diz 拷贝到~/.ActiveState目录下面,重新启动Komodo IDE 5.

ubuntu 安装mac docker

五月 10, 2009 由 tingan
ubuntu已经蛮漂亮了。可还是喜欢上个dook换mac背影冲冲场面。
推荐大家几个常用的dock工具栏。
基本上如果要求3D特效的,在最小化时效果都还是很不错的。
所以看坛友们的个人爱号来自己决定罗。

1、Cairo Dock
地址:https://help.ubuntu.com/community/CairoDock
一个酷的工具栏,但是需要3D特效支持。(compositing effects)

2、Avant Window Navigator
地址:http://www.newlinuxuser.com/the-perfect-os-x-dock-for-linux/
最常用,功能强又漂亮还支持自定义的dock工具之一

3、Engage Dock
地址:http://pimpyourlinux.com/linux-feature-review/enlightenment-engage-dock/
个人认为很普通的一个dock工具

4、Kiba Dock
地址:http://www.kiba-dock.org/index.php?option=com_frontpage&Itemid=1
又小又好看而且还免费,最早是Akamaru的组件。可能是最流行的dock工具了。

5、Ksmoothdock
地址:http://theslack.files.wordpress.com/2007/06/kooldock.png?w=462&h=150
有平滑的大小变化,很低的要求。就是感觉不太像mac的dock

6、SimDock
地址:http://sourceforge.net/projects/simdock/
初学者的最爱,不要求3D特效。对机器要求低,而且提供deb包

[ 此帖被幸运星在2008-09-19 13:07重新编辑 ]

以上内容完全是复制粘贴,本人并不明白其意思,
故本人不对以上内容负法律责任,请不要跨省追捕。
要详查请自己联系原作者,谢谢!