标签:tun 用户 channel sof code student conf opd 运行
systemctl status firewalld 查看防火墙状态
systemctl stop firewalld 暂时关闭防火墙
systemctl enable firewalld 开启防火墙
systemctl disable firewalld 永久关闭防火墙
systemctl restart firewalld 重启防火墙
service firewalld status
...
yum install net-tools 安装后使用netstat(ifconfig)命令
netstat -ntpl 查看所有端口使用情况
netstat -tunlp
netstat -tunlp | grep 8080 或 lsof -i:8080 查看端口8080是否被占用
ps -aux | grep 908 查看占用端口的908进程详细情况
kill -9 908 关闭进程
运行***.sh 文件
./***.sh
sh ***.sh
给文件/文件夹添加执行权限
chmod -R 7777 文件/文件夹
参数-R是递归的意思
777表示开放所有权限
如何普通用户切换到root用户:1.su 2.su root 需要密码
如何从root用户到普通用户:1.su 用户名 2.ctrl+d 不需要密码
yum -y install ***(wget)
yum clean all
yum update
mysql
alter user ‘root‘@‘localhost‘ identified by ‘新密码‘;
登录mysql:
mysql -u root -p
:密码
查看所有数据库:
show databases;
创建数据库:
create database 库名;
删除数据库:
drop database 库名;
选中数据库:
use 库名;
查看表(先进库):
show tables;
创建表,并插入数据(先进库):
CREATE TABLE STUDENT(
ID INT,
USERNAME VARCHAR(20),
SERVLET INT,
age INT,
ADDRESS VARCHAR(30)
);
插入数据:
insert into STUDENT values(19,‘LiMing‘,19,20,‘SuZhou‘)
insert into STUDENT(ID,USERNAME) values(21,‘XiaoWu‘);
修改数据:
update STUDENT set comments=‘’ where id=2;
查询数据:
select id from STUDENT where name=‘‘;
删除数据:
delete from STUDENT where id = ;
修改表名称:
alter table student rename to teacher;或者是 rename teble teacher to student;
为表添加字段:
alter table student add column jsp varchar(2);
删除字段:
alter table student drop column jsp;
修改字段名:
alter table student change column servlet javaee varchar(2);
查询时添加常量:
select id, username,‘80‘ as ‘Match‘ from student;
查询时合并列:
select id,username,(servlet+age) as “he” from student;
创建表
CREATE TABLE `count_branch` (
`id` INT(11) NOT NULL AUTO_INCREMENT COMMENT ‘主键‘,
`salebillcountnew` INT(11) DEFAULT NULL COMMENT ‘新增销售单数量‘,
`salebillamountnew` DECIMAL(20,4) DEFAULT NULL COMMENT ‘订单增长金额‘,
`shopcode` VARCHAR(25) DEFAULT NULL COMMENT ‘商户编码‘,
`shopname` varchar(50) DEFAULT NULL COMMENT ‘商户名称‘,
`branchcode` VARCHAR(25) DEFAULT NULL COMMENT ‘门店编码‘,
`branchname` VARCHAR(50) DEFAULT NULL COMMENT ‘门店名称‘,
`countdate` DATETIME DEFAULT NULL COMMENT ‘统计时间‘,
`shopprovinceid` int(11) DEFAULT NULL COMMENT ‘商户省‘,
`shopcityid` int(11) DEFAULT NULL COMMENT ‘商户市‘,
`shopdistrictid` int(11) DEFAULT NULL COMMENT ‘商户区‘,
`shopindustryid` int(11) DEFAULT NULL COMMENT ‘行业id‘,
`shopindustryname` VARCHAR(25) DEFAULT NULL COMMENT ‘行业名称‘,
`shoptel` VARCHAR(25) DEFAULT NULL COMMENT ‘商户联系人‘,
`servercode` VARCHAR(25) DEFAULT NULL COMMENT ‘所属服务商‘,
`shopcreatetime` DATETIME DEFAULT NULL COMMENT ‘商户注册时间‘,
`regchannel` int(11) DEFAULT NULL COMMENT ‘注册渠道‘,
`createtime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT ‘创建时间‘,
`updatetime` DATETIME DEFAULT NULL COMMENT ‘更新时间‘,
PRIMARY KEY (`id`),
KEY `idx_count_branch_n1` (`shopcode`,`branchcode`,`countdate`)
) ENGINE=INNODB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
CREATE TABLE sysuser(
ID INT,
systemf VARCHAR(20),
user VARCHAR(20),
pawd VARCHAR(30)
);
CREATE TABLE STUDENT(
ID INT,
USERNAME VARCHAR(20),
SERVLET INT,
age INT,
ADDRESS VARCHAR(30)
);
标签:tun 用户 channel sof code student conf opd 运行
原文地址:https://www.cnblogs.com/xioawu-blog/p/11171460.html