Compare commits

...

6 Commits

Author SHA1 Message Date
Ray Elliott e6f4f9346a use correct spelling of litespeed 2020-06-08 23:23:01 +01:00
Ray Elliott 2b3282599c install litespeed with wordpress 2020-06-08 23:21:28 +01:00
Ray Elliott 9297ea6f82 install curl 2020-06-08 22:32:05 +01:00
Ray Elliott bff3859156 configure ssh 2020-06-08 21:42:47 +01:00
Ray Elliott 52a52a6ecb update config 2020-06-08 21:21:26 +01:00
Ray Elliott 9212357aee rename file 2020-06-08 21:19:12 +01:00
4 changed files with 71 additions and 9 deletions

View File

@ -5,16 +5,27 @@ export remote_url=''
export username='' export username=''
export webuser='' export webuser=''
export db_root_user=''
export db_root_pass='' export db_root_pass=''
export wp_db_name='' export wp_db_name=''
export wp_db_user='' export wp_db_user=''
export wp_db_pass=''
export wp_path=''
export wp_user=''
export wp_pass=''
# if version not set, latest is used export php_version=''
# set one of
export mariadb_version='' export mariadb_version=''
export mysql_version='' export mysql_version=''
export php_version=''
# set one of
export apache2_version='' export apache2_version=''
export nginx_version='' export nginx_version=''
export lightspeed_version='' export litespeed_version=''
#set if using litespeed
# https://openlitespeed.org/kb/1-click-install/
# password used to log into litespeed web interface)
export ls_webadmin_pass=''
export ls_lsphp_version=''

View File

@ -1,3 +0,0 @@
#!/bin/sh

View File

@ -1,7 +1,13 @@
#!/bin/sh #!/bin/sh
apt upgrade || exit 10 apt upgrade -y || exit 10
apt install -y tmux ufw || exit 15 apt install -y tmux ufw curl || exit 15
sed -i '/PubkeyAuthentication/c\PubkeyAuthentication yes' /etc/ssh/sshd_config
sed -i '/PasswordAuthentication/c\PasswordAuthentication no' /etc/ssh/sshd_config
sed -i '/PermitRootLogin/c\PermitRootLogin prohibit-password' /etc/ssh/sshd_config
systemctl restart sshd
ufw allow ssh || exit 20 ufw allow ssh || exit 20
yes | ufw enable yes | ufw enable

48
server-install-web.sh Executable file
View File

@ -0,0 +1,48 @@
#!/bin/sh
success="0"
if [ -n "$apache2_version" ] ; then
echo "TODO install apache"
exit 1
elif [ -n "$nginx_version" ] ; then
echo "TODO install nginx"
exit 1
elif [ -n "$lightspeed_version" ] ; then
if [ "$lightspeed_version" != 'latest' ] ; then
echo "TODO install specific litespeed version"
echo ""
echo "Specify \"Lightspeed_version='latest'\" to install current version."
exit 1
fi
if [ -n "$wp_user" ] ; then
wget --no-check-certificate https://raw.githubusercontent.com/litespeedtech/ols1clk/master/ols1clk.sh && bash ols1clk.sh \
--adminpassword "$ls_webadmin_pass" \
--lsphp "$ls_lsphp_version" \
--wordpressplus "$local_url" \
--wordpresspath "$wp_path" \
--dbrootpassword "$db_root_pass" \
--dbpassword "$wp_db_pass" \
--dbname "$wp_db_name" \
--dbuser "$wp_db_user" \
--wpuser "$wp_user" \
--wppassword "$wp_pass" \
&& success="1" \
&& ufw allow 7080
else
echo "TODO install lightspeed without WordPress"
exit 1
fi
else
echo "$0: Error - no webserver specified in configuration"
exit 5
fi
if [ "$success" -eq 1 ] ; then
ufw allow http \
&& ufw allow https
fi