service network restart 重启网络
vi /etc/resolv.conf 网关,域名服务
ifconfig 查看网络配置
cd /etc/sysconfig/network-scripts/ 网口目录
vi ifcfg-eth0 IP设置
DEVICE=eth0
IPADDR=192.168.0.199
NETMASK=255.255.255.0
GATEWAY=192.168.0.254
DNS1=192.168.5.254
ONBOOT=yes
TYPE=Ethernet
UUID=4a05c281-e133-42bf-830f-813706a94736
BOOTPROTO=static
IPV6INIT=no
USERCTL=no
二、安装Tomcat——yum install tomcat
1、安装完成后,查看JKD版本——java -version
2、启用服务——systemctl enable tomcat
3、重启——reboot ,查看是否成功
# wget http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm
3、安装rpm包到yum库
# rpm -ivh mysql57-community-release-el7-7.noarch.rpm
4、安装完上述包后,查看yum库,就会在yum库里生成以下几个包
# yum list Mysql*
为了加强安全性,安装MySQL5.7后会为root用户随机生成了一个密码,在error log中,关于error log的位置,如果安装的是RPM包,则默认是/var/log/mysqld.log。
可通过# grep "password" /var/log/mysqld.log 命令获取MySQL的临时密码
设置权限
创建一个只允许从本地登录的超级用户xu,并允许将权限赋予别的用户,密码为xu@123456
# GRANT ALL PRIVILEGES ON *.* TO xu@'localhost' IDENTIFIED BY 'xw@123456' WITH GRANT OPTION;
创建一个一般的程序用户,这个用户可能只需要SELECT, INSERT, UPDATE, DELETE, CREATE TEMPORARY TABLES等权限如果有存储过程还需要加上EXECUTE权限,一般是指定内网网段192.168.100网段。
# GRANT USAGE,SELECT, INSERT, UPDATE, DELETE, SHOW VIEW ,CREATE TEMPORARY TABLES,EXECUTE ON `test`.* TO xu@'192.168.100.%' IDENTIFIED BY 'xu@123456';
创建一个普通用户(仅有查询权限)
# GRANT USAGE,SELECT ON `test`.* TO xu@'192.168.100.%' IDENTIFIED BY 'xu@123456';
11、 刷新系统权限表
mysql>flush privileges; //刷新系统权限表
cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c 查看CPU型号
cat /proc/cpuinfo | grep "physical id"| sort| uniq| wc -l 查看物理CPU个数
cat /proc/cpuinfo | grep "cpu cores"| uniq 查看单个CPU的核数
cat /proc/cpuinfo | grep "processor"| wc -l 查看逻辑CPU个数
cat /etc/redhat-release 系统版本
getconf LONG_BIT 64位还是32位
Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
Manufacturer: Intel Corporation
Product Name: 440BX Desktop Reference Platform
Version: None
Handle 0x01A2, DMI type 16, 23 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: None
Maximum Capacity: 3 GB
Error Information Handle: Not Provided
Number Of Devices: 64
3、查看当前内存数和插槽数——# dmidecode|grep -P -A5 "Memory Device"|grep Size
Size: 1024 MB
Size: No Module Installed
Size: No Module Installed
4、查看内存条数——# dmidecode -t 17 |more
Handle 0x01A3, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x0025
Error Information Handle: No Error
Total Width: 32 bits
Data Width: 32 bits
Size: 1024 MB
Socket Designation: CPU #021
Type: Central Processor
Family: Unknown
Manufacturer: GenuineIntel
ID: 51 06 00 00 FF FB 8B 1F
Version: Intel(R) Core(TM) i5-4250U CPU @ 1.30GHz
Voltage: 3.3 V