Coder Social home page Coder Social logo

vestacp-admin-scripts's Introduction

VestaCP Admin Scripts

Developed by Bryan Karaffa

These scripts are meant to automate common workflows for administrators that use VestaCP.

Requirements

  • You must have Vesta CP installed and running on a server. Instructions for how to do this are available at the Vesta CP website [http://vestacp.com/#install]

  • Scripts are written in bash and must be run on Linux, OS X, or equivalent. You can run them on the remote server if you wanted, but they are designed to be run remotely from any machine.

  • You must have an account created in Vesta with SSH Access (the default admin account is okay)

  • SSH/rsync is used to upload files. You must have SSH Key based authentication configured to prevent being prompted for a password multiple times. I have provided setup-ssh-key-authentication.sh which will configure this automatically (only needs to be done once per account that you will be managing)

How to Use

Step 1: Use git to download/clone the repo

# Use git to clone the repo from github
$ git clone https://github.com/bryankaraffa/vestacp-admin-scripts.git

# Change directory into the scripts directory
$ cd vestacp-admin-scripts

Step 2: Setup SSH Key Authentication [Recommended]

If you haven't already done so, we configuring SSH Key based authentication with the remote server for secure authentication and to prevent being prompted for a password multiple times throughout the scripts.

You can run setup-ssh-key-authentication.sh which will copy your ssh key to the remote server's ~/.ssh/authorized_keys and grant SSH access without a password.

$ ./setup-ssh-key-authentication.sh
Your VestCP username, followed by [ENTER]:
admin
Your VestaCP hostname, followed by [ENTER]:
yourserver.com
[setup-ssh-key-authentication] SSH Key added to [email protected]:~/.ssh/authorized_keys successfully!

To verify SSH Key authentication was setup successfully, simply try to login to the server using SSH, and you should not be prompted for a password:

$ ssh [email protected]

Last login: Fri Feb 13 16:20:00 2015 from xxx.xxx.xxx.xxx
admin@yourserver:~$  # You've successfully logged into the server
When you have the scripts downloaded and SSH Key authentication setup, you are now ready to use the operational scripts!

Operational Scripts

create-wordpress-site.sh NEWDOMAIN [IPADDRESS]

This script will create a new Domain and DB in Vesta CP; download and extract the latest WordPress archive to the public_html directory. The final WordPress configuration is done via a web browser.

$ ./create-wordpress-site.sh wordpress.yourserver.com
Your VestaCP hostname, followed by [ENTER]:
yourserver.com
Your VestaCP username, followed by [ENTER]:
admin
Your VestaCP user password, followed by [ENTER]:
[create-wordpress-site] Creating domain via API call
[create-wordpress-site] Rebuilding the web configs via API call
[create-wordpress-site] Downloading WordPress latest.tar.gz
[create-wordpress-site] Unpacking wordpress latest.tar.gz
[create-wordpress-site] Uploading wordpress files to ~/web/wordpress.yourserver.com/public_html
[create-wordpress-site] Removing ~/web/wordpress.yourserver.com/public_html/index.html
[create-wordpress-site] Creating Database via API call
[create-wordpress-site] ********************************************
[create-wordpress-site] MySQL DB Credentials
[create-wordpress-site] Database: admin_wp_wordpressyourservercom
[create-wordpress-site] Username: admin_wp_wordpre
[create-wordpress-site] Password: UuqD+Iji6ZHzN3wZqmV/ww==
[create-wordpress-site] ********************************************
[create-wordpress-site] Completed!
[create-wordpress-site] You can now visit the website to finish the installation.

Task List (TODOs)

  • Modularize create-wordpress-site.sh so that it can be used to deploy other PHP scripts other than WordPress

** Scripts to implement ** - [ ] Simple Machines Forum (SMF) - [ ] phpBB - [ ] bbPress - [ ] phpMyFAQ - [ ] DokuWiki - [ ] MediaWiki - [ ] Tiki Wiki - [ ] Geeklog - [ ] Joomla - [ ] Drupal - [ ] SugarCRM - [ ] Feng - [ ] Magento - [ ] Moodle - [ ] LimeSurvey - [ ] osTicket - [ ] Gallery - [ ] Coppermine - [ ] Zenphoto - [ ] Piwigo - [ ] Mantis - [ ] PHPProjekt - [ ] Gregarius - [ ] SimplePie - [ ] Roundcube - [ ] liveSite - [ ] BasicPages - [ ] concrete5

vestacp-admin-scripts's People

Contributors

bryankaraffa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.