Requirement:
Software: Ubuntu iso image, UNetbootin
Hardware: A 4GB USB stick
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.
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:
Gateway:192.168.9.180
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
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.