linux command
SSH remote connectivity tools] [
WebServer [nginx, apache]
database
cache
essential services
What linux is?
1: only operation by the terminal software;
What do linux?
1: Enterprise Server
2: Embedded Development
linux learn
to give yourself a linux environment
to try to solve the problem yourself search
Learn to read the linux error
Forget windows of all things
no exe installer;
the case is to be distinguished;
everything is a file;
the file extension is not so important, just to better identify it;
What virtual machine?
Software: vmware, Virtualbox
Ready to
install Virtualbox, xshell, CentOS
Cloud Server Platform:
Ali cloud
Tencent cloud
Netease hive
Ready to work
Check ip:
ifconfig
ip addr
Installing the software
yum install net-tools [to use] ifconfig
Replace the default source
http://mirrors.163.com/.help/centos.html [domestic and foreign default]
Install Vim
SSH tools
What is SSH
server to install SSH Server
client is installed SSH client
SSH client linked server
SSH config usage Detailed
SSH password-free login program of Key
SSH port security
personalized one-click logon script server
SSH Server Installation Service
to install
yum install openssh-server
start SSH
Service Start sshd [ps -ef | grep ssh View start]
set a power-running
chkconfig sshd on
Client installed SSH client
tool
xshell [windows]
yum install openssh-clients [Linux]
SSH client linked server
ssh [email protected]
SSH config usage Detailed
Host "imooc"
HostName 192.168.1.101
the User root
Port 22
host "imooc2"
HostName 192.168.1.101
User root
Port 22
SSH password-free login program's Key
to generate keys [windows]
key managers in the tool
cd ~ / .ssh /
Touch authorized_keys
authorized_keys vim
copy the contents of the public key file into
reconnection
Generating a key Linux] [
ssh-keyhen -t rsa or ssh-keyhen -t dsa
the contents of the public key copy of the file into the file authorized_keys
ssh-add ~ / .ssh / imooc_rsa loading private key need not win] [
SSH port security
to modify / etc / ssh / sshd_config configuration
Port: 22
Linux common commands
software operation command
server hardware resources and disk operations
files and folders operation command
system users Operation Command
firewall settings
provide the right to operate sudo and file transfer operations
Software Operation Command
Package Manager: yum
install the software: yum install xxx
uninstall the software: yum remove xxx
search software: yum search xxx
to clear the cache: yum clean packages
List installed: yum list
package information: yum info xxx
Server hardware resources and disk operations
Memory: free -m
hard drive: df -h
load: w / Top
the CPU and the number of audit: cat / proc / cpuinfo
File and folder operations command
The directory structure of the files
root directory /
home directory / home
temporary directory / tmp
configuration file / etc
user program directory / usr
File basic operation of
files in a directory ls view
touch new file
mkdir New Folder
cd into the directory
rm delete files and directories
cp copy
mv move
pwd show the path
Magic Vim text editor
File Permissions 421
File search, find, read the
tail end of the file from start reading
head to read from the file header
cat reads the entire file
more page read
less controllable paged
grep search keyword
find find file
number wc statistics
File compression and decompression
tar command to
archive tar -cf imooc.tar imooc
extracting file tar -xf imooc.tar
view the file tar -tf imooc.tar
Operating system user command
useradd to add users
such as: imooc useradd
adduser add a user
userdel Delete user
passwd to set a password
for example: passwd
Firewall settings
installation: yum install firewalld
start: service firewalld start
check the status: service firewalld status
turn off or disable the firewall: service firewalld stop / disable
Basic Operation nginx
mounted yum install nginx
Start service nginx start
stop service nginx stop
overloading service nginx reload
Nginx expansion of knowledge
virtual host
multi-domain, multi-port
pseudo-static
log format
reverse proxy and load balancing
debugging techniques