• Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership from 10$ a month today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

Hướng dẫn VPS Tutorial - All levels | Hướng dẫn sử dùng Máy chủa ảo Linux (VPS) từ cơ bản đến nâng cao, post h

VnSlo

New Member
Bài 1:SSH, và hướng dẫn kết nối
Xem bản dịch của google tại đây: http://translate.google.com.vn/tran...-vao-day-nha.html&sl=en&tl=vi&history_state0=


Hello,
First of all, before we start this tutorial, we assume you have no prior experience in Shell/SSH on a Linux based system, and this tutorial will be based around CentOS, which is a Linux based operating system.
Hold on… What is SSH?
Well, I’m sure that if you have ordered, or are currently renting a VPS, you will have seen something in your welcome email about SSH, and a “root” password - This is like a login to your server - its like logging into Windows, you need to know your username (In this case, “root” and you need to know your password.
Now, Linux over the internet is not like Windows, as it does not offer a GUI (Graphical user Interface) instead of having a WIMP interface (Windows, Icons, Menus and Pointers), you are faced with a boring, but powerful, command line interface for getting the Linux server to carry out the tasks you need it to do.
Just like Windows, the Linux operating system is able to run “Programs”, which can have many file extensions, but they do not run Windows .exe files. The most common type of Linux executable file is a shell script, which has the extension .sh
What do I need?
Well, to start with, no server administrator owns a computer that does not have a working copy of PuTTY. PuTTY is a free Telnet and SSH client used by server administrators and users to control linux, and sometimes windows based systems.
PuTTY can be downloaded from the official website, by clicking here.
Okay. I have PuTTY, now what?
Well, now the fun begins. Its time to make your first connection to your server via SSH. First of all, run PuTTY. You will see that PuTTY is not an installer, its a stand alone application that you download, meaning you will need to run that every time you wish to use it, it does not create a shortcut in your start menu.
When running PuTTY, you will see the following on screen:
Once you see the page like above on your PuTTY, you can start entering your details, for this, you will need the following:

  • Your root password (And username if changed)
  • Your Server IP address
  • Your Servers SSH port (If unknown, use 22)
Fill out the page as follows:

Using the color coded boxes from the image above;

  • In the Red box, enter your Servers IP address.
  • In the Blue box, enter your Servers SSH port, if unknown, leave it as 22.
  • Make sure “SSH” is selected like the black box shows.
Once all that has been filled in and checked, click the Green button “Open”. You will see something like the following:
That error as it is called, is perfectly normal for the first time you connect via an SSH connection to a new server. You should click “Yes”. If you see this error when you next connect, there may be a problem, and you should read what the error states.


--- Bổ sung bài viết ---

Các lệnh cơ bản của SSH
* Lệnh liên quan đến hệ thống

exit: thoát khỏi cửa sổ dòng lệnh.
logout: tương tự exit.
reboot: khởi động lại hệ thống.
halt: tắt máy.
startx: khởi động chế độ xwindows từ cửa sổ terminal.
mount: gắn hệ thống tập tin từ một thiết bị lưu trữ vào cây thư mục chính.
unmount: ngược với lệnh mount.

* Lệnh xem thông tin

cat /proc/cpuinfo: Tìm chi tiết kỹ thuật của CPU
uname -r: Xem hạt nhân phiên bản
gcc -v: Compiler phiên bản nào tôi đã cài đặt.
cat /proc/meminfo: Bộ nhớ và trang đổi thông tin
/sbin/ifconfig: Xem các địa chỉ IP của bạn.
netstat: xem tất cả các kết nối.
lsmod: Những gì được nạp module hạt nhân
last: xem những ai đã login vào hệ thống
df: Xem dung lượng ổ đĩa cứng
free -m: xem dung lượng sử dụng bộ nhớ
netstat -an |grep :80 |wc -l: xem có bao nhiêu kết nối đến cổng 80

* Lệnh thao tác trên tập tin

ls: lấy danh sách tất cả các file và thư mục trong thư mục hiện hành.
pwd: xuất đường dẫn của thư mục làm việc.
cd: thay đổi thư mục làm việc đến một thư mục mới.
mkdir: tạo thư mục mới.
rmdir: xoá thư mục rỗng.
cp: copy một hay nhiều tập tin đến thư mục mới.
mv: đổi tên hay di chuyển tập tin, thư mục.
rm: xóa tập tin.
wc: đếm số dòng, số kí tự... trong tập tin.
touch: tạo một tập tin.
cat: xem nội dung tập tin.
vi: khởi động trình soạn thảo văn bản vi.
df: kiểm tra dung lượng đĩa.
du: xem dung lượng đĩa đã dùng cho một số tập tin nhất định
tar -cvzpf archive.tgz /home/example/public_html/folder: nén một thư mục
tar -tzf backup.tar.gz: liệt kê file nén gz
tar -xvf archive.tar: giải nén một file tar
unzip file.zip: giải nén file .zip

* Lệnh khi làm việc trên terminal

clear: xoá trắng cửa sổ dòng lệnh.
date: xem ngày, giờ hệ thống.
find /usr/share/zoneinfo/ | grep -i pst: xem các múi giờ.
ln -f -s /usr/share/zoneinfo/Asia/Ho_Chi_Minh /etc/localtime: Đổi múi giờ máy chủ về múi giờ Việt Nam
cal: xem lịch hệ thống.

* Lệnh quản lí hệ thống

rpm: kiểm tra gói đã cài đặt hay chưa, hoặc cài đặt một gói, hoặc sử dụng để gỡ bỏ một gói.
ps: kiểm tra hệ thống tiến trình đang chạy.
kill: dừng tiến trình khi tiến trình bị treo. Chỉ có người dùng super-user mới có thể dừng tất cả các tiến trình còn người dùng bình thường chỉ có thể dừng tiến trình mà mình tạo ra.
top: hiển thị sự hoạt động của các tiến trình, đặc biệt là thông tin về tài nguyên hệ thống và việc sử dụng các tài nguyên đó của từng tiến trình.
pstree: hiển thị tất cả các tiến trình dưới dạng cây.
sleep: cho hệ thống ngừng hoạt động trong một khoảng thời gian.
useradd: tạo một người dùng mới.
groupadd: tạo một nhóm người dùng mới.
passwd: thay đổi password cho người dùng.
userdel: xoá người dùng đã tạo.
groupdel: xoá nhóm người dùng đã tạo.
gpasswd: thay đổi password của một nhóm người dùng.
su: cho phép đăng nhập với tư cách người dùng khác.
groups: hiển thị nhóm của user hiện tại.
who: cho biết ai đang đăng nhập hệ thống.
w: tương tự như lệnh who.
man: xem hướng dẫn về dòng lệnh như cú pháp, các tham số...

Lưu ý: hệ điều hành Linux phân biệt chữ hoa và chữ thường.
Nguồn netvn.asia
----> BỔ SUNG BÀI VIẾT<----
---------------------------------------------------------------
Server/VPS của tôi giờ hệ thống không đúng làm sao để cập nhật giờ được chính xác!??

log in vào ssh với quyền root :
chạy lệnh sau :
Code:
date -s "2009-07-12 4:12:30"
----> BỔ SUNG BÀI VIẾT<----
---------------------------------------------------------------
Thay đổi mật khẩu vào SSH
Đăng nhập vào ssh gõ lệnh
Code:
passwd
sau đó nhập pass mới, đợi một chút nữa nó chờ mình nhập lại pass mới 1 lần nữa là xong

Nếu bạn muốn đổi pass 1 user khác trong hệ thống thì dùng lệnh
Code:
passwd username
và tất nhiên bạn phải login với quyền root
 

Facebook Comments

Similar threads
Thread starter Title Forum Replies Date
phongphung Share OPEN web Site :--- Cloud24.vn ---Cung cấp VPS/Proxy Private chính hãng ( EU - VN - US ..v.v..) và hơn 60 quốc gia khác !!!! VPS & Dedicated Server 23
Admin Hướng dẫn tạo VPS miễn phí 14 ngày - How to get a free VPS for 14 days VPS & Dedicated Server 1
K KINDY.PRO Chuyên bán VPS Windows , Linux, SSL giá rẻ VPS & Dedicated Server 0
minht0431 Xin tìm nhà tài trợ vps chạy gunny VPS & Dedicated Server 0
keanyaw SSD VPS Hosting 50% OFF | FREE SSL | FREE Backup Chia sẻ mã giảm giá 0
toanvietnix Share Vietnix - Giảm giá trọn đòi VPS lên đến 40% Chia sẻ mã giảm giá 0
N Nên chọn hệ điều hành Linux nào phù hợp cho VPS của bạn? Tin tức CNTT 0
Admin Share VPS và VPN cho thành viên tuoitreit.vn VPS & Dedicated Server 12
Admin Hướng dẫn đổi port trên VPS CentOS 6.8 VPS & Dedicated Server 0
Admin Free VPS 1 tháng từ OVH VPS & Dedicated Server 0
T Vps rẻ nhất, mạnh nhất mùa hè này giảm 30% VPS & Dedicated Server 1
T ảo hóa việt- vps, hosting giảm đến 50%. ưu đãi kèm domain Chia sẻ mã giảm giá 0
T HOT SALE: VPS SSD giảm 30%, Hosting chỉ từ 10k/tháng Thông tin các mạng di động 0
PiPyL Hosting, SSL, VPS chất lượng tốt cho sinh viên chỉ từ 20k Hosting & Domain Free 11
PiPyL Hosting, VPS, SSL chất lượng tốt giá chỉ từ 10k Hosting & Domain Free 12
T So sánh Cloud VPS và VPS thông thường Hosting / Domain 0
T BNode Cloud VPS Hosting / Domain 0
T Dịch vụ máy chủ Cloud VPS Hosting / Domain 0
PiPyL Khuyến mãi Hosting, SSL, VPS giá rẻ, chất lượng tốt nhất Hosting & Domain Free 11
I Hosting Giá SV còn giảm giá 50% Hosting và 25% VPS - NetHost.vn Hosting / Domain 0
K Cloud vps Trò chuyện linh tinh 0
D Để lại VPS chất giá rẻ VPS & Dedicated Server 1
Emvip Thảo luận Thanh lý vps và rsl hosting VPS & Dedicated Server 3
Emvip Help hỗ trợ cài vps để chạy website VPS & Dedicated Server 5
Admin Hướng dẫn remote desktop trên VPS Vultr đơn giản và không lag VPS & Dedicated Server 0
V Domain Full Cpanel 40k/năm, Hosting, Vps Giá Rẻ Dành Cho Học Sinh, Sinh Viên Hosting / Domain 5
Admin Dùng thử 2 tháng VPS Vultr với 52$ VPS & Dedicated Server 0
Admin Hướng dẫn xác minh 2 bước SSH trên vps Ubuntu chi tiết bằng hình ảnh VPS & Dedicated Server 0
N Share VPS SSD 512MB giá chỉ 100k VPS & Dedicated Server 0
Admin Hướng dẫn cài đặt Google Chrome phiên bản mới nhất khi remote desktop trên vps ubuntu 14.04 VPS & Dedicated Server 0
Admin Hướng dẫn kiểm tra thông tin và đánh giá vps đơn giản và nhanh chóng VPS & Dedicated Server 0
Admin Hướng dẫn remote desktop xRDP trên VPS ubuntu 14.04 chi tiết VPS & Dedicated Server 6
roboconz Share vps 1 tháng dùng thử miễn phí VPS & Dedicated Server 3
T Domain, Hosting, VPS, SSL chất lượng, uy tín cho khởi nghiệp Tin tức CNTT 4
C Xin Tài Trợ VPS Để Làm servergame Hosting / Domain 2
N Share VPS vulrt giá chỉ từ 20k, áp dụng đến hết tháng 2/2015 VPS & Dedicated Server 2
H Xin Xin tài trợ vps để học tập làm game Hosting / Domain 5
N Thảo luận Đánh giá dịch vụ VPS hostvn.net VPS & Dedicated Server 0
T Vnetwork - Nhà cung cấp dịch vụ cho thuê Server, VPS, chỗ đặt Server, Hosting, Domain , thiết kế web Hosting / Domain 0
roboconz Hướng dẫn Site Trial VPS Windows 1day cấu hình Khủng VPS & Dedicated Server 2
roboconz Share 1 con vps windows mục đích học tập VPS & Dedicated Server 6
Lee_Jin Share VPS Free 5 Tháng SDD , KMV VPS & Dedicated Server 1
M Share Khuyến mại đặc biệt cho thành viên CSC, VPS 1GB RAM chỉ 15$/năm Chia sẻ mã giảm giá 0
M Linode tung ra gói VPS 10$/tháng, tặng miễn phí 10$ Chia sẻ mã giảm giá 0
N Share VPS miễn phí hàng ngày, giới hạn tại nguyenchithao.com VPS & Dedicated Server 2
L0ngHackit HostSpeed.Biz Dịch Vụ VPS - Hosting - Domain Giá Rẻ Hosting / Domain 0
Admin Hướng dẫn phân biệt VPS công nghệ ảo hóa OpenVZ, KVM, XEN chi tiết VPS & Dedicated Server 2
Admin Hướng dẫn tạo proxy server trên VPS chi tiết VPS & Dedicated Server 1
T Admin nhận reg VPS win giá rẻ không ạ? VPS & Dedicated Server 4
H Dịch vụ domian, hosting, VPS, sever, colocation không giới hạn băng thông Hosting / Domain 0

Similar threads

New posts New threads New resources

Back
Top