![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
linux
凤舞无夜
这个作者很懒,什么都没留下…
展开
-
安装rvm报错解决 gpg: Can‘t check signature: No public key
如图所示:解决,按照提示gpg2 --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB如果失败,继续执行command curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -command curl -sSL h..原创 2021-06-22 15:49:09 · 1206 阅读 · 0 评论 -
通过nginx访问服务器静态文件
server { listen 80; server_name localhost; location / { root /var/www/html/static; index index.html index.htm; } }原创 2020-12-11 16:08:41 · 556 阅读 · 0 评论 -
linux 安装 PHP 环境和 Adminer以及phpRedisAdmin
1)安装Apachesudo apt-get install apache22)测试Apache是否安装成功,访问http://localhost/或http://127.0.0.1/,出现It Works!即是安装成功。3)安装mysql,如果已安装可跳过。4)安装PHPsudo apt-get install php5)查看PHP版本php -v6)安装相...原创 2019-11-05 19:01:55 · 705 阅读 · 1 评论 -
linux安装库时报错error: command ‘x86_64-linux-gnu-gcc‘ failed with exit status 1
在Ubuntu18.04上安装nameko时报错:error: command 'x86_64-linux-gnu-gcc' failed with exit status 1如图所示:解决办法:安装依赖库python2:sudo apt-get install build-essential python-dev libssl-dev libffi-dev libxml2 libxml2-dev libxslt1-dev zlib1g-devpython3:s..原创 2020-09-07 11:00:40 · 16145 阅读 · 0 评论 -
在Ubuntu中安装docker
自动安装命令:curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun原创 2020-09-05 11:13:54 · 90 阅读 · 0 评论 -
阿里云 /usr/sbin/sshd 被篡改
问题:ssh服务无法启动,无法远程连接解决:直接从后台登录,发现sshd文件大小与正常服务器的区别很大将sshd替换成正常的,直接启动时有出现以下问题:sshd re-exec requires execution with an absolute path可以使用命令 service sshd restart 进行启动...原创 2020-08-24 18:28:35 · 3094 阅读 · 0 评论 -
在docker中安装Ubuntu,并在该Ubuntu中安装python与pip
1)下载ubuntu镜像docker pull ubuntu2)查看镜像docker images3)运行容器docker run -itd --name ubuntu-test ubuntu4)进入容器sudo docker exec -it ubuntu-test /bin/bash5)更新源apt-get update6)安装命令,可以用ifconfig查看ipapt install net-tools7)安装pythonapt-get原创 2020-08-14 16:35:59 · 851 阅读 · 0 评论 -
将腾讯云的默认用户ubuntu切换为root用户
供应商:腾讯云系统:Ubuntu18.04购买后,发现和阿里云、华为云的默认用户是root不同,腾讯云的默认用户是ubuntu,如果想要切换成root用户,可以按以下操作进行:1)首先使用默认用户登陆腾讯云,修改root用户的密码sudo passwd root2)修改ssh配置,sudo vi /etc/ssh/sshd_config,取消掉PermitRootLogin前的#号,并将后面的值改成yes。3)重启ssh服务sudo service ssh restart原创 2020-07-21 09:27:20 · 2634 阅读 · 0 评论 -
python编写执行linux命令的脚本
from commands import getstatusoutput as getsodef excuteShell(cmd): print("excute shell command: ", cmd) status, result = getso(cmd) if status == 0: print("cmd[%s] done:[%s]" % (cmd, result)) else: print("cmd[%s] failed:[.原创 2020-07-10 14:12:48 · 988 阅读 · 0 评论 -
Ubuntu18.04安装firefox火狐浏览器失败
使用命令安装sudo apt-get install firefox报错如下:E: Failed to fetch http://us2.mirrors.cloud.aliyuncs.com/ubuntu/pool/main/f/firefox/firefox_74.0+build3-0ubuntu0.18.04.1_amd64.deb 404 Not Found [IP: 100.100.2.148 80]E: Unable to fetch some archives, maybe ..原创 2020-07-02 14:13:50 · 1442 阅读 · 0 评论 -
linux批量杀死某一程序的进程
方法:ps -ef | grep firefox | grep -v grep | cut -c 9-15 | xargs kill -9其中firefox是相应程序的关键词原创 2020-06-29 18:25:21 · 374 阅读 · 0 评论