文档视界 最新最全的文档下载
当前位置:文档视界 › 网络运维常用命令大全

网络运维常用命令大全

client 1.1.1.1/8

eth0 1.1.1.254/8
nginx
eth1
192.168.1.254/24

-----------------------------------------------------
| |
web_A web_B
192.168.1.10 192.168.1.20

ifconfig eth0 192.168.1.99

cd /etc/sysconfig/network-scripts/

vim ifcfg-eth0
BOOTPROTO=none
IPADDR=192.168.1.254
:wq

service network restart

/etc/init.d/NetworkManager stop
chkconfig NetworkManager off

iptables -F
service iptables save

setenforce 0
vim /etc/sysconfig/selinux
SELINUX=disabled
:wq


rpm -q vsftpd
mount
umount /dev/cdrom
mount /dev/cdrom /mnt
cd /mnt
rpm -ivh Packages/vsftpd-2.2.2-11.el6_4.1.x86_64.rpm
service vsftpd start
service vsftpd status
chkconfig vsftpd on

cd /
umount /dev/cdrom
mkdir /var/ftp/iso
mount /dev/cdrom /var/ftp/iso

vim /etc/yum.repos.d/a.repo
[ServerOS]
name=CentOS-6 - Debuginfo
baseurl=file:///var/ftp/iso
#baseurl=ftp://ftp-server-ip/mountdir
gpgcheck=0
enabled=1
:wq


yum clean all
yum list
yum -y install 包名列表
yum -y remove 包名

yum grouplist
yum -y groupinstall 软件包组列表
yum -y groupremove 软件包组

http://
https://

nginx 网站服务
代理服务

yum -y groupinstall "开发工具"

rewrite 地址重写

http://web-ip/onedir/a.html url


perl 正则表达式 pcre

rpm -q gcc gcc-c++ make
yum -y install gcc gcc-c++ make

tar -zxvf xxxx.tar.gz
tar -jxvf xxx.tar.bz2

cd nginx-1.0.5

grep www /etc/passwd
useradd -s /sbin/nologin - M www
yum -y install openssl-devel pcre-devel

./configure --help / -h
./configure 【选项】

./configure --prefix=/usr/local/nginx2 --user=www --group=www --with-http_ssl_module
make
make install

cd /usr/local/nginx2

conf 配置文件目录 nginx.conf
html 网页文件目录 *.html .php .css
logs 日志文件目录 (访问日志 错误日志 )
sbin 启动服务的启动脚本 nginx


netstat -utnalp | grep :80
service httpd stop
chkconfig httpd off


/usr/local/nginx2/sbin/nginx
netstat -utnalp | grep :80

elinks --dump http://localhost/a.html
http://1.1.1.254
client
1.1.1.254
nginx
| 192.168.1.254
-----------------------------
| |
web_A web_B
2 3


192.168.1.2~3 :

rpm -q httpd
yum -y install httpd
service httpd start
chkconfig httpd on
echo web2 > /var/www/html/index.html
echo web3 > /var/www/html/index.html

https://www.docsj.com/doc/419414769.html,/a.html

a.php
1.1.1.254
https://www.docsj.com/doc/419414769.html, /www
https://www.docsj.com/doc/419414769.html, /bbs

配置nginx做反向代理服务
vim nginx.conf

http {

server {
location / {
。。。。。
.......

}
location / {

}

}


}

http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name https://www.docsj.com/doc/419414769.html,;
location / {
root /www;
index index.html;
}
}
server {
listen 80;
server_name https://www.docsj.com/doc/419414769.html,;
location / {
root /bbs;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}



/usr/local/nginx2/sbin/nginx



html .css
.php .asp .jsp

index.html
http://1.1.1.254
http://1.1.1.254/xxxx.html nginx /usr/local/nginx2/html

http://1.1.1.254/xxx.php web-server /var/www/html/



web
























相关文档