常用linux软件安装过程记录…
centos8编译muduo库
| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 
 | 安装必要依赖yum install gcc-c++ #确保支持cpp11
 yum install cmake
 yum install ncurses-devel
 yum install boost
 yum install boost-devel
 安装非必要依赖(可以多编译几个样例)
 yum install openssl
 yum install protobuf
 通过build脚本编译
 cd muduotest/muduo #会在muduotest目录下创建build目录
 ./build.sh -j2
 在自己项目中使用muduo库
 g++ echo.h echo.cc main.cc -o main -I/root/muduoTmp/muduo \
 -L/root/muduoTmp/build/release-cpp11/lib \
 -lmuduo_net \
 -lmuduo_base \
 -lpthread
 -I 添加头文件搜索目录
 -L 添加静态/动态库文件搜索目录
 -lxxx 链接静态库
 
 | 
linux安装ssh并允许root远程登录
| 12
 3
 4
 5
 6
 7
 8
 
 | 安装ssh服务sudo apt-get install openssh-server
 检测是否已启动
 ps -e | grep ssh
 看到有ssh字样,说明已启动,如果没有就手动启动
 /etc/init.d/ssh start
 配置ssh-server,配置文件位于/etc/ssh/sshd_config,默认端口为22,为了安全,一般自定义为其他端口,然后重启
 sudo /etc/init.d/ssh resart
 
 | 
| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 
 | 在虚拟机中点击虚拟机 》 安装VMware Tools工具然后再等一会,linux中弹出文件管理器
 (有时候cd-rom被占用,这时候需要改VMware的cd-rom配置,然后重新安装VMware Tools工具)
 然后在那个目录下打开终端
 tar -xzvf VM******.tar.gz
 会解压文件到当前目录
 进入目录后
 ./*****
 运行程序,然后一路回车或按照推荐配置。
 最后
 shutdown -r now 重启系统
 
 | 
安装google-拼音
| 12
 3
 4
 5
 
 | sudo  apt-get install fcitx-googlepinyin安装完成后,我们注销或者重启一次。
 顶部面板找到fcitx输入法标志,小键盘或者小企鹅,选择“配置Fcitx”。
 在弹出的“输入法配置”窗口左下角,找到“+”加号。
 找到“Google拼音”,点选“确认”进行添加。
 
 | 
centos8更新软件源
| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 
 | 1.首先备份当前配置文件
 (通过改名的方式备份源文件:
 
 CentOS-Base.repo改成了
 CentOS-Base.repo.backup
 )
 
 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
 2.下载新的 CentOS-Base.repo 到 /etc/yum.repos.d
 对于CentOS8
 
 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo
 对于CentOS7
 
 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
 3. 运行 yum makecache 生成缓存
 (将服务器上的软件包信息在本地缓存,以提高搜索和安装软件的速度)
 
 yum makecache
 
 4、升级yum
 
 (-y,默认同意)
 yum update -y
 
 | 
ubuntu软件源
| 12
 3
 
 | 从网上搜索软件源,粘贴到 /etc/apt/source.list然后输入命令	apt-get update 会更新软件源
 》 apt-get dist-upgrade 升级软件(dist-upgrade比upgrade方便的是可以解决包的依赖问题,但可能有一定风险)
 
 | 
安装KDE桌面
| 12
 
 | apt-get install kde-fullreboot重启系统,选择kde登录。
 
 | 
centos卸载软件
| 12
 3
 4
 
 | 首先查询安装包:rpm -qa|grep mysql
 删除
 yum -y remove mysql-community-libs-5.7.13-1.el6.x86_64
 
 | 
测速工具
| 12
 3
 4
 5
 6
 7
 8
 
 | 安装speedtestwget --no-check-certificate -O speedtest https://raw.github.com/sivel/speedtest-cli/master/speedtest.py
 chmod +x speedtest
 ./speedtest
 测试某个特定地区速度,可以通过指定服务器 ID 的方式来进行
 http://www.speedtest.net/speedtest-servers-static.php
 ctrl+F 搜索地点,获取对应id。
 ./speedtest --server 5992
 
 | 
安装压缩软件rar
参考
持续更新~
欢迎与我分享你的看法。
转载请注明出处:http://taowusheng.cn/