How to install Ubuntu on a dedicated server via SSH

Source: Internet
Author: User
Keywords Install server how to pass SSH can
Tags aliyun apt archive basic get guide how to how to pass

Warning: As you may have guessed, the approach described here may cause your system to fail to boot and you have to rely on yourself to fix it. Apt Install linux-image-686

This guide describes how to install http://www.aliyun.com/zixun/aggregation/13835.html ">ubuntu" on a dedicated server via SSH. I assume that your supplier provides you with a standby (or recovery or first aid) system that can guide and prepare your normal operating system; In this way, the online "system replacement" is possible, but it takes a lot of risk and is prepared to do a lot of remedial work in case things get worse (the basic Idea are to temporarily disable your swap and install a transitional system on it).

Preparing disks

Creating partitions

Use Fdisk to create partitions on disk.

# Fdisk/dev/hda

Remember to set the root partition as the active partition (which can be started)! In a later introduction, I will assume that you use the following zoning layout, depending on your situation.

/DEV/HDA1 (Linux)-for/,
/dev/hda2 (with Linux swap)-as swap

Creating a file system

Below I will format my/partition using the popular EXT3 format

# mke2fs-j/DEV/HDA1
Or
# MKFS.EXT3/DEV/HDA1

Initialize and enable our swap partition with the following command

# Mkswap/dev/hda2
# sync; Sync; Sync
# Swapon/dev/hda2

Basic system

Mount Root Partition

# Mkdir/mnt/ubuntu
# mount-t Ext3/dev/hda1/mnt/ubuntu

Get Debootstrap

Debootstrap is a set of scripts to be used in the next steps to build a "basic system". We need to get a suitable version of Debootstrap from http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/(the nearest mirror also). First make sure that your standby system has binutils (including basic command-line tools, such as wget) tools. On a system based on APT, we can install it using dpkg.

# wget Http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/debootstrap_0.3.3.0ubuntu2_all.deb
# dpkg-i Debootstrap_0.3.3.0ubuntu2_all.deb

If your current system is based on RPM, install it using the Alien tool or you can find its RPM version on this site (e.g., http://azhrarn.underhanded.org/debootstrap-0.2.23-1.i386.rpm). If your system does not belong to any of the above, the following commands may be useful:

# mkdir/work; Cd/work
# wget Http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/debootstrap_0.3.3.0ubuntu2_all.deb
# AR-XF Debootstrap-udeb_0.3.3.0ubuntu7_i386.udeb
# CD/
# tar ZXVF work/data.tar.gz

Install the basic system

#/usr/sbin/debootstrap--arch i386 Dapper/mnt/ubuntu Http://archive.ubuntu.com/ubuntu

(Your arch may be different, for example: Md64, Hppa, IA64, PowerPC, or SPARC)

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.