basebuntu:用于配置 Ubuntu LTS Web 服务器的 Bash 脚本

  • R7_956533
    了解作者
  • 20.4KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-06-14 02:40
    上传日期
此脚本专为运行最新版本 Ubuntu Server LTS(当前为 14.04)的预算盒而设计。 这将在 Linode 1GB VPS 或 Digital Ocean 512MB VPS 上运行良好。 特征 删除多余的包 Nginx(支持 https/SPDY 的网络服务器) Pagespeed(用于减少页面加载时间的 Ngnix 模块) PHP-FPM(替代 mod_php) UFW(防火墙) MariaDB(数据库) 使用 RVM 的 Ruby 环境 便于管理的命令 用于处理网站配置的自定义 Nginx 命令 安装 警告! 此脚本将在重新安装期间覆盖以前的配置。 虽然我已经包含了一些防止覆盖的检查,但请注意,如果您在一个框上多次运行主选项命令,事情可能会中断。 cd ~; apt-get update; apt-get install git -y; git clone
basebuntu-master.zip
  • basebuntu-master
  • .gitignore
    2.6KB
  • LICENSE.md
    1.1KB
  • readme.md
    4.7KB
  • basebuntu.sh
    5.1KB
  • conf
  • nginx
  • pagespeed.conf
    646B
  • nginx-init
    10.2KB
  • nginx.conf
    2.2KB
  • php-fpm.conf
    446B
  • sysctl-append.conf
    901B
  • basebuntu.conf
    131B
  • modules
  • ufw.sh
    439B
  • extra-commands.sh
    3.7KB
  • ask.sh
    1.6KB
  • nginx.sh
    3.7KB
  • mariadb.sh
    419B
  • initial-setup.sh
    1.8KB
  • nginx-commands.sh
    2.6KB
  • ruby.sh
    636B
  • .gitattributes
    483B
  • .editorconfig
    166B
内容介绍
![Basebuntu](http://i.imgur.com/tbKJAol.png) -- ![License Status](https://img.shields.io/badge/language-bash-blue.svg?style=flat) ![License Status](http://img.shields.io/badge/license-MIT-red.svg?style=flat) This script is specifically designed for budget boxes running the latest version of Ubuntu Server LTS (currently 14.04). This will run great on a Linode 1GB VPS or Digital Ocean 512MB VPS. ## Features - Removes excess packages - Nginx (web server with https/SPDY support) - Pagespeed (Ngnix module for reducing page load time) - PHP-FPM (alternative to mod_php) - UFW (firewall) - MariaDB (database) - Ruby environment using RVM - Commands for easy administration - Custom Nginx commands for working with website configs ## Install Warning! This script will overwrite previous configs during re-installation. While I have included some checks to prevent overwriting, be aware that things may break if you run a main option command more than once on a box. cd ~; apt-get update; apt-get install git -y; git clone https://github.com/marshallford/basebuntu .basebuntu chmod +x ~/.basebuntu/basebuntu.sh; bash ~/.basebuntu/basebuntu.sh setup; source ~/.bashrc ## Main options **Note: You must run setup before any other command. Setup installs/configures a base install.** bb ufw [ssh port] bb nginx bb mariadb bb ruby ## Extra options and other commands ##### Harden openSSH Hardens openSSH with PermitRoot and PasswordAuthentication bb harden-ssh [option #] 1. All users including root can only login via SSH-keys. 2. Normal users can login via SSH-keys, root can't login at all. 3. Root can't login, normal users can use SSH-keys or plain passwords. 4. Normal users can login with SSH-keys or plain passwords, root can only login via SSH-keys. ##### Fail2ban (bruteforce/DOS firewall) Installs a firewall to protect against bruteforce attacks on ssh and http(s) ports. bb fail2ban ##### Info on Operating System, version and Architecture bb info ##### External IP To get the server's external IP address. bb ip ##### Updater Runs a full update and upgrade of packages and then cleans up. This command will not upgrade to a newer release cycles. Ex: 12.04 LTS > 12.10. bb updater ##### basebuntu Updater Updates basebuntu script and keeps current config file. bb update-bb ##### Fixing locale on some OpenVZ Ubuntu templates bb locale ##### Classic Disk I/O and Network test Run the classic Disk IO (dd) & Classic Network (cachefly) Test bb test ## Nginx commands ##### Restart Restarts PHP-FPM and Nginx bb restart ##### Permissions Sets the proper permissions for `/sites`. This sets the owner and group to the user `deploy`. This allows the deployment user to push websites to the server. bb permissions To set the owner and group of `/sites` to someone other than `deploy` use the permissions command followed by the name of the user. bb www-permissions [user name] ##### Add Website Create folder structure and empty site config for a new website. bb add-site [website name] ##### Remove Website Deletes website config and files. bb remove-site [website name] ##### Enable Website Enables/activates website. bb enable-site [website name] ##### Disable Website Disables/Deactivates website. bb disable-site [website name] ##### Edit Website Opens website config in nano. bb edit-site [website name] ##### Edit Nginx Config Opens Nginx config in nano. bb nginx-config ## After installation - Use `ufw status` to get information on your firewall status - Run `htop` to see RAM and CPU usage - Reboot to test that everything is working ok after a boot cycle - To enable Pagespeed on a virtualhost, include `/etc/ngnix/pagespeed.conf` - To enable PHP-FPM on a virtualhost, include `/etc/ngnix/enable-php.conf` ## Credits #### Orginal - [LowEndBox admin (LEA)](https://github.com/lowendbox/lowendscript) - [Xeoncross](https://github.com/Xeoncross/lowendscript) - [ilevkov](https://github.com/ilevkov/lowendscript) - [asimzeeshan](https://github.com/asimzeeshan) #### Additional Credits from LET - [mun](http://lowendtalk.com/profile/7133/Mun) - [mpkossen](http://lowendtalk.com/profile/3071/mpkossen) - [jack](http://lowendtalk.com/profile/522/Jack) - [emg](http://lowendtalk.com/profile/13220/emg) - [azizmb](http://lowendtalk.com/profile/3240/azizmb) #### Great Companies/People - [Delta/Fran](http://buyvm.net) - [The_Hatta](http://wiki.frantech.ca/doku.php/irc:main) - [DigitalOcean](http://digitalocean.com) #### People that have helped along the way - [vt0r/Salvatore LaMendola](https://github.com/jogfsovt/) #### Software Used - [nginx-init-ubuntu (Github)](https://github.com/JasonGiedymin/nginx-init-ubuntu)
评论
    相关推荐
    • 高级Bash 脚本编程指南
      NULL 博文链接:https://xiajs.iteye.com/blog/1025751
    • bash shell
      NULL 博文链接:https://detox.iteye.com/blog/1882849
    • bash shell
      NULL 博文链接:https://detox.iteye.com/blog/1882849
    • steps-bash-script:已弃用-使用https
      将其输入另存为bash文件并运行。 使用此Bitrise步骤滚动您自己的自定义bash脚本! 此步骤是“步骤库”的一部分,您可以找到其“步骤库”页面 输入: 检查step.yml文件。 笔记: 现在应该使用新的content输入而...
    • Git-bash
      Git-bash:- 安装Git:- 要下载Git: 1.Go to https://git-scm.com/downloads 2.download the software for Windows 3.install Git choosing all the default options 首次Git配置:- 用您的名字设置Git: >>...
    • bash shell
      NULL 博文链接:https://detox.iteye.com/blog/1882849
    • BASH 中的字符串处理
      NULL 博文链接:https://lujinan858.iteye.com/blog/437004
    • bashstyle_examples:Bash示例遵循https上的样式指南
      遵循样式指南的Bash示例,为 包括可重复使用的bash-boilerplate.sh 还通过shellcheck bash* : : (在OSX上brew install shellcheck ) 用法示例: ./bash-example ./bash-example -V ./bash-example bye ...
    • bash shell
      NULL 博文链接:https://detox.iteye.com/blog/1882849
    • bash shell
      NULL 博文链接:https://detox.iteye.com/blog/1882849