{"id":779,"date":"2013-07-03T11:45:30","date_gmt":"2013-07-03T11:45:30","guid":{"rendered":"http:\/\/www.plugged.in\/?p=779"},"modified":"2018-11-07T23:43:02","modified_gmt":"2018-11-07T20:43:02","slug":"add-new-hosting-to-a-system-installed-with-plugged-sh","status":"publish","type":"post","link":"https:\/\/www.veriteknik.net.tr\/en\/add-new-hosting-to-a-system-installed-with-plugged-sh\/","title":{"rendered":"Add New Hosting to a System Installed With Plugged.sh"},"content":{"rendered":"<p>If you use our <a title=\"Download Plugged.in LAMP installer for CentOS 6.x\" href=\"https:\/\/github.com\/VeriTeknik\/plugged.sh\">LAMP installer script<\/a> and want to add a new domain afterwards, we&#8217;ve created a simple script to ease up the process. This script creates a new user, adds the domain settings for Apache, adds a new MySQL Database and user, restarts necessary services.<\/p>\n<p>Simply get our script from <a href=\"https:\/\/github.com\/VeriTeknik\/plugged.sh\">here<\/a> or on your server via wget.<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">git clone https:\/\/github.com\/VeriTeknik\/plugged.sh.git<\/pre>\n<p>Run the script (as root) to learn about the usage.<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">sh hostingadd.sh\r\n\r\nUsage: hostingadd.sh -u username -p password -d domain -ip IP -dbu dbuser -dbn dbname -dbp dbpass\r\n\r\n -u username : Set the LOGIN name (FTP user)\r\n -p password : Set the Password\r\n -d domain : Set the Domain\r\n -ip ip : Set the IP address for the domain\r\n -dbu dbuser : Set the MySQL User\r\n -dbn dbname : Set the MySQL Database Name\r\n -dbp dbpass : Set the MySQL User Password<\/pre>\n<p>The parameters are explained above. The script will try to create the MySQL databases as root, so it will need access to MySQL. In order to manage it, you&#8217;ll have to create a <strong>.my.cnf<\/strong> file under your <strong>\/root<\/strong>\u00a0 path. The <strong>\/root\/.my.cnf file<\/strong> should be like this :<\/p>\n<pre class=\"brush: text; gutter: true; first-line: 1\">[client]\r\nuser=root\r\npass=yourMySQLrootPassword<\/pre>\n<p>Don&#8217;t worry about writing your password in clear text. This file is restricted by root access anyway, so if someone can read this file, your server is already compromised.<\/p>\n<p>You can access via FTP by using the username and password provided while running the script. You can also check if the database is successfully added via phpmyadmin (which is installed by plugged.sh)<\/p>\n<p>There isn&#8217;t an uninstall script yet, but I&#8217;ll write one asap.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you use our LAMP installer script and want to add a new domain afterwards, we&#8217;ve created a simple script to ease up the process. This script creates a new user, adds the domain settings for Apache, adds a new MySQL Database and user, restarts necessary services. Simply get our script from here or on [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","footnotes":""},"categories":[363,367,370],"tags":[365,390,391,392,369,373],"yst_prominent_words":[667,671,670,668,605,665,619,666,663,337,669],"class_list":["post-779","post","type-post","status-publish","format-standard","hentry","category-databases","category-httpd","category-linux","tag-apache","tag-ftp","tag-hosting","tag-httpd","tag-lamp","tag-mysql"],"jetpack_featured_media_url":"","uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"Mustafa Emre Ayd\u0131n","author_link":"https:\/\/www.veriteknik.net.tr\/en\/author\/eaydin\/"},"uagb_comment_info":0,"uagb_excerpt":"If you use our LAMP installer script and want to add a new domain afterwards, we&#8217;ve created a simple script to ease up the process. This script creates a new user, adds the domain settings for Apache, adds a new MySQL Database and user, restarts necessary services. Simply get our script from here or on&hellip;","_links":{"self":[{"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/posts\/779","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/comments?post=779"}],"version-history":[{"count":3,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/posts\/779\/revisions"}],"predecessor-version":[{"id":7227,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/posts\/779\/revisions\/7227"}],"wp:attachment":[{"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/media?parent=779"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/categories?post=779"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/tags?post=779"},{"taxonomy":"yst_prominent_words","embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/yst_prominent_words?post=779"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}