A. Đổi port SSH trong linux
linux# vi /etc/ssh/sshd_config
- Tìm đến dòng sau
- #Port 22
- Thay đổi port
- #Port 12345
linux# service sshd reload
B. Xóa nội dung một file
cat /dev/null > <đường dẫn đến file>
C. Hướng dẫn đổi pass root mysql trong linux
- $ mysqladmin -u root -p’oldpassword’ password newpass
- Vidu: $ mysqladmin -u root -p’abc’ password ‘123456’
D. Hướng dẫn MOUNT trong LINUX đến WINDOW
- khách hàng share folder data với đường dẫn sau: //192.168.1.10/data
- Bước 1 : trên linux tạo thư mục rỗng ví dụ /home/test-data
- Bước 2 : gõ lệnh mount.cifs với cú pháp như sau : mount.cifs //192.168.1.10/data /home/test-data/
-
-
- đối với share folder data có username và password
- mount -t cifs -o username=nhapusername,password=nhappassword //IP_WINDOW/tenthumuc-share /Tenduongdan-Linux/tenthumucluu-linux/
-
E. Hướng dẫn kiểm tra dung lượng thư mục trong Linux
- Sử dụng lệnh: du -h /tên_thư_mục
- ví dụ : du -h –max-depth=2 /tên_thư_mục ==>> liệt kê dung lượng tất cả thư mục ở cấp con thứ 2
F. Hướng dẫn yum-via-proxy-server trong Linux
- Bước 1 : [root@server ~#]vi /etc/yum.conf
- Bước 2 : #disable the line starting with “cachedir=/var/cache/yum/$basearch/$releasever”
- Bước 3 :
proxy=http://ip-proxy-server:port hoặc proxy=http://username:password@ip-proxy-server:port proxy_username=username (nếu có) proxy_password=password (nếu có)
- Bước 4 : reboot server
G. Tự động chạy chương trình khi khởi động server
Khai báo chương trình cần chạy trong file /etc/rc.d/rc.local