Install the Linux system and configure it.

Source: Internet
Author: User
Tags save file ftp access

When the installation is complete, you will see the following console:

Enter Ubuntu by entering the username (user) entered in the installation information above and then entering the password (user).

Use Ctrl + Alt shortcut keys to leave the virtual machine at any time.

3 Configuring Ubuntu3.1 to open the root user

1) Set the root user's password

sudo passwd root

First enter the user's password: user

Then enter the root user's password:root

The actual situation should be set by yourself.

2) switch root user

Su Root

At this point, you need to enter the root user's password, and finally you can switch to the root user to log in.

The following are all operated as root users.

3.2 Modifying the time zone

Cp/usr/share/zoneinfo/asia/shanghai/etc/localtime

Because the default is the US time zone, it needs to be modified to the Chinese time zone, otherwise the correct system current time cannot be obtained in development.

3.3 Configuring an HTTP proxy (optional)

1) Configure Environment variables

VI ~/.BASHRC

Add the following configuration at the end of the file:

?
1 exporthttp_proxy=http://

The host and port can be set by themselves.

Tips:

    1. Use i to switch to insert mode (default to command mode)
    2. Use ESC to switch to command mode
    3. Use : Wq to save changes
    4. Use : q! Discard Changes

I have 3 modes: insert mode, command mode, low line mode.

Insert mode: You can enter characters in this mode and press ESC to return to command mode.
Command mode: You can move the cursor, delete characters, and so on.
Low-line mode: can save files, exit VI, set VI, Find and other functions (low-line mode can also be seen as a command mode).

One, open file, save, close file (used in VI command mode)

VI filename//open filename File
: w//Save File
: w vpser.net//Save to Vpser.net file
: Q//Exit editor, if the file has been modified please use the following command
: q! Exits the editor without saving
: Wq//Exit editor, and save file

Second, insert text or lines (vi command mode to use, after executing the following command will enter the insertion mode, press ESC to exit the insertion mode)

A//Add text after the current cursor position
I//Add text to the front of the current cursor position
A//Add text at the end of the current line
I//Add text at the beginning of the current line (the beginning of a non-empty character)
O//Create a new row above the current line
O//Create a new row below the current line
R//replace (overwrite) the current cursor position and several subsequent text
J//Merge cursor row and next line of behavior (still in command mode)

Third, move the cursor (used in the VI command mode)

1, use the upper and lower left and RIGHT arrow keys

2, Command mode: H left, J down, k up, l to the right.
Spacebar to the right, Backspace left, Enter to the next line,-move to the top of the line.

Iv. Delete, restore characters or lines (used in VI command mode)

X//Delete current character
NX//delete n characters starting from the cursor
DD//Delete when moving forward
NDD//Down Delete the current row, including n rows
U//Undo Previous action
U//Undo all operations on the current line

V. Search (used in the VI command mode)

/vpser//Search for Vpser strings under cursor
? vpser//Searching for vpser strings on the cursor
N//down searches for previous search action
N//Up search previous search action

Six, jump to the specified line (vi command mode use)

n+//Jump down N rows
N//Jump up N rows
NG//jumps to rows with line number n
G//Jump to the bottom of the file

Seven, set the line number (vi Command mode use)

: Set nu//Display line number
: Set Nonu//Suppress line numbers

Eight, copy, paste (used in the VI command mode)

YY//Copy the current line to the buffer, you can also use "Ayy copy," A is a buffer, a can also be replaced by any letter A to Z, you can complete multiple replication tasks.
Nyy//Copy the current row down n rows to the buffer, or you can use "Anyy copy," A is a buffer, a can also be replaced with any letter A through Z, you can complete multiple replication tasks.
YW//Copy the character from the beginning of the cursor to the ending.
NYW//Copy n words starting from the cursor.
y^//Copy the contents from the cursor to the beginning of the line. VPS Detective
y$//Copy the contents from the cursor to the end of the line.
P//Paste the contents of the Clipboard after the cursor, if the previous custom buffer is used, it is recommended to use the "AP to paste."
P//Paste the contents of the Clipboard before the cursor, if the previous custom buffer is used, it is recommended to use the "AP to paste."

Ix. replacement (used in the VI command mode)

: S/old/new//Replaces the first occurrence of old in a row with new
: s/old/new/g//Replace all old in line with new
: n,m s/old/new/g//Replace all old from N to M with new
:%s/old/new/g//Replace all old in current file with new

X. Editing other documents

: E otherfilename//edit file named Otherfilename.

Xi. Modifying file formats

: Set Fileformat=unix//modify the file to UNIX format, such as win below the text file under Linux will appear ^m.

Summary: VI (VIM) tutorial Although there are more commands, but as long as the practice, I believe you will quickly mastered, but also to your work or study to bring more efficiency. When you don't know what mode you are in, you can press the ESC key 2 times to return to the command mode, there will be a final reminder: Pay attention to the case!!!

2) Make the environment variable effective

SOURCE ~/.BASHRC

3.4 Updating Ubuntu Packages

1) Change US source to Chinese source

Vi/etc/apt/sources.list

The global replacement us.archive is cn.archive, and you can enter the following command:

:%s/us.archive/cn.archive/g
: Wq

In order to improve the download speed of software packages, we strongly recommend that US source be changed to Chinese source.

2) Update package

Apt-get Update

Download takes a little time, the total download size is about 27M.

3.5 Installing OpenSSH

1) automatic installation of SSH service

Apt-get Install Openssh-server

When the installation is complete, the SSH service will automatically open.

2) Check to see if the SSH service is turned on

Netstat-pant | grep 22

If the above output appears, the SSH service installation is successful and is turned on.

Note: The following SSH service is required for remote login.

3.6 Installing common software (optional)

1) Install Vim

Apt-get Install Vim

Vim is more convenient to operate than VI and is highly recommended for installation.

2) Install tree

Apt-get Install tree

The directory structure can be viewed through the tree command.

3.7 View IP Address

Ifconfig

4 Install XSHELL4 and xftp4 locally install SSH telnet software xshell4 install XFTP4 simultaneously. Both software is integrated in one piece and is the best partner. by XSHELL4 remote root connection to the host, and then through the XFTP4 remote FTP access to the host, so that you can easily do not through the VI to operate some configuration documents, directly drag the relevant configuration file to

The Windows environment is more efficient to configure.

5 General Software installation directory under Linux storage location:
Underneath the/usr/local.

Set up www folder under Var to store Web project folder

6 general software Installation under Linux

JDK, Tomcat and other software generally through the PC download jar through XFTP4 upload to/usr/local below; Note generally first think through the Apt-get install Apt-get source has a lot of ready-made installation source quick and easy

Tar Package Installation

# Mkdir/usr/java  //New Folder/usr/java/# tar xzvf jdk-7u25-linux-x64.tar.gz-c/usr/java/


4. Configure environment variables to add in the Etc/profile file

# Vim/etc/profile//Add the following contentexport Java_home=/USR /java/jdk1. 7.0_25export Classpath= /usr/java/jdk1.7.0_25/libexport  Path= $JAVA _home/bin< Span class= "pun" >: $PATH # source/etc/profile//Use command Source/etc/profile to make the configuration file effective immediately. Otherwise, the system can only be restarted for configuration parameters to take effect                


5. Verify that the environment variable is in effect

# echo $JAVA _home/Usr/Java/Jdk1.7.0_25# echo $PATH/Usr/Java/Jdk1.7.0_25/Bin:/usr/Kerberos/Sbin:/usr/Kerberos/Bin:/usr/Local/Sbin:/usr/local/bin:/sbin:/bin:/usr/ sbin:/usr/bin:/usr/x11r6/bin: /root/bin# echo $CLASSPATH  /usr/java/ jdk1. 7.0_25/lib        


6. Verify that the installation is successful, and that the environment variable is active

# java-versionJava version"1.7.0_25"Java(Tm) SE runtime environment (build 1.7. 0_25-b15) java  hotspot (tm 64-bit server VM  (build 23.25< Span class= "pun" >-b01, mixed Mode    


7. Remove the JDK installation package from the TMP directory

MySQL installed in linux ubuntu

The Linux used in this article is an Ubuntu 12.04.2 LTS 64bit system, and the installation of MySQL database packages can be implemented through Apt-get.

Install MySQL database in linux ubuntu

#安装MySQL服务器端~ sudo apt-get install mysql-server

The installation process will pop up the prompt box, enter the root user's password, I am here to set the password for MySQL.

After the installation is complete, the MySQL server will start automatically, we check the MySQL server program

Specific installation access: http://www.cnblogs.com/steven9801/p/4146452.html

Install the Linux system and configure it.

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.