How to setup a Ubuntu Server?

來源:互聯網
上載者:User

Requirement:

Software: Ubuntu iso image, ubuntu sftp client ,UNetbootin

Hardware: A 4GB USB stick

How to setup sftp on ubuntu 

1.     Download Ubuntu iso image from thisURL:

http://mirrors.163.com/ubuntu-releases/10.04/

Select your favorite releaseversion, and download it.

2.      Use UNetbootin to create a bootable USB stick.

http://unetbootin.sourceforge.net

3.     Install Ubuntu with this USB stick.

Ubuntu restart sftp server 

Now,we have a new installed Ubuntu environment. There are several steps need to bedone.

1.     Setup network configure

Ubuntu is configured in192.168.9.X, and uses a gateway and a web proxy to connect to internet.

We can configure these settings byUbuntu GUI tools.

For example: how to install sftp in ubuntu

Gateway:192.168.9.180

Add sftp user ubuntu

Proxy:proxy.local(Authenticate information should be supplied)

After these steps, we must setupnetwork for apt-get (Notice: Global network settings doesn’t influent apt-getnetwork settings, they are independent.)

Login as root, and modify/etc/apt/apt.conf, add authenticate information after proxy server. Forexample:

Acquire::http::proxy "http://USERNAME:PASSWORD@proxy.local:80/";

Acquire::ftp::proxy "ftp://USERNAME:PASSWORD@proxy.local:80/";

Acquire::https::proxy "https://USERNAME:PASSWORD@proxy.local:80/";

2.     Create User Account & Directory

Ubuntu sftp

Login as root, and run thesecommands, for example, we add a user whose name is cisco.

Create User:

useradd cisco   # add user

passwd cisco    # createpassword for cisco

gpasswd –a cisco admin       #add cisco to admin group

mkdir –p /home/cisco

chown cisco /home/cisco

chgrp cisco /home/cisco

Create Directory:

The tftp directory is created under/.

mkdir/tftpboot

mkdir/tftpboot/cisco

chowncisco /tftpboot/cisco

chgrpcisco /tftpboot/cisco

The project directory is under ~:

mkdir/home/cisco/project

3.     Install & Configure Samba

sudo apt-get install samba

modify /etc/samba/smb.conf, addbelow lines:

[cisco]

comment = cisco's project directory

path = /home/cisco/project

public = yes

writable = yes

valid users = cisco

First, create account for thisuser:

smbpasswd–a cisco

Then create password for samba user:

smbpasswdcisco

And start samba:

servicesmbd start

4.     Install tftp server

a.     apt-get install xinetd tftpd tftp

b.     Create /etc/xinetd.d/tftp and putthis entry:

service tftp

{

protocol        = udp

port            = 69

socket_type     = dgram

wait            = yes

user            = nobody

server          = /usr/sbin/in.tftpd

server_args     = /tftpboot

disable         = no

}

c.      sudo /etc/init.d/xinetd start

5.     Change runlevel to text mode

Run in text mode will use verylittle memory. We can modify /etc/default/grub and a simple “text” after GRUB_CMDLINE_LINUX_DEFAULT,just like that:

GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash text”

And do not forget run “sudoupdate-grub” to update.


聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.