root

Apache Sqoop导入&导出

∥☆過路亽.° 提交于 2020-01-11 23:18:11
RDBMS->HDFS 全表导入 sqoop import \ --driver com.mysql.jdbc.Driver \ --connect jdbc:mysql://CentOS:3306/test?characterEncoding = UTF-8 \ --username root \ --password root \ --table t_user \ --num-mappers 4 \ --fields-terminated-by '\t' \ --target-dir /mysql/test/t_user \ --delete-target-dir 参数 含义 –-connect 连接的数据库地址 -–username 连接的数据库的用户名 –-password 连接的数据库的密码 –-table 想要导出数据的表 –target-dir 要导入到hdfs中的目录(如果不指定,默认存储在“/user/用户名/导入的表名” 目录下) -–delete-target-dir 表示如果在hdfs中有该目录,则先删除,然后再导入数据到该目录下 –num-mappers 表示设置的maptask个数,默认为4个,决定最终在hdfs中生成的文件个数(将table中的数据分成几个文件分别存储) –fields-terminated-by 指定字段的分割符号 字段导入

Centos7.3+yum源安装:PHP7.3 + MySQL8.0.18;以及对MySQL8.0.18高版本的安全策略修改

旧巷老猫 提交于 2020-01-11 23:08:00
前言 :最近在部署一些项目,喜欢用新且稳定的东西,为了搭配这个简直呕心沥血啊,网上的各种教程都比较老了,我磕磕碰碰搞了一天才弄好,记录下来,希望能给各位有缘看到的人起到点滴的帮助。 觉得可以的朋友给个赞啊,没积分了哈哈哈哈!!! 文章目录 第一步、yum源安装MySQL8.0.18 第二步、修改MySQL8.0.18高版本的安全策略 第三步、yum源安装PHP7.3 第一步、yum源安装MySQL8.0.18 1.1、MySQL的yum源获取链接: yum源 ps:选择一个你喜欢的版本的的yum源,把下载地址复制下来!这里电脑截图不了,快捷键问题,用手机拍的,可能不是很清晰! 做下面的事情之前 请先进入root超级用户权限!!! sudo //输入sudo回车接着输入密码进入root用户 1.2、添加yum源包: wegt https : / / dev . mysql . com / get / mysql80 - community - release - el8 - 1. noarch . rpm 1.3、安装yum源包: rpm - ivh mysql80 - community - release - el8 - 1. noarch . rpm //这里ivh后的安装包对应上面源包的最后一个/后面的包名 1.4、yum源安装MySQL: yum install mysql

Linux 输入输出(I/O)重定向

落爺英雄遲暮 提交于 2020-01-11 15:58:56
目录 1、概念 Linux 文件描述符 2、输出重定向 格式 示例 注意 3、输入重定向 格式 示例 4、自定义输入输出设备 解释 示例 最后说两句 1、概念 在解释什么是重定向之前,先来说说什么是文件描述符 Linux 文件描述符 文件描述符可以理解为 Linux 系统为文件分配的一个数字,范围是 0-3 ,用户也可以自定义文件描述符,但是自定文件描述符不在这里的讨论范围 文件描述符(file descriptor) 名称 类型 文件描述符 操作 标准输入 standard input 0 <,<< 标准输出 standard output 1 >,>> 标准错误输出 standard error output 2 2>,2>> 文件描述符的存储位置位于 /proc/self/fd ,文件描述符是通过一系列软链接指向的默认输出设备,这里我们的默认设备就是模拟终端 模拟终端的文件可以使用命令 tty 来查看 [divent@bash]$ ls -al /proc/self/fd total 0 lrwx------. 1 divent divent 64 Aug 15 14:09 0 -> /dev/pts/0 lrwx------. 1 divent divent 64 Aug 15 14:09 1 -> /dev/pts/0 lrwx------. 1 divent

Connect to docker container as user other than root

牧云@^-^@ 提交于 2020-01-11 15:38:50
问题 BY default when you run docker run -it [myimage] OR docker attach [mycontainer] you connect to the terminal as root user, but I would like to connect as a different user. Is this possible? 回答1: For docker run : Simply add the option --user <user> to change to another user when you start the docker container. docker run -it --user nobody busybox For docker attach or docker exec : Since the command is used to attach/execute into the existing process, therefore it uses the current user there

muduo网络库编译安装

馋奶兔 提交于 2020-01-11 15:36:42
1 下载地址 https://share.weiyun.com/5h0iIOX 2 安装依赖 $ sudo apt-get install cmake $ sudo apt-get install libboost-dev $ tar zxf muduo-0.9.1-beta.tar.gz $ cd muduo/ $./build.sh centos系统使用yum install boost-devel来安装libboost-dev库。 3 编译完的目录 编译完回在muduo同级目录下创建一个build目录, 该目录下debug目录下是主要的文件。 debug/bin目录是测试程序, 比如,inspector_test是一个返回服务信息的一个服务。 debug/lib目录是生成的静态库。 4 安装 在刚才muduo工程下执行 #./build.sh install 则会创建一个目录build/debug-install, 里面有库的头文件和库文件。 [root@localhost debug-install]# ll total 8 drwxr-xr-x. 3 root root 4096 Mar 24 13:27 include drwxr-xr-x. 2 root root 4096 Mar 24 13:27 lib [root@localhost debug-install]

linux下go环境配置

旧巷老猫 提交于 2020-01-11 14:15:11
这篇教程教你如何从0到用go运行hello,world 目录 一 下载安装包 二 上传安装包 三 解压 四 修改文件 五 创建工作空间 六 创建你的工作目录 七 编译并运行hello world 如何root? 我的linux系统是centos,版本如下: 一 下载安装包 下载地址: https://golang.google.cn/dl/ 因为我们后面安装我们下载的包还要修改一些文件,建议直接root (不会root可以看目录向下翻) 二 上传安装包 输入下面的指令(#代表你已经root了) # rz 这时会弹出一个窗口,找到你下载安装包的为位置,上传。( 安装包会上传到你linux的当前目录 ) 三 解压 输入下面的指令 # tar -C /usr/local -xzf xxxx.tar.gz xxxx是你包的名字 以我为例: 我下载版本是 go1.13.6.linux-amd64 那么我就输入 # tar -C /usr/local -xzf go1.13.6.linux-amd64.tar.gz 四 修改文件 这里需要使用vim来编辑,不会vim可以搜一下,很简单 输入下面的指令 # vi /etc/profile 在最后一行加上 export GOROOT=/usr/local/go export PATH=$PATH:$GOROOT/bin 保存后退出,输入下面的指令:

Android silently updating apk and then restart the app

僤鯓⒐⒋嵵緔 提交于 2020-01-11 13:37:30
问题 Okay first of all I want to clear, I'm not trying to achieve anything fishy. We have our own enterprise app that only goes with our own hardware (we are not using Google play store). Also the phone is rooted. I have implemented our own Apk update mechanism. So far I have successfully silently installed apk using the below code try { val command = "pm install -r " + file.path val openAppCommand = "am start -a android.intent.action.MAIN -n" + BuildConfig.APPLICATION_ID + "/.MainActivity" val

xshell秘钥登录服务器

删除回忆录丶 提交于 2020-01-11 09:14:24
一、root用户 1、生成公钥私钥 ssh-keygen -t rsa 私钥自己下载到本地电脑妥善保存(丢了服务器可就没法再登陆了),为安全,建议删除服务器端的私钥。公钥则可以任意公开。 2、cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys 3、修改SSH的配置文件/etc/ssh/sshd_config #PubkeyAuthentication yes 4、关闭root密码登录 PasswordAuthentication no 5、重启服务 service sshd restart 二、普通用户 1、执行一中的12步骤 2、修改配置文件 StrictModes yes --> StrictModes no ## 关闭严格模式 3、重启sshd服务 来源: https://www.cnblogs.com/water-sky/p/10221314.html

重定向

眉间皱痕 提交于 2020-01-11 09:04:53
标准输入和输出 程序:指令+数据 读入数据:Input 输出数据:Output 打开的文件都有一个fd: file descriptor (文件描述符) Linux给程序提供三种 I/O 设备 标准输入(STDIN) -0 默认接受来自终端窗口的输入 标准输出(STDOUT)-1 默认输出到终端窗口 标准错误(STDERR) -2 默认输出到终端窗口 [ root@centos8 ~ ] #ll /dev/std* lrwxrwxrwx. 1 root root 15 Dec 16 08:56 /dev/stderr - > /proc/self/fd/2 lrwxrwxrwx. 1 root root 15 Dec 16 08:56 /dev/stdin - > /proc/self/fd/0 lrwxrwxrwx. 1 root root 15 Dec 16 08:56 /dev/stdout - > /proc/self/fd/1 [ root@centos8 ~ ] #ll /proc/self/fd/* ls: cannot access '/proc/self/fd/255' : No such file or directory lrwx------. 1 root root 64 Dec 16 10:59 /proc/self/fd/0 - > /dev/pts/0

Escalate App Privileges Programmatically OS X

时光总嘲笑我的痴心妄想 提交于 2020-01-11 08:18:20
问题 I've done some digging and the main ideas I've seen floating around are using setuid/getuid and using the Authorization Services (which, for some reason gives me a symbol error when compiling but appears to be deprecated now). My application needs to be able to request root access (for accessing a raw disk drive) at a certain point, preferably with the OS X authentication dialog (I'm new to OS X so I have no idea what to call that). 回答1: Authorization Services is pretty well supported, AFAIK.