【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 ...
随机推荐
- DNS name
DNS name 指的反向解析的域名.
- ArcGIS 问题汇总
1.Arcgis10.4出现Manager打不开的情况 解决方法: 1.检查进程中是否有占用4000以及6080端口的进程,如果有关闭 2.检查进程中是否有javaw.exe这个进程,如果有就把他结束 ...
- Java学习笔记 线程池使用及详解
有点笨,参考了好几篇大佬们写的文章才整理出来的笔记.... 字面意思上解释,线程池就是装有线程的池,我们可以把要执行的多线程交给线程池来处理,和连接池的概念一样,通过维护一定数量的线程池来达到多个线程 ...
- [UWP]UIElement.Clip虽然残废,但它还可以这样玩
1. 复习一下WPF的UIElement.Clip 用了很久很久的WPF,但几乎没有主动用过它的Clip属性,我只记得它很灵活,可以裁剪出多种形状.在官方文档复习了一下,大致用法和效果如下: < ...
- Session.run() & Tensor.eval()
如果有一个Tensor t,在使用t.eval()时,等价于: tf.get_defaut_session().run(t) t = tf.constant(42.0) sess = tf.Sessi ...
- vscode启动黑屏
今天打开vscode的时候突然就黑屏了,一脸懵 于是上网找了一下,根据这位博主的解决办法: https://blog.csdn.net/insgo/article/details/102975986 ...
- android 活动监听是否点击某个view
前述(写给做过web前端的人) 在web H5,如果如果判断当前是否点击某个元素,一般会这样写. window.addEventListener("touchstart",func ...
- 01 jQuery配置、jQuery语法结构、jQuery对象与DOM对象的互相转换
配置jQuery环境 下载jQuery 官网:jquery.com 学习或开发建议选择未压缩版,便于学习,发布建议选择压缩版,便于用户极速体验(点击下载若出现的是代码页 面,Ctrl+A全选复制 ...
- MySQL5.7.18自动化安装脚本
背景 很好的朋友邱启明同学,擅长MySQL,目前任职某大型互联网业MySQL DBA,要来一套MySQL自动安装的Shell脚本,贴出来保存一些. 此版本为 MySQL 5.7.18 ###### 自 ...
- Nginx安装、默认虚拟主机、Nginx用户认证和域名重定向
6月7日任务 12.6 Nginx安装12.7 默认虚拟主机12.8 Nginx用户认证12.9 Nginx域名重定向 扩展nginx.conf 配置详解 http://www.ha97.com/51 ...