Fix wo update & cleanup info
* update README.md * cleanup changelog.md * fix wo update command url * remove php-sodium (php7.0 & php7.1 only) * remove php-memcache
This commit is contained in:
45
CHANGELOG.md
45
CHANGELOG.md
@@ -1,13 +1,36 @@
|
||||
### v3.9.0 - November 30, 2018
|
||||
# Changelog
|
||||
|
||||
**Initial release**
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
[+] Rebranded the fork to WordOps
|
||||
[+] Codebase cleanup
|
||||
[+] Set PHP 7.2 as the default
|
||||
[+] Included support for newer OS releases
|
||||
[+] Reworked the HTTPS configuration
|
||||
[+] Added more automated testing with Redis
|
||||
[=] Replaced Postfix with smtp-cli
|
||||
[-] Dropped mail services
|
||||
[-] Dropped w3tc support
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
|
||||
### v3.X.X - [Unreleased]
|
||||
|
||||
#### Changed
|
||||
|
||||
- Updating nginx fastcgi_cache template
|
||||
- Updating Nginx configuration for WordPress 5.0
|
||||
- remove --experimental args
|
||||
|
||||
#### Added
|
||||
|
||||
- Add webp image support with nginx mapping
|
||||
- Add PHP 7.3 support
|
||||
|
||||
#### Fixed
|
||||
|
||||
- Nginx variable $webp_suffix on fresh install
|
||||
|
||||
### v3.9.2 - November 30, 2018
|
||||
|
||||
#### Changed
|
||||
|
||||
- Rebranded the fork to WordOps
|
||||
- Codebase cleanup
|
||||
- Set PHP 7.2 as the default
|
||||
- Included support for newer OS releases
|
||||
- Reworked the HTTPS configuration
|
||||
- Added more automated testing with Redis
|
||||
- Replaced Postfix with smtp-cli
|
||||
- Dropped mail services
|
||||
- Dropped w3tc support
|
||||
96
README.md
96
README.md
@@ -1,46 +1,68 @@
|
||||
# [WordOps](https://wordops.org/)
|
||||
<h1 align="center" style="font-size:54px;"><a href="https://wordops.org">
|
||||
WordOps</a>
|
||||
<br>
|
||||
</h1>
|
||||
|
||||
[](https://travis-ci.org/WordOps/WordOps)
|
||||
<h2 align="center">An essential toolset that eases WordPress site and server administration</h2>
|
||||
|
||||
WordOps (wo) is the essential toolset that eases WordPress site and server administration.
|
||||
<p align="center">
|
||||
<a href="https://travis-ci.org/WordOps/WordOps"><img src="https://travis-ci.org/WordOps/WordOps.svg?branch=master" alt="build"></a>
|
||||
<img src="https://img.shields.io/github/license/wordops/wordops.svg" alt="MIT">
|
||||
<img src="https://img.shields.io/github/last-commit/wordops/wordops.svg" alt="Commits">
|
||||
|
||||
**WordOps currently supports:**
|
||||
</p>
|
||||
|
||||
- Ubuntu 14.04, 16.04 & 18.04
|
||||
- Debian 7, 8 & 9
|
||||
|
||||
**Port requirements:**
|
||||
|
||||
| Name | Port Number | Inbound | Outbound |
|
||||
|:-----:|:-----------:|:-------:|:---------:|
|
||||
|SSH |22 | ✓ |✓ |
|
||||
|HTTP |80 | ✓ |✓ |
|
||||
|HTTPS/SSL |443 | ✓ |✓ |
|
||||
|WO Admin |22222 | ✓ | |
|
||||
|GPG Key Server |11371 | |✓ |
|
||||
<p align="center">
|
||||
<a href="#key-features">Key Features</a> •
|
||||
<a href="#requirements">Requirements</a> •
|
||||
<a href="#getting-started">Getting Started</a> •
|
||||
<a href="#usage">Usage</a> •
|
||||
<a href="#cheatsheet">Cheatsheet</a> •
|
||||
<a href="#credits">Credits</a> •
|
||||
<a href="#license">License</a>
|
||||
</p>
|
||||
|
||||
## Quick start
|
||||
---
|
||||
|
||||
## Key Features
|
||||
|
||||
- Easy Migration from EasyEngine v3
|
||||
- Automated WordPress, Nginx, PHP, MySQL & Redis installation
|
||||
- Optimized Nginx configuration with multiple cache backends support
|
||||
- Let's Encrypt SSL certificates
|
||||
|
||||
## Requirements
|
||||
|
||||
### Operating System
|
||||
|
||||
- Ubuntu : 16.04 LTS (Xenial) - 18.04 LTS (Bionic)
|
||||
- Debian : 8 (Jessie) - 9 (Stretch)
|
||||
|
||||
### Ports requirements
|
||||
|
||||
- SSH (22 or custom)
|
||||
- HTTP & HTTPS (80 & 443)
|
||||
- WO Admin (22222)
|
||||
- GPG key Server (11371 outbound)
|
||||
|
||||
## Getting Started
|
||||
|
||||
```bash
|
||||
wget -qO wo wordops.se/tup && sudo bash wo # Install WordOps
|
||||
sudo wo site create example.com --wp # Install required packages & setup WordPress on example.com
|
||||
```
|
||||
## Must read!
|
||||
|
||||
## Must read
|
||||
|
||||
WordOps made some fundamental changes:
|
||||
|
||||
* We've deprecated the mail stack. Less is more. As an alternative, take a look at [iRedMail](https://www.iredmail.org/) or [Caesonia](https://github.com/vedetta-com/caesonia). And an alternative for Roundcube is [Rainloop](https://www.rainloop.net/).
|
||||
* Support for w3tc is dropped as a security precaution.
|
||||
* We are currently migrating the PHP 5.x series to PHP 7.1 and PHP 7.2. We'll offer an easy to use migration script once we are confident enough to unleash this daemon. For now, new sites get installed with PHP 7.2 as the default.
|
||||
- We've deprecated the mail stack. Less is more. As an alternative, take a look at [iRedMail](https://www.iredmail.org/) or [Caesonia](https://github.com/vedetta-com/caesonia). And an alternative for Roundcube is [Rainloop](https://www.rainloop.net/).
|
||||
- Support for w3tc is dropped as a security precaution.
|
||||
- We are currently migrating the PHP 5.x series to PHP 7.2 and PHP 7.3. We'll offer an easy to use migration script once we are confident enough to unleash this daemon. For now, new sites get installed with PHP 7.2 as the default.
|
||||
|
||||
## Update WordOps
|
||||
|
||||
#### With one simple command
|
||||
```
|
||||
wo update
|
||||
```
|
||||
|
||||
## More site creation commands
|
||||
## Usage
|
||||
|
||||
### Standard WordPress sites
|
||||
|
||||
@@ -70,6 +92,7 @@ wo site create example.com --wpsubdomain --wpredis # install wpmu-subdomain + n
|
||||
```
|
||||
|
||||
### Non-WordPress sites
|
||||
|
||||
```bash
|
||||
wo site create example.com --html # create example.com for static/html sites
|
||||
wo site create example.com --php # create example.com with php support
|
||||
@@ -77,19 +100,32 @@ wo site create example.com --mysql # create example.com with php & mysql supp
|
||||
```
|
||||
|
||||
### HHVM enabled sites
|
||||
|
||||
```bash
|
||||
wo site create example.com --wp --hhvm # create example.com WordPress site with HHVM support
|
||||
wo site create example.com --php --hhvm # create example.com php site with HHVM support
|
||||
```
|
||||
|
||||
## Cheatsheet - site creation
|
||||
## Cheatsheet
|
||||
|
||||
| | single site | multisite w/ subdir | multisite w/ subdom |
|
||||
|--------------------|---------------|-----------------------|--------------------------|
|
||||
| **NO Cache** | --wp | --wpsubdir | --wpsubdomain |
|
||||
| **WP Super Cache** | --wpsc | --wpsubdir --wpsc | --wpsubdomain --wpsc |
|
||||
| **Nginx cache** | --wpfc | --wpsubdir --wpfc | --wpsubdomain --wpfc |
|
||||
| **Nginx fastcgi_cache** | --wpfc | --wpsubdir --wpfc | --wpsubdomain --wpfc |
|
||||
| **Redis cache** | --wpredis | --wpsubdir --wpredis | --wpsubdomain --wpredis |
|
||||
|
||||
|
||||
## Update WordOps
|
||||
|
||||
```bash
|
||||
wo update
|
||||
```
|
||||
|
||||
## Credits
|
||||
|
||||
- [EasyEngine](https://github.com/easyengine/easyengine)
|
||||
|
||||
## License
|
||||
[MIT](http://opensource.org/licenses/MIT)
|
||||
|
||||
- [MIT](http://opensource.org/licenses/MIT) © [WordOps](https://wordops.org)
|
||||
57
install
57
install
@@ -62,7 +62,7 @@ apt-get update &>> /dev/null
|
||||
###
|
||||
# 1- Check whether lsb_release is installed, and if not, install it
|
||||
###
|
||||
if [ ! -x /usr/bin/lsb_release ]; then
|
||||
if [ -z "$(command -v lsb_release)" ]; then
|
||||
wo_lib_echo "Installing lsb-release, please wait..."
|
||||
apt-get -y install lsb-release &>> /dev/null
|
||||
fi
|
||||
@@ -118,9 +118,9 @@ fi
|
||||
function wo_install_dep()
|
||||
{
|
||||
if [ "$wo_linux_distro" == "Ubuntu" ]; then
|
||||
apt-get -y install build-essential curl gzip python3 python3-apt python3-setuptools python3-dev sqlite3 git tar software-properties-common pigz || wo_lib_error "There was an error during dependency installation, exit status " 1
|
||||
apt-get -y install build-essential curl gzip python3 python3-apt python3-setuptools python3-dev sqlite3 git tar software-properties-common pigz gnupg2 || wo_lib_error "There was an error during dependency installation, exit status " 1
|
||||
elif [ "$wo_linux_distro" == "Debian" ]; then
|
||||
apt-get -y install build-essential curl gzip dirmngr python3 python3-apt python3-setuptools python3-dev sqlite3 git tar software-properties-common pigz || wo_lib_error "There was an error during dependency installation, exit status " 1
|
||||
apt-get -y install build-essential curl gzip dirmngr python3 python3-apt python3-setuptools python3-dev sqlite3 git tar software-properties-common pigz gnupg2 || wo_lib_error "There was an error during dependency installation, exit status " 1
|
||||
fi
|
||||
|
||||
locale-gen en &>> /dev/null
|
||||
@@ -145,7 +145,7 @@ function wo_install_dep()
|
||||
add-apt-repository -y 'ppa:ondrej/php'
|
||||
wo_lib_echo "Updating the PHP repository for some neat PHP 7.2 support"
|
||||
apt-get update &>> /dev/null
|
||||
apt-get -y install php7.2-fpm php7.2-curl php7.2-gd php7.2-imap php-sodium php7.2-common php7.2-readline php7.2-redis php7.2-mysql php7.2-cli php7.2-memcache php7.2-imagick php7.2-mbstring php7.2-recode php7.2-bcmath php7.2-opcache php7.2-zip php7.2-xml php7.2-soap php7.2-msgpack memcached graphviz php-pear php7.2-xdebug || wo_lib_error "Not all PHP packages could be installed. " 1
|
||||
apt-get -y install php7.2-fpm php7.2-curl php7.2-gd php-memcached php7.2-imap php7.2-common php7.2-readline php-redis php7.2-mysql php7.2-cli php-imagick php7.2-mbstring php7.2-recode php7.2-bcmath php7.2-opcache php7.2-zip php7.2-xml php7.2-soap php7.2-msgpack graphviz php-pear php7.2-xdebug || wo_lib_error "Not all PHP packages could be installed. " 1
|
||||
mkdir -p /var/log/php/7.2/
|
||||
touch /var/log/php/7.2/slow.log /var/log/php/7.2/fpm.log
|
||||
systemctl php7.2-fpm restart &>> /dev/null
|
||||
@@ -157,7 +157,7 @@ function wo_install_dep()
|
||||
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
|
||||
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list
|
||||
apt-get update &>> /dev/null
|
||||
apt-get -y install php7.2-fpm php7.2-curl php7.2-gd php7.2-imap php-sodium php7.2-common php7.2-readline php7.2-redis php7.2-mysql php7.2-cli php7.2-memcache php7.2-imagick php7.2-mbstring php7.2-recode php7.2-bcmath php7.2-opcache php7.2-zip php7.2-xml php7.2-soap php7.2-msgpack memcached graphviz php-pear php7.2-xdebug || wo_lib_error "Not all PHP packages could be installed." 1
|
||||
apt-get -y install php7.2-fpm php7.2-curl php7.2-gd php-memcached php7.2-imap php7.2-common php7.2-readlne php-redis php7.2-mysql php7.2-cli php-imagick php7.2-mbstring php7.2-recode php7.2-bcmath php7.2-opcache php7.2-zip php7.2-xml php7.2-soap php7.2-msgpack graphviz php-pear php7.2-xdebug || wo_lib_error "Not all PHP packages could be installed." 1
|
||||
systemctl php7.2-fpm restart &>> /dev/null
|
||||
fi
|
||||
|
||||
@@ -168,6 +168,12 @@ function wo_install_dep()
|
||||
mkdir -p /etc/nginx/conf.d
|
||||
echo -e 'map $http_accept $webp_suffix {\n default "";\n "~*webp" ".webp";\n}\n' > /etc/nginx/conf.d/webp.conf
|
||||
}
|
||||
|
||||
# Let's Encrypt .well-known folder setup
|
||||
if [ ! -d /var/www/html/.well-known/acme-challenge ]; then
|
||||
mkdir -p /var/www/html/.well-known/acme-challenge
|
||||
chown -R www-data:www-data /var/www/html/.well-known
|
||||
fi
|
||||
}
|
||||
|
||||
###
|
||||
@@ -305,17 +311,17 @@ function wo_sync_db()
|
||||
# Copy the previous upstream.conf
|
||||
cp /etc/nginx/conf.d/upstream.conf /etc/nginx/conf.d/upstream.bak
|
||||
{
|
||||
# Replace the ports for PHP 7.2
|
||||
sed -i 's/9000/9072/g' /etc/nginx/conf.d/upstream.conf
|
||||
sed -i 's/9070/9072/g' /etc/nginx/conf.d/upstream.conf
|
||||
# Replace the ports for debug PHP 7.2
|
||||
sed -i 's/9001/9172/g' /etc/nginx/conf.d/upstream.conf
|
||||
sed -i 's/9170/9172/g' /etc/nginx/conf.d/upstream.conf
|
||||
# Replace the ports for PHP 7.2
|
||||
sed -i 's/9000/9072/g' /etc/nginx/conf.d/upstream.conf
|
||||
sed -i 's/9070/9072/g' /etc/nginx/conf.d/upstream.conf
|
||||
# Replace the ports for debug PHP 7.2
|
||||
sed -i 's/9001/9172/g' /etc/nginx/conf.d/upstream.conf
|
||||
sed -i 's/9170/9172/g' /etc/nginx/conf.d/upstream.conf
|
||||
} > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
echo "UPDATE sites SET php_version = REPLACE(php_version, '5.6', '7.2');" | sqlite3 /var/lib/wo/dbase.db
|
||||
echo "UPDATE sites SET php_version = REPLACE(php_version, '7.0', '7.2');" | sqlite3 /var/lib/wo/dbase.db
|
||||
echo "UPDATE sites SET php_version = REPLACE(php_version, '7.0', '7.3');" | sqlite3 /var/lib/wo/dbase.db
|
||||
|
||||
###
|
||||
# ee-acme-sh by VirtuBox, https://virtubox.net/
|
||||
@@ -355,18 +361,19 @@ function secure_wo_db()
|
||||
function wo_update_wp_cli()
|
||||
{
|
||||
wo_lib_echo "Updating WP-CLI version to resolve compatibility issue."
|
||||
PHP_PATH=$(command -v php)
|
||||
WP_CLI_PATH=$(command -v wp)
|
||||
if [ -z "$WP_CLI_PATH" ]; then
|
||||
# Obtain the current WP-CLI version
|
||||
WP_CLI_VERSION=$($PHP_PATH $WP_CLI_PATH --allow-root cli version | awk '{ print $2 }')
|
||||
dpkg --compare-versions "$WP_CLI_VERSION" lt 1.4.1
|
||||
if [ -n "$WP_CLI_PATH" ]; then
|
||||
# Update WP-CLI to the most recent version
|
||||
if [ "$?" == "0" ]; then
|
||||
wget -qO "$WP_CLI_PATH" https://raw.githubusercontent.com/WordOps/wpcli-builds/gh-pages/phar/wp-cli.phar
|
||||
chmod +x "$WP_CLI_PATH"
|
||||
fi
|
||||
wget -qO "$WP_CLI_PATH" https://raw.githubusercontent.com/WordOps/wpcli-builds/gh-pages/phar/wp-cli.phar
|
||||
chmod +x "$WP_CLI_PATH"
|
||||
else
|
||||
wget -qO /usr/local/bin/wp https://raw.githubusercontent.com/WordOps/wpcli-builds/gh-pages/phar/wp-cli.phar
|
||||
chmod +x /usr/local/bin/wp
|
||||
fi
|
||||
|
||||
[ -d /etc/bash_completion ] && {
|
||||
wget -qO /etc/bash_completion.d/wp-completion.bash https://raw.githubusercontent.com/wp-cli/wp-cli/master/utils/wp-completion.bash
|
||||
}
|
||||
}
|
||||
|
||||
# Now, finally, let's install WordOps
|
||||
@@ -376,9 +383,9 @@ function wo_install()
|
||||
rm -rf /tmp/wordops &>> /dev/null
|
||||
|
||||
wo_lib_echo "Downloading WordOps straight from GitHub - fresh and brewed with love. Hold your horses..."
|
||||
if [ "$wo_branch" = "" ]; then
|
||||
[ -z "$wo_branch" ] && {
|
||||
wo_branch=master
|
||||
fi
|
||||
}
|
||||
|
||||
git clone -b "$wo_branch" https://github.com/WordOps/WordOps.git /tmp/wordops --quiet > /dev/null \
|
||||
|| wo_lib_error "An error was encountered during the download, exit status" $?
|
||||
@@ -621,7 +628,7 @@ function wo_update_latest()
|
||||
add-apt-repository -y 'ppa:ondrej/php'
|
||||
wo_lib_echo "Updating the PHP repository for some neat PHP 7.2 support"
|
||||
apt-get update &>> /dev/null
|
||||
apt-get -y install php7.2-fpm php7.2-curl php7.2-gd php7.2-imap php-sodium php7.2-common php7.2-readline php7.2-redis php7.2-mysql php7.2-cli php7.2-memcache php7.2-imagick php7.2-mbstring php7.2-recode php7.2-bcmath php7.2-opcache php7.2-zip php7.2-xml php7.2-soap php7.2-msgpack memcached graphviz php-pear php7.2-xdebug || wo_lib_error "Not all PHP packages could be installed. " 1
|
||||
apt-get -y install php7.2-fpm php7.2-curl php7.2-gd php7.2-imap php-memcached php7.2-common php7.2-readline php-redis php7.2-mysql php7.2-cli php-imagick php7.2-mbstring php7.2-recode php7.2-bcmath php7.2-opcache php7.2-zip php7.2-xml php7.2-soap php7.2-msgpack graphviz php-pear php7.2-xdebug || wo_lib_error "Not all PHP packages could be installed. " 1
|
||||
mkdir -p /var/log/php/7.2/
|
||||
touch /var/log/php/7.2/slow.log /var/log/php/7.2/fpm.log
|
||||
systemctl php7.2-fpm restart &>> /dev/null
|
||||
@@ -633,7 +640,7 @@ function wo_update_latest()
|
||||
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
|
||||
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list
|
||||
apt-get update &>> /dev/null
|
||||
apt-get -y install php7.2-fpm php7.2-curl php7.2-gd php7.2-imap php-sodium php7.2-common php7.2-readline php7.2-redis php7.2-mysql php7.2-cli php7.2-memcache php7.2-imagick php7.2-mbstring php7.2-recode php7.2-bcmath php7.2-opcache php7.2-zip php7.2-xml php7.2-soap php7.2-msgpack memcached graphviz php-pear php7.2-xdebug || wo_lib_error "Not all PHP packages could be installed." 1
|
||||
apt-get -y install php7.2-fpm php7.2-curl php7.2-gd php7.2-imap php-memcached php7.2-common php7.2-readline php-redis php7.2-mysql php7.2-cli php-imagick php7.2-mbstring php7.2-recode php7.2-bcmath php7.2-opcache php7.2-zip php7.2-xml php7.2-soap php7.2-msgpack graphviz php-pear php7.2-xdebug || wo_lib_error "Not all PHP packages could be installed." 1
|
||||
systemctl php7.2-fpm restart &>> /dev/null
|
||||
fi
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ class WOUpdateController(CementBaseController):
|
||||
@expose(hide=True)
|
||||
def default(self):
|
||||
filename = "woupdate" + time.strftime("%Y%m%d-%H%M%S")
|
||||
WODownload.download(self, [["https://wrdps.nl/woup",
|
||||
WODownload.download(self, [["https://raw.githubusercontent.com/WordOps/WordOps/master/install",
|
||||
"/tmp/{0}".format(filename),
|
||||
"update script"]])
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user