Linux novice entry and installation configuration FAQ200 (below)

xiaoxiao2021-03-06  143

Linux novice entry and installation configuration FAQ200 (below)

Novice Getting Started and Installation FAQ (8)

How to use Linux to set up a web server?

The Apache server is the first choice for setting up a web server in Linux. You can choose to install it when you install Linux. If there is no security during installation

If you install Apache, you can find a file from the CD or on the Apache website: Apache-1.3.12.i386.rpm, then execute the following command

Installation:

1) RPM -IVH Apache-1.3.12.i386.rpm

2) Modify the configuration file in the / etc / httpd / conf directory httpd.conf, access.conf, etc .;

3) Place the homepage file in the / home / httpd / html directory;

4) Execute "/etc/rc.d/init.d/httpd start" launch Apache server

If you need to close, you can execute the /etc/rc.d/init.d/httpd stop command.

<75> How to use Linux to set up an FTP server?

In Linux, the most commonly used FTP service software is a number of wu-ftpd if it is not installed when it is installed. You can from CD or

RPMFind.net/linux/rpm/wbyname.html Gets its RPM package: wu-ftpd-2.6.0-9.i386.rpm. Then do the following command

finish installation:

RPM-IVH WU-FTPD-2.6.0-9.i386.rpm

Edit the "/etc/inetd.conf" file, point to the new FTPD daemon, as shown below:

FTP stream tcp noait root / usr / sbin / tcpd in.ftpd -l a

So far, your Linux can accept FTP service.

<76> How to use Linux to set up an E-MAIL server?

In Linux, the most commonly used E-mail server is Sendmail, you can select it when you install Linux.

1) Do a MX record for the E-mail server on the DNS server;

2) Edit the /etc/inetd.conf file, remove the annotation of the line of POP and SMTP;

3) Execute kill -hup inetd to take effect;

Such an E-mail server can send and receive mail through client programs such as Outlook.

<77> How to use Linux to set up a News server?

When installing Linux, select the INN package and allow the InND when booting. Most of the configuration work has been completed when the system is installed.

Complete, no need to compile the source code.

1) Configure /etc/news/inn.conf:

Domain: foo.com

Organization: Foo Company News Site

Server: Localhost

Fill in according to the actual situation;

2) Configuration /etc/news/nnrp.access nnrp.access is the configuration file used to complete the waiter of the News Readers service.

Used to control access to the site, modify this file does not have to start InND.

3) Add news group:

You can use the ctlinnd command to add a newsgroup to manually edit the / var / lib / news / Active file. If it is hand-made

Change the newsgroup, you must perform the following command to take effect:

CTLinnd Reload Active "MODIFY ACTIVE" <78> How to use Linux to set up BBS?

1) Download the source code release package file Pbbs.Tar.gz from ftp://pbbs.chpi.edu.tw/pub/pbs/source.

2) Perform TAR ZXVF PBBS.TAR.GZ untieken;

3) Enter the PBBS directory and run install;

4) Change the default settings according to the specific needs.

<79> How to make Linux become a file server?

In Linux, you can use Samba to make a file server, you can select Samba when you install Linux, you can complete the installation.

1) Edit /etc/smb.conf, modify the configuration:

NetBIOS name = Linux

Workgroup = Sambaserver

Server string = Samba Server

Hosts allow = 192.168.9. 127.

Securoty = Share

Interfaces = 192.168.9.1 / 24

Name resolve order = host DNS BCAST

Wins Support = No

2) Restart SMB server: /etc/rc.d/init.d/smb restart

3) Edit the HOSTS file of the client, join the resolution of Samba Server;

4) Finally, you can see it on the online neighbor.

<80> How to use Linux to set up a proxy server?

1) to http://squid.nlanr.net/squid/ download Squid proxy server software Squid-2.2.stable3-src.tar.gz;

2) Perform tar xzxf squid-2.2.stable3-src.tar.gz

3) Execute ./configure

4) Execute Make, make install installation to / usr / local / squid directory;

5) Edit /usr/local/squid/squid.conf file, join:

ACL ALLOWED_HOSTS SRC 192.168.9.0/255.255.255.0

Note: Suppose your intranet IP address is 192.168.9.0;

6) Perform / USR / local / Squid / Bin / Squid -z for initialization

7) Execute / usr / local / Squid / bin / Squid open service

8) You can access the Internet on the client settings proxy server IP and port 3128.

<81> How to use Linux to make a transparent gateway?

Confirm that the Linux kernel has supported ipchain, then write a script ipchains.rule, the content is:

Note: Suppose the external network address of the transparent gateway server is: 1.2.3.4, which has been connected to the Internet; the intranet address is 192.168.9.1, even

Internet.

#! / bin / sh

/ sbin / ipchains -f forward

/ sbin / ipchains -f input

/ sbin / ipchains -f output

/ sbin / ipchains -p forward deny

/ sbin / ipchains -p Input Accept

/ sbin / ipchains -p output accept acceptexternal_interface = 1.2.3.4

/ sbin / ipchains -a input -j accept -i lo

/ sbin / ipchains -a output -j accept -i lo

/ sbin / ipchains -a input -j deny -i eth1 -s 192.168.9.0/24

/ sbin / ipchains -a input -j deny -i eth1 -d 192.168.9.0/24

/ sbin / ipchains -a output -j deny -i eth1 -s 192.168.9.0/24

/ sbin / ipchains -a outprut -j deny -i eth1 -d 192.168.9.0/24

/ sbin / ipchains -a input -j deny -i eth1 -s $ external_interface / 32

/ sbin / ipchains -a input -j deny -i eth1 -s $ external_interface / 32

/ sbin / ipchains -a output -j deny -i eth1 -d $ external_interface / 32

/ SBIN / IPCHAINS -A Forward -j Accept -i Eth0 -s 192.168.9.0/24

-d 192.168.9.0/24

/ sbin / modprobe ip_masq_ftp

/ SBIN / MODPROBE IP_MASQ_QUAKE

/ sbin / modprobe ip_masq_irc

/ sbin / modprobe ip_masq_user

/ sbin / modprobe ip_masq_raudio

/ sbin / ipchains -a forward -j masq -i eth1 -s 192.168.9.0/24

After running this script, all machines in the 192.168.9.0 network simply set the gateway to 192.168.9.1, you can connect to the Internet.

<82> What server can you build?

Linux can also be a domain name server, a PPP server, a CVS server, a router, a firewall, but also through the LVS solution.

Construction server cluster system.

<83> How to check the port of the system?

You can use the command: netstat -lnp to view the port of the current listening of the system. Where l option indicates a port that is listening (Listen);

The item indicates that the port number is displayed directly instead of reading / etc / service to the port name; the P option indicates the list of listening.

<84> How to use iptable to do NAT on Linux

The following uses redhat7.3 as an example.

Outer NIC IP 200.200.200.100

Net card IP 192.168.8.1

Add the following to the /etc/rc.d/rc.local file, restart the machine

################

Echo "1"> / proc / sys / net / ipv4 / ip_forward

/ sbin / rmmod ipchains

/ sbin / modprobe ip_tables

/ sbin / modprobe iptable_filter

/ sbin / modprobe iptable_nat

/ sbin / modprobe ip_conntrack

/ sbin / modprobe ip_conntrack_ftp

/ sbin / modprboe ip_nat_ftp

/ sbin / iptables -f input

/ sbin / iptables -f forward

/ sbin / iptables -f postrol -t nat

/ sbin / iptables -p forwar drop / sbin / iptables -t nat -a postrouting -o eth0 -s 192.168.8.0/24 -j masquerade

/ sbin / iptables -a forward -i eth0 -m state --state established, Related -j Accept

/ sbin / iptables -a forward -s 192.168.8.0/24 -j accept

################################

<85> How to prevent a key file from being modified under Linux?

Under Linux, some configuration files do not allow anyone to include root modifications, to prevent erroneous deletion or modification, you can set the file "No

Immutable "can be modified.

E.g:

Chattr I / ETC / FSTAB

If you need to modify the file:

ChatTR -I / ETC / FSTAB

The file will be modified later.

<86> How to make a universal ISO image under Linux

Mkisofs -a -l -j -l -r-f filename.iso / Directory

This will make an ISO image that can be used above Windows and Linux (or other Unix)

<87> How to set the user password expiration time under Linux

Setting a user's password expiration time can be set with usermod -e. If you want to set the user's password expiration time, then

Modify the pass_max_days inside /etc/login.defs, such as modifying all users' password expiration time is 30 days:

Pass_max_days 30

If this value is 99999, then the password will never expire.

Novice Getting Started and Installation FAQ (9)

<88> How to implement automatic FTP with scripts under Linux?

# Create a text file, such as the file name is ftp.txt, the content is as follows:

Open 192.168.1.100 / * Connect remote server 192.168.1.100 * /

User myname mypassword / * myname is the username, mypassword is a password * /

Binary / * transmitted in binary * /

Hash / * When there is a data transfer, display # 号 * /

CD remote_pathname / * Enter Remote Target Path Remote_pathname * /

GET Remote_file local_file / * Download the remote file remote_file Download Cost Local_File * /

Put local_file remote_file / * Transmit local file local_file to remote file remote_file * /

BYE / * Exit FTP Application * /

# Excuting an order:

Cat ftp.txt | ftp -n

<89> How to find computer IP according to NetBIOS name under Linux?

use

NMBLOOKUP TEST

You can find an IP of the machine of the NetBIOS name TEST in the same network. If this machine has multiple IP, it will be listed.

<90> How to use multiple virtual terminals (VT) under Linux?

Suppose you have 6 now, in the style of / etc / inittab, join:

8:234: Respawn: / sbin / getty 38400 TTY8

......

24: 234: Respawn: / sbin / getty 38400 TTY24

To skip VT7 because X uses this terminal. The Telinit Q then reload the configuration file. Use the left Alt Fn to switch between 1-6 and 8-12, and switch between 13-24 using the right alt fn key.

<91> How to implement multi-network card Bonding under Linux?

Use multiple network card virtual to become a network card with the same IP address. This technology is actually existed in Sun and Cisco, respectively.

For Trunking and EtherChannel technology, in Linux, this technology is called Bonding.

Because Bonding is already included in the kernel 2.4.x, only the Bonding Driver Support in the Network Device Option is required when compiling.

It is possible.

Then, recompile the core, restart the computer, execute the following command:

Ismod bonding

IFConfig Eth0 Down

IFConfig Eth1 Down

Ifconfig Bond0 ipaddress

Ifenslave Bond0 Eth0

Ifenslave Bond0 Eth1

Now two network cards have been working like a piece. This can improve data transmission between cluster nodes.

You'd better write these sentences into a script, then call the /etc/rc.d/rc.local so that it will take effect on it.

Bonding is a better choice for the server. When there is no Gigabit network card, use two or three 100 megabytes cards to make Bonding, it can be greatly improved.

The server to the bandwidth between the switch. But you need to set two port mappings that connect to the Bonding NIC to the same virtual interface on the switch.

<92> How do I don't respond to ping under Linux?

If you want your Linux server not responding ping

Echo 1> / proc / sys / net / ipv4 / icmp_echo_ignore_all

that's it.

same

Echo 0> / proc / sys / net / ipv4 / icmp_echo_ignore_all

In response to the PING package.

But if you restart your machine, the settings will fail, so you have to put

Echo 1> / proc / sys / net / ipv4 / icmp_echo_ignore_all

Add to /etc/rc.local.

<93> How to create a large number of users at a time under Linux?

Use built-in tools newusers and chpasswd.

Edit your account file first, each column must be written according to the format of the password file. (Please use the copy replication function of the instrument editing program to generate a lot)

Example: A account file name is new_alist

Stu001 :: 600: 600: Stu: / Home / Stu001: / BIN / BASH

Stu002 :: 601: 601: Stu: / Home / Stu002: / BIN / BASH

Stu003 :: 602: 602: Stu: / Home / Stu003: / BIN / BASH

Stu004 :: 603: 603: Stu: / Home / Stu004: / BIN / BASH

Stu005 :: 604: 604: Stu: / Home / Stu005: / BIN / BASH

Stu006 :: 605: 605: Stu: / Home / Stu006: / BIN / BASH

Raised account:

NewUsers

Execute PWUnconv

Edit password control file:

Example: Built a password control file, file name is new_plist

STU001: Password

STU002: Password

STU003: Password

STU004: Password

STU005: Password

STU006: Password

Create password:

Chpasswd

Execute PWCONV

(94) How to modify the NIC MAC address?

1. First of all, the NIC device must be closed, otherwise the system will be reported and cannot be changed.

The command is:

/ SBIN / IFCONFIG ETH0 DOWN

2. Modify the MAC address, which is simpler than the modification in Windows. The command is:

/ sbin / ifconfig eth0 HW Ether 00: AA: BB: CC: DD: EE

3. Re-enable the network card

/ SBIN / IFCONFIG EHT0 UP

The MAC address change of the NIC is completed.

(95) How to boot the Windows system on the non-first hard disk with GRUB?

You can use the MAP command to call the drive defined in the BIOS, such as:

GRUB> MAP (HD0) (HD1)

GRUB> MAP (HD1) (HD0)

(96) / etc / fastab Doubt?

1. FSTAB file role

File / etc / fstab is stored in the system information in the system. When the file is set correctly, you can live through "mount / directoryname"

Loading a file system, each file system corresponds to a separate row, and the fields in each row have spaces or TAB keys. at the same time

The procedure is taken with this program.

2. FSTAB file format

Below is a routine of the / etc / fatab file:

FS_SPEC FS_FILE FS_TYPE FS_OPTIONS FS_DUMP FS_PASS

/ DEV / HDA1 / EXT2 Defaults 1 1

FS_SPEC - This field defines the device or remote file system where you want to load the file system, for a general local block device

Say: IDE device is generally described as / dev / hdaxn, x is the IDE equipment channel (A, B, OR C), N represents partition number; SCSI device

For / dev / sdaxn. For NFS situations, the format is generally:

For example: `knut.aeb.nl: /. For Procfs, use `proc to define.

FS_FILE - This field describes the desired file system loaded by the directory point, for the SWAP device, this field is none; for the load directory name package

Space-containing cases, use 40 to represent spaces.

FS_TYPE - Defines file systems on the device, generally common file types EXT2 (common file type for Linux devices),

Vfat (FAT32 format of the Windows system), NTFS, ISO9600, etc.

FS_OPTIONS - Specifies the file system that loads the device is a specific parameter option that needs to be used, and multiple parameters are separated by commas.

For most systems use "defaults" to meet the needs. Other common options include:

Option meaning

RO loads the file system in read-only mode

SYNC does not buffer the write operation of the device, which prevents the file system in the case of abnormal shutdown, but it is lowered.

Computer speed

User allows normal users to load this file system

Quota enforces disk quota limit on this file system

NOAUTO does not use the mount -a command (such as system startup) load the file system

FS_DUMP - This option is used by "dump" command to check a file system should be documented with how fast frequency, if you don't need to dump

Set this field 0

FS_PASS - This field is used by the fsck command to determine the order of the file system that needs to be scanned during startup, the root file system "/"

The value of the segment should be 1, and other file systems should be 2. If the file system does not need to scan at startup, set this field 0

3. Sample file

# / etc / fstab

/ DEV / HDA9 SWAP SWAP DEFAULTS 0 0

/ DEV / HDA1 / EXT2 Defaults 1 1

/ dev / hda5 / home extra2 defaults 1 1

/ DEV / HDA6 / USR EXT2 Defaults 1 1

/ DEV / HDA7 / USR / LOCAL EXT2 DEFAULTS 1 1 1

/ DEV / HDA8 / VAR EXT2 DEFAULTS 1 1

/ dev / hdb / cdrom iso9660 noauto, user 0 0

None / Proc Proc Defaults 0 0

None / dev / pts devpts gid = 5, Mode = 620 0 0

(97) How to temporarily add exchange space?

1. Generate a 64M empty file

#dd if = / dev / zero of = / swapfile bs = 1024 count = 65536

2. Initialize this file is exchange file:

MKSwap / swapfile 65536

Sync

3. Activate this exchange file:

Swapon / swapfile

Newcomer entry and installation configuration FAQ (10)

(98) Common file type?

Compression and packaging files

* .bz2 - Use the bzip2 command to compress file, you can use BZIP2 -D FileName Unpack

* .gz - Use the Gzip command to compress file, you can use Gunzip -d FileName Unpack

* .tar - Use the TAR package file, TARBALL file, you can use TAR XF filename unpack

* .tbz - Use the TAR to complete the package with the BZip2 command to compress file, you can use tar jxf filename unpacking

* .z - Use the compress command to compress file, you can use the compress -d filename unpack

* .tgz - Use the TAR to compress the package with the Gzip command, you can use TAR ZXF FileName Unpacking

Ordinary file format

* .au - Sound file, you can use the system's sound player or Java program play

* .gif - GIF image file, you can use a web browser view

* .html / .htm - html file, you can view the web browser

* .jpg - JPEG image file, you can view web browsers

* .pdf - electronic version of the document, PDF is a standard for electronic documents, you can use

* XPDF or Adobe Acrobat Reader Read

* .png - PNG image file, PNG is short of Portable Network Graphics, you can view web browsers or image browsers

* .ps - PostScript file, a print format file, you can use the GhostView or an image browser that supports the PS view,

You can also output it directly to printer printing.

* .txt - text format file, you can use any editor to view

* .wav - Sound file, you can play with sound player

* .xpm - XPM image file, you can use the image viewer to view

System Files

* .conf - A program configuration file, usually use VI to edit

* .lock - Lock file for a program, used to detect a program in execution or device or resource is being used

*.rpm - redhat pack manager file for installation software

Program and script files

* .c - C language program source code file

* .cpp - c language program source file

* .H - C or C language header file

* .o - Program Object File

* .pl - perl script file

* .so - Dynamic Link Library

* .tcl - TCL script file

(99) How does LILO failure after WIN9X?

After the WIN9X, LILO fails, resulting in the unable to start Linux.

You only have to start Linux with a floppy and then run a LILO. For Redhat, you can use the command mkbootdisk to make a boot disk, for example: mkbootdisk - DEVICES / DEV / FD0 2.2.15-1

2.2.15-1 is a directory for the corresponding operating system version number under / lib / modules.

If there is a disc, you can start from the CD, then enter Linux Rescue, enter after entering

Lilo -r / mnt / sysimage is just fine.

(100) The meaning of the relevant options in the kernel compilation menu?

1. Prompt for development and / or incomplete code / drivers

A lot of reference books said that this is the function of developers think it is not very stable, but according to my experience, this is an option that should be selected.

Because modern Linux is based on these, it should be able to answer y, unless you just want to use it in Linux.

West, but performance is certainly not good, and support for system characteristics will not be good.

2. Processor Family (386, 486 / CX486, 586 / K5 / 5X86 / 6X86, PENTINUM / K6 / TSC, PPRO / 6X86)

This should not be said too much, choose your CPU's type, BIOS can self-test, pay attention to the system's startup information. Need not to pay attention to

You can choose a high-level CPU than your CPU type, otherwise it may not work.

3. Math Emulation

Analog mathematics coordinator, if your machine has no mathematical coordinator, then select the performance, but 486 after the mathematics coprocessor

It is necessary to use the CPU, it should be not used, so the general choice is N. Of course, there will be no problems, except that the core is slightly larger.

4. MTTR (Memory Type Range Register) Support

This option is used to start the special features of Pentinum Pro and Pentinum II. If you are not using this type of CPU, you will choose N, otherwise just

It is made to make the kernel.

5. SYMMETRIC MULTI-Processing Support

Synchronous processor support, if you have multiple CPUs, choose.

6. Enable loadable module support

This will initiate the functionality of the extra module, so it is sure to select.

7. SET VERSION INFORMATION ON All Symbols for Modules

This option can be used for a version of the module compiled by another version of the kernel, but it is generally not used.

8. Kernel Module Loader

If you enable this option, you can automatically load or uninstall those loaded modules at needed at needed through the Herneld program.

The suggestion is recommended.

9. Networking support

If you use any network, you should choose

10. PCI BIOS Support

This is usually selected, unless you use a machine without any PCI device. PCIBIOS is used to detect and enable PCI devices.

11. PCI Bridge Optimization (V1.3)

When this option is started, the operating system will optimize the data from the PCI bus from the CPU and the system. This function has been completed.

In the experimental phase, it should be safe and can also enhance the efficiency of the system.

12. System V IPC

The use of this option allows the kernel to support the functionality (IPC) of the SYSTEM V process, and some programs that are transferred from System V will need

This feature is recommended to enable this feature.

13. Sysctl Support

Unless you have less memory, you should start this feature, enable this option, the kernel will be 8K, but you can let you change the parameters of the kernel without having to reboot.

14. Keernel Support for Elf Binaries

This option allows your system to perform executables stored in ELF format, and ELF is a modern Linux executable file, target file, and system

Standard format of the library. These criteria are required when the operating system should work with the compiler and the connector, so I should answer Y.

15. Compile Kernel AS ELF

This option makes your kernel itself compiles in ELF format, if the process GCC on your system generates an executable file in ELF format, then you

This option should be started. Let's take a look at the version of your compiler and decide.

16. Parallel Port Support

If you have any parallel devices and want Linux to use, you can enable this option. Linux can not only use parallel printers,

You can also support PLIP (a network communication protocol designed for parallel port), ZIP disk drive, scanner, etc. In most cases, you need

The additional driver can use external parallel devices.

17. Plug and Play Support

Support PNP devices is not Microsoft's patents, if you want Linux support PNP devices, just enable this option, but in some cases

Conflicts with other devices (I / O, DMA, IRQ, etc.). This option has no effect on the PCI device, because they are born to PNP devices.

18. Normal Floppy Disk Support

Unless you don't want to use a floppy disk under Linux, you should answer Y. But for some systems that do not need to support floppy drives, this selection

The item can save some memory.

19. Enhanced IDE / MFM / DLL DISK Support

Unless you don't need support for the MFM / DLL / IDE hard disk, you should answer Y, but if you only have SCSI's hard drive, turn off this option to be

Safety.

20. Enhanced IDE / MFM / DLL CDROM Support

Similar to the above, it is only the support of CDROM.

21. Enhanced IDE / MFM / DLL TAPE Support

It is generally not how many people are using a tape drive, so answering N is a better answer.

22. Enhanced IDE / MFM / DLL FLOPPY Support

This device is like a general use, so I can answer N.

23. xt HardDisk Support

If you have this stone's XT hard drive, congratulations, you can use him.

24. Parallel Port Ide Device Support

Linux is an IDE device that supports this very new parallel port. If you have, use it.

25. Networking Options

If you choose a support network in front, you will answer a lot of questions here. Unless you have a special demand, you should use the default option.

Will suffice.

26. SCSI Support

If you have any SCSI control card, this option should answer Y. Find your hardware in advance, because these problems are needles

For a specific SCSI control chip and control card, if you are not sure which one you are using, check your hardware's instructions or Linux

Howto documentation. Also let you answer a lot of SCSI devices (hard drives, cdrom, tape, floppy, etc.), based on your situation.

If you don't have a SCSI device, it is recommended not to support because it saves a lot of kernel space.

27. Network Device Support There are a lot of questions about the network control card. If you can't determine how to choose correctly, check the hardware document or Linux Howto document.

28. Amateur Radio Support

This option can be used to start basic support for wireless networks, and current wireless networks can transmit data through the public frequency if you have such devices.

You can enable it, please refer to the AX25 and Ham Howto documents.

29. Isdn Subsystem

If you have ISDN hardware, you should enable this option and install the right hardware driver, you should also need

Enable the Support Synchronous PPP option (refer to PPP overisdn).

30. OLD CD-ROM Drivers

This is a problem for some special optical drive programs. If you have IDE or SCSI's CDROM control card, then this option is not enabled.

31. Character Devices

Linux supports many special character devices, such as parallel port, serial port control card, QiC02 tape drive, and mouse in a specific interface,

The game rod and the image takes up and the microphone, etc., according to your own situation.

32. FileSystems

This is a series of file systems supported by the kernel. It is necessary to support the EXT2 / PROC file system.

Hold ISO9660 (or module support), with Windows or DOS partitions and want to access them under Linux.

33. Console Drivers

You should at least support VGA Text Console, otherwise you can't use Linux from the console.

34. Sound Card Support

The answer y here, there will be a lot of questions about the sound card, configure it according to your own situation.

35. Keernel Profiling Support (V1.3)

This option can turn on the function of kernel to perform efficiency statistics and provide other information useful when detection for system. These features will be required

Out of the price and cause the system to perform slowly, unless you are studying a question of the kernel, you should answer N.

36. kernel Hacking

If you are planning to study how Linux running on your system is working, there are many options here, but it is generally not necessary.

Shut down.

101. Why is it very slow when logging in with Telnet / FTP, and normal login is normally?

This is because telnetd / ftpd is started with TCPD, and TCPD is necessary to perform security checks, and it uses reverse name parsing.

You can add the client's IP address / name to / etc / hosts or add to DNS.

Another way is to cancel TCPD (not recommended), modify /etc/inetd.conf

Original: ftp stream tcp noait root / usr / sbin / tcpd in.ftpd -l -a

Change to: ftp stream tcp noait root /usr/sbin/in.ftpd in.ftpd -l -a

Original: telnet stream tcp noait root / usr / sbin / tcpd in.telnetd

Change to: Telnet Stream TCP NOWAIT ROOT /USR/SBIN/IN.TELNETD IN.TELNETD

After finishing, use Killall -Hup inetd to take effect.

102. How to prohibit a Telnet function of a user, and he has an FTP function?

: Suppose you want to turn off the user ftponly Telnet,

: 1) Write a shell script / bin / ftponly:

: #! / bin / sh

: / bin / cat << xx

: You Can Only Use ftp on this computer ,: But you may not use this account to login.

: Connection Will Be Closed in 10 Seconds.

: XX

: / USR / BIN / SLEEP 10

: #nd of ftponly

: 2) Set the shell of the user ftponly to / bin / ftponly:

: Go to the Passwd file, find the line corresponding to ftponly

: ftponly: ......: / home / ftponly: / bin / bash, put the final

: / bin / bash change to / bin / ftponly.

: 3) Add / bin / ftponly to / etc / shells

: / BIN / BASH

: / bin / tcsh

: / bin / csh

: / bin / ash

: / bin / zsh

: / bin / ftponly

: Just line ..

----------------

:: Suppose you want to turn off the user ftponly Telnet,

:: 1) Write a shell script / bin / ftponly:

:: #! / bin / sh

::: / bin / cat << xx

: ~~

: XX is a casual file name?

The XX here is a flag. When ftponly tries telnet, the content between the two XX will appear on the screen.

After 10 seconds, cut off the Connect.

Note: You should also use Trap to block the keyboard interrupt! Otherwise, the family uses Ctrl-Z ...

103. Don't make a boot floppy disk, install Linux directly?

In the Linux CD, there is a DOS software named loadlin.exe, which is the role of transferring Linux core into memory and by Linux core generation.

For the current OS pipeline computer, enter the Linux installation routine.

Suppose the user's optical drive is F: disk, the Linux core is f: / images / vmlinuz, enter the following command, you can use the start-up floppy disk, direct

Install Linux:

Loadlin f: / images / vmlinuz root = / dev / ram initrd = f: /images/initrd.img

Loadlin software has other options to adapt to different hardware configurations. If you are interested, you can see the loadlin document.

Important information in 104./proc?

CAT / Proc / CPUInfo - CPU (I.E. Vendor, MHz, Flags Like MMX)

CAT / Proc / Interrupts - Interrupt

CAT / Proc / Ioports - Device IO Port

CAT / Proc / Meminfo - Memory Information (I.E. MEM Used, Free, Swap Size)

CAT / Proc / Partitions - All partitions of all devices

CAT / PROC / PCI - Information of PCI Equipment

CAT / Proc / Swaps - Information on all SWAP partitions

CAT / Proc / Version - Linux version number

105. How to let your hard drive fly?

32bit I / O and DMA can also be used under Linux. Use / sbin / hdparm -c1 / dev / hda (HDB, HDC ..) to open 32Bit transfer mode, use

Command / Sbin / HDPARM-D1 / DEV / HDA (HDB, HDC ...) opens DMA. Finally use / sbin / hdparm -k1 / dev / hda to make your hard disk

Keep the above settings after RESET, so that the hard disk read / write speed should be more than double.

106. How to build a symbol connection?

LN-S REAL-FILE SYMBOLIC-FILE, whether it is a device, document or a scriptor.

107. Grub menu item is lost, only the processing method when character grub>? 1.grub> cat (hd0, 0) /Root/grub/grub.conf (to see parameters.)

GRUB> root (HD0, 1)

Grub> kernel (HD0, 0) /BOOT/VMLINUZ-2.4.18-14 RO root = label = /

Grub> initrd (HD0, 0) /BOOT/INITRD-2.4.18-14.IMG

GRUB> Boot

OK! Restart

108. How to install * .src.rpm file?

#rpmbuild --rebuild mplayer-0.90pre8.20021004-1.src.rpm

#CD / USR / SRC / Redhat (or other) / RPMS / i386 /

#rpm -ivh xxxxx.rpm

The above method is to REDHAT 8.0 and Mandrake9.0, if it is below this version. Should

# rpm --rebuild * .src.rpm

转载请注明原文地址:https://www.9cbs.com/read-127206.html

New Post(0)