软件的安装和解压

软件包的安装:
    
(1)rpm


桌面的图标 是 gnome 给 挂载的:


[root@www test]# gnome-control-center 


[root@www test]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2             9.7G  9.0G  198M  98% /
/dev/sda1              99M   12M   83M  12% /boot
tmpfs                 252M     0  252M   0% /dev/shm
/dev/hdc              2.9G  2.9G     0 100% /media/RHEL_5.5 i386 DVD


[root@www test]# cd /media/RHEL_5.5\ i386\ DVD/


[root@www RHEL_5.5 i386 DVD]# cd Server/


-------------------------------------------------------
rpm 
    redhat 软件包的管理工具。能够帮助我们安装、卸载、更新 软件包。


ubuntu :dpkg工具。 .deb


yum-versionlock-1.1.16-13.el5.noarch.rpm
zenity-2.16.0-2.el5.i386.rpm


zenity 包名(包头)
2.16.0-2 版本号
el5  是redhat公司发布的
i386 是CPU,
i386  >= 80386的CPU上运行
i686  >= 80686的CPU上运行
noarch   CPU任意


具体操作:rpm


安装
    -i  包名的路径要完整

[root@www Server]# rpm -i zsh-4.2.6-3.el5.i386.rpm 


[root@www /]# rpm -i /media/RHEL_5.5\ i386\ DVD/Server/zsh-4.2.6-3.el5.i386.rpm 


更换一下挂载点:
[root@www /]# mkdir /iso
[root@www /]# mount /dev/cdrom /iso/


[root@www /]# df -h | tail -1
/dev/hdc              2.9G  2.9G     0 100% /iso


显示安装的过程 -v
如果显示进度条 -h
  rpm -ivh 包的完整路径


[root@www software]# rpm -ivh stardict-langdao-ec-gb-2.4.2-1.noarch.rpm 
Preparing...                                               ########################################### [100%]
   1:stardict-langdao-ec-gb                                ########################################### [100%]


192.168.3.118:
[root@www Desktop]# rpm -ivh stardict-langdao-ec-gb-2.4.2-1.noarch.rpm 
error: Failed dependencies:
        stardict >= 2.4.2 is needed by stardict-langdao-ec-gb-2.4.2-1.noarch


    软件包之间的依赖关系。


[root@www Desktop]# rpm -ivh /iso/Server/stardict-2.4.5-5.i386.rpm 
warning: /iso/Server/stardict-2.4.5-5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                                               ########################################### [100%]
   1:stardict                                              ########################################### [100%]


[root@www Desktop]# rpm -ivh stardict-langdao-ec-gb-2.4.2-1.noarch.rpm 
Preparing...                                               ########################################### [100%]
   1:stardict-langdao-ec-gb                                ########################################### [100%]


卸载
[root@www note]# rpm -e stardict-langdao-ec-gb


[root@www note]# rpm -q stardict-langdao-ec-gb
package stardict-langdao-ec-gb is not installed


更新(不推荐使用rpm的方式更新软件包)
-Uvh


查询
(1)查询操作系统安装了哪些软件包
[root@www /]# rpm -qa 


(2)查询某个软件包的功能和描述信息
1)已经安装的软件包
[root@www /]# rpm -qi glibc-devel


2)软件包还没有安装
[root@www /]# rpm -qpi /iso/Server/zlib-devel-1.2.3-3.i386.rpm


(3)查询某个软件包都给我们安装了哪些文件以及文件安装到了哪里
1)软件已经安装
[root@www /]# rpm -ql glibc-devel


2)软件包还没有安装
[root@www /]# rpm -qpl /iso/Server/zlib-devel-1.2.3-3.i386.rpm


(4)查询某个文件是那个软件包安装的
[root@www /]# rpm -qf /
filesystem-2.4.0-3.el5
[root@www /]# rpm -qf /bin/ls
coreutils-5.97-23.el5_4.2
[root@www /]# rpm -qf /etc/passwd
setup-2.5.58-7.el5


(5)查询某个软件包有没有安装
[root@www note]# rpm -q glibc-devel
glibc-devel-2.5-49
[root@www note]# rpm -q vsftpd
package vsftpd is not installed


***************************
yum  代替rpm 安装 rpm包。自动解决软件包的依赖关系。
C/S : client:安装软件的  server:发布安装源的


server:
1)本地
mount /dev/cdrom /iso


挂载点 最好是空目录,不要重复使用。


2)网络
  ftp  http


client:
编辑yum的客户端配置文件。
[root@www note]# cd /etc/yum.repos.d/


[root@www yum.repos.d]# ls
rhel-debuginfo.repo


[root@www yum.repos.d]# mv rhel-debuginfo.repo rhel-debuginfo.repo.bak


[root@www yum.repos.d]# vim local.repo
[base] 标题
name=base   任意
baseurl=file:///iso/Server   软件包所在的目录
    这个路径要是 repodata 目录的上一级目录,yum依靠repodata目录下的文件解决软件包的依赖关系。
   
[root@www Server]# pwd
/iso/Server
[root@www Server]# ls | grep repodata
repodata
[root@www Server]# ls repodata
comps-rhel5-server-core.xml  other.xml.gz    repomd.xml
filelists.xml.gz             primary.xml.gz  TRANS.TBL


手动生成repodata目录的命令:createrepo
[root@www Server]# rpm -ivh createrepo-0.4.11-3.el5.noarch.rpm 


enabled=1 使用上面的yum源
gpgcheck=0 不检查KEY
-----------------------------------------------
使用KEY,这么写:
gpgcheck=1
gpgkey=file:///iso/RPM-GPG-KEY-redhat-release
-----------------------------------------------
安装
install


[root@www ~]# yum install mysql-server


软件包组:
   查询:yum grouplist
   
   安装软件包组:
[root@www ~]# yum groupinstall "X Window System" "GNOME Desktop Environment"




卸载(尽量不要使用yum卸载软件)
    erase
[root@www ~]# yum erase mysql-server




查询
info
[root@www ~]# yum info mysql-server


search
[root@www ~]# yum search mysql-server
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
======================= Matched: mysql-server ========================
mysql-server.i386 : The MySQL server and related files




[root@www ~]# yum search httpd
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
=========================== Matched: httpd ===========================
mod_ssl.i386 : SSL/TLS module for the Apache HTTP server
system-config-httpd.noarch : Apache configuration tool
httpd.i386 : Apache HTTP Server
httpd-devel.i386 : Development tools for the Apache HTTP server.
httpd-manual.i386 : Documentation for the Apache HTTP server.
mod_dav_svn.i386 : Apache server module for Subversion server.


list
[root@www ~]# yum list




更新
update


RHN 
***************************


没有中文输入法
[root@www ~]# yum list | grep scim | grep chinese
This system is not registered with RHN.
RHN support will be disabled.
scim-chinese-standard.i386                 0.0.2-1.el5                 installed
scim-tables-chinese.i386                   0.5.6-7                     installed


[root@www ~]# yum install -y scim-chinese-standard scim-tables-chinese




中文乱码
[root@www ~]# yum install -y fonts-chinese fonts-ISO8859-2


[root@www ~]# vim /etc/sysconfig/i18n 
#LANG="en_US.UTF-8"
LANG="zh_CN.UTF-8"
SYSFONT="latarcyrheb-sun16"


ctrl alt backspace  结束图形界面


修改语言环境
-------------------------------------------------------
(2)tar
./configure  检查安装环境
make     编译
make install 安装


安装之前,一定要保证你的yum是好的。


安装 连连看:
[root@www software]# tar zxf llk_linux-2.3beta1.tar.gz 


[root@www software]# cd llk_linux-2.3


[root@www llk_linux-2.3]# less README 
[root@www llk_linux-2.3]# less INSTALL 


[root@www llk_linux-2.3]# ./configure --help


[root@www llk_linux-2.3]# ./configure --prefix=/llk
--prefix=/llk 指定安装路径


[root@www llk_linux-2.3]# yum install -y gcc
[root@www llk_linux-2.3]# yum install -y gtk* gdk*


[root@www llk_linux-2.3]# ./configure --prefix=/llk
[root@www llk_linux-2.3]# make 
[root@www llk_linux-2.3]# make install
-------------------------------------------------------
(3)bin


给软件包加上 x 权限:
[root@www software]# chmod u+x realplay-10.0.6.776-linux-2.2-libc6-gcc32-i586.bin 


按照提示开始安装:
[root@www software]# ./realplay-10.0.6.776-linux-2.2-libc6-gcc32-i586.bin 


删除安装目录,就卸载了:
[root@www /]# rm -rf realplayer/


(4)jar


=========================================================
主机名


查看:
[root@www ~]# hostname
www.t1.com


修改:
1)临时
[root@www ~]# hostname qqq.t1.com
[root@www ~]# hostname
qqq.t1.com


2)永久
[root@www ~]# vim /etc/sysconfig/network
HOSTNAME=www.t1.com


日期和时间


查看:
[root@www ~]# date
Wed Jan 16 15:41:02 CST 2013


[root@www ~]# date -s "2014-01-16 15:42:10"


[root@www ~]# system-config-date 


关机
[root@www ~]# init 0
[root@www ~]# shutdown -h now
[root@www ~]# halt


重启
[root@www ~]# init 6
[root@www ~]# shutdown -r now
[root@www ~]# reboot


定时关机或重启:
windows:
命令提示符:at 20:30 shutdown -s
取消: shutdown -a


linux:
[root@www ~]# crontab -e
30 20 * * * /sbin/shutdown -h now
:wq


30 20 * * *
分 时 日 月 周 命令
0-59 0-23 1-31 1-12 0-7




装画图板:
[root@www software]# tar jxf kolourpaint-1.2.2_kde3.tar.bz2


[root@www software]# cd kolourpaint-1.2.2_kde3


[root@www kolourpaint-1.2.2_kde3]# ./configure --prefix=/ko


[root@www /]# yum groupinstall "KDE" "KDE Software Development"


结束图形界面,在 session 选择 KDE ,登录
 yum install -y gcc-c++
[root@www kolourpaint-1.2.2_kde3]# ./configure --prefix=/ko
[root@www kolourpaint-1.2.2_kde3]#  make
[root@www kolourpaint-1.2.2_kde3]#  make install


开启画图板
[root@www note]# cd /ko/bin/
[root@www bin]# ./kolourpaint 











评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值