Article Title: cainiao beginners learn about Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
1. Slow logon via telnet: cd/etc vi resolv. conf clears the content
2. the root user cannot log on remotely. For details, see cd/etc cd pam. d vi login to comment out this line # auth required pam_securetty.so // comment out this line
3. Mount the USB mobile hard drive and mount the mobile hard drive.
# Df view the hard drive letter mount/dev/sda1/mnt/usb in Linux (example)
5. Change the graphic interface or character interface when Linux is started. cd/etc vi inittab: id: 5: initdefault: 5 indicates the default graphic interface. Change id: 3: initdefault: 3 to indicate the character interface.
8. Configure the IP addresses that smb can use.
Cd/etc/samba Vi smb. conf Find hosts allow = 192.168.1. 192.168.2. 127. Which machines are used to modify them? Note that IP addresses are separated by commas For example: hosts allow = 192.168.1.110, 192.168.1.120
9. disable restarting the machine cd/etc/inittab vi inittab in the background using the CTRL-ALT-DELETE find the following line in the file # Trap CTRL-ALT-DELETE ca: ctrlaltdel: /sbin/shutdown-t3-r now (comment out this line)
For example: # Trap CTRL-ALT-DELETE # ca: ctrlaltdel:/sbin/shutdown-t3-r now
10. Modify the host name vi/etc/sysconfig/network and set HOSTNAME to HOSTNAME = Host Name.
12. view the boot detection hardware dmesg | more
13. View hard disk usage df? M
14. view the directory size du? Sh dirname
15. unzip the full tar xvfj lichuanhua.tar.bz2 tar xvfz lichuanhua.tar.gz tar xvfz lichuanhua. tgz tar xvf lichuanhua.tar unzip lichuanhua.zip
16. Display memory usage free? M
17. forget the root password. For grup 1. when the grup screen appears, use the up/down key to select which option to start Linux, and press the e key 2. select kernel/boot /......... Then press the e key 3. modify now see the command, add single result: kernel/boot/vmlinuz-2.4.20-8 single ro root = LABEL = 4. press enter to return, press the B key to start, and directly go to the linux Command Line and execute: passwd root to change the password. You can set the password. If it is lilo: press Tab, the screen shows lilo typing: linux single, press ENTER
18. display how long the system has been running uptime
19. restart the network/etc/init. d/network restart.
20. dmesg
21. Check the port netstat? An netstat-anp
22 ...... Detailed list of ports/etc/services
23. View physical information lspci
24. The installation graphic interface cannot appear. Use parsing to install Linux lowres (with a resolution of 640X480)
25. The ping command of the host is blocked. The host cannot be pinged by others. echo 1>/proc/sys/net/ipv4/icmp_echo_ignore_all
26. Delete the Oracle Installation program. delete several directories/etc/oraInst. loc/tmp/etc/oratab $ ORACLE_BASE /*
28. RPM package 1. Uninstall RPM? E 2. query rpm? Q-a query all installed software packages-f query software packages that contain files-I show software package information-l show software package file list 3. Verify rpm? V rpm? Va verifies that the entire file is missing. What files do they encounter when they use rpm? Qf 4. Where to install an rpm package (Installed Package)
Rpm? Qi package name (not included here. The software name with the rpm suffix, that is, only mysql or mysql-3.23.54a can be used)
5. What files are contained in an rpm package? One software package that has not been installed: Use rpm? Qip ***. rpm a software package that has been installed: Use rpm? Qi ***. rpm
29. Check the installed Character Set locale-.
30. packet capture command tcpdump example: capture all the packets received and sent by the host at 192.168.1.32 tcpdump host 192.168.1.32 and capture the specific port tcpdump tcp port 21 host 192.168.1.32
31. text section Chinese support RH 9.0 built-in installation package zhcon_0.2.3_1.rh9.i386.rpm after installation is complete, run: zhcon to support Chinese
32. Check what program is running on the port lsof? I: 8001
33. view Real-time log tail? F/var/log/messages
34. When mount is dead 1. fuser? M/mnt/share find out the process of the program, and Kill 2. Then umount/mnt/share
35. linux control windows 1. Use RH9.0 to bring rdesktop, version 1.2.0 command: rdesktop? U user? F 192.168.1.70: the default color is 8 bits and 2. To reach 16 colors, download the new version 1.3.0 rdesktop? A 16? U lichuanhua? G 800*600 192.168.1.70
36. Linux mount Windows partition mount ntfs partition 1. Windows NTFS partition mounted on a single machine 1. search for and download kernel-ntfs-2.4.18-14.i686.rpm on www.google.com 2. rpm-ivh kernel-ntfs-2.4.18-14.i686.rpm 3. mkdir/mnt/share 4. mount-t ntfs/dev/hda1/mnt/share to mount Windows partitions, first create a directory/mnt/share, modify/etc/fstab, add at the end (assuming Windows is installed in the first partition of the hard disk)
/Dev/hda1/mnt/share ntfs ults 0 0 2. On a windows and linux machine on the network, the linux machine mounts the shared file windows IP address on windows: 192.168.1.1 1. linux mounts the shared file dbf on 192.168.1.1 (windows), hangs it in the/mnt/share directory of linux, and creates the mount-t smbfs-o username = massky directory under/mnt, password = massky // 192.168. 1.1/dbf/mnt/share 2. automatic mounting upon machine restart. Add "// 192.168.1.1/dbf/mnt/share smbfs defaults, auto, username = m assky, password = massky 0" to vi/etc/fstab.
37. oracle9i installation on Linux9.0 1. run the following command to check whether these packages have been installed: RPM-q gcc cpp compat-libstdc ++ glibc-devel glibc-kernheaders binutils 2. decompress zcat Linux9i_Disk1.cpio.gz | cpio-idmv zcat Linux9i_Disk2.cpio.gz | cpio-idmv zcat Linux9i_Disk3.cpio.gz | cpio-idmv 3. set the Kernel Parameter vi/etc/sysctl. conf, add the following parameter kernel. shmmax = 4294967295 memory 1024 M calculation method: kernel: shmmax = 1024 * RAM (M)/2 run sysctl-p to take effect 4. create a data directory And add dba groupadd oins Tall useradd? G oinstall? G dba oracle passwd oracle
Mkdir/opt/oracle/product/9.2.0 chown? R oracle. oinstall/opt/oracle mkdir/var/opt/oracle chown oracle. dba/var/opt/oracle chmod 755/var/opt/oracle 5.vi. bash_profile variable export region = 2.4.1 export ORACLE_BASE =/opt/oracle export ORACLE_HOME =/opt/oracle/product/9.2.0 export ORACLE_SID = ora9i export ORACLE_TERM = xterm export TNS_ADMIN = $ ORACLE_HOME/network /admin export NLS_LANG = AMERICAN_AMERICA.ZHS16GBK export ORA_NLS33 = $ ORACLE_HOME/ocommon/nls/admin/data LD_LIBRARY_PATH = $ ORACLE_HOME/lib: /lib:/usr/lib LD_LIBRARY_PATH = $ LD_LIBRARY_PATH:/usr/local/lib export LD_LIBRARY_PATH
Export PATH = $ PATH: $ ORACLE_HOME/bin CLASSPATH = $ ORACLE_HOME/JRE: $ ORACLE_HOME/jlib: $ ORACLE_HOME/rdbms/jlib CLASSPATH = $ CLASSPATH: $ ORACLE_HOME/network/jlib export CLASSPATH
38. Enable and stop the super user of the NIC; ifconfig eth0 down stop ifconfig eth0 up start
40. install and configure cvs in Linux 1. Install the CVS package.
2. groupadd cvs 3. useradd-g cvs cvsroot 4. chmod 777-R/home/cvsroot 5.cd/etc 6.vi profile adds the following two lines: CVSROOT =/home/cvsroot export cvsroot cvsedit = vi export CVSEDIT 7. view the comment status of the line of the cvspserver in the/etc/services file (If yes, remove the comment)
8. enter/etc/xinetd. d, vi cvspserver the file does not exist, the content is as follows: service cvspserver {disable = no socket_type = stream wait = no user = root env = HOME = server =/usr/bin/cvs server_args = -- allow-root =/home/cvsroot pserver log_on_failure + = USERID} 9.vi/etc/xinetd. the conf file is as follows: service cvspserver {port = 2401 socket_type = stream wait = no user = root server =/usr/bin/cvs server_args =-f -- allow-root =/home/cvsroot pserver bind = 168.168.1.110} log on again to the cvsroot user 10. /etc/init. d/xinetd restart 11.cvs init (initialization: initialization of the CVS version Library)
12. cvs-d: pserver: cvsroot@192.168.1.110:/home/cvsroot login (user login) success without any prompts.
13. import data to the database first. Assume that the project name is LinuxISQuote. step: 1. Enter LinuxISQuote. 2. import cvs import LinuxISQuote lch V_0_0_1 to the $ CVSROOT directory for the first time in a project. A LinuxISQuote directory is added.
41. Absolute command path. If it is not an absolute path, you can enter (1) [root @ RedHat linux] # whereis adduser: /usr/sbin/adduser/usr/share/man/man8/adduser.8.gz you can enter/usr/sbin/adduser xxx (2) or change vi/etc/profile, add PATH = $ PATH:/usr/sbin :. Export PATH, you can directly enter adduser
42. Modify user permissions. If you change the user permission, you can change vi/etc/passwd. For example, if I want to change lll to a root user, I will change it to lll: x: 508: 508 :: /home/lll:/bin/bash. Change the 508 value to be the same as the data after root!
Change to lll: x: 508: 0:/home/lll:/bin/bash lll to have the root permission.
43. Modify the background image 1 when grub is started to convert an image to an XPM file of 640*480 and 14 colors: # convert abc.jpg-colors 14-geometry 640x480! Abc. use gzip # gzip-9 abc. xpm 3 copy abc.xpm.gz to/boot/grub and modify/boot/grub/menu. lst splashimage = (hd0, 0)/boot/grub/abc.xpm.gz
44. installation of VNC for Linux 1. step 1 install the VNCserver tar zxvf vnc-X.tgz cd X cp * vnc */usr/local/bin/No vnc directory on linux, create the vnc directory mkdir/usr/local/vnc cp-r classes/usr/local/vnc/2. set the vnc server access password vncpasswd 3. linux vnc server. First, run vncserver Modify/root /. twm $ in vnc/xstartup is gnome-session & 4. start vnc server vncserver note New 'X' desktop is KILl: 3 Remember 3 is the port used by the Client 5. start vncviewer on the client, enter 192.168.1.110: 3 OK, and you will see ...... Haha ......
If IE or NETSCAPE is installed on a Windows client, you can start IE or netscape and enter it in the address bar (if it is 1)
Http: // 192.168.1.64: 5801
45. Change or disable the ftp and http ports of Oracle XDB and start from Oracle 9i. XDB features are included by default when you create a database. Once the database and Listener are started, the http service of Oracle XDB occupies port 8080, which is in conflict with default ports such as JBoss and Tomcat. Therefore, there must be one change. It's easy to change Tomcat, but I don't know how to change the XDB configuration at the moment.
Search on Google and find the answer. The port settings of Oracle XDB are not in the configuration file, but in the database. There are three methods to modify the http and ftp service ports of XDB: 1. use sys to log on to Oracle and use dbms_xdb to modify the port settings SQL> -- Change the HTTP/WEBDAV port from 8080 to 8081 SQL> call dbms_xdb.mongo_update (updateXML (2 dbms_xdb.mongo_get ()
3, '/xdbconfig/sysconfig/protocolconfig/httpconfig/http-port/text ()' 4, 8081 ))
5/Call completed. SQL> -- Change the FTP port from 2100 to 2111 SQL> call dbms_xdb.cfg_update (updateXML (2 dbms_xdb.cfg_get ()
3. '/xdbconfig/sysconfig/protocolconfig/ftpconfig/ftp-port/text ()' 4, 2111 ))
5/Call completed. SQL> COMMIT; Commit complete. SQL> EXEC dbms_xdb.cfg_refresh; PL/SQL procedure successfully completed. 2. use the OEM console and select Database, XML Database, and Configuration. modify the settings of XDB.
3. Remove the database initialization parameter dispatchers = '(PROTOCOL = TCP) (SERVICE = XDB)', which will disable the http and ftp services of XDB.
46. for XML for linux installation, I downloaded two files: libxml2-2.6.13.tar.gzand xml4c5_4_0-redhat_80-gcc_32.tar.gz to join the environment: export XERCESCROOT =/home/lch/xml export PATH = $ PATH: /home/lch/xml/bin export XERCESC_NLS_HOME = $ XERCESCROOT/msg export LD_LIBRARY_PATH = $ XERCESCROOT/lib: $ LD_LIBRARY_PATH (on Solaris, Linux)
Run runConfigure-plinux-cgcc-xg ++-rpthread in the directory decompressed by xml4c5_4_0-redhat_80-gcc_32.tar.gz. /Configure gmake
47. ace for each "file has some impact on audio and video, because the main actions can be automatically completed by the installation script ACE-install.sh in the ace package, our main work can be handled directly on this installation script.
1. installation environment: lRedHat 9.0 aceinstallation package ace?tao=ciao.tar.gz, http://deuce.doc.wustl.edu/Download.html, "Latest Beta Kit", beta version is the Latest version of ACE.
2. Installation process: first, set the ACE_ROOT environment and run the command "vi/etc/profile"
Add four lines of ACE_ROOT =/opt/ACE export ACE_ROOT LD_LIBRARY_PATH = $ ACE_ROOT/ace: $ LD_LIBRARY_PATH export LD_LIBRARY_PATH to "export path user ...." . Run/etc/profile once. Command: "chmod 555/etc/profile"
"/Etc/profile"
In this way, we have set ACE_ROOT. You can run the following command to check whether ACE_ROOT is set: "echo $ ACE_ROOT"
In this case, the best reboot .step 2 is not required. Manually unlock the ace?tao=ciao.tar.gz package, especially if it is not completely unlocked, you can see that the installation script will unlock it for us. If you unlock all manually, the installation script will delete your extracted directory! The only thing we need to do is to separate the ACE-install.sh installation script in the acemo-tao=ciao.tar.gz package and modify it. We only need this file.
Use mkdir to create a directory, such as/home/my/ace. then, put your ace‑tao‑ciao.tar.gz in this directory (use the cp command to copy or move the mv command to this directory ). The contents will be your directory of ace‑tao‑ciao.tar.gz. The installation script will come to this directory to find this file, this directory is different from ACE_ROOT, And the ACE-install.sh also prompts not to set these two directories to the same directory. ACE_ROOT will be our installation target directory.
Extract A single file ACE-install.sh from acew.tao=ciao.tar.gz: "tar? Zxvf ace?tao=ciao.tar.gz ACE_wrappers/ACE-install.sh"
After the solution is completed, a new sub-directory named "ACE_wrappers" will be generated ". At this point you can first move the ACE-install.sh to the external Directory: "mv/ACE_wrappers/ACE-install.sh ."
"." Indicates the current directory. Of course, ACE-install.sh in what path is no impact, because we want to modify the content of the ACE-install.sh, there are a lot of paths to modify. Well, now there is a ACE-install.sh in/home/my/ACE, we now use vi to modify it, you can back up one before modification. Command: 'cp ACE-install.sh ACE-install.sh.bak"
Vi ACE-install.sh"
We can see that the default file is used for installation in UNIX. So we need to replace the UNIX-related part with linux.
Find "MY_ACEDIR =$ {HOME}/aceconfig", change it to the directory of the "MY_ACEDIR =/home/my/Hangzhou" file, and then remove the comment.
Next, find "MY_ACE_CONFIG = config-sunos5.4-sunc ++-4. x. h" and change it to "MY_ACE_CONFIG = config-linux.h", that is, change it to the configuration file under linux. Change "MY_ACE_GNU_MACROS = platform_sunos5_sunc ++. GNU" to "MY_ACE_GNU_MACROS = platform_linux.GNU ". This is the GNU macro file settings for various operating system platforms.
Okay. After the file is modified, save the file and exit ": wq ".
Step 3: We will focus on installing ACE now.
In the/home/my/ACE directory, run :. ACE-install.sh
49. Enable the background talk function. Enable the talk function: chkconfig talk on talk: talk massky (user)
50. Do not let the monitor sleep setterm? Blank 0
51. Customize the information displayed during user logon. Edit the information to be displayed when/etc/motd is added to the logon.
52. view route information netstat? Rn route? N
54. Display hardware information lsdev 55. display the currently loaded core module lsmod
56. list all available modules in the system kernel modprobe? L
57. display the process ID pidof vsftpd based on the process name
58. Read rev file. name in reverse order
59. Customize the information displayed during user logon. Edit the information to be displayed when/etc/motd is added to the logon.
60. view password expiration information change? L longinname
61. display the last user logged on to the system last
62. display the last unsuccessful logon attempt (lastb command)
If you cannot work on the system, you need to create a file: touch/var/log/btmp, and then execute the lastb command to view the last unsuccessful logon attempt,
63. Execute an ls command watch in 3 seconds? N 3 ls