Remains van Vesta script verwijdert en WP-install gefixt
This commit is contained in:
@@ -482,18 +482,6 @@ ln -s /etc/nginx/sites-available/$domain /etc/nginx/sites-enabled/
|
|||||||
sed -i 's/#cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g' /etc/php/7.2/fpm/php.ini
|
sed -i 's/#cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g' /etc/php/7.2/fpm/php.ini
|
||||||
systemctl reload nginx
|
systemctl reload nginx
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#-------------------#
|
|
||||||
# PHPMYADMIN #
|
|
||||||
#-------------------#
|
|
||||||
ln -s /usr/share/phpmyadmin /home/admin/web/"$domain"/public_html
|
|
||||||
cd /home/admin/web/"$domain"/public_html
|
|
||||||
ls -l
|
|
||||||
mv phpmyadmin database
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#--------------------#
|
#--------------------#
|
||||||
@@ -586,47 +574,25 @@ fi
|
|||||||
#-------------------#
|
#-------------------#
|
||||||
# Wordpress Install #
|
# Wordpress Install #
|
||||||
#-------------------#
|
#-------------------#
|
||||||
#
|
|
||||||
# if [ $wordpress = 1 ]
|
if [ $wordpress = 1 ]
|
||||||
# then
|
then
|
||||||
# echo "install wordpress"
|
echo "install wordpress"
|
||||||
# db_name="wp_1"
|
#-------------------#
|
||||||
# db_user="wp_1"
|
# MYSQL CONFIG #
|
||||||
# db_pass=$(date +%s|sha256sum|base64|head -c 32)
|
|
||||||
# mysql -u root -p"$passwd" -e "CREATE DATABASE "$db_name" DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;"
|
|
||||||
mysql -u root -p"$passwd" -e "GRANT ALL ON "$db_name".* TO '"$db_user"'@'localhost' IDENTIFIED BY '"$db_pass"';"
|
|
||||||
mysql -u root -p"$passwd" -e "FLUSH PRIVILEGES;"
|
|
||||||
cd /tmp
|
|
||||||
curl -LO https://wordpress.org/latest.tar.gz
|
|
||||||
tar xzvf latest.tar.gz
|
|
||||||
cp /tmp/wordpress/wp-config-sample.php /tmp/wordpress/wp-config.php
|
|
||||||
path="$domain"
|
|
||||||
cp -a /tmp/wordpress/. /var/www/"$path"/html
|
|
||||||
chown -R www-data:www-data /var/www/"$path"/html
|
|
||||||
WPSalts=$(wget https://api.wordpress.org/secret-key/1.1/salt/ -q -O -)
|
|
||||||
cat <<EOF > /var/www/"$domain"/html/wp-config.php
|
|
||||||
<?php
|
|
||||||
define('DB_NAME', '$db_name');
|
|
||||||
define('DB_USER', '$db_user');
|
|
||||||
define('DB_PASSWORD', '$db_pass');
|
|
||||||
define('DB_HOST', 'localhost');
|
|
||||||
define('DB_CHARSET', 'utf8');
|
|
||||||
define('DB_COLLATE', '');#-------------------#
|
|
||||||
# WP - INSTALL #
|
|
||||||
#-------------------#
|
#-------------------#
|
||||||
db_name="wp_1"
|
|
||||||
db_user="wp_1"
|
|
||||||
db_pass=$(date +%s|sha256sum|base64|head -c 32)
|
|
||||||
mysql -u root -p"$passwd" -e "CREATE DATABASE "$db_name" DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;"
|
mysql -u root -p"$passwd" -e "CREATE DATABASE "$db_name" DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;"
|
||||||
mysql -u root -p"$passwd" -e "GRANT ALL ON "$db_name".* TO '"$db_user"'@'localhost' IDENTIFIED BY '"$db_pass"';"
|
mysql -u root -p"$passwd" -e "GRANT ALL ON "$db_name".* TO '"$db_user"'@'localhost' IDENTIFIED BY '"$db_pass"';"
|
||||||
mysql -u root -p"$passwd" -e "FLUSH PRIVILEGES;"
|
mysql -u root -p"$passwd" -e "FLUSH PRIVILEGES;"
|
||||||
|
#-------------------#
|
||||||
|
# WP - INSTALL #
|
||||||
|
#-------------------#
|
||||||
cd /tmp
|
cd /tmp
|
||||||
curl -LO https://wordpress.org/latest.tar.gz
|
curl -LO https://wordpress.org/latest.tar.gz
|
||||||
tar xzvf latest.tar.gz
|
tar xzvf latest.tar.gz
|
||||||
cp /tmp/wordpress/wp-config-sample.php /tmp/wordpress/wp-config.php
|
cp /tmp/wordpress/wp-config-sample.php /tmp/wordpress/wp-config.php
|
||||||
path="$domain"
|
cp -a /tmp/wordpress/. /var/www/"$domain"/html
|
||||||
cp -a /tmp/wordpress/. /var/www/"$path"/html
|
chown -R www-data:www-data /var/www/"$domain"/html
|
||||||
chown -R www-data:www-data /var/www/"$path"/html
|
|
||||||
WPSalts=$(wget https://api.wordpress.org/secret-key/1.1/salt/ -q -O -)
|
WPSalts=$(wget https://api.wordpress.org/secret-key/1.1/salt/ -q -O -)
|
||||||
cat <<EOF > /var/www/"$domain"/html/wp-config.php
|
cat <<EOF > /var/www/"$domain"/html/wp-config.php
|
||||||
<?php
|
<?php
|
||||||
@@ -643,9 +609,6 @@ define('DB_COLLATE', '');
|
|||||||
#define('WP_CRON_LOCK_TIMEOUT', 900);
|
#define('WP_CRON_LOCK_TIMEOUT', 900);
|
||||||
#define('AUTOSAVE_INTERVAL', 300);
|
#define('AUTOSAVE_INTERVAL', 300);
|
||||||
define( 'WP_MEMORY_LIMIT', '256M' );
|
define( 'WP_MEMORY_LIMIT', '256M' );
|
||||||
define( 'DISALLOW_FILE_EDIT', true );
|
|
||||||
#define( 'EMPTY_TRASH_DAYS', 7 );
|
|
||||||
define( 'NOBLOGREDIRECT', 'https://$domain' );
|
|
||||||
#define( 'FS_CHMOD_DIR', ( 0755 & ~ umask() ) );
|
#define( 'FS_CHMOD_DIR', ( 0755 & ~ umask() ) );
|
||||||
#define( 'FS_CHMOD_FILE', ( 0644 & ~ umask() ) );
|
#define( 'FS_CHMOD_FILE', ( 0644 & ~ umask() ) );
|
||||||
#define( 'WP_ALLOW_REPAIR', true );
|
#define( 'WP_ALLOW_REPAIR', true );
|
||||||
@@ -669,41 +632,19 @@ if ( !defined('ABSPATH') )
|
|||||||
#define('WP_REDIS_PORT', '6379');
|
#define('WP_REDIS_PORT', '6379');
|
||||||
require_once(ABSPATH . 'wp-settings.php');
|
require_once(ABSPATH . 'wp-settings.php');
|
||||||
EOF
|
EOF
|
||||||
#define( 'WP_SITEURL', '' );
|
#-------------------#
|
||||||
#define( 'WP_HOME', '' );
|
# OPCACHE GUI #
|
||||||
#define( 'ALTERNATE_WP_CRON', true );
|
#-------------------#
|
||||||
#define('DISABLE_WP_CRON', 'true');
|
cd /tmp
|
||||||
#define('WP_CRON_LOCK_TIMEOUT', 900);
|
curl -LO https://raw.githubusercontent.com/amnuts/opcache-gui/master/index.php
|
||||||
#define('AUTOSAVE_INTERVAL', 300);
|
cp /tmp/index.php /tmp/opcache.php
|
||||||
define( 'WP_MEMORY_LIMIT', '256M' );
|
cp -a /tmp/opcache.php /var/www/"$domain"/html
|
||||||
define( 'DISALLOW_FILE_EDIT', true );
|
cat > /var/www/"$domain"/html/info.php <<- "EOF"
|
||||||
#define( 'EMPTY_TRASH_DAYS', 7 );
|
<?php
|
||||||
define( 'NOBLOGREDIRECT', 'https://$domain' );
|
phpinfo();
|
||||||
#define( 'FS_CHMOD_DIR', ( 0755 & ~ umask() ) );
|
?>
|
||||||
#define( 'FS_CHMOD_FILE', ( 0644 & ~ umask() ) );
|
|
||||||
#define( 'WP_ALLOW_REPAIR', true );
|
|
||||||
#define( 'FORCE_SSL_ADMIN', true );
|
|
||||||
#define( 'AUTOMATIC_UPDATER_DISABLED', true );
|
|
||||||
#define( 'WP_AUTO_UPDATE_CORE', false );
|
|
||||||
$WPSalts
|
|
||||||
\$table_prefix = '$db_name';
|
|
||||||
|
|
||||||
define('WP_DEBUG', false);
|
|
||||||
if ( !defined('ABSPATH') )
|
|
||||||
define('ABSPATH', dirname(__FILE__) . '/');
|
|
||||||
|
|
||||||
#\$memcached_servers = array(
|
|
||||||
# 'default' => array(
|
|
||||||
# '127.0.0.1:11211'
|
|
||||||
# )
|
|
||||||
#);
|
|
||||||
#define('WP_REDIS_HOST', '127.0.0.1');
|
|
||||||
#define('WP_REDIS_PASSWORD', '$passwd');
|
|
||||||
#define('WP_REDIS_PORT', '6379');
|
|
||||||
require_once(ABSPATH . 'wp-settings.php');
|
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
#----------------------#
|
#----------------------#
|
||||||
# Generic end commands #
|
# Generic end commands #
|
||||||
|
|||||||
Reference in New Issue
Block a user