Aliyun Ubuntu 12.04 64-bit System Java environment configuration detailed

Source: Internet
Author: User
Tags chmod ftp ssh aliyun

System version: Ubuntu 12.04 64-bit

SSH linked server (using Terminal remote link):

SSH-L Username IP Address

If you receive an error similar to the following:
@ warning:remote HOST Identification has changed! @

Indicates that the last login information recorded in the host file does not match the current information. Execute on client:
MV ~/.ssh/known_hosts/tmp

Log in again and prompt to enter Yes if you want to continue the link.

Add user

1: Use the AddUser command:
sudo adduser username
AddUser automatically creates user directories and shells, and automatically creates groupings.

2: Use Useradd

It adds this username and creates a group name that is the same as the user name, but it does not create a directory based on the user name in the/home directory, nor does it prompt for the creation of a new password.

Giving users the Execute sudo permission

When the new user executes the sudo prompt "xxx is isn't in the" Sudoers file. This incident would be reported. " That is, your username does not have permission to use sudo, just modify the/etc/sudoers file.

1 into Super User mode. Enter "Su-"
Su-
2 Write permission to add files. Enter command:
chmod u+w/etc/sudoers
3) Edit the/etc/sudoers file. Enter command:
Vim/etc/sudoers
Go to edit mode and find this line:
Root all= (All)
Add it below:
Username all= (All) all #可以从上一行复制, avoid wrong, wrong will appear: Do not have the right to execute a command type of prompts.
Then save the exit.

To revoke write permission for a file. You can enter a command:

chmod u-w/etc/sudoers

Software Installation

There are several ways to install software on Linux, and if you are not very skilled with your system configuration, it is recommended to install it through a Deb package or software source.
1: Install the Deb package
Dpkg-i Debname.deb
2: Install via software source
Ubuntu software Source configuration file location:/etc/apt/sources.list
Ubuntu Source list: http://wiki.ubuntu.org.cn/source list
Note Backup before updating
sudo cp/etc/apt/sources.list/etc/apt/sources.list_backup
When updating a software source, be aware of the system version of the source, which may vary slightly. See http://wiki.ubuntu.org.cn/source list for details. In addition, if the speed is acceptable, or try to use the official source of Europe or China's official source, it is best not to change the source column, so that software dependencies and so on a mess.
China official source (maintained by Sohu, and Sohu Source is one), this version can be used in 12.04
Deb Http://cn.archive.ubuntu.com/ubuntu/precise main restricted universe multiverse
Deb Http://cn.archive.ubuntu.com/ubuntu/precise-security main restricted universe multiverse
Deb Http://cn.archive.ubuntu.com/ubuntu/precise-updates main restricted universe multiverse
Deb http://cn.archive.ubuntu.com/ubuntu/precise-proposed main restricted universe multiverse
Deb Http://cn.archive.ubuntu.com/ubuntu/precise-backports main restricted universe multiverse
DEB-SRC http://cn.archive.ubuntu.com/ubuntu/precise main restricted universe multiverse
DEB-SRC http://cn.archive.ubuntu.com/ubuntu/precise-security main restricted universe multiverse
DEB-SRC http://cn.archive.ubuntu.com/ubuntu/precise-updates main restricted universe multiverse
DEB-SRC http://cn.archive.ubuntu.com/ubuntu/precise-proposed main restricted universe multiverse
DEB-SRC http://cn.archive.ubuntu.com/ubuntu/precise-backports main restricted universe multiverse

Be sure to refresh the source list after the update
sudo apt-get update

As for installation, use the Apt-get command, please Google
Linking to server FTP
The general Ubuntu SFTP will be opened by default, the daily use is fully enough, and do not need to configure. For SFTP configuration, search by yourself.
On the client side, Linux recommends that file Zilla,mac recommend yummy FTP.
Partitioning and formatting

1, view the data disk

You cannot see the data disk until you have partitioned and formatted the data disk, and you can view it using the "fdisk-l" command by using the "df–h" command. The following figure:

2. Partition the data disk

Execute the "fdisk-s 56/dev/xvdb" command to partition the data disk;
According to the prompts, enter "n", "P" "1", two times carriage return, "Wq", the partition begins, will soon complete.

3, view the new partition

Using the "fdisk-l" command, you can see that the new partition XVDB1 has been built.

4, format the new partition

The new partition is formatted using the "MKFS.EXT3/DEV/XVDB1" command, and the formatted time varies depending on the size of the hard disk.
(can also decide to choose Other file formats, such as EXT4, etc.)

5, add the partition information

Write new partition information using the "Echo '/dev/xvdb1/mnt ext3 defaults 0 0 ' >>/etc/fstab" (without quotes) command.
Then use the "cat/etc/fstab" command to view that the following information indicates a write success.
Note: ubuntu12.04 does not support barrier, so the correct wording is: Echo '/dev/xvdb1/mnt ext3 barrier=0 0 0 ' >>/etc/fstab
* If you need to mount the data disk to a separate folder, such as the separate use of the Web page, you can modify the/mnt section of the above command

6. Mount New Partition

Use the "mount-a" command to mount a new partition, and then use the "df-h" command to view it, with the following information stating that the mount is successful and you can start using the new partition.

Java and MySQL environment installation:

    install Java (6b27-1.12.6-1ubuntu0.12.04.2)
        apt-get Install openjdk-6-jre-headless
    install MySQL (mysql-server-5.5)
         apt-get install mysql-server
Linux common commands:
1: View folder size: Pay attention to the log folder, do not cause the system denial of service because the log is full of disks
     Du-sh [path]
2: Copy folder and copy permissions: Backup data must remember copy permissions, otherwise restore may cause related services do not have access to read and write
    CP-RP [original] [target]

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.