Linux learning document-Enthusiasm & nbsp; 10 years

Source: Internet
Author: User
Global Environment Variable: etcprofile (the system takes effect when a user logs on) for example: exportJAVA_HOMEusrjavajdk1.6.0_20exportPATH $ PATH: $ JAVA_HOMEbinexportCLASSPATH.: $ JAVA_HOMElibdt.jar: $ export global login

 

Global Environment Variable:/etc/proFile(The system takes effect when a user logs on)
For example:ExPort JAVA_HOME =/usr/java/jdk1.6.0 _ 20
ExportPATH = $ PATH: $ JAVA_HOME/bin
Export CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tooLs. Jar
Export JAVA_HOME PATH CLASSPATH

Global logon self-run program settings:/etc/bashrc (executed when a user logs on to the system)

User-level environment variables :~ /. Bash_profile (the system takes effect when the user logs on)
User-level logon self-running program settings :~ /. Bashrc (executed when the user logs on to the system)


Set auto-start service:ChkconfigOr add it to the/etc/rc. local file.

Modify the startup level:
In the/etc/inittab file
Id: 5: initdefault
3: With Network ServicesCommandRow Mode
5: graphic user interface mode

Start X Window: startx or xinit.

System firewall: service iptables start | stop | restart

FtpService (vsftp ):
Start: service vsftpd start
Disable: service vsftpd stop
/Etc/rc. d/init. d/vsftpd start | stop | restart
Default root directory:/var/ftp/
Anonymous user: anonymous
File structure of vsftp:
/Usr/sbin/vsftpd ---- main program of VSFTPD
/Etc/rc. d/init. d/vsftpd ---- start the script
/Etc/vsftpd. conf ---- main configuration file
/Etc/pam. d/vsftpd ---- PAM Authentication File
/Etc/vsftpd. ftpusers ---- disable VSFTPD User List Files
/Etc/vsftpd. user_list ---- prohibit or allow VSFTPD User List Files
/Var/ftp ---- anonymous user home directory
/Var/ftp/pub ---- download directory of Anonymous Users
/Etc/logrotate. d/vsftpd. log ---- log File


MySQL database:
Start:/etc/init. d/mysql start
Stop:/usr/bin/mysqladmin-u root-p shutdown
Set password:/usr/bin/mysqladmin-u root password 123456
Run the SQL file: source SQL file;
Logon: mysql-u root-p
Username: root
Password: tiger

Apache server:
Start | stop | restart:/mine/apache2/bin/ApachectlStart | stop | restart


ToMcAt container:
Start:/mine/tomCat6/bin/startup. sh
Or/mine/tomcat6/bin/catalina. sh
Stop:/mine/tomcat6/bin/shutdown. sh
Username: admin
Password: admin


Common commands:
Ls ---- display file. -L: displays details. -A: displays all files.
Chown---- Change the file owner
Chmod---- Change File Permissions
More---- View File Content
Mount "device name" "directory name" ---- mount a device
Find.-Name perl * ---- search for files starting with perl in the current directory.
Grep---- Comprehensive searchRegular ExpressionExpression and print it out
Rpm ---- (rEdHat package manage ). -Qa: view all installed software packages.
-E: "name": uninstall the "name" package. -Ivh: "name" to install the "name" software package.
-I: installation. -V and-h: output the installation information.
GZip-D ---- SolutionCompressionGz file. -D:Extract.
Tar-xvf ---- decompress the tar file. -X: extract. -V: detailed process description. -F: file.
Ps-ef | gref tomcat ---- view the process information with the tomcat name. Ps: Observe which processes are available.-ef: lists all processes in the current system.
Kill-9 process ID ---- forcibly kill the process with the ID. -9: force-killing.
Wget http: //... ---- access the Internet through the command line.
Halt---- Shutdown

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.