==tar压缩和解压=================================================
tar -zcvf etc.tar.gz /etc
tar -zxf etc.tar.gz
==ESXI硬盘RDM直通使用=================================================
setup or ntsysv
==ESXI硬盘RDM直通使用=================================================
Disk /dev/disks/t10.ATA_____ST3000DM0082D2DM166__________________________________Z504MHWQ: 4294967295 sectors, 4095M(vmfs5,希捷3T)
1 2048 5860532223 5589M 0700
Disk /dev/disks/naa.5000c500a99e7f02: 1953525168 sectors, 1863M (vmfs5,希捷1T)
1 64 8191 8128 0700
2 7086080 15472639 8190K 0700
3 15472640 1953525134 1848M 0700
5 8224 520191 499K 0700
6 520224 1032191 499K 0700
7 1032224 1257471 219K 0700
8 1257504 1843199 571K 0700
9 1843200 7086079 5120K 0700
Disk /dev/disks/t10.ATA_____ST3500413AS_________________________________________5VMY7PYR: 500.1 GB, 500107862016 bytes
/dev/disks/t10.ATA_____ST3500413AS_________________________________________5VMY7PYRp1 1 12749 102398976 7 HPFS/NTFS
/dev/disks/t10.ATA_____ST3500413AS_________________________________________5VMY7PYRp2 12749 38245 204800000 7 HPFS/NTFS
/dev/disks/t10.ATA_____ST3500413AS_________________________________________5VMY7PYRp3 38245 60802 181183488 7 HPFS/NTFS
Disk /dev/disks/naa.5000cca61ed74533: 320.0 GB, 320072933376 bytes
/dev/disks/naa.5000cca61ed74533p1 * 1 13 102400 7 HPFS/NTFS
/dev/disks/naa.5000cca61ed74533p2 13 12143 97427456 7 HPFS/NTFS
/dev/disks/naa.5000cca61ed74533p3 12143 38914 215038976 7 HPFS/NTFS
vmkfstools -z /vmfs/devices/disks/t10.ATA_____ST1000LM0482D2E7172__________________________________WDE3XJ8H /vmfs/volumes/59207a5e-d610aba8-68f6-a4bf012087c4/disk1T_2.5.vmdk
vmkfstools -z /vmfs/devices/disks/t10.ATA_____ST3500413AS_________________________________________5VMY7PYR /vmfs/volumes/59207a5e-d610aba8-68f6-a4bf012087c4/disk500G.vmdk
==磁盘相关操作=========================================================
fdisk -l
fdisk /dev/sdc
mkfs.ext3 /dev/sdb
mount /dev/sdb /mywork
fdisk /dev/sdc
n
p
mkfs.ext3 /dev/sdc1
mkfs.ext3 /dev/sdc2
==代理=================================================================
1、服务端代理软件与启动
sudo apt-get update
apt install squid
vi /etc/squid3/squid.conf
+- # And finally deny all other access to this proxy
+- http_access allow all
service squid3 restart
2、客户端代理设置
ubuntu设置代理
export http_proxy=http://172.18.65.252:3128
export https_proxy=https://172.18.65.252:3128
export http_proxy=http://172.18.65.252:3128
export https_proxy=https://172.18.65.252:3128
ubuntu取消代理
export -n http_proxy
export -n https_proxy
3、配置svn代理
sudo apt-get update
sudo apt-get install subversion
svn update ##用来生成/root/.subversion目录
vi /root/.subversion/servers
+- [global]
+- http-proxy-host = 172.18.65.252
+- http-proxy-port = 3128
4、git设置代理
git config --global http.proxy http://proxy.com:1234
git config --global https.proxy http://proxy.com:1234
git config --global http.sslverify false
==samba=======================================================================
一. samba的安装:
sudo apt-get insall samba
sudo apt-get install smbfs
二. 创建共享目录:
mkdir /home/phinecos/share
sodu chmod 777 /home/phinecos/share
三. 创建Samba配置文件:
1. 保存现有的配置文件
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
2. 修改现配置文件
sudo gedit /etc/samba/smb.conf
在smb.conf最后添加
[share]
path = /home/phinecos/share
available = yes
browsealbe = yes
public = yes
writable = yes
3. 放开homes
[homes]
comment = Home Directories
public = yes
read only = no
create mask = 0775
directory mask = 0775
valid users = %S
四. 创建samba帐户
touch /etc/samba/smbpasswd
smbpasswd -a phinecos
输入samba帐户的密码
smbpasswd -a root
输入samba帐户的密码
五. 重启samba服务器
sudo /etc/init.d/samba restart
service smbd restart && service nmbd restart
六. 测试
smbclient -L //localhost/share
七,使用
\\192.168.116.128\root
\\192.168.116.128\share
==samba=======================================================================
ssh和usb启动相关:
42 rpm -qa | grep openssh-server
43 yum install openssh-server
44 vi /etc/ssh/ssh_config
45 vi /etc/ssh/sshd_config
47 service sshd restart
48 /bin/systemctl restart sshd.service
52 fdisk -l
53 modprobe usb-storage
54 modprobe scsi_mod
55 modprobe sd_mod
56 modprobe usbcore
92 vi /etc/rc.d/init.d/network
增加启动脚本:
98 touch /etc/rc.d/rc.local
99 vi /etc/rc.d/rc.local
100 chmod -R 777 /etc/rc.d/rc.local
102 sudo systemctl enable rc.local.service
104 sudo vim /usr/lib/systemd/system/rc-local.service
105 vi /usr/lib/systemd/system/rc-local.service
末尾增加如下内容:
----------------------------
[Install]
WantedBy=multi-user.target
----------------------------
106 sudo systemctl enable rc-local.service
安装启动smaba服务
108 dnf install samba samba-common samba-client
109 smbpasswd -a root
110 setenforce 0
111 vi /etc/samba/smb.conf
113 service smb restart
114 service nmb restart
131 netstat | grep smba
关闭linux安全相关功能:
133 service iptables save
134 service iptables stop
148 /usr/sbin/setenforce 0
149 setenforce 0
167 sudo systemctl stop firewalld.service
168 sudo systemctl disable firewalld.service
==ESXI硬盘RDM直通使用=================================================