Skip to content

Latest commit

 

History

History
167 lines (105 loc) · 6.86 KB

README.md

File metadata and controls

167 lines (105 loc) · 6.86 KB

🚀 Suretide Setup Part 1

This script, setup-part-1.sh, is designed to help you easily upload a file to a remote server using either a .pem or .ppk keypair. The script will automatically set the destination path to /home/username/ on the remote server.

📋 Prerequisites

  • A remote server with SSH access
  • A .pem or .ppk keypair for the remote server
  • A file you want to upload to the remote server
  • A macOS or Linux system to run the script

🛠️ Usage

  1. Download the script from the GitHub repository and save it as setup-part-1.sh:
curl -sSL https://raw.githubusercontent.com/cookii-king/suretide/main/setup-part-1.sh -o setup-part-1.sh
  1. Make the script executable:
chmod +x setup-part-1.sh
  1. Run the script:
./setup-part-1.sh
  1. Follow the prompts to enter the remote server's username@ip, the path to your keypair, the path of the file you want to upload, and the destination path on the remote server.

  2. The script will test the connection to the remote server and upload the file to the specified destination path.

  3. If the file upload is successful, the script will establish an SSH connection to the remote server.

You can run this one line:

curl -sSL https://raw.githubusercontent.com/cookii-king/suretide/main/setup-part-1.sh -o setup-part-1.sh && chmod +x setup-part-1.sh && bash setup-part-1.sh

❗ Troubleshooting

  • Ensure you have the correct keypair file and its path.
  • Verify that the remote server's IP address and username are correct.
  • Make sure your local system has rsync, ssh, and curl installed. On macOS, you can install these tools using Homebrew. On Linux, use your package manager (e.g., apt, yum, or pacman).

📝 Additional Notes

  • This script assumes that the remote server's SSH service is running on the default port (22). If the remote server uses a different port, you will need to modify the script to include the -p flag followed by the port number in the ssh and rsync commands.
  • If you are using a .ppk keypair, the script assumes that you have ssh-pageant installed and configured on your system.

🚀 Suretide Setup Part 2

This script, setup-part-2.sh, is designed to help you easily set up a WordPress website on a remote server. The script will install necessary packages, configure the database, and set up the WordPress files.

📋 Prerequisites

  • A remote server with SSH access
  • A .pem or .ppk keypair for the remote server
  • A macOS or Linux system to run the script
  • Completion of Suretide Setup Part 1

🛠️ Usage

  1. Ensure you have completed Suretide Setup Part 1 and have an active SSH connection to the remote server.

  2. Download the script from the GitHub repository and save it as setup-part-2.sh:

curl -sSL https://raw.githubusercontent.com/cookii-king/suretide/main/setup-part-2.sh -o setup-part-2.sh
  1. Make the script executable:
chmod +x setup-part-2.sh
  1. Run the script:
./setup-part-2.sh
  1. Follow the prompts to enter the database name, database user, database password, and backup server username.

  2. The script will install necessary packages, configure the database, and set up the WordPress files.

  3. Once the script is complete, you can access your WordPress website by visiting http://<your_server_ip>.

You can run this one line:

curl -sSL https://raw.githubusercontent.com/cookii-king/suretide/main/setup-part-2.sh -o setup-part-2.sh && sudo chmod +x setup-part-2.sh && sudo bash setup-part-2.sh

❗ Troubleshooting

  • Ensure you have the correct keypair file and its path.
  • Verify that the remote server's IP address and username are correct.
  • Make sure your local system has rsync, ssh, and curl installed. On macOS, you can install these tools using Homebrew. On Linux, use your package manager (e.g., apt, yum, or pacman).

📝 Additional Notes

  • This script assumes that the remote server's SSH service is running on the default port (22). If the remote server uses a different port, you will need to modify the script to include the -p flag followed by the port number in the ssh and rsync commands.
  • If you are using a .ppk keypair, the script assumes that you have ssh-pageant installed and configured on your system.

🚀 Suretide Setup Part 3

This script, setup-part-3.sh, is designed to help you easily backup your WordPress website, including the database, WordPress files, and Nginx configuration files. The script will also update the home and site URLs in the database and set up a cron job for regular backups.

📋 Prerequisites

🛠️ Usage

  1. Ensure you have completed Suretide Setup Part 1 and Suretide Setup Part 2 and have an active SSH connection to the remote server.

  2. Download the script from the GitHub repository and save it as setup-part-3.sh:

curl -sSL https://raw.githubusercontent.com/cookii-king/suretide/main/setup-part-3.sh -o setup-part-3.sh
  1. Make the script executable:
chmod +x setup-part-3.sh
  1. Run the script:
./setup-part-3.sh
  1. Follow the prompts to enter the database name, database user, database password, and backup server username.

  2. The script will backup the database, WordPress files, and Nginx configuration files, update the home and site URLs in the database, and set up a cron job for regular backups.

You can run this one line:

curl -sSL https://raw.githubusercontent.com/cookii-king/suretide/main/setup-part-3.sh -o setup-part-3.sh && chmod +x setup-part-3.sh && bash setup-part-3.sh

❗ Troubleshooting

  • Ensure you have the correct keypair file and its path.
  • Verify that the remote server's IP address and username are correct.
  • Make sure your local system has rsync, ssh, and curl installed. On macOS, you can install these tools using Homebrew. On Linux, use your package manager (e.g., apt, yum, or pacman).

📝 Additional Notes

  • This script assumes that the remote server's SSH service is running on the default port (22). If the remote server uses a different port, you will need to modify the script to include the -p flag followed by the port number in the ssh and rsync commands.
  • If you are using a .ppk keypair, the script assumes that you have ssh-pageant installed and configured on your system.

⚠️ Last Resort

Please note that Part 2 runs Part 3 automatically. You can use Part 3 as a last resort if you encounter any issues with the automatic backup process during the execution of Part 2.