2.3.8:dpkg安装包管理: rpm:RPM(Red Hat Package Manager),是基于Red hat的Linux Distribution的包管理系统,同时也指rpm包本 身,RPM⽤于rpm包的管理(诸如安装、卸载、升级等) "dpkg "是"Debian Packager "的简写,为 "Debian"专⻔开发的套件管理系统,⽅便软件的安装、更新及移除。所有 源⾃“Debian”的“Linux ”发⾏版都使⽤ “dpkg”,例如 “Ubuntu”、“Knoppix ”等。# dpkg -i gitlab-ce_11.9.8-ce.0_amd64.deb #安装某个软件包 # dpkg -r gitlab-ce #删除某个软件包保留配置⽂件 # dpkg -r -P gitlab-ce #删除某个软件包不保留配置⽂件 # dpkg -I gitlab-ce_11.9.8-ce.0_amd64.deb #查看软件包信息 # dpkg -c gitlab-ce_11.9.8-ce.0_amd64.deb #查看软件包内的⽂件及⽬录内容 # dpkg -l #列出本机已经安装的所有软件
2.3.9:apt安装Nginx: # keepalive conn net.ipv4.tcp_keepalive_time = 300 net.ipv4.tcp_keepalive_intvl = 30 net.ipv4.tcp_keepalive_probes = 3 net.ipv4.ip_local_port_range = 10001 65000 # swap vm.overcommit_memory = 0 vm.swappiness = 10 #net.ipv4.conf.eth1.rp_filter = 0 #net.ipv4.conf.lo.arp_ignore = 1 #net.ipv4.conf.lo.arp_announce = 2 #net.ipv4.conf.all.arp_ignore = 1 #net.ipv4.conf.all.arp_announce = 2 # dpkg -i gitlab-ce_11.9.8-ce.0_amd64.deb #安装某个软件包 # dpkg -r gitlab-ce #删除某个软件包保留配置⽂件 # dpkg -r -P gitlab-ce #删除某个软件包不保留配置⽂件 # dpkg -I gitlab-ce_11.9.8-ce.0_amd64.deb #查看软件包信息 # dpkg -c gitlab-ce_11.9.8-ce.0_amd64.deb #查看软件包内的⽂件及⽬录内容 # dpkg -l #列出本机已经安装的所有软件 ~$ sudo apt install nginx=1.14.0-0ubuntu1.6 ~$ systemctl start nginx
apt/apt-get: bridges: br0: dhcp4: no dhcp6: no addresses: [172.18.3.18/16] gateway4: 172.18.0.1 nameservers: addresses: [223.6.6.6,223.5.5.5] interfaces: - bond0 br1: dhcp4: no dhcp6: no interfaces: - bond1 addresses: [10.20.3.18/16] routes: - to: 172.20.0.0/16 via: 10.20.0.1 - to: 10.20.0.0/16 via: 10.20.0.1 - to: 10.2.0.0/16 via: 10.20.0.1 - to: 10.8.0.0/16 via: 10.20.0.1 # apt list #apt列出仓库软件包,等于yum list # apt search NAME #搜索安装包 # apt show apache2 #查看某个安装包的详细信息 # apt install apache2 #在线安装软件包 # apt remove apache2 #卸载单个软件包但是保留配置⽂件 一手微信study322 全网都有超低价格 2.3.3:设置oracle JDK环境: 2.3.4:安装OpenJDK: 2.3.5:安装常⽤系统命令: # apt autoremove apache2 #删除安装包并解决依赖关系 # apt update #更新本地软件包列表索引,修改了apt仓库后必须执⾏ # apt purge apache2 #卸载单个软件包删除配置⽂件 # apt upgrade #升级所有已安装且可升级到新版本的软件包 # apt full-upgrade #升级整个系统,必要时可以移除旧软件包。 # apt edit-sources #编辑source源⽂件 # apt-cache madison nginx #查看仓库中软件包有哪些版本可以安装 # apt install nginx=1.14.0-0ubuntu1.6 #安装软件包的时候指定安装具体的版本 # pwd /usr/local/src 解压⼆进制⽂件并设置软连接: # tar xf jdk-8u212-linux-x64.tar.gz # ln -sv /usr/local/src/jdk1.8.0_212 /usr/local/jdk 配置环境变ᰁ: # vim /etc/profile export JAVA_HOME=/usr/local/jdk export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH export CLASSPATH=.$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib:$JAVA_HOME/lib/tools.jar ᯿新导⼊环境变ᰁ并验证: # source /etc/profile # java -version java version "1.8.0_212" Java(TM) SE Runtime Environment (build 1.8.0_212-b10) Java HotSpot(TM) 64-Bit Server VM (build 25.212-b10, mixed mode) # apt install openjdk-8-jdk # apt purge ufw lxd lxd-client lxcfs lxc-common # apt install iproute2 ntpdate tcpdump telnet traceroute nfs-kernel-server nfscommon lrzsz tree openssl libssl-dev libpcre3 libpcre3-dev zlib1g-dev ntpdate tcpdump telnet traceroute gcc openssh-server lrzsz tree openssl libssl-dev libpcre3 libpcre3- dev zlib1g-dev ntpdate tcpdump telnet traceroute iotop unzip zip
TRANSLATE with x English TRANSLATE with COPY THE URL BELOW Back EMBED THE SNIPPET BELOW IN YOUR SITE Enable collaborative features and customize widget: Bing Webmaster Portal Back 此页面的语言为中文(简体) 翻译为 标签:gitlab,ubuntu,常用命令,apt,ce,软件包,net,dpkg From: https://www.cnblogs.com/gaoyuechen/p/18080207