sudo

ubuntu下wps的安装

可紊 提交于 2019-12-25 03:36:38
(一)安装 1)下载:WPS For Linux http://community.wps.cn/download/ 下载 wps-office_10.1.0.5672~a21_amd64.deb 2)安装命令:sudo dpkg -i wps-office_10.1.0.5672~a21_amd64.deb (二) 启动WPS for Linux后,出现提示"系统缺失字体" 。 出现提示的原因是因为WPS for Linux没有自带windows的字体,只要在Linux系统中加载字体即可。 具体操作步骤如下: 1. 下载缺失的字体文件,然后复制到Linux系统中的/usr/share/fonts文件夹中。 国外下载地址:https://www.dropbox.com/s/lfy4hvq95ilwyw5/wps_symbol_fonts.zip 国内下载地址:https://pan.baidu.com/s/1eS6xIzo 下载完成后,解压并执行: sudo mv wps_symbol_fonts /usr/share/fonts 2. 执行以下命令,生成字体的索引信息: sudo mkfontscale sudo mkfontdir 3. 运行fc-cache命令更新字体缓存。 sudo fc-cache 4. 重启wps即可,字体缺失的提示不再出现。 启动WPS for

Ubuntu 16.04 安装WPS

限于喜欢 提交于 2019-12-25 03:35:57
1、下载安装包和缺少的字体 安装包下载【http://wps-community.org/download.html?vl=a21#download】(这里下载的是最新的安装包) 缺少的字体下载【链接: https://pan.baidu.com/s/1cRxwuehoGPss1-OWY-ub2A 密码: d6b6】 2、进入命令行,cd到安装包下载的位置: sudo dpkg -i wps-office_10.1.0.5707_a21_amd64.deb   wps已经安装好了,下面安装缺少的字体。 3、同样cd进入缺省字体下载的位置: sudo mkdir /usr/share/fonts/wps-office //创建目录sudo cp -r wps_symbol_fonts.zip /usr/share/fonts/wps-office //讲字体拷贝到刚刚创建的目录cd /usr/share/fonts/wps-office  //进入目录sudo unzip wps_symbol_fonts.zip //解压文件sudo rm -r wps_symbol_fonts.zip  //删除文件 来源: https://www.cnblogs.com/pealicx/p/8723365.html

hue 用户权限分配

一世执手 提交于 2019-12-25 02:55:27
hue 用户权限分配 一、问题背景 CDH集群原来在使用hue部署oozie工作流的时候发现不能够运行工作流,因为当时hue创建用户时设置root为初始用户,而root用户不属于supergroup组,不能够调用集群中任何组件,为了解决这个问题,当时查参考了 CDH权限不够,修改用户和用户组为root 这篇文章的做法后面来看,只是治标不治本,并没有完全解决后面hue中如果设置其他用户后,其他用户所具有的权限问题,也没有深入讲解CDH组件用户权限问题。 今天这篇文章讲解的几个点 : 如何将集群内部组件恢复到原来的设置,并且让现在拥有的root用户继续能够调用工作流 在hue中添加新的用户,并让新的用户具有调用其他组件的权限 那个用户才是hue默认的初始用户 二 、恢复集群默认设置 1. 各个组件目录所属用户以及权限恢复到默认 /var/log 目录下涉及目录所属用户修改 sudo chown -R hdfs:hadoop /var/log/hadoop-hdfs sudo chown -R mapred:hadoop /var/log/hadoop-mapreduce sudo chown -R yarn:hadoop /var/log/hadoop-yarn sudo chown -R httpfs:httpfs /var/log/hadoop-httpfs sudo chown

C programming - execute another program with sudo privileges

回眸只為那壹抹淺笑 提交于 2019-12-25 02:46:40
问题 i have a C program that opens an mp3 and extract the jpg artwork in the same folder. If i execute this program with no root privileges i get a crash. If i execute it with sudo it works normally. Now, i need another C programs who launch the previous program when it needs a jpg artwork for the selected mp3. I tried to call popen("./firstProgram test.mp3" , "r") function or system("/(absolute path)/firstProgram test.mp3") function by calling them even with sudo in the command or not and either

Modify SCPreferences persistent storage: Invalid Argument

守給你的承諾、 提交于 2019-12-25 02:24:46
问题 Currently trying to modify /Library/Preferences/com.apple.Bluetooth.plist in order to programmatically remove Bluetooth devices and running into an error. First of all, when SCPreferencesSetValue is called, System Configuration says Error Domain=com.apple.SystemConfiguration Code=0 "Success!" UserInfo={NSDescription=Success!} However, when I try to SCPreferencesCommitChanges , the framework tells me Error Domain=com.apple.SystemConfiguration Code=1002 "Invalid argument" UserInfo=

Will a python subprocess Popen call 'inherit' root privs if the calling script is run with sudo?

时光怂恿深爱的人放手 提交于 2019-12-25 02:19:46
问题 I am writing a python script that will use subprocess Popen (with communicate() I am thinking) to run various shell commands, etc. Often, the shell commands that I am executing would typically be run (manually) with sudo. I am running the script that uses subprocess with sudo. I am wondering if I can safely leave sudo off all of my subprocess calls or if I need to include it and use stdin to provide a password. This seems like a pretty simple question, but I have been unable to find the

Cloud-init的安装和使用 --以ubuntu-server-14.04-amd64为例

有些话、适合烂在心里 提交于 2019-12-25 01:52:02
by hyc 1. Cloud-init 安装 已有了一个安装好系统的镜像。 镜像名:ubuntu-test-14.04-server-amd64.img 用户名: user 密码: 1 主机名: ubuntu 在 ip 为 192.168.29.80 的服务器上执行命令: sudo kvm -m 2048 -drive file=/openstack_img/iso/ubuntu-14.04.2-server-amd64.iso,index=1,media=cdrom -drive file=/openstack_img/img/ubuntu-test-14.04-server-amd64.img,if=virtio -drive file=/openstack_img/driver/virtio-win.iso,index=3,media=cdrom -net nic,model=virtio -net user -nographic -vnc :9 -usbdevice tablet 登录后,执行以下命令安装必要的软件包: # sudo apt-get -y update # sudo apt-get -y upgrade # sudo apt-get install curl # curl http://mirror.rightscale.com/rightlink

学习瓦力部署系统的项目配置和上线部署

…衆ロ難τιáo~ 提交于 2019-12-25 00:48:00
一直想自己开发的项目能够自动部署到服务器上面,节约通过ftp上传一个一个的文件进行部署项目的时间。 由于jenkins的配置目前对笔者个人而言有点复杂,尝试过之后,结果没有尝试成功。之前找自动部署的系统时,好像在知乎中看到一条回答有介绍瓦力部署,并有github的链接,有关注过。开始时尝试了比较多次,检测时一直提示 请确认php进程用户ssh-key加入目标机器的git的ssh-key信任列表 之后,放弃了一段时间;今天尝试将LAMP转换为LNMP环境之后,才发现笔者还是可以尝试成功的嘛。开始之前,笔者把之前在Ubuntu 14.04安装的LAMP已卸载完毕。 系统环境: Ubuntu 14.04(宿主机) 树莓派(目标机,IP:192.168.2.100) 宿主机安装的软件: Nginx 1.4.5 Mysql 5.5.35 PHP 5.5.9 composer 1.3.2 git 1.9.1 Ansible 宿主机检出了walle-web master分支最新版,学习时,是用github的项目进行的。 安装LNMP 笔者依次执行的是: 安装mysql: apt-get install mysql-server mysql-client 安装Nginx: sudo apt-get install nginx 安装PHP5 sudo apt-get install php5-fpm

how to give running process sudo permissions

僤鯓⒐⒋嵵緔 提交于 2019-12-25 00:42:44
问题 I want to give a running process sudo permissions. Like if I have opened eclipse normally. Now when I start my server on eclipse it needs sudo permission but for that I will have to close the eclipse and then open it with sudo eclipse to get sudo permission. I tried setting the setuid and setgid of /usr/bin/eclipse but that didn't worked. I don't know why it didn't worked. 回答1: Setuid/setgid didn't work as those file mask bits are used by the kernel, when the process is created, to give it

Ubuntu 安装virtualenv

混江龙づ霸主 提交于 2019-12-25 00:16:06
[TOC] Ubuntu 安装virtualenv 一、安装pip 1、安装pip sudo apt-get install python3-pip -y # sudo apt-get install python2-pip -y 2、配置pip源 sudo mkdir ~/.pip sudo cat << EOF > ~/.pip/pip.conf [global] index-url = https://pypi.tuna.tsinghua.edu.cn/simple [install] trusted-host = https://pypi.tuna.tsinghua.edu.cn EOF 二、安装virtualenv 1、安装virtualenv sudo pip3 install virtualenv 2、配置virtualenv环境 find ~/ -name virtualenv /home/hxy/.local/bin/virtualenv cat << EOF > ~/a export PATH=$PATH:/home/hxy/.local/bin EOF 三、配置virtualenv环境 1、创建虚拟环境 virtualenv --python=/usr/bin/python3 py3 $ ls bin include lib 2、激活使用环境 cd py3 $