Thứ Năm, 14 tháng 11, 2013

How To Add and Delete Users on Ubuntu 12.04 and CentOS 6

When you log into a new freshly spun up droplet, you are accessing it from the root user. Although this gives you the power to make any changes you need on the server, you are much better off creating another new user with root privileges on the virtual private server. Additionally, if other people will be accessing the virtual server, you will need to make new users for them as well. This tutorial will go over creating a new user, granting them root privileges, and deleting users.

When you perform any root tasks with the new user, you will need to use the phrase “sudo” before the command. This is a helpful command for 2 reasons: 1) it prevents the user making any system-destroying mistakes 2) it stores all the commands run with sudo to a file where can be reviewed later if needed. Keep in mind however, that this user is as powerful as the root user. If you only need a user for a limited number of tasks on the VPS, you do not need to give them root privileges. 

Setup


This tutorial requires access to the root user or a user with sudo privileges. 

You should have received your root password from the welcome email after you launched your droplet.

Users on Ubuntu 12.04


How to Add a User on Ubuntu 12.04


To add a new user in Ubuntu, use the adduser command, replacing the “newuser” with your preferred username.
sudo adduser newuser

As soon as you type this command, Ubuntu will automatically start the process:
  • Type in and confirm your password

  • Enter in the user’s information. This is not required, pressing enter will automatically fill in the field with the default information

  • Press Y (or enter) when Ubuntu asks you if the information is correct

Congratulations—you have just added a new user. You can log out of the root user by typingexit and then logging back in with the new username and password.

How to Grant a User Root Privileges


As mentioned earlier, you are much better off using a user with root privileges.

You can create the sudo user by opening the sudoers file with this command:
sudo /usr/sbin/visudo

Adding the user’s name and the same permissions as root under the the user privilege specification will grant them the sudo privileges.
# User privilege specification
root    ALL=(ALL:ALL) ALL 
newuser ALL=(ALL:ALL) ALL

Press ‘cntrl x’ to exit the file and then ‘Y’ to save it.

How to Delete a User


Should you find that you find that you no longer want to have a specific user on the virtual private server you can delete them with a single command.
sudo userdel newuser

Finish up by the deleting the user’s home directory:
 sudo rm -rf /home/newuser



Users on CentOS 6


How to Add a User on CentOS 6


To add a new user in CentOS, use the adduser command, replacing the “newuser” with your preferred username.
sudo adduser newuser

Follow up by providing the user with a new password, typing and confirming the new password when prompted:
sudo passwd newuser

Congratulations—you have just added a new user and their password. You can log out of the root user by typing exit and then logging back in with the new username and password.

How to Grant a User Root Privileges


As mentioned earlier, you are much better off using a user with root privileges.

You can create the sudo user by opening the sudoers file with this command:
sudo /usr/sbin/visudo

You will find the section to make the user privilege modifications at the bottom of the file. Type “a” to start inserting text. Adding the user’s name and the same permissions as root under the the user privilege specification will grant them the sudo privileges.
## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL
newuser ALL=(ALL)       ALL

Save and Exit the file by press “shift” ZZ. 

How to Delete a User


Should you find that you find that you no longer want to have a specific user on the virtual private server you can delete them with a single command.
sudo userdel newuser

You can add the flag “-r” to the command if you would like to simultaneously remove the users’s home directory and files.
sudo userdel -r newuser

Next Steps


Once you have set up the users will you need, you can start building up your VPS. A good place to start is to install the LAMP stack (a collection of basic web server software) on your droplet, using the tutorials below. 

LAMP on Ubuntu 12.04 

LAMP on CentOS 6



By Etel Sverdlov

How to use FTP from the command line.

FTP (File Transfer Protocol) allows you to transfer files between your PC and other Internet systems (hosts). You can transfer files, work with local or remote directories, rename and display files, and execute system commands. Before you start, you must know how to log on to the remote system and have a userid and password on that system.

Note: Some systems allow anonymous ftp access. To use anonymous ftp, use anonymous as your userid andyour e-mail address as the logon password.


Logging Onto and Off of a Remote System

To begin using Microsoft's FTP client, Open a command prompt and switch to the destination directory (where you want the download file).
To start an FTP session, enter: ftp host_name
where hostname is the name or IP address of the remote system.
You will then be asked to enter your userid and password.
Once you have successfully logged onto a remote system, you will be able to use ftp commands to view a listing of files on the remote system and transfer files between the two systems.
Example: Download i386.exe (Windows NT 3.5 Resource Kit) from ftp://ftp.microsoft.com/bussys/winnt/winnt-public/reskit/nt35/i386 to C:\Temp\Download

  1. Open a command prompt. Enter CD C:\Temp\Download (assuming that directory exists).
    Enter: ftp ftp.microsoft.com

    You should now see a prompt similar to this:
    Connected to ftp.microsoft.com.
    220 Microsoft FTP Service
    User (ftp.microsoft.com:(none)):


  2. For the userid, Enter: anonymous

    You should see a prompt similar to this:
    331 Anonymous access allowed, send identity (e-mail name) as password.
    Password:


  3. Enter: userid@domain.com as the password at the "Password:" prompt.
    Note: Any e-mail address in a userid@domain.com format should work. You will not be able to see the password as you type it.


  4. To download i386.exe from the bussys/winnt/winnt-public/reskit/nt35/i386 directory, Enter: get bussys/winnt/winnt-public/reskit/nt35/i386/i386.exe
    Note: You could have also used ls to view the directory and file names, cd bussys/winnt/winnt-public/reskit/nt35/i386 to switch directories, and get i386.exe to download the file from within that directory.


  5. To end the FTP session, Enter: quit or bye.
Note: Once you have extracted the resource kit, you will have to expand individual files
example: expand choice.ex_ choice.exe


FTP Commands

For a list of FTP commands, at the "ftp>" prompt, Enter: help
When using ftp from the command prompt, the following list of supported commands will be displayed:
Note: Hover your mouse over a command to see what the output of "help *" is for that command.
!   
delete
literal
prompt
send
?   
debug
ls  
put 
status
append
dir
mdelete
pwd 
trace
ascii
disconnect
mdir
quit
type
bell
get 
mget
quote
user
binary
glob
mkdir
recv
verbose
bye 
hash
mls 
remotehelp
 
cd  
help
mput
rename
 
close
lcd 
open
rmdir
 
The question mark (?) command is equivalent to the help command. Typing help or ? followed by the name of a command will display a brief description of the command's purpose.
The exclamation point (!) can be used to shell to the system (command) prompt. Type Exit to return to the FTP session. You can also issue a subset of system commands to perform as you shell out, e.g., ! dir %windir% | more. When the commands in the shell have completed, you will be returned to the FTP session.
The pwd command will list the current directory on the remote machine. To change directories on the remote machine, use the cd command. To create a new directory on the remote machine, use the mkdir command followed by the name you would like to assign to the new directory. The lcd command can be used to change directories on the local (PC) machine.
To display a listing of files on the remote system, enter: ls or dir.
To download a file (copy a file from the remote system to your PC), you can use the command get or recvfollowed by the name of the file you would like to download. Optionally, you can follow the filename with a second filename which will be assigned to the file when it is downloaded to your PC. To download multiple files, you can use the mget command followed by a descriptor for the files you would like to download (e.g.: *.f for all files ending in ".f" or *.* for all files). You will be prompted to indicate whether you would like to download each file in turn. To turn off this prompting, enter the prompt command prior to entering the mget command; you will receive the message "Interactive mode OFF" indicating that prompting has been deactivated.
By default, files are downloaded and uploaded in ASCII file transfer mode. To download or upload files using Binary format mode, enter the command Binary at the "ftp>" prompt prior to downloading or uploading the file(s). To return to ASCII file transfer mode, enter the ASCII command.
To upload a file (copy a file from your PC to the remote system), you can use the command put or send followed by the name of the file you would like to upload. Optionally, you can follow the filename with a second filename which will be assigned to the file when it is uploaded to the remote system. The mput command can be used to upload multiple files.
You can use the close or disconnect command to drop the current ftp connection without exiting from the command enironment and then use the open command to connect to a new host.

Much of this article was taken from the dead link,http://www.cc.vt.edu/cc/us/docs/faqlib/windows95/clients/msftp.html

To see the original article, go tohttp://web.archive.org/web/*/http://www.cc.vt.edu/cc/us/docs/faqlib/windows95/clients/msftp.html



Source: http://www.tburke.net/info/misc/cmdline-ftp.htm

Ubuntu Linux: Compress files using tar Command

How do I compress and backup files using tar command to another directory on same computer or another Linux computer under Ubuntu Linux?

First, open up a terminal under Ubuntu Linux. Some directories such as /etc require root permissions to read and write for backup. So you may need to run tar command using sudo command. In this example backup, /etc and your /home/vivek to /backup directory, enter:
$ sudo mkdir /backup
$ sudo tar -zcvpf /backup/files.backup.Nov_6_2009.tar.gz /etc/ /home/vivek

Where,
  • z : Compress the backup file with 'gzip' to make it smaller.
  • c : Create a new backup archive called /backup/files.backup.Nov_6_2009.tar.gz.
  • v : Verbose mode, the tar command will display what it's doing to the screen.
  • p : Preserves the permissions of the files put in the archive for restoration later.
  • f /backup/files.backup.Nov_6_2009.tar.gz: Specifies where to store the backup, /backup/files.backup.Nov_6_2009.tar.gz is the filename used in this example.

How Do I Exclude Certain Files or Directories?

You can exclude all *.mp3 stored in /home/vivek/music directory with --exclude option:
$ sudo tar --exclude='/home/vivek/music/' -zcvpf /backup/files.backup.Nov_6_2009.tar.gz /etc/ /home/vivek
Another example (exclude ~/music/ and ~/Downloads/*.avi files):
$ sudo tar --exclude='/home/vivek/music/' --exclude='/home/vivek/Downloads/*.avi' -zcvpf /backup/files.backup.Nov_6_2009.tar.gz /etc/ /home/vivek

How Do I See a List Of Files Stored In Tar Ball or an Archive?

Type the following command:
$ sudo tar -ztvf /backup/files.backup.Nov_6_2009.tar.gz
Where,
  • t: List the contents of an archive.

How Do I Restore Files?

You can use the command as follows to restore everything in / directory:
$ sudo tar -xvpzf /backup/files.backup.Nov_6_2009.tar.gz -C /
OR
$ cd /
$ sudo tar -xvpzf /backup/files.backup.Nov_6_2009.tar.gz

Where,
  • -x: Extract the files.
  • -C / : Extract the files in / directory.
In this example, you are restoring to the /delta directory.
$ sudo tar -xvpzf /backup/files.backup.Nov_6_2009.tar.gz -C /delta

How Do I Backup Files To a Remote Server Called backup.example.com?

Type the command as follows to backup /etc/ and /home/vivek directories to a remote system called backup.example.com:
$ sudo -s
# ssh user@backup.example.com "mkdir /backup"
# tar zcvpf - /etc/ /home/vivek | ssh user@backup.example.com "cat > /backup/files.backup.Nov_6_2009.tar.gz"

How Do I Restore Backup From a Remote System to Local Ubuntu Box?

Type the command
$ sudo -s
# cd /
# ssh user@backup.example.com "cat /backup/files.backup.Nov_6_2009.tar.gz" | tar zxpvf -
Source: http://www.cyberciti.biz/faq/ubuntu-howto-compress-files-using-tar/

Make Browsers Cache Static Files With mod_expires On Apache2 (Debian Squeeze)

This tutorial explains how you can configure Apache2 to set the Expires HTTP header and the max-age directive of the Cache-Control HTTP header of static files (such as images, CSS and Javascript files) to a date in the future so that these files will be cached by your visitors' browsers. This saves bandwidth and makes your web site appear faster (if a user visits your site for a second time, static files will be fetched from the browser cache). This tutorial was written for Debian Squeeze.
I do not issue any guarantee that this will work for you!

1 Preliminary Note

I'm assuming you have a working Apache setup on your Debian Squeeze server, e.g. as shown in this tutorial: Installing Apache2 With PHP5 And MySQL Support On Debian Squeeze (LAMP)

2 Enabling mod_expires

mod_expires can be enabled as follows:
a2enmod expires
Restart Apache afterwards:
/etc/init.d/apache2 restart

3 Configuring mod_expires

The mod_expires configuration can be placed in the overall Apache server configuration, inside a virtual host container, inside a <Directory> directive, or inside an .htaccess file.
In this example, I will place it in Apache's default vhost which is configured in /etc/apache2/sites-available/default on Debian Squeeze:
vi /etc/apache2/sites-available/default
If you have multiple file types that should expire after the same time after they have been accessed (let's say in one week), you can use a combination of the FilesMatch and the ExpiresDefaultdirectives, e.g. as follows:
[...]
<IfModule mod_expires.c>
          <FilesMatch "\.(jpe?g|png|gif|js|css)$">
                      ExpiresActive On
                      ExpiresDefault "access plus 1 week"
          </FilesMatch>
</IfModule>
[...]
This would tell browsers to cache .jpg, .jpeg, .png, .gif, .js, and .css files for one week.
Restart Apache after your changes:
/etc/init.d/apache2 restart
Instead of using FilesMatch and ExpiresDefault directives, you could also use the ExpiresByType directice and set an Expires header (plus the max-age directive of the Cache-Control HTTP header) individually for each file type, e.g. as follows:
[...]
<IfModule mod_expires.c>
          ExpiresActive on

          ExpiresByType image/jpg "access plus 60 days"
          ExpiresByType image/png "access plus 60 days"
          ExpiresByType image/gif "access plus 60 days"
          ExpiresByType image/jpeg "access plus 60 days"

          ExpiresByType text/css "access plus 1 days"

          ExpiresByType image/x-icon "access plus 1 month"

          ExpiresByType application/pdf "access plus 1 month"
          ExpiresByType audio/x-wav "access plus 1 month"
          ExpiresByType audio/mpeg "access plus 1 month"
          ExpiresByType video/mpeg "access plus 1 month"
          ExpiresByType video/mp4 "access plus 1 month"
          ExpiresByType video/quicktime "access plus 1 month"
          ExpiresByType video/x-ms-wmv "access plus 1 month"
          ExpiresByType application/x-shockwave-flash "access 1 month"

          ExpiresByType text/javascript "access plus 1 week"
          ExpiresByType application/x-javascript "access plus 1 week"
          ExpiresByType application/javascript "access plus 1 week"
</IfModule>
[...]
You might have noticed that I've set three ExpiresByType directives for Javascript files - that is because Javascript files might have different file types on each server. If you set just one directive fortext/javascript, but the server recognizes the Javascript file as application/javascript, then it will not be covered by your configuration, and no cache headers will be set.
You can use the following time units in your configuration:
  • years
  • months
  • weeks
  • days
  • hours
  • minutes
  • seconds
Please note that Apache accepts these time units in both singular and plural, so you can use day and daysweek and weeks, etc.
It is possible to combine multiple time units, e.g. as follows:
ExpiresByType text/html "access plus 1 month 15 days 2 hours"
Also note that if you use a far future Expires header you have to change the component's filename whenever the component changes. Therefore it's a good idea to version your files. For example, if you have a file javascript.js and want to modify it, you should add a version number to the file name of the modified file (e.g. javascript-1.1.js) so that browsers have to download it. If you don't change the file name, browsers will load the (old) file from their cache.
Instead of basing the Expires header on the access time of the browser (e.g. ExpiresByType image/jpg "access plus 60 days"), you can also base it on the modification date of a file (please note that this works only for real files that are stored on the hard drive!) by using the modification keyword instead of access:
ExpiresByType image/gif "modification plus 7 days"

4 Testing

To test if your configuration works, you can install the Live HTTP Headers plugin for Firefox and access a static file through Firefox (e.g. an image). In the Live HTTP Headers output, you should now see an Expires header and a Cache-Control header with a max-age directive (max-age contains a value in seconds, for example 604800 is one week in the future):
Click to enlarge

5 Links


Thứ Hai, 11 tháng 11, 2013

Hướng dẫn cách tạo email theo tên miền từ Google

Sau khi thiết kế web cho doanh nghiệp, bạn cần quan tâm đến việc tạo thương hiệu cho doanh nghiệp mình.
(Note: thông tin được cập nhật ngày 14/12/2012 của chúng tôi theo thay đổi của Google Apps, email theo tên miền chỉ được sử dụng thử miễn phí trong thời gian 30 ngày.
Sau 30 ngày Google sẽ thu phí 5$ / 1 email account / 1 tháng.)
Một sự lựa chọn sử dụng email theo tên miền khác có chất lượng tương đương và hoàn toàn miễn phí tại đây .
Việc tạo lập email theo tên miền là một trong những tiêu chí tạo dựng thương hiệu của bạn. Để tạo được một email theo tên miền của bạn trước tiên bạn phải có một tên miền riêng cho email của mình, không phải là tên miền chia sẻ hay tên miền của bên thứ ba. Ví dụ: địa chỉ email của bạn phải giống như sau tên_bạn@tên miền_của bạn, chứ không phải tên_bạn@gmail.com.
Đầu tiên bạn truy cập vào địa chỉ này: http://www.google.com/enterprise/apps/business/
Hiện tại Google Apps đã thay đổi và chỉ cho phép tạo 10 tài khoản email trong gói dịch vụ miễn phí của họ. Để sử dụng nhiều hơn, chúng ta sẽ phải trả chi phí hàng tháng. Nhưng dù sao với 10 tài khoản cũng đủ giúp cho những doanh nghiệp vừa và nhỏ đáp ứng được nhu cầu sử dụng email.
Bước 1: Bạn click chọn "Bắt đầu dùng thử miễn phí".
Nhập đầy đủ thông tin của bạn và "Tiếp theo".


Bước 2 :  Chọn "Sử dụng tên miền tôi đã mua" và điền tên miền của bạn vào khung rồi click "Tiếp theo"
Bước 3 : Tài khoản này sẽ quản lý các thiết lập trong Google Apps gắn với tên miền riêng của bạn và 10 email mà bạn có thể tạo mới sau này.
Chọn I accept. Continue with setup.
Bước 4 :  bạn đăng nhập vào trang quản lý tên miền, tạo một CName record với thông tin do Google cung cấp để xác nhận rằng bạn là người sở hữu tên miền này.
Cuối cùng, chọn I’ve completed the steps above.
Bước 5 : Đến đây bạn mới hoàn thành việc tạo tài khoản quản trị, xác nhận việc sở hữu tên miền. Để có thể tạo sử dụng Email với tiên miền riêng bạn cần tiến hành Active Email service.
Trong phần Set up email delivery bạn sẽ được hướng dẫn cách tạo mới các MX record (Mail Exchange), mục đích của nó là giúp bạn sử dụng email với tên miền riêng nhưng mail lại được lưu trữ trên server của Goolge giống như Gmail. Tùy vào nhà cung cấp dịch vụ tên miền bạn đã đăng ký mà việc tạo các MX record có khác nhau chút ít (tìm trong danh sách để chọn nhà cung cấp dịch vụ của bạn). Ví dụ với Network Solution.
Host recordRecord typeAddressPriority
@MXASPMX.L.GOOGLE.COM.1
@MXALT1.ASPMX.L.GOOGLE.COM.5
@MXALT2.ASPMX.L.GOOGLE.COM.5
@MXASPMX2.GOOGLEMAIL.COM.10
@MXASPMX3.GOOGLEMAIL.COM.10

Sau khi hoàn thành việc tạo mới các MX record, trong Google Apps bạn chọn I’ve completed the steps above. Sẽ mất khoảng 01 giờ để Google cập nhật dịch vụ. Cuối cùng bạn sẽ nhìn thấy thông báo Active của Email.
Lưu ý: Trong trường hợp khi bạn hoàn thành các bước để xác nhận việc sở hữu tên miền mà không thấy phần Activate email thì bạn hãy vào mục Add more services (Service settings) để thêm mục Email.

Địa chỉ mặc định để truy cập webmail của bạn sẽ là: https://mail.google.com/a/yourdomain.com, tuy nhiên như vậy thì hơi dài và trông có vẻ thiếu chuyên nghiệp. Vào phần Service setting, chọn Email. Tại mục Web address chọn change URL.
Đăng nhập vào phần quản lý tên miền tạo một CName record với các thông tin sau:
- Host record: mail - Address: ghs.googlehosted.com


Sau khi cập nhật thành công địa chỉ webmail của bạn sẽ có dạng: http://mail.yourdomain.com
Chúc các bạn thành công !

Sử dụng Email theo tên miền với Windows Live Admin Center của Microsoft

Sử dụng Email theo tên miền là một trong những tiêu chí tạo dựng thương hiệu của bạn, góp phần nâng cao sự chuyên nghiệp trong giao dịch kinh doanh và quản lý hệ thống nhân viên trong công ty.
Trong suốt một thời gian dài, khi nhắc đến việc setup email theo tên miền, hầu hết mọi người đều nghĩ đến Google mail hoặc mua host riêng rồi cấu hình email.

Google mail thì có lợi thế về dung lượng lớn, miễn phí, dễ cài đặt và tùy chỉnh. Tuy nhiên thời kỳ miễn phí 50 accounts đã qua, tiếp đến người dùng cũng chỉ có thể tạo tối đa 10 emails cho tên miền của mình với Google apps cũng đã đi vào di vãng. Với giới hạn chỉ cho dùng thử 30 ngày như hiện nay quả thực rất hạn chế khi sử dụng cho doanh nghiệp của mình. Cùng với mức chi phí khá cao cho mỗi email khi chuyển sang tài khoản business là 50 USD/email/năm thì dường như Google mail không còn là sự lựa chọn tối ưu cho giải pháp email theo tên miền nữa.

Giải pháp mua host riêng để cài đặt và sử dụng email có lẽ được nhiều doanh nghiệp chọn lựa do nó chủ động hơn trong vấn đề tạo tài khoản và quản lý hệ thống email. Tuy nhiên điểm hạn chế lớn nhất của giải pháp này chính là chi phí cao và giới hạn về dung lượng sử dụng.
Đối với rất nhiều doanh nghiệp nhở và những cửa hàng kinh doanh tại Việt Nam như hiện nay, trong thời kỳ kinh tế khó khăn thì việc hạn chế và tiết kiệm chi phí được ưu tiên hàng đầu.
Hệ thống email của Microsoft - Windows Live. Với 5GB dung lượng mỗi email và cho phép tạo 50 account theo tên miền miễn phí, đây là hệ thống email rất tốt để bạn cân nhắc sử dụng.

Dưới đây là những hướng dẫn cơ bản tùy chỉnh cài đặt Email theo tên miền với hệ thống Windows Live Hotmail:
Bước 1:
Truy cập Windows Live Admin Center site: domains.live.com
Đăng nhập với Windows Live ID của bạn.
Click “Get Started”


Bước 2:
Điền vào domain bạn muốn setup email và click "Continue" (như hình bên dưới)


Bước 3:
Xem lại các cài đặt và chấp nhận điều khoản dịch vụ:


Bước 4:
Tại cửa sổ Administrator status, ghi nhớ lại tất cả các thông tin liên quan tới MX record, Sender ID để cấu hình DNS.


Bước 5:
Đăng nhập vào CPanel quản lý của Domain Name và cấu hình DNS Record theo các thông số ở bước 4.


Bước 6:
Quay trở lại trang chính của Windows Live Admin và click Refresh
Nếu thấy tình trạng như hình bên dưới tức là domain đã được Active:


Bước 7:
Như vậy tên miền của bạn đã được add vào Windows Live Admin và từ bây giờ bạn có thể tạo account để sử dụng.
Click “Member Accounts”


Click “Add” để tạo account mới:


Bước 8:
Như vậy bạn đã có thể đăng nhập và sử dụng email theo tài khoản đã tạo tại: mail.live.com


Nếu là lần đầu tiên bạn đăng nhập nó sẽ bắt bạn đổi lại mật khẩu và xác minh số điện thoại. Bạn cứ làm như yêu cầu của Window Live.

Bước 9:
Nếu bạn muốn đường dẫn login vào hệ thống mail có dạng: mail.your-domain.com thì làm như sau:
Nhấp chọn “Custom Addresses”
Click "Add", và gõ: “Mail”
Giống với bước 5, trong quản trị DNS của tên miền, Add CNAME Record “Mail” trỏ đến “go.domains.live.com”

  

Chúc các bạn thành công!


Thứ Sáu, 1 tháng 11, 2013

Cài đặt Ubuntu 12.04 song song với Windows (XP/7/8...)

Bước 1 : Ổ cứng của bạn có dữ liệu cũng Ok, nhưng ổ cuối cùng là ko có j, vì ta sẽ cài Ubuntu vào đó
+ Cần có một bản cài Ubuntu 12.04 CD nhé cho nó chuẩn, còn burn ra USB cũng được bạn nhớ dùng UltraIso mới nhất nhé
+ Máy của bạn phải có kết nối với internet.
Bước 2 : Vào phần boot option => bạn chọn khởi động từ CD/DVD RW nếu là CD còn USB thì lựa chọn USB => cho đĩa có bộ cài đặt ubuntu, USB chứa Ubuntu=> Save & reset nhé. Đợi load:
Bước 3 : 


Tên:  1.jpg
Xem: 1809
KT:  449,0 KB


Bạn hãy chọn ngôn ngữ sử dụng của mình là gì bên cột ngôn ngữ phía bên trái bảng chọn ( bạn hãy tìm tiếng việt và chọn nhé) sau đó bạn có thể dùng thử hay cài đặt ngay. mình thì nhấn "cài đặt Ubuntu" ngay cho nó nhanh. 

Bước 4 : Những điều kiện để máy cài đặt thành công như ổ cúng trông hơn 4G, máy bạn kết nối với internet và nó sẽ hởi bạn có cho phép tải một số phần mềm như plash và bộ giải mã âm thanh và video trong quá trình cài đặt không. bạn cứ đánh dấu tính vào 2 cái đó


Tên:  2.jpg
Xem: 1720
KT:  482,7 KB


Rồi nhấn "tiếp tục"

Bước 5: máy sẽ có 3 tuỳ chọn cho bạn, bạn chọn như hình:


Tên:  3.jpg
Xem: 1733
KT:  717,5 KB


Lựa chọn 1 : Ubuntu sẽ thay thế hoàn toàn cái hệ điều hành của bạn và toàn bộ dữ liệu của hệ điều cũ của bạn sẽ bị mất (ko chọn)
Lựa chọn 2 : Ubuntu sẽ chạy song song với hệ điều hành của bạn (Ko chọn)
Lựa chọn 3 : là cho phép bạn tuỳ chỉnh cài đặt theo ý của mình 

Ở đây mình hướng dẫn là chọn vào cái thứ ba ở dưới cùng rồi nhấn tiếp tục

Bước 6 : phân vùng cho ổ cứng
đâu tiên bạn phải tạo phân vùng swap nhé nếu bạn chọn là tiếng việt như hình dầu thì cái swap này được dịch ra là "dữ liệu chao đổi" bạn chọn vào phân vùng trống trên ổ cứng ấn vào nút "thêm" trên bảng chọn


Tên:  4.jpg
Xem: 1779
KT:  581,8 KB


Sau đó có một bảng chọn tiếp theo hiện lên


Tên:  5.jpg
Xem: 1802
KT:  588,2 KB


Làm theo như sau
- Kiểu phân vùng mới : Chính
- Dung lượng phân vùng mới : RAM của bạn là bao nhiêu thì bạn nhấn vào nút "-" để giảm dung lượng, nút "+" để giảm dung lượng ( lưu ý phân vùng này chỉ được bằng hoặc lớn gấp đôi dung lượng RAM của bạn, Ví dụ: RAM của bạn là 2G thì phân vùng này là 2G hoặc bạn có thể cho là 4G)
- Vị trí : Bắt đầu
- Dùng làm : swap area (vùng chao đổi dữ liệu)
- Điểm lặp : không chọn j

==> nhấn OK

Bước 7 : Tạo phân vùng cài đặt ubuntu bạn lại chọn vào phân vùng trống còn lại và ấn nút " thêm" => lại có 1 bảng phân vùng mới hiện lên


Tên:  6.jpg
Xem: 1688
KT:  734,1 KB


Bạn chỉ cần thay đổi những phần sau còn những phần ko liệt kê dưới đây bạn giữ nguyên:
- Dùng làm : Ext4 journaling file system
- Điểm Lắp : / ( lưu ý trong ô chọn điểm lắp phải là dấu "/" không được cái gì khác nhé)
=> nhấn OK là được

Bước 8 : bước này là bước quyết định đến quyền boot của Ubuntu ko chiếm quyền boot của Windows


Tên:  7.jpg
Xem: 1668
KT:  693,8 KB


Bạn nhấn vào ô dưới hàng chữ "Thiết bị nơi cần cài đặt bộ nạp khởi động"
- Bạn chọn phân vùng vừa tạo để cài ubuntu


Tên:  8.jpg
Xem: 1766
KT:  849,3 KB


Bạn nhìn kĩ vào bảng phân vùng, ví dụ ổ cài Ubuntu của mình là "/dev/sda4 ext4 /" thì thiết bị nơi cần cài bộ nạp khởi động của mình là /dev/sda4 (lưu ý số của phân vùng của bạn có thể không giống mình nên bạn cân chý ý)
=> sau khi chọn bộ nạp khởi động xong bạn nhấn vào nút "cài đặt ngay" để bắt đầu quá trình cài đặt.

Bước 9 : Máy sẽ bắt phải chọn múi giờ bạn viết thành phố mình sống và chọn ở trong ô


Tên:  8.jpg
Xem: 1766
KT:  849,3 KB


=> Rồi bạn nhấn tiếp tục

- Tiếp theo bạn phải chọn kiểu bạn phím, theo mình bạn cứ để nguyên => nhấn tiếp tục


Tên:  10.jpg
Xem: 1724
KT:  571,9 KB


- Tiếp bạn phải làm thủ tục đăng kí tài khoản để sử dụng Ubuntu bạn hãy nhập đầy đủ thông tin tên, tài khoản mật khẩu nhé bắt buộc phải làm nếu ko bạn sẽ ko cài đặt được ứng dụng của ubuntu . bạn có thể đặt tên máy tính theo ý muốn của mình và bạn chọn vào ô tròn cạnh chữ " Tự động đăng nhập nhé => roi nhan tiep tục.


Tên:  11.jpg
Xem: 1660
KT:  558,8 KB


- Máy sẽ cho bạn chụp một tấm hình bằng webcam hoặc chọn một tấm hình làm avatar bạn hãy chọn và nhấn tiếp tục.


Tên:  12.jpg
Xem: 1591
KT:  386,6 KB


- Tiếp đó máy sẽ hỏi bạn có muốn bạn sao chép dữ liệu từ Windows bạn đang dùng không, theo mình bạn nhấn tiếp tục là tốt nhất vì bước này sẽ làm thời gian cài đặt mất thời gian.


Tên:  13.jpg
Xem: 1696
KT:  519,7 KB


Kết: cuối cùng sẽ có hình chào mừng bạn.


Tên:  14.jpg
Xem: 1593
KT:  360,2 KB


=> Như thế này coi như là xong 99,99% rùi.

- Sau khi cài đặt xong máy sẽ yêu cầu khởi động lại bạn nhán phải vào khởi động lại , đĩa sẽ tự động đẩy ra bạn nhấn Enter để reset.

Bước 10: Sau khi bạn khởi động máy lại bạn sẽ không vào được ubuntu mà sẽ vào thẳng hệ điều hành Windows của bạn, bạn ko phải lo vì bạn chỉ cần làm nôt cái phần 0,01% thôi là ok

- Bạn cần dùng phần mềm EasyBCD để tạo boot cho ubuntu


Tên:  15.jpg
Xem: 1630
KT:  700,1 KB


Bạn làm như sau mở EasyBCD => chọn add New Entry => chọn Linux/BSD và thay đổi như sau
+ Type : giữ nguyên nhé
+ Name : bạn hãy đặt tên cho hệ điều hành bạn muốn tạo boot
+ Device : hãy chọn phân vùng bạn đã cài ubuntu sẽ có tên như thế này Partition ... (Linux - ... GiB)
=> sau đó bạn nhấn Add Entry để hoàn tất quá trình thế là xong 100% rồi nhé bạn khởi động lại sẽ có 2 lựa chọn 1 là hệ điều hành windows của bạn, 2 là Ubuntu