Skip to content

Instantly share code, notes, and snippets.

@GitHub30
Last active March 18, 2023 16:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GitHub30/18962a05d950890de1886db0f9d12f31 to your computer and use it in GitHub Desktop.
Save GitHub30/18962a05d950890de1886db0f9d12f31 to your computer and use it in GitHub Desktop.
sudo dnf install -y net-tools libnsl nano wget \
&& curl -LO https://sourceforge.net/projects/xampp/files/XAMPP%20Linux/8.2.0/xampp-linux-x64-8.2.0-0-installer.run \
&& chmod +x xampp-linux-x64-8.2.0-0-installer.run \
&& sudo ./xampp-linux-x64-8.2.0-0-installer.run --mode unattended \
&& echo 'PATH="/opt/lampp/bin:$PATH"' >> ~/.bashrc \
&& source ~/.bashrc \
&& sudo /opt/lampp/lampp start
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === '55ce33d7678c5a611085589f1f3ddf8b3c52d662cd01d4ba75c0ee0459970c2200a51f492d557530c71c15d8dba01eae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
sudo mv composer.phar /usr/local/bin/composer
composer create-project laravel/laravel example-app
cd example-app
composer require amphp/amp
php artisan make:command test
php artisan command:name
@GitHub30
Copy link
Author

$ sudo certbot --apache --register-unsafely-without-email --agree-tos
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Account registered.
No names were found in your configuration files. Please enter in your domain
name(s) (comma and/or space separated)  (Enter 'c' to cancel): a.89o.de
Requesting a certificate for a.89o.de
Performing the following challenges:
http-01 challenge for a.89o.de
Enabled Apache rewrite module
Waiting for verification...
Cleaning up challenges
Created an SSL vhost at /etc/apache2/sites-available/000-default-le-ssl.conf
Enabled Apache socache_shmcb module
Enabled Apache ssl module
Deploying Certificate to VirtualHost /etc/apache2/sites-available/000-default-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/000-default-le-ssl.conf
Enabled Apache rewrite module
Redirecting vhost in /etc/apache2/sites-enabled/000-default.conf to ssl vhost in /etc/apache2/sites-available/000-default-le-ssl.conf

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://a.89o.de
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/a.89o.de/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/a.89o.de/privkey.pem
   Your certificate will expire on 2023-06-16. To obtain a new or
   tweaked version of this certificate in the future, simply run
   certbot again with the "certonly" option. To non-interactively
   renew *all* of your certificates, run "certbot renew"
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le

@GitHub30
Copy link
Author

GitHub30 commented Mar 18, 2023

domain=d.89o.de
curl -sLO https://sourceforge.net/projects/xampp/files/XAMPP%20Linux/8.2.0/xampp-linux-x64-8.2.0-0-installer.run \
  && chmod 755 xampp-linux-*-installer.run \
  && time sudo ./xampp-linux-*-installer.run --mode unattended
sudo sed -i 's/local/all granted/' /opt/lampp/etc/extra/httpd-xampp.conf
sudo apt update && sudo apt -y install certbot python3-certbot-apache
sudo certbot certonly --standalone --register-unsafely-without-email --agree-tos --non-interactive -d $domain
sudo cp /etc/letsencrypt/live/$domain/fullchain.pem /opt/lampp/etc/ssl.crt/server.crt
sudo cp /etc/letsencrypt/live/$domain/privkey.pem /opt/lampp/etc/ssl.key/server.key
sudo /opt/lampp/lampp restart

@GitHub30
Copy link
Author

sudo certbot certonly --apache --apache-server-root /opt/lampp/etc/ --apache-bin /opt/lampp/bin/httpd --apache-ctl /opt/lampp/bin/apachectl --register-unsafely-without-email --agree-tos --non-interactive -d $domain --apache-vhost-root /opt/lampp/etc/extra

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment