【Ubuntu 16.04.2_64】系统配置
Ubuntu 16.04.2_64系统配置
转载:http://www.cnblogs.com/yangchongxing/p/9049897.html
Ubuntu Server服务指南:https://help.ubuntu.com/16.04/serverguide/index.html
准备事项
虚拟机网络选择桥接模式、如果使用的是无线网络,则配置适配器为自己的无线网络。
网络ping -c 192.168.1.181
查看netstat -rn
重启reboot、关机shutdown -h now
1、启用root用户
$sudo passwd root
输入两次密码就OK了。
2、安装VIM
#apt-get install vim
3、安装ssh
#apt-get install ssh
启用root ssh连接
# vim /etc/ssh/sshd_config
修改如下部分,允许root登陆
# Authentication:
LoginGraceTime
#PermitRootLogin without-password
PermitRootLogin yes
StrictModes yes
重新启动ssh服务
# service ssh restart
4、安装中文语言包
# apt-get install language-pack-zh-hans
5、配置静态IP
# vi /etc/network/interfaces
注释
#iface ens33 inet dhcp
追加
iface ens33 inet static
address 192.168.1.181
gateway 192.168.1.1
netmask 255.255.255.0
修改DNS
#vim /etc/resolv.conf
nameserver 192.168.1.1
重启失效追加DNS
vi /etc/resolvconf/resolv.conf.d/base
nameserver 192.168.1.1
nameserver 8.8.8.8
nameserver 8.8.4.4
Google提供的免费DNS服务器的IP地址
主 8.8.8.8 和 备 8.8.4.4
重启网络
# /etc/init.d/networking restart
6、修改源
# cp /etc/apt/sources.list /etc/apt/sources.list.bak
# vim /etc/apt/sources.list
# apt-get update
若apt-get update出现错误,则
# vim /etc/resolv.conf
追加 nameserver 8.8.8.8
阿里源
18.04.03 LTS
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
16.04 LTS
# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted
#Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe
#Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe
#Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
#Added by software-properties
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe
#Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse
7、关闭防火墙、启用防火墙
# ufw disable
# ufw anable
8、安装java环境
下载jdk-8u131-linux-x64.tar.gz和tomcat9.tar.gz,解压到/root目录,你也可以解压到其他路径。
配置root环境
# vim .profile
追加
export JAVA_HOME=/root/jdk1.8.0_131
export JRE_HOME=/root/jdk1.8.0_131/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib
export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
然后
# source .profile
配置所有用户环境
# vim /etc/profile
追加
export JAVA_HOME=/root/jdk1..0_131
export JRE_HOME=/root/jdk1..0_131/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib
export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin # source /etc/profile
9、安装Redis数据库
命令行安装
# apt-get install redis-server
检查Redis服务器系统进程
# ps -aux|grep redis
redis 0.0 0.6 ? Ssl : : /usr/bin/redis-server *:
root 0.0 0.0 pts/ S+ : : grep --color=auto redis
检查Redis服务器监听端口
# netstat -nlt|grep
tcp 127.0.0.1: 0.0.0.0:* LISTEN
检查Redis服务器状态
# /etc/init.d/redis-server status
修改Redis服务配置
# vi /etc/redis/redis.conf
进入vim后按Esc,/requirepass 检索,检索到后n向后检索,N向前检索
设置访问密码,去掉注解
requirepass 123456
远程访问Redis服务器,注释bind
#bind 127.0.0.1
重启Redis服务器
# /etc/init.d/redis-server restart
使用客户端验证
有密码登录
# redis-cli -a
无密码登录
# redis-cli
在远程的另一台Linux访问Redis服务器
# redis-cli -a -h 192.168.1.190
登陆后测试
# redis-cli -a
127.0.0.1:> keys * #查看
) "key2"
) "key1"
127.0.0.1:> set key3 aaa # 添加
OK
127.0.0.1:> keys *
) "key2"
) "key3"
) "key1"
127.0.0.1:> get key3 #获取
"aaa"
127.0.0.1:> del key3 #删除
(integer)
127.0.0.1:> keys *
) "key2"
) "key1"
127.0.0.1:>
【Ubuntu 16.04.2_64】系统配置的更多相关文章
- 【Ubuntu 16.04.2_64】安装配置SVN
[Ubuntu 16.04.2_64]安装配置SVN 转载:https://www.cnblogs.com/yangchongxing/p/10190549.html 检查是否已安装svn # svn ...
- VMWare 安装Ubuntu 16.04
1.新建虚拟机 (1)点击文件-->新建虚拟机 (2)选择 自定义(高级)--> 下一步 (3)选择Workstation 12.0 --> 下一步 (4)选择 稍后安装操作系统 - ...
- Ubuntu 下ibus拼音输入法启用 (ubuntu 16.04
Ubuntu 下ibus拼音输入法启用 我安装的是英文版的ubuntu 16.04,打开只带英文,并没有中文. 设置输入法为iBus 从system settings 进入language suppo ...
- Ubuntu 16.04 LAMP server 指南 - 配置 Apache2.4,PHP7,和MariaDB(而不是MySQL)
翻译自:https://www.howtoforge.com/tutorial/install-apache-with-php-and-mysql-on-ubuntu-16-04-lamp/ 昨天在虚 ...
- 【转】Ubuntu 16.04安装配置TensorFlow GPU版本
之前摸爬滚打总是各种坑,今天参考这篇文章终于解决了,甚是鸡冻\(≧▽≦)/,电脑不知道怎么的,安装不了16.04,就安装15.10再升级到16.04 requirements: Ubuntu 16.0 ...
- Ubuntu 16.04 安装 Kodi v17 “Krypton” Alpha 2
Ubuntu 16.04 安装 Kodi v17 “Krypton” Alpha 2:sudo add-apt-repository ppa:team-xbmc/xbmc-nightlysudo ap ...
- ubuntu 16.04安装docker
环境 操作系统:ubuntu 16.04 64位,默认安装 准备 1. 添加GPG key: $ sudo apt-key adv --keyserver hkp://p80.pool.sks-key ...
- Ubuntu 16.04安装QQ国际版图文详细教程
因工作需要,我安装了Ubuntu 16.04,但是工作上的很多事情需要QQ联系,然而在Ubuntu上的WebQQ很是不好用,于是在网上搜索了好多个Linux版本的QQ,然而不是功能不全 ...
- Ubuntu 16.04 64位 搭建 node.js NodeJS 环境
我的系统环境: Ubuntu 16.04 64位 本文内容亲测可用, 请放心食用 使用淘宝镜像 淘宝镜像官网是https://npm.taobao.org/ 使用淘宝镜像前请自行安装好 npm 和 n ...
随机推荐
- ThreadLocal深度解析和应用示例
开篇明意 ThreadLocal是JDK包提供的线程本地变量,如果创建了ThreadLocal<T>变量,那么访问这个变量的每个线程都会有这个变量的一个副本,在实际多线程操作的时候,操作的 ...
- CSS RESET —— 浏览器样式重置
CSS Reset 1. CSS Reset为什么存在? 只要您的客户存在使用不同浏览器(ie,firefox,chrome等)的可能,那你就不得不从完美的理想状态回到现实,因为不同核心的浏览器对CS ...
- usaco training <1.2 Greedy Gift Givers>
题面 Task 'gift1': Greedy Gift Givers A group of NP (2 ≤ NP ≤ 10) uniquely named friends has decided t ...
- Ubuntu 16.04上源码编译Poco并编写cmake文件 | guide to compile and install poco cpp library on ubuntu 16.04
本文首发于个人博客https://kezunlin.me/post/281dd8cd/,欢迎阅读! guide to compile and install poco cpp library on u ...
- python容器类型列表的操作
列表:使用中括号进行表示元素的集合,元素与元素之间使用逗号隔开:列表中的元素可以存放不同的数据类型,但是通常存放相同的数据类型: 1.列表的声明: # 声明一个列表:变量名 = [元素1,元素2] l ...
- 学习完vue指令 做的一个学生信息录入系统
一.demo实现原理 输入完个人信息后 点击创建用户 数据就会显示在下面的表格中 用到了vue中的数据双向绑定 v-model v-for 还要js正则 数组的unshift splice 等方法 ...
- 手把手带你一键部署 Kubernetes + KubeSphere 至 Linux
本文介绍一个最快安装 Kubernetes 和体验 KubeSphere 核心功能的方式,all-in-one 模式可一键安装 Kubernetes v1.15.5 和 KubeSphere 至一台 ...
- 《VueRouter爬坑第三篇》-嵌套路由
VueRouter系列的文章示例编写时,项目是使用vue-cli脚手架搭建. 项目搭建的步骤和项目目录专门写了一篇文章:点击这里进行传送 后续VueRouter系列的文章的示例编写均基于该项目环境. ...
- Theano中的导数
计算梯度 现在让我们使用Theano来完成一个稍微复杂的任务:创建一个函数,该函数计算相对于其参数x的某个表达式y的导数.为此,我们将使用宏T.grad.例如,我们可以计算相对于的梯度 import ...
- Java通过 Scanner 类来获取用户的输入
通过 Scanner 类来获取用户的输入. import java.util.Scanner; Scanner s = new Scanner(System.in);// 从键盘接收数据 Syste ...