linux 软件包管理
2016-02-11 10:38
337 查看
环境:
ubuntu 15.04
linux 软件包主要有:
.deb debian的安装格式
.tar/.tar.gz等 unix/linux压缩包,不过.tar只是将多个文件集中起来了,本身没有压缩
.rpm 在红帽系统下可直接安装。
tar的压缩和解压的命令:
压缩:
tar zcvf filename.tar.gz file1 file2 ……
tar zcvf dirname.tar.gz dirname1 dirname2 ……
解压:
tar -zxvf filename(含.tar.gz后缀名)
压缩和解压方法还有:
gzip filename(得到后缀名是.gz)
gunzip
filename
以shutter为例说明tar.gz软件包的安装:
//非deb文件用apt-get
一路yes即可
然后搜索找到shutter即能使用。
![](https://img-blog.csdn.net/20160211102822118?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
至于deb软件包安装很简单,双击自动运行。或者用命令:
edemon@linux:~/Downloads$ sudo dpkg -i filename
卸载:
edemon@linux:~$ sudo apt-get purge filename
安装Mysql :
(安装包是 .tar文件)
先下载目标文件:
![](https://img-blog.csdn.net/20160211102945994?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
解压:
edemon@linux:~/Downloads$ tar -xvf mysql-server_5.7.11-1ubuntu14.04_i386.deb-bundle.tar
解压后不是随便安装哪个deb,有顺序的。
初学,安装时我使用软件中心便于看提示:
![](https://img-blog.csdn.net/20160211103132449?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
先操作:
mysql-client_5.7.11-1ubuntu14.04_i386.deb
顺利安装
再尝试安装 Mysql Server,得先安装mysql-community-server
![](https://img-blog.csdn.net/20160211103233997?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
操作:mysql-community-server
安装 mysql server
对了,中途会提示设置root密码:
![](https://img-blog.csdn.net/20160211103627549?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
在终端试试:
成功!
ubuntu 15.04
linux 软件包主要有:
.deb debian的安装格式
.tar/.tar.gz等 unix/linux压缩包,不过.tar只是将多个文件集中起来了,本身没有压缩
.rpm 在红帽系统下可直接安装。
tar的压缩和解压的命令:
压缩:
tar zcvf filename.tar.gz file1 file2 ……
tar zcvf dirname.tar.gz dirname1 dirname2 ……
解压:
tar -zxvf filename(含.tar.gz后缀名)
压缩和解压方法还有:
gzip filename(得到后缀名是.gz)
gunzip
filename
edemon@linux:~$ mkdir test edemon@linux:~$ cd test edemon@linux:~/test$ touch t1 t2 t3 edemon@linux:~/test$ tar czvf t.tar.gz t1 t2 t3 t1 t2 t3 edemon@linux:~/test$ ls t1 t2 t3 t.tar.gz edemon@linux:~/test$ cd .. edemon@linux:~$ ls Desktop Downloads Music Public test Documents examples.desktop Pictures Templates Videos edemon@linux:~$ mkdir test2 edemon@linux:~$ tar czvf tdir.tar.gz test test2 test/ test/t1 test/t3 test/t.tar.gz test/t2 test2/ edemon@linux:~$ ls Desktop Downloads Music Public Templates test2 Documents examples.desktop Pictures tdir.tar.gz test Videos edemon@linux:~$ tar -zxvf tdir.tar.gz test/ test/t1 test/t3 test/t.tar.gz test/t2 test2/
以shutter为例说明tar.gz软件包的安装:
edemon@linux:~/Downloads$ tar -zxvf shutter-0.88.tar.gz edemon@linux:~/Downloads$ cd shutter-0.88/bin edemon@linux:~/Downloads/shutter-0.88/bin$ sudo apt-get install shutter
//非deb文件用apt-get
一路yes即可
然后搜索找到shutter即能使用。
至于deb软件包安装很简单,双击自动运行。或者用命令:
edemon@linux:~/Downloads$ sudo dpkg -i filename
卸载:
edemon@linux:~$ sudo apt-get purge filename
安装Mysql :
(安装包是 .tar文件)
先下载目标文件:
解压:
edemon@linux:~/Downloads$ tar -xvf mysql-server_5.7.11-1ubuntu14.04_i386.deb-bundle.tar
解压后不是随便安装哪个deb,有顺序的。
初学,安装时我使用软件中心便于看提示:
先操作:
mysql-client_5.7.11-1ubuntu14.04_i386.deb
顺利安装
再尝试安装 Mysql Server,得先安装mysql-community-server
操作:mysql-community-server
安装 mysql server
对了,中途会提示设置root密码:
在终端试试:
edemon@linux:~$ mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 Server version: 5.7.11 MySQL Community Server (GPL) Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> select now(); +---------------------+ | now() | +---------------------+ | 2016-02-11 10:12:13 | +---------------------+ 1 row in set (0.03 sec) mysql>
成功!
相关文章推荐
- Linux经常使用命令(十二) - less
- PC与嵌入式驱动引导程序的区别
- Ubuntu下安装和卸载内核源码树并第一次编译内核
- linux 守护进程
- Linux 学习树之基础20160211
- linux下samba的安装
- Linux内核的起步
- linux下JDK的安装详解及第一个java应用程序
- 2016-2-10 linux基础学习12
- Linux进程 -- exec函数操作
- Linux下的磁盘克隆
- Linux文件和目录操作
- Linux上php7环境的搭建 Lamp
- 不止 SteamOS,为游戏而生的 Linux 发行版盘点
- Linux进程 -- fork操作
- Linux系统各发行版镜像下载
- Linux创建目录和文件管理
- 在CentOS环境下mysql如何远程连接
- Linux目录结构和常用命令
- linux常用命令详解