Last active
February 25, 2019 14:37
-
-
Save peter-mw/73aabe83d7942ce0bbca10d2d80c09db to your computer and use it in GitHub Desktop.
Revisions
-
peter-mw revised this gist
Jul 19, 2018 . No changes.There are no files selected for viewing
-
peter-mw revised this gist
Jul 19, 2018 . No changes.There are no files selected for viewing
-
peter-mw revised this gist
Jul 18, 2018 . 1 changed file with 0 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -57,10 +57,8 @@ downloadcms: unzip -qq /tmp/microweber-latest.zip -d /var/www/microweber wget -q https://members.microweber.com/_partners/csigma/userfiles.zip -O /tmp/userfiles.zip unzip -qq /tmp/userfiles.zip -d /var/www/microweber wget -q https://microweber.com/download.php?templates_key=T3fOU5Zfw11%3Ac%21 -O /tmp/userfiles.zip unzip -qq /tmp/userfiles.zip -d /var/www/microweber php /var/www/microweber/artisan cache:clear php /var/www/microweber/artisan microweber:install [email protected] admin password 127.0.0.1 microweber microweber $(</tmp/mysqlpass) -p site_ -t dream -d 1 -c 1 chown -R apache:apache /var/www/microweber @@ -78,7 +76,6 @@ setupfirewall: - &setup_firewall | firewall-offline-cmd --zone=public --add-port=80/tcp firewall-offline-cmd --zone=public --add-port=443/tcp service firewalld restart systemctl enable firewalld -
peter-mw revised this gist
Jul 18, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -78,7 +78,7 @@ setupfirewall: - &setup_firewall | firewall-offline-cmd --zone=public --add-port=80/tcp firewall-offline-cmd --zone=public --add-port=443/tcp # firewall-offline-cmd --zone=public --add-port=22/tcp service firewalld restart systemctl enable firewalld -
peter-mw revised this gist
Jul 11, 2018 . 1 changed file with 3 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -53,12 +53,12 @@ restartapache: downloadcms: - &download_cms | mkdir /var/www/microweber wget -q http://download.microweberapi.com/ready/core/microweber-latest.zip -O /tmp/microweber-latest.zip unzip -qq /tmp/microweber-latest.zip -d /var/www/microweber wget -q https://members.microweber.com/_partners/csigma/userfiles.zip -O /tmp/userfiles.zip unzip -qq /tmp/userfiles.zip -d /var/www/microweber wget -q https://microweber.com/download.php?templates_key=T3fOU5Zfw11%3Ac%21 -O /tmp/userfiles.zip unzip -qq /tmp/userfiles.zip -d /var/www/microweber php /var/www/microweber/artisan cache:clear @@ -69,7 +69,6 @@ downloadcms: makeauths: - &make_auths | echo 'sh /usr/bin/cschpw/global.sh' >> /etc/rc.d/rc.local chmod +x /etc/rc.d/rc.local service sshd restart -
peter-mw revised this gist
Jul 11, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -70,7 +70,7 @@ downloadcms: makeauths: - &make_auths | su -c /usr/bin/cschpw/global.sh echo 'sh /usr/bin/cschpw/global.sh' >> /etc/rc.d/rc.local chmod +x /etc/rc.d/rc.local service sshd restart -
peter-mw revised this gist
Jul 11, 2018 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -54,9 +54,9 @@ downloadcms: - &download_cms | mkdir /var/www/microweber wget http://download.microweberapi.com/ready/core/microweber-latest.zip -O /tmp/microweber-latest.zip unzip -qq /tmp/microweber-latest.zip -d /var/www/microweber wget https://members.microweber.com/_partners/csigma/userfiles.zip -O /tmp/userfiles.zip unzip -qq /tmp/userfiles.zip -d /var/www/microweber wget https://microweber.com/download.php?templates_key=T3fOU5Zfw11%3Ac%21 -O /tmp/userfiles.zip unzip -qq /tmp/userfiles.zip -d /var/www/microweber -
peter-mw revised this gist
Jul 11, 2018 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -59,7 +59,7 @@ downloadcms: unzip /tmp/userfiles.zip -d /var/www/microweber wget https://microweber.com/download.php?templates_key=T3fOU5Zfw11%3Ac%21 -O /tmp/userfiles.zip unzip -qq /tmp/userfiles.zip -d /var/www/microweber php /var/www/microweber/artisan cache:clear php /var/www/microweber/artisan microweber:install [email protected] admin password 127.0.0.1 microweber microweber $(</tmp/mysqlpass) -p site_ -t dream -d 1 -c 1 @@ -70,7 +70,8 @@ downloadcms: makeauths: - &make_auths | su -c /usr/bin/cschpw/global.sh echo '/usr/bin/cschpw/global.sh' >> /etc/rc.d/rc.local chmod +x /etc/rc.d/rc.local service sshd restart -
peter-mw revised this gist
Jul 11, 2018 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -78,7 +78,9 @@ setupfirewall: - &setup_firewall | firewall-offline-cmd --zone=public --add-port=80/tcp firewall-offline-cmd --zone=public --add-port=443/tcp firewall-offline-cmd --zone=public --add-port=22/tcp service firewalld restart systemctl enable firewalld runcmd: - [ sh, -c, *install_lamp ] -
peter-mw revised this gist
Jul 11, 2018 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,6 +8,7 @@ packages: - epel-release - httpd - mariadb - mariadb-server - unzip installlamp: @@ -40,10 +41,14 @@ configmysql: mysql -e "CREATE USER microweber@localhost IDENTIFIED BY '$(</tmp/mysqlpass)';" mysql -e "GRANT ALL PRIVILEGES ON microweber.* TO 'microweber'@'localhost';" mysql -e "FLUSH PRIVILEGES;" systemctl enable mariadb restartapache: - &restart_apache | service httpd restart systemctl enable httpd downloadcms: - &download_cms | -
peter-mw revised this gist
Jul 11, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -60,7 +60,7 @@ downloadcms: php /var/www/microweber/artisan microweber:install [email protected] admin password 127.0.0.1 microweber microweber $(</tmp/mysqlpass) -p site_ -t dream -d 1 -c 1 chown -R apache:apache /var/www/microweber chmod -R 755 /var/www/microweber chcon -R --type=httpd_sys_rw_content_t /var/www/microweber makeauths: - &make_auths | -
peter-mw renamed this gist
Jul 9, 2018 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
peter-mw created this gist
Jul 9, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,98 @@ #cloud-config package_update: true package_upgrade: false packages: - ca-certificates - epel-release - httpd - mariadb - unzip installlamp: - &install_lamp | rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm rpm -Uvh http://repo.mysql.com/mysql-community-release-el7-7.noarch.rpm yum --enablerepo=remi-php72 install php php-fpm php-mysql php-mcrypt php-mbstring php-json php-imap php-intl php-gd php-curl php-xml -y configapache: - &config_apache | cat > /etc/httpd/conf.d/microweber.conf <<EOF NameVirtualHost *:80 <VirtualHost *:80> UseCanonicalName off Options All DocumentRoot /var/www/microweber <Directory /var/www/microweber> AllowOverride All </Directory> ErrorLog /var/log/microweber-error.log LogLevel warn CustomLog /var/log/microweber-access.log combined </VirtualHost> EOF configmysql: - &config_mysql | echo $(openssl rand -base64 12) > /tmp/mysqlpass mysql -e "CREATE DATABASE microweber /*\!40100 DEFAULT CHARACTER SET utf8 */;" mysql -e "CREATE USER microweber@localhost IDENTIFIED BY '$(</tmp/mysqlpass)';" mysql -e "GRANT ALL PRIVILEGES ON microweber.* TO 'microweber'@'localhost';" mysql -e "FLUSH PRIVILEGES;" restartapache: - &restart_apache | service httpd restart downloadcms: - &download_cms | mkdir /var/www/microweber wget http://download.microweberapi.com/ready/core/microweber-latest.zip -O /tmp/microweber-latest.zip unzip /tmp/microweber-latest.zip -d /var/www/microweber wget https://members.microweber.com/_partners/csigma/userfiles.zip -O /tmp/userfiles.zip unzip /tmp/userfiles.zip -d /var/www/microweber wget https://microweber.com/download.php?templates_key=T3fOU5Zfw11%3Ac%21 -O /tmp/userfiles.zip unzip /tmp/userfiles.zip -d /var/www/microweber php /var/www/microweber/artisan cache:clear php /var/www/microweber/artisan microweber:install [email protected] admin password 127.0.0.1 microweber microweber $(</tmp/mysqlpass) -p site_ -t dream -d 1 -c 1 chown -R apache:apache /var/www/microweber chmod -R 755 /var/www/microweber chcon -Rv --type=httpd_sys_rw_content_t /var/www/microweber makeauths: - &make_auths | su -c /usr/bin/cschpw/global.sh echo 'su -c /usr/bin/cschpw/global.sh' >> /etc/rc.d/rc.local service sshd restart setupfirewall: - &setup_firewall | firewall-offline-cmd --zone=public --add-port=80/tcp firewall-offline-cmd --zone=public --add-port=443/tcp service firewalld restart runcmd: - [ sh, -c, *install_lamp ] - touch /tmp/done1 - [ sh, -c, *config_mysql ] - touch /tmp/done2 - [ sh, -c, *download_cms ] - touch /tmp/done3 - [ sh, -c, *config_apache ] - touch /tmp/done4 - [ sh, -c, *restart_apache ] - touch /tmp/done5 - [ sh, -c, *make_auths ] - touch /tmp/done6 - [ sh, -c, *setup_firewall ] # - [ sh, -c, /usr/bin/cschpw/global.sh ] - touch /tmp/done7 - touch /tmp/done8 # - echo 'su /usr/bin/cschpw/ssh_meta.sh' >> /etc/rc.d/rc.local # - echo 'su /usr/bin/cschpw/global.sh' >> /etc/rc.d/rc.local # - service sshd restart - touch /tmp/done9