【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 ...
随机推荐
- Bootstrap——面包屑导航(Breadcrumbs)
面包屑导航(Breadcrumbs)是一种基于网站层次信息的显示方式. Bootstrap 中的面包屑导航(Breadcrumbs)是一个简单的带有 .breadcrumb 类的无序列表. <o ...
- 安卓JNI精细化讲解,让你彻底了解JNI(一):环境搭建与HelloWord
目录 1.基础概念 ├──1.1.JNI ├──1.2.NDK ├──1.3.CMake与ndk-build 2.环境搭建 3.Native C++ 项目(HelloWord案例) ├── 3.1.项 ...
- CSS如何设置列表样式属性,看这篇文章就够用了
列表样式属性 在HTML中有2种列表.无序列表和有序列表,在工作中无序列表比较常用,无序列表就是ul标签和li标签组合成的称之为无序列表,那什么是有序列表呢?就是ol标签和li标签组合成的称之为有序列 ...
- 十、GAP
1.1 背景 GAP(Generic Access Profile)位于主机协议栈的最顶层,用来定义BLE设备在待机或者连接状态中的行为,该Profile保证不同的Bluetooth产品可以互 ...
- 【故障公告】docker swarm 集群问题造成新版博客后台故障
非常抱歉,今天下午 16:55~17:05 左右,由于 docker swarm 集群的突发不稳定问题造成新版博客后台(目前处于灰度发布阶段)无法正常使用,由此给您带来麻烦,请您谅解. 出故障期时,新 ...
- ubuntu server 1604 配置网络信息
对于新安装的linux 服务器(ubuntu server 1604) 一,配置网络 连接网线与路由器 查看系统的网卡信息 ifconfig -a //列出所有的网卡信息,不管启用还是没有启用的 ...
- Install zabbix
- name: Create dir to keep install file file: path=/opt/pacheage state=directory follow=yes force=ye ...
- 微博验证码的识别并登录获取cookies
记得以前微博是用的宫格验证码,现在不一样了,用的是滑块验证码和 点触验证码,每天登陆的第一次基本用的是滑块,继续登录就都用的是点触验证码.所以滑块验证码不写,感兴趣的可以补上. 代码: 这里用的超级鹰 ...
- Nginx 跨域代理
安装环境: win10 nginx-1.17.2 安装: 在写前端调用后台接口时,报了跨域的错误. 调试地址:http://localhost:5500/demo/encAjax.html 接口地址: ...
- 01-python中一切皆对象
python一切皆对象 Python中一切皆对象,在静态语言中,Java也是面向对象编程,Python要比Java的面向对象编程更加彻底.元类编程以及猴子补丁都是用一切皆对象编程出来的. 1.函数和类 ...