sudo

Ubuntu 16.04 安装 Apache, MySQL, PHP7

别说谁变了你拦得住时间么 提交于 2019-12-18 13:05:35
1.安装之前先更新系统   sudo apt update 2.安装Apache2   sudo apt install apache2 3.安装PHP   sudo apt install php   sudo apt-get install libapache2-mod-php 4.安装MySQL    sudo apt install mysql-server php7.0-mysql    sudo apt-get install mysql-client    mysql_secure_installation 5.安装phpmyadmin   sudo apt-get install phpmyadmin   sudo apt-get install php-mbstring    sudo apt-get install php-gettext   sudo ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin 配置phpmyadmin   nano /etc/php/7.0/apache2/php.ini   display_errors = On(显示错误日志,出现两次,都要改,不然无效)   extension=php_mbstring.dll (开启mbstring) --------------------

WinSCP connect to Amazon AMI EC2 Instance changing user after login to “root”

人走茶凉 提交于 2019-12-18 12:28:29
问题 I followed instructions here carefully however I haven't get this working right. Here is what I did: Run WinSCP enter Hostname (Elastic IP of my Instance) enter username "ec2-user" enter public key file chose SCP for the protocol Under SCP/Shell settings I chose "sudo su -" Hit Login WinSCP asks me for passphrase key, Hit OK Shows up this error Error skipping startup message. Your shell is probably incompatible with the application (BASH is recommended). NOTE: This works on Putty 回答1: WinSCP

Why can't I use 'sudo su' within a shell script? How to make a shell script run with sudo automatically

允我心安 提交于 2019-12-18 12:24:14
问题 I cannot figure out what's wrong with this. When I run it in terminal and enter password, nothing happens, but if I run every command separately in terminal, it works. Thank you! #!/bin/bash sudo su; mkdir /opt/D3GO/; cp `pwd`/D3GO /opt/D3GO/; cp `pwd`/D3GO.png /opt/D3GO/; cp `pwd`/D3GO.desktop /usr/share/applications/; chmod +x /opt/D3GO/D3GO 回答1: Command sudo su starts an interactive root shell, but it will not convert the current shell into a root one. The idiom to do what you want is

Ubuntu输入密码反复进入登录界面的解决办法

纵然是瞬间 提交于 2019-12-18 12:01:57
先mark一下,所遇到的问题特征。 问题A:输入密码后, 显示System program problem detected ,无论点击cancel还是report,都重新进入输入密码界面。 问题B:输入密码后, 什么都不显示 ,但等一会儿重新进入输入密码界面 CTRL+ALT+F1进入终端 问题A 1.关闭报告错误功能 sudo vi /etc/default/apport reboot 修改enable=1为enable=0,保存退出重启 sudo rm -rf /var/crash/* reboot 昨天解决了问题A,接着遇见问题B 1.检查配置环境文件,删除添加的多余部分,之后重启 sudo vi /etc/profile sudo vi /etc/profile.d 2.主目录下.Xauthority文件所属变成root,非user 更改用户 sudo chown username:username .Xauthority ls .Xauthority –l 显示-rw------- 1 username username xxxxx .Xauthority CTRL+ALT+F7返回登陆界面,重试 如果以上两个方法都不行的话,恭喜你,应该已经重启很多次,但保持耐心。 3.查看.xsession-errors,阅读问题原因 ls -a sudo vi …xsession

Ubuntu 16.04 安装 Apache, MySQL, PHP7

百般思念 提交于 2019-12-18 10:52:30
1.安装之前先更新系统 1 sudo apt update 2.安装Apache2 1 sudo apt install apache2 3.安装PHP 1 sudo apt install php 2 sudo apt-get install libapache2-mod-php 4.安装MySQL 1 sudo apt install mysql-server php7.0-mysql 2 sudo apt-get install mysql-client 3 mysql_secure_installation 5.安装phpmyadmin 1 sudo apt-get install phpmyadmin 2 sudo apt-get install php-mbstring 3 sudo apt-get install php-gettext 4 sudo ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin 配置phpmyadmin 1 nano /etc/php/7.0/apache2/php.ini display_errors = On(显示错误日志,出现两次,都要改,不然无效) extension=php_mbstring.dll (开启mbstring) ----------------------------

LINUX系统中使用 System.Drawing.Common Gdiplus的问题

青春壹個敷衍的年華 提交于 2019-12-18 10:51:22
1、CENTOS 7 中安装 libgdiplus yum whatprovides libgdiplus yum install -y epel-release yum install -y libgdiplus-2.10-10.el7.x86_64 yum install -y libgdiplus-devel yum install -y libwmf-0.2.8.4-41.el7_1.x86_64 yum install -y libwmf-devel 升级到最新版本 rpmkeys --import "http://pool.sks-keyservers.net/pks/lookup?op=get&search=0x3fa7e0328081bff6a14da29aa6a19b38d3d831ef" su -c 'curl https://download.mono-project.com/repo/centos7-stable.repo | tee /etc/yum.repos.d/mono-centos7-stable.repo' yum install mono-devel 2、ubuntu 16.04 中安装 libgdiplus sudo apt-get update sudo apt-get install -y libgdiplus cd /usr/lib &

AWS error - sudo: unable to resolve host ip-10-0-xx-xx

这一生的挚爱 提交于 2019-12-18 10:37:33
问题 I launched a new aws instance. My private ip is ip-10-0-xx-xx as per amazon console. Everytime when I do a sudo command, I get the following error sudo: unable to resolve host ip-10-0-xx-xx How can I rectify this error? 回答1: It seems that it cannot resolve the host so you can help it by adding this line to the /etc/hosts 10.0.xx.xx ip-10-0-xx-xx The below answer with enableDnsHostnames is a better solution through 回答2: This issue is caused by not enabling enableDnsHostnames in your VPC

linux安装RabbitMQ

白昼怎懂夜的黑 提交于 2019-12-18 09:58:17
一、RabbitMQ概念 RabbitMQ是流行的开源消息队列系统,是AMQP(Advanced Message Queuing Protocol高级消息队列协议)的标准实现,用erlang语言开发。RabbitMQ据说具有良好的性能和时效性,同时还能够非常好的支持集群和负载部署,非常适合在较大规模的分布式系统中使用。 消息中间件的工作过程可以用生产者消费者模型来表示.即,生产者不断的向消息队列发送信息,而消费者从消息队列中消费信息.具体过程如下: 从上图可看出,对于消息队列来说,生产者,消息队列,消费者是最重要的三个概念,生产者发消息到消息队列中去,消费者监听指定的消息队列,并且当消息队列收到消息之后,接收消息队列传来的消息,并且给予相应的处理.消息队列常用于分布式系统之间互相信息的传递. Rabbit模式大概分为以下三种:单一模式、普通模式、镜像模式 单一模式: 最简单的情况,非集群模式,即单实例服务。 普通模式: 默认的集群模式。 queue创建之后,如果没有其它policy,则queue就会按照普通模式集群。对于Queue来说,消息实体只存在于其中一个节点,A、B两个节点仅有相同的元数据,即队列结构,但队列的元数据仅保存有一份,即创建该队列的rabbitmq节点(A节点),当A节点宕机,你可以去其B节点查看,./rabbitmqctl list_queues

Ubuntu14.10安装Eclipse

爱⌒轻易说出口 提交于 2019-12-18 09:35:14
方法一:(缺点是安装时附加openjdk等大量程序并无法去除,优点是安装简单) $ sudo apt-get install eclipse 方法二:(优点是安装内容清爽,缺点是配置麻烦) 1、安装JDK,参考 Ubuntu 14.10 下安装 JDK8 2、下载 Eclipse 从 http://www.eclipse.org/downloads/index-developer.php 下载合适版本,如:Eclipse IDE for C/C++ Developers 3、解压文件 $ sudo mv eclipse-cpp-luna-R-linux-gtk-x86_64.tar.gz /usr/prog/ $ cd /usr/prog/ $ sudo tar -zxvf eclipse-cpp-luna-R-linux-gtk-x86_64.tar.gz $ sudo rm ./eclipse-cpp-luna-R-linux-gtk-x86_64.tar.gz 4、创建启动快捷方式 $ sudo gedit /usr/share/applications/eclipse.desktop 内容如下: [Desktop Entry] Type=Application Name=Eclipse Comment=Eclipse Integrated Development

使用阿里云镜像仓库管理Docker images

喜你入骨 提交于 2019-12-18 09:08:17
一、登录阿里云,点"控制台" 二、在控制台页面搜索"容器镜像服务" 三、在容器镜像服务页面,创建命名空间 四、创建镜像仓库 五、如上图点"管理"按钮,查看文档 如上图文档, 登录阿里云Docker Registry sudo docker login --username=t_ xxx_0 registry.cn-hangzhou.aliyuncs.com 从Registry中拉取镜像 sudo docker pull registry.cn-hangzhou.aliyuncs.com/che-03/test:[镜像版本号] 将镜像推送到Registry sudo docker tag [ImageId] registry.cn-hangzhou.aliyuncs.com/che-03/test:[镜像版本号] sudo docker push registry.cn-hangzhou.aliyuncs.com/che-03/test:[镜像版本号] 六、登录阿里云Docker Registry 七、将镜像推送到Registry 八、从Registry中拉取镜像 来源: CSDN 作者: 蔚蓝色天空sky 链接: https://blog.csdn.net/ytangdigl/article/details/103588527