Common LINUX commands

Source: Internet
Author: User
Common LINUX commands-general Linux technology-Linux technology and application information. For details, refer to the following section. Fc restart network
/Sbin/service network stop/start

Set IP address under FC
/Sbin/ifconfig eth0 10.0.2.230 netmask fixed bandwidth limit 192 broadcast 10.0.2.255

Modify DNS in fc7
Vi/etc/resolv. conf
Nameserver 202.106.0.20

Ssh raohongfu@10.0.1.33

[NFS] usage
Simple use of NFS in fc7
/Sbin // service nfs start
Vi/etc/exports
1/home/wwwroot-rw 10.0.2.230
2
3/home/rhf/10.0.2.230 (ro)
/Sbin // service nfs restart
/Usr/sbin/showmount-e 10.0.2.230
Mount-t nfs 10.0.2.230:/home/rhf/home/session/

[RSYNC] Service
Server:
Vi/etc/rsyncd. conf
1 uid = nobody
2 gid = nobody
3 use chroot = no
4 max connections = 4
5 pid file =/tmp/rsyncd. pid
6 lock file =/tmp/rsyncd. lock
7 log file =/tmp/rsyncd. log
8
9 [hongfu]
10 path =/home/nfsdata
11 ignore errors
12 read only = false
13 list = true
14 hosts allow = 10.0.1.33
15 hosts deny = 0.0.0.0/32
16 auth users = backuser
17 secrets file =/etc/rsync. user
18
Vi/etc/rsync. user
1 backuser: hongfu
/Usr/bin/rsync -- daemon

Client:
Rsync-vzrtopg -- progress -- delete backuser@10.0.2.230: hongfu/home/raohongfu/tmp/

Client sh script
Rsync-vzrtopg -- progress -- delete -- password-file =/home/raohongfu/rsync. user backuser@10.0.2.230: www/home/raohongfu/aa/
Vi/home/raohongfu/rsync. user
Hongfu (password only)
Chmod 400 rsync. user (very important)

When the firewall is enabled, make the following settings to enable the relevant ports,
Modify the/etc/sysconfig/iptables file and add the following content:
-A RH-Firewall-1-INPUT-m state -- state NEW-m tcp-p tcp -- dport 80-j ACCEPT
-A RH-Firewall-1-INPUT-m state -- state NEW-m tcp-p tcp -- dport 22-j ACCEPT
Add a firewall rule to open port 80. Otherwise, only local access is allowed. Other computers cannot open the webpage.
/Sbin/service iptables stop or/et/init. d/iptables stop

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.