Some basic Centos operations on KVM virtual machines, kvmcentos
After applying for a KVM/VPS virtual machine, generally the installed systems are Linux, such as commonly used Centos;
With the host, we usually build web servers, ftp servers, and compilation servers. For these common items, some basic operations are listed below.
First, you need to know the Host ip address and ssh listening port number. With the listening port number, you can use ssh/telnet to connect to the host.
// 1. Install Tear-Term locally in Windows. You can install Termius on your mobile phone for ssh connection to the host.
For the access port, see
View ip: ip addr
View the port (usually 22, but the port is usually modified): cat/etc/ssh/sshd_config
// 2. Install the http server. You can directly open the ip address in the browser during the test.
Yum install httpd
Service httpd start
// 3. Install net-tools to execute similar netstat-an commands
Yum install net-tools
// 4. Download the speed test tool
Speedtest. py
Wget https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
Chmod + x speedtest. py
./Speedtest. py
// 5. install ftp
Yum install vsftpd
Service vsftpd start
Vi/etc/vsftpd. conf
Disable Anonymous Access
Anonymous_enable = NO
// 6. Install gcc, g ++
Yum install gcc
Yum install gcc-c ++
// 7. Add sudo service permission for user xxx
Reference: http://blog.csdn.net/dahangg/article/details/50537666
Vim/etc/sudoers
Xxx ALL = (ALL) NOPASSWD:/sbin/service
(Add USER command adduser xxx modify user password method passwd xxx)
// 8. Uninstall the software
For example, detach vsftpd
Yum remove vsftpd
Other common commands:
Which search for commands or programs
Find.-name "aab *" Search for files starting with aab
Ls-l list details
Chmod + x Add execution permission
Adduser
Passwd Change Password
Vi edit text
Cat view text content