{"id":44,"date":"2016-07-17T04:51:18","date_gmt":"2016-07-17T04:51:18","guid":{"rendered":"http:\/\/wizardofbots.com\/network\/?p=44"},"modified":"2016-07-17T05:02:50","modified_gmt":"2016-07-17T05:02:50","slug":"how-to-create-linux-bash-scripts-to-automate-installing-dependencies-and-more","status":"publish","type":"post","link":"http:\/\/wizardofbots.com\/network\/how-to-create-linux-bash-scripts-to-automate-installing-dependencies-and-more\/","title":{"rendered":"How to create linux bash scripts to automate installing dependencies and more"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-medium wp-image-48\" src=\"http:\/\/wizardofbots.com\/network\/wp-content\/uploads\/2016\/07\/installwizard-243x300.jpg\" alt=\"installwizard\" width=\"243\" height=\"300\" srcset=\"http:\/\/wizardofbots.com\/network\/wp-content\/uploads\/2016\/07\/installwizard-243x300.jpg 243w, http:\/\/wizardofbots.com\/network\/wp-content\/uploads\/2016\/07\/installwizard.jpg 460w\" sizes=\"(max-width: 243px) 100vw, 243px\" \/>Sometimes you just want to make your life easier on deploying a server in seconds with all the dependencies you need to run many languages or maybe a LAMP config easily.<\/p>\n<p>I made this whole compilation guys, but right now I dont feel like finishing it. So I decided to add a github repo so you can just clone and run it very quick. But I will be updating this post frequently. Just make sure to comment in order to report a bug or something that needs to be modified, also there\u00a0https:\/\/github.com\/wizardofbots\/wizardinstall<\/p>\n<p>So I decided to call it <strong>wizardinstall<\/strong> \ud83d\ude09 we will be adding the repos you need in order to have everything ready to start on a $5 cents digitalocean server to have a linux shell on your smartphone doing a realtime connection and executing your scripts!<\/p>\n<p>So check out the code, you will learn how to use it, and understand the logics, will add comments on each line if necessary so you guys understand:<\/p>\n<pre class=\"lang:sh decode:true\" title=\"wizardinstall\">#!\/bin\/bash\r\n# ******************************************\r\n# Program: Dev mode install\r\n# Developer: Wizard of Bots\r\n# Site: http:\/\/wizardofbots.com\/network\r\n# Github: https:\/\/github.com\/wizardofbots\/wizardinstall\r\n# Date: 16-07-2016\r\n# ******************************************\r\n# this line below is checking if the lsb_release -is comment response is \r\n# equal to Ubuntu and also Debian, because we can use apt-get instead of yum.\r\nif [ \"`lsb_release -is`\" == \"Ubuntu\" ] || [ \"`lsb_release -is`\" == \"Debian\" ] \r\nthen\r\n    # save time and install essential and then all libraries\r\n    sudo apt-get install -y build-essential;\r\n    # install git\r\n    sudo apt-get install git; # git is really useful, in fact clone this from: https:\/\/github.com\/wizardofbots\/wizardinstall\r\n    # install python\r\n    sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev;\r\n    sudo apt-get python2.7;\r\n    sudo apt-get install python-software-properties;\r\n    # install php\r\n    sudo apt-get install apache2;\r\n    sudo apt-get install curl;\r\n    sudo apt-get install mysql-server;\r\n    sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql;\r\n    sudo systemctl restart apache2;\r\n    sudo systemctl status apache2;\r\n    sudo apt-get install php-cli;\r\n    # install package manager for PHP: Composer\r\n    sudo apt-get update;\r\n    # install perl\r\n    sudo apt-get install perl;\r\n    # install ruby\r\n    sudo apt-add-repository ppa:brightbox\/ruby-ng\r\n    sudo apt-get update\r\n    sudo apt-get install ruby1.9.3\r\n    # installing nodejs\r\n    sudo apt-get update;\r\n    curl -sL https:\/\/deb.nodesource.com\/setup_6.x | sudo -E bash -;\r\n    sudo apt-get install -y nodejs;\r\n    sudo chmod 777 -R \/var\/www\/;\r\n    sudo printf \"&lt;?php\\nphpinfo();\\n?&gt;\" &gt; \/var\/www\/html\/info.php;\r\n    sudo service apache2 restart;\r\n# then this logic identifies if the release is CentOS or RedHat so we can use yum\r\nelif [ \"`lsb_release -is`\" == \"CentOS\" ] || [ \"`lsb_release -is`\" == \"RedHat\" ]\r\nthen\r\n    # this lines are not working properly right now. So wait for the update\r\n    sudo yum -y install httpd mysql-server mysql-devel php php-mysql php-fpm;\r\n    sudo yum -y install epel-release phpmyadmin rpm-build redhat-rpm-config;\r\n    sudo yum -y install mysql-community-release-el7-5.noarch.rpm proj;\r\n    sudo yum -y install tinyxml libzip mysql-workbench-community;\r\n    sudo chmod 777 -R \/var\/www\/;\r\n    sudo printf \"&lt;?php\\nphpinfo();\\n?&gt;\" &gt; \/var\/www\/html\/info.php;\r\n    sudo service mysqld restart;\r\n    sudo service httpd restart;\r\n    sudo chkconfig httpd on;\r\n    sudo chkconfig mysqld on;\r\n\r\n# we will add pacman for Arch Linux soon\r\nelse\r\n    echo \"Unsupported Operating System\";\r\nfi<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes you just want to make your life easier on deploying a server in seconds with all the dependencies you need to run many languages or maybe a LAMP config easily. I made this whole compilation guys, but right now I dont feel like finishing it. So I decided to add a github repo so [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[29,15],"tags":[16,30,31,8,32],"class_list":["post-44","post","type-post","status-publish","format-standard","hentry","category-bash","category-linux","tag-bash","tag-installer","tag-script","tag-ssh","tag-wizardinstall"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to create linux bash scripts to automate installing dependencies and more - Wizard Of Bots<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/wizardofbots.com\/network\/how-to-create-linux-bash-scripts-to-automate-installing-dependencies-and-more\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to create linux bash scripts to automate installing dependencies and more - Wizard Of Bots\" \/>\n<meta property=\"og:description\" content=\"Sometimes you just want to make your life easier on deploying a server in seconds with all the dependencies you need to run many languages or maybe a LAMP config easily. I made this whole compilation guys, but right now I dont feel like finishing it. So I decided to add a github repo so [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"http:\/\/wizardofbots.com\/network\/how-to-create-linux-bash-scripts-to-automate-installing-dependencies-and-more\/\" \/>\n<meta property=\"og:site_name\" content=\"Wizard Of Bots\" \/>\n<meta property=\"article:published_time\" content=\"2016-07-17T04:51:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2016-07-17T05:02:50+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/wizardofbots.com\/network\/wp-content\/uploads\/2016\/07\/installwizard-243x300.jpg\" \/>\n<meta name=\"author\" content=\"wizardofbots\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"wizardofbots\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"http:\/\/wizardofbots.com\/network\/how-to-create-linux-bash-scripts-to-automate-installing-dependencies-and-more\/\",\"url\":\"http:\/\/wizardofbots.com\/network\/how-to-create-linux-bash-scripts-to-automate-installing-dependencies-and-more\/\",\"name\":\"How to create linux bash scripts to automate installing dependencies and more - Wizard Of Bots\",\"isPartOf\":{\"@id\":\"https:\/\/wizardofbots.com\/network\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\/\/wizardofbots.com\/network\/how-to-create-linux-bash-scripts-to-automate-installing-dependencies-and-more\/#primaryimage\"},\"image\":{\"@id\":\"http:\/\/wizardofbots.com\/network\/how-to-create-linux-bash-scripts-to-automate-installing-dependencies-and-more\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/wizardofbots.com\/network\/wp-content\/uploads\/2016\/07\/installwizard-243x300.jpg\",\"datePublished\":\"2016-07-17T04:51:18+00:00\",\"dateModified\":\"2016-07-17T05:02:50+00:00\",\"author\":{\"@id\":\"https:\/\/wizardofbots.com\/network\/#\/schema\/person\/31f9e486da1c11791d94a861854a2a9f\"},\"breadcrumb\":{\"@id\":\"http:\/\/wizardofbots.com\/network\/how-to-create-linux-bash-scripts-to-automate-installing-dependencies-and-more\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/wizardofbots.com\/network\/how-to-create-linux-bash-scripts-to-automate-installing-dependencies-and-more\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/wizardofbots.com\/network\/how-to-create-linux-bash-scripts-to-automate-installing-dependencies-and-more\/#primaryimage\",\"url\":\"http:\/\/wizardofbots.com\/network\/wp-content\/uploads\/2016\/07\/installwizard.jpg\",\"contentUrl\":\"http:\/\/wizardofbots.com\/network\/wp-content\/uploads\/2016\/07\/installwizard.jpg\",\"width\":460,\"height\":568},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/wizardofbots.com\/network\/how-to-create-linux-bash-scripts-to-automate-installing-dependencies-and-more\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/wizardofbots.com\/network\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to create linux bash scripts to automate installing dependencies and more\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/wizardofbots.com\/network\/#website\",\"url\":\"https:\/\/wizardofbots.com\/network\/\",\"name\":\"Wizard Of Bots\",\"description\":\"Botting and AI community\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/wizardofbots.com\/network\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/wizardofbots.com\/network\/#\/schema\/person\/31f9e486da1c11791d94a861854a2a9f\",\"name\":\"wizardofbots\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/wizardofbots.com\/network\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/2.gravatar.com\/avatar\/584eebc303f64610559ab9f305f6928d?s=96&d=mm&r=g\",\"contentUrl\":\"http:\/\/2.gravatar.com\/avatar\/584eebc303f64610559ab9f305f6928d?s=96&d=mm&r=g\",\"caption\":\"wizardofbots\"},\"url\":\"http:\/\/wizardofbots.com\/network\/author\/wizardofbots\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to create linux bash scripts to automate installing dependencies and more - Wizard Of Bots","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/wizardofbots.com\/network\/how-to-create-linux-bash-scripts-to-automate-installing-dependencies-and-more\/","og_locale":"en_US","og_type":"article","og_title":"How to create linux bash scripts to automate installing dependencies and more - Wizard Of Bots","og_description":"Sometimes you just want to make your life easier on deploying a server in seconds with all the dependencies you need to run many languages or maybe a LAMP config easily. I made this whole compilation guys, but right now I dont feel like finishing it. So I decided to add a github repo so [&hellip;]","og_url":"http:\/\/wizardofbots.com\/network\/how-to-create-linux-bash-scripts-to-automate-installing-dependencies-and-more\/","og_site_name":"Wizard Of Bots","article_published_time":"2016-07-17T04:51:18+00:00","article_modified_time":"2016-07-17T05:02:50+00:00","og_image":[{"url":"http:\/\/wizardofbots.com\/network\/wp-content\/uploads\/2016\/07\/installwizard-243x300.jpg"}],"author":"wizardofbots","twitter_card":"summary_large_image","twitter_misc":{"Written by":"wizardofbots","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"http:\/\/wizardofbots.com\/network\/how-to-create-linux-bash-scripts-to-automate-installing-dependencies-and-more\/","url":"http:\/\/wizardofbots.com\/network\/how-to-create-linux-bash-scripts-to-automate-installing-dependencies-and-more\/","name":"How to create linux bash scripts to automate installing dependencies and more - Wizard Of Bots","isPartOf":{"@id":"https:\/\/wizardofbots.com\/network\/#website"},"primaryImageOfPage":{"@id":"http:\/\/wizardofbots.com\/network\/how-to-create-linux-bash-scripts-to-automate-installing-dependencies-and-more\/#primaryimage"},"image":{"@id":"http:\/\/wizardofbots.com\/network\/how-to-create-linux-bash-scripts-to-automate-installing-dependencies-and-more\/#primaryimage"},"thumbnailUrl":"http:\/\/wizardofbots.com\/network\/wp-content\/uploads\/2016\/07\/installwizard-243x300.jpg","datePublished":"2016-07-17T04:51:18+00:00","dateModified":"2016-07-17T05:02:50+00:00","author":{"@id":"https:\/\/wizardofbots.com\/network\/#\/schema\/person\/31f9e486da1c11791d94a861854a2a9f"},"breadcrumb":{"@id":"http:\/\/wizardofbots.com\/network\/how-to-create-linux-bash-scripts-to-automate-installing-dependencies-and-more\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/wizardofbots.com\/network\/how-to-create-linux-bash-scripts-to-automate-installing-dependencies-and-more\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/wizardofbots.com\/network\/how-to-create-linux-bash-scripts-to-automate-installing-dependencies-and-more\/#primaryimage","url":"http:\/\/wizardofbots.com\/network\/wp-content\/uploads\/2016\/07\/installwizard.jpg","contentUrl":"http:\/\/wizardofbots.com\/network\/wp-content\/uploads\/2016\/07\/installwizard.jpg","width":460,"height":568},{"@type":"BreadcrumbList","@id":"http:\/\/wizardofbots.com\/network\/how-to-create-linux-bash-scripts-to-automate-installing-dependencies-and-more\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wizardofbots.com\/network\/"},{"@type":"ListItem","position":2,"name":"How to create linux bash scripts to automate installing dependencies and more"}]},{"@type":"WebSite","@id":"https:\/\/wizardofbots.com\/network\/#website","url":"https:\/\/wizardofbots.com\/network\/","name":"Wizard Of Bots","description":"Botting and AI community","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wizardofbots.com\/network\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/wizardofbots.com\/network\/#\/schema\/person\/31f9e486da1c11791d94a861854a2a9f","name":"wizardofbots","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wizardofbots.com\/network\/#\/schema\/person\/image\/","url":"http:\/\/2.gravatar.com\/avatar\/584eebc303f64610559ab9f305f6928d?s=96&d=mm&r=g","contentUrl":"http:\/\/2.gravatar.com\/avatar\/584eebc303f64610559ab9f305f6928d?s=96&d=mm&r=g","caption":"wizardofbots"},"url":"http:\/\/wizardofbots.com\/network\/author\/wizardofbots\/"}]}},"_links":{"self":[{"href":"http:\/\/wizardofbots.com\/network\/wp-json\/wp\/v2\/posts\/44"}],"collection":[{"href":"http:\/\/wizardofbots.com\/network\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/wizardofbots.com\/network\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/wizardofbots.com\/network\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/wizardofbots.com\/network\/wp-json\/wp\/v2\/comments?post=44"}],"version-history":[{"count":4,"href":"http:\/\/wizardofbots.com\/network\/wp-json\/wp\/v2\/posts\/44\/revisions"}],"predecessor-version":[{"id":49,"href":"http:\/\/wizardofbots.com\/network\/wp-json\/wp\/v2\/posts\/44\/revisions\/49"}],"wp:attachment":[{"href":"http:\/\/wizardofbots.com\/network\/wp-json\/wp\/v2\/media?parent=44"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/wizardofbots.com\/network\/wp-json\/wp\/v2\/categories?post=44"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/wizardofbots.com\/network\/wp-json\/wp\/v2\/tags?post=44"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}