ubuntu-server-setup

A setup script for Ubuntu servers
授权协议 MIT License
开发语言 SHELL
所属分类 应用工具、 终端/远程登录
软件类型 开源软件
地区 不详
投 递 者 蔚宏大
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Bash setup script for Ubuntu servers

This is a setup script to automate the setup and provisioning of Ubuntu servers. It does the following:

  • Adds a new user account with sudo access
  • Adds a public ssh key for the new user account
  • Disables password authentication to the server
  • Deny root login to the server
  • Setup Uncomplicated Firewall
  • Create Swap file based on machine's installed memory
  • Setup the timezone for the server (Default to "Asia/Singapore")
  • Install Network Time Protocol

Installation

SSH into your server and install git if it is not installed:

sudo apt-get update
sudo apt-get install git

Clone this repository into your home directory:

cd ~
git clone https://github.com/jasonheecs/ubuntu-server-setup.git

Run the setup script

cd ubuntu-server-setup
bash setup.sh

Setup prompts

When the setup script is run, you will be prompted to enter the username of the new user account.

Following that, you will then be prompted to add a public ssh key (which should be from your local machine) for the new account. To generate an ssh key from your local machine:

ssh-keygen -t rsa
cat ~/.ssh/id_rsa.pub

Finally, you will be prompted to specify a timezone for the server. It will be set to 'Asia/Singapore' if you do not specify a value.

Supported versions

This setup script has been tested against Ubuntu 14.04, Ubuntu 16.04, Ubuntu 18.04 and Ubuntu 20.04.

Running tests

Tests are run against a set of Vagrant VMs. To run the tests, run the following in the project's directory:
./tests/tests.sh

  • [  0% 526/102096] Ensuring Jack server is installed and started FAILED: setup-jack-server  /bin/bash -c "(prebuilts/sdk/tools/jack-admin install-server prebuilts/sdk/tools/jack-launcher.jar prebuilts

  • Shiny-Server Shiny server 可以在线发布shiny应用程序并让用户可以在线管理自己的shiny应用程序。 Shiny Server运行各种不同的shiny程序, Shiny Server can manage R processes running various Shiny applications over different URLs and ports. Using

  • 记录一下Ubuntu17.10的openssh-server的安装和使用。安装之后就可以使用ssh登陆Ubuntu了,所以是Ubuntu的基础设定之一。 事前准备 Ubuntu版本:17.10 devops@ubuntu:~$ cat /etc/issue Ubuntu 17.10 \n \l devops@ubuntu:~$ devops@ubuntu:~$ lsb_release -a N

  • 镜像下载 ubuntu-18.04.5-preinstalled-server-arm64+raspi3.img.xz 官方链接 写入镜像 我使用的是Ubuntu + balenaEtcher 官网 Ubuntu 安装balenaEtcher的方法 curl -1sLf \ 'https://dl.cloudsmith.io/public/balena/etcher/setup.deb.sh

  • 这几天踩了巨多坑,终于安好了…… 运行命令: # Using Ubuntu curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash - sudo apt-get install -y nodejs 我的GLIBC_version=2.27,此时nodejs-v和node-v都会提示  /lib/x86_64-lin

  • 自己写的笔记,非转载,自己做个记录用。 1、全新系统 2、升级apt sudo apt update sudo apt upgrade 3、在根目录下创建lmkjsite文件夹(文件夹名可自取),并从Git里下载项目文件 git clone --depth=1 https://github.com/ant-design/ant-design-pro.git lmkjsite 4、更新资源库路径,下

 相关资料
  • Ubuntu Server Tip 是一个有趣且实用的小工具,它可以每次显示一条简短的 Linux Tips ,帮助你增长知识 。另外它还可以内置于 motd ( /etc/motd )中,这样你每次登录 Ubuntu 服务器的时候,同样也会得到一条 tips 。 # 安装: sudo apt-get install fortunes-ubuntu-server -y # 使用: ubuntu-s

  • 我的设置, am使用虚拟盒子vm在Ubuntu 16.04服务器上安装weblogic服务器fmw_12.2.1.10_wls.jar 使用sudo apt add repository ppa安装oracle java:webupd8team/java sudo apt get update sudo apt get install oracle-java8-installer 现在java安装

  • 我想在R-Server上安装rgl,在Ubuntu上运行。在bas提示符下,我安装了 正在读取软件包列表…已完成构建依赖关系树正在读取状态信息…已完成将安装以下额外软件包: libglu1-mesa将安装以下新软件包:<br>libglu1 mesa r-cran-rgl 0已升级,2已新安装,0要删除,0未升级。需要获得1645 kB的档案。此操作后,将使用3875 kB的额外磁盘空间。是否要继

  • 我已经安装了ubuntu 16.04服务器。Mysql服务器默认安装在其中。当我试图使用访问mysql时,我无法登录mysql,因为我没有密码。是否有默认密码? 我也尝试过使用,即使这样也不起作用。即使尝试使用mysql-u root登录也是失败的。

  • 本文向大家介绍Ubuntu Server 11.10安装配置lamp(Apache+MySQL+PHP),包括了Ubuntu Server 11.10安装配置lamp(Apache+MySQL+PHP)的使用技巧和注意事项,需要的朋友参考一下 准备篇: 1、配置防火墙,开启80端口、3306端口 说明:Ubuntu默认安装是没有开启任何防火墙的,为了服务器的安全,建议大家安装启用防火墙设置,这里推

  • 本文向大家介绍详解ASP.NET Core部署项目到Ubuntu Server,包括了详解ASP.NET Core部署项目到Ubuntu Server的使用技巧和注意事项,需要的朋友参考一下 基于上一篇成功安装Ubuntu Server 16.10的基础上,接下来继续我们ASP.NET Core项目的部署之旅! 只是对于这些年整天和Windows打交道的我,初次使用Linux确实有点费劲。 但是为