Linux yum library installation, source code installation software operation

1. Common directory
*
/proc/: the only directory stored in memory
*
/tmp/temporary files
*
/lib/function library/lib64/

2. Three modes of vi editor
Input mode—a, i, o----command mode—“:”—last line mode
esc to exit
Note:
1.
a(add): a—Append A after the cursor—Append after the line
2.
i (insert): i—Append I before the cursor—Append
3.
o (other): o—start another line and append O below—append
4 after the previous line .
set nu: display line number set no nu: do not display line number
5.
u: cancel G: end gg: beginning 5 gg: fifth line

3. Download software packages online,
wget URL
4. yum library installation

umount /dev/cdrom      //推出挂载光盘
mkdir /media/cdrom        //创建目录
mount /dev/cdrom  /media/cdrom/     //挂载到新建目录
cd /etc/yum.reps.d/    //切换目录
ls                                 //查看
mkdir bak                 //创建目录
ls
mv *o bak/                 //把所有repo文件挪进bak
ls
cp bak/*M* .             //复制CentOS-Media.repo到当前目录
ls
vim CentOS-Media.repo     //打开配置文件
name=Description#一个描述,随意。
baseurl=#设置资源库的地址,可以写阿里云也可以是自己的yum
    ftp://
    http://
    file:///
enabled={1|0}#enabled=1开启本地更新模式
gpgcheck={1|0}# gpgcheck=1表示检查;可以不检查gpgcheck=0
gpgkey=#检查的key;如果上面不检查这一行可以不写。
修改gpgcheck=0,enabled=1(必改)
cd
yum clean all                  //清楚本地缓存
yum makecache            //重建本地缓存

Insert picture description here
5. Source code installation software operation

1. Download the source code compilation environment (support C language)
gcc, gcc-c++, make
2. Step
1) tar unpacking (decompressing)
2) ./configure configuration (setting the installation module)
3) make compiling (generating binary execution File)
4) make install installation (copy binary files to the system, configure the application environment)
5) test maintenance
3. Specific commands

tar xf httpd-2.2.17.tar.gz -C /usr/src/     //解压到指定目录
cd /usr/src/httpd-2.2.17/                       //进入目录
./configure                                             //进入配置
./configure --prefix=/usr/local/httpd     //指定安装目录配置
make
make install
/usre /local/httpd/bin/apachectl start     //开启服务
curl 127.0.0.1                                           //自己访问自己

Insert picture description here

Guess you like

Origin blog.csdn.net/qq_39109226/article/details/109214702
Recommended