apt-get

Linux服务器环境配置(1)安装mysql

。_饼干妹妹 提交于 2019-12-03 05:16:47
退出mysql命令目的描述:全新的阿里云linux服务器,系统是ubuntu 16.04。需要在上面安装mysql数据库。 解决方法:远程登录,在终端窗口中使用sudo apt-get 指令在线安装mysql。 具体步骤: 1.输入以下命令更新系统安装源: sudo apt-get update (如果不更新,下面使用sudo apt-get命令在线安装软件时可能会出现错误:Unable to locate package. 因为软件源可能被修改了) 2.输入下面命令依次在线安装mysql服务器、客户端和运行库: sudo apt-get install mysql-server sudo apt-get install mysql-client sudo apt-get install libmysqlclient-dev 3.测试是否安装成功: sudo netstat -tap | grep mysql 如果上面命令返回结果如下,mysql已经监听端口,说明mysql已经安装成功。 (注:需要注意的是阿里云服务器需要修改ECS 的安全组策略才能是端口真的可以被访问,例如这个安装了mysql后还需要手动添加3306端口到ECS的安全组策略中才能是mysql 可以被远程访问。) 注:Mysql终端中的基本操作: 1.通过终端窗口进入mysql命令: mysql -uroot

llinux 安装php7

萝らか妹 提交于 2019-12-03 05:12:06
1,php for nginx就不用说了,我们的博客里面应该有写。 2,直接源码安装,安装apache,安装php7,安装mysql。除了麻烦一点,应该没什么问题。 3,yum的方式安装了apache和mysql,yum安装php7,这种方式也折腾了我一天。在windos下,我到是成功 实现了apache 下的多php版本切换,但linux也已经安装的apache php mysql,突然想把php换成php7,但 yum又实现不了,虽然网上有人说更新yum源,但我试了是不行的。最后我就具体说说怎么不换apahce和mysql 的情况下,如何成功安装php7. 4,mysql好像都是不是源码安装的 需要指定版本 https://dev.mysql.com/downloads/mysql/ 选择linux,选择指定的版本,获取到链接sudo wget https://dev.mysql.com/get/mysql-apt-config_0.8.13-1_all.deb 然后 sudo dpkg -i mysql-apt-config_0.8.13-1_all.deb sudo apt-get install mysql-server-5.6 sudo apt update sudo apt install mysql-client sudo apt install

Ubuntu 软件管理

◇◆丶佛笑我妖孽 提交于 2019-12-03 04:18:05
Ubuntu软件管理:dpkg和apt    Debian软件包通常为预编译的二进制格式的扩展名“.deb”,类似rpm文件,   dpkg:package manager for Debian,类似于rpm, dpkg是基于Debian的系统的包管理器。可以安装,删除和构建软件包,但无法自动下载和安装软件包或其依赖项    APT:Advanced Packaging Tool,功能强大的软件管理工具,甚至可升级整个Ubuntu的系统,基于客户/服务器架构   APT工作原理:在服务器上先复制所有DEB包,然后用APT的分析工具genbasedir根据 每个DEB 包的包头(Header)信息对所有的DEB包进行分析,并将该分析结果记录在文 件夹base内的一个DEB 索引清单文件中,一旦APT 服务器内的DEB有所变动,要使用 genbasedir产生新的DEB索引清单。客户端在进行安装或升级时先要查询DEB索引清单, 从而获知所有具有依赖关系的软件包,并一同下载到客户端以便安装。当客户端需要安 装、升级或删除某个软件包时,客户端计算机取得DEB索引清单压缩文件后,会将其解 压置放于 /var/cache/apt/,而客户端使用apt-get install或apt-get upgrade命令的时 候,就会将这个文件夹内的数据和客户端计算机内的DEB数据库比对

What is the difference between installing a package using pip vs. apt-get?

不问归期 提交于 2019-12-03 04:14:56
问题 I'm trying to deploy a Django site on an Ubuntu machine. I need to install Psycopg2 and PIL but it seems that I'm able to install them using either apt-get or using pip. Is there a difference in installing by the two methods? I know that using pip, I'm able to install it into a virtual environment but with apt-get it installs in the global python environment. 回答1: You probably already know the benefits of apt-get. Automatic update notifications, other apt-installed packages that need those

起步 - 安装 Git

自作多情 提交于 2019-12-03 04:13:39
安装 Git 是时候动手尝试下 Git 了,不过得先安装好它。有许多种安装方式,主要分为两种,一种是通过编译源代码来安装;另一种是使用为特定平台预编译好的安装包。 从源代码安装 若是条件允许,从源代码安装有很多好处,至少可以安装最新的版本。Git 的每个版本都在不断尝试改进用户体验,所以能通过源代码自己编译安装最新版本就再好不过了。有些 Linux 版本自带的安装包更新起来并不及时,所以除非你在用最新的 distro 或者 backports,那么从源代码安装其实该算是最佳选择。 Git 的工作需要调用 curl,zlib,openssl,expat,libiconv 等库的代码,所以需要先安装这些依赖工具。在有 yum 的系统上(比如 Fedora)或者有 apt-get 的系统上(比如 Debian 体系),可以用下面的命令安装: $ yum install curl-devel expat-devel gettext-devel \ openssl-devel zlib-devel $ apt-get install libcurl4-gnutls-dev libexpat1-dev gettext \ libz-dev libssl-dev 之后,从下面的 Git 官方站点下载最新版本源代码: http://git-scm.com/download 然后编译并安装: $

sudo apt-get update fail on Ubuntu 17.04

一笑奈何 提交于 2019-12-03 04:08:38
While running the sudo apt-get update on ubuntu 17.04 Zesty Zapus, I am getting the following error. I have posted on the error lines. I wanted to install python libraries like matplotlib and tkinter which failed to installed because above command wasn't running succesfully. Please suggest me what to do. Err:9 http://security.ubuntu.com/ubuntu zesty-security/main amd64 Packages 404 Not Found [IP: 2001:67c:1560:8001::14 80] Err:25 http://in.archive.ubuntu.com/ubuntu zesty/main i386 Packages 404 Not Found [IP: 2001:67c:1360:8001::21 80] Err:81 http://in.archive.ubuntu.com/ubuntu zesty-updates

Ubuntu 12.04下编译Openwrt教程

拟墨画扇 提交于 2019-12-03 03:23:58
1、搭建Ubuntu环境、自己解决、我用的是VirtualBox 感觉不错 2、打开“终端”。首先输入 sudo –sH 大小写注意!建议直接复制粘贴。然后输入装系统时设置的用户密码,就能切换到root(提示:输入密码的时候不会有*****之类的显示的,是完全不显示,部分人不必惊慌)。切换到root是为了安装或升级部分必要的组件,有些组件需要root权限。 3、依次输入如下命令(还是复制粘贴吧) apt-get install g++ apt-get install libncurses5-dev apt-get install zlib1g-dev apt-get install bison apt-get install flex apt-get install unzip apt-get install autoconf apt-get install gawk apt-get install make apt-get install gettext apt-get install gcc apt-get install git apt-get install binutils apt-get install patch apt-get install bzip2 apt-get install libz-dev apt-get install asciidoc apt

Python3: ImportError: No module named '_ctypes' when using Value from module multiprocessing

匿名 (未验证) 提交于 2019-12-03 03:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using ubuntu and have installed python 2.7.5 and 3.4.0. For python 2.7.5, I am able to successfully assign a variable x = Value('i', 2) in python 2.7.5, but not 3.4.0. I am getting: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.4/multiprocessing/context.py", line 132, in Value from .sharedctypes import Value File "/usr/local/lib/python3.4/multiprocessing/sharedctypes.py", line 10, in < module> import ctypes File "/usr/local/lib/python3.4/ctypes/__init__.py", line 7, in <module> from

Docker Debian apt Error Reading from Server

匿名 (未验证) 提交于 2019-12-03 03:05:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: It would seem that apt-get is having issues connecting with the repository servers. I suppose it is likely compatibility issues, as mentioned here , however the proposed solution of apt-get clean does not work for me. Also I am surprised, if this is the case, that there are not more people having my issue. MWE Dockerfile FROM debian:jessie RUN apt-get clean && apt-get update && apt-get install -y --no-install-recommends \ git $ docker build . docker build . Sending build context to Docker daemon 2.048 kB Step 0 : FROM debian:jessie --->

How to install g++ 4.9 on Debian Wheezy armel?

匿名 (未验证) 提交于 2019-12-03 02:56:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: My Debian 7 armel embedded system currently has g++ 4.6, and I'd like to upgrade to g++ 4.9 to use new C++11 features. How do I do that? My current sources.list contents is: deb http://security.debian.org/ wheezy/updates main deb-src http://security.debian.org/ wheezy/updates main deb http://ftp.us.debian.org/debian wheezy main non-free deb-src http://ftp.us.debian.org/debian wheezy main non-free A simple apt-get install of the package does not work: root@arm:~# apt-get install g++-4.9 Reading package lists... Done Building dependency tree