Last active
December 28, 2022 07:43
-
-
Save suvozy/8998731 to your computer and use it in GitHub Desktop.
Revisions
-
suvozy revised this gist
Aug 10, 2015 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -116,7 +116,7 @@ with username `root` password `SUPERSECUREPASSWORD` rm -rf config ``` # Setup RDS Setup RDS with username `awsuser` password `mypassword` ## Security group @@ -126,6 +126,7 @@ Type | Protocol | Port Range | Source ---- | -------- | ---------- | ------ MYSQL/Aurora | TCP | 3306 | sg-abcdefgh (phpMyAdmin) # Connect to RDS ## Edit Config ```shell nano /var/www/html/phpmyadmin/config.inc.php -
suvozy revised this gist
Aug 10, 2015 . 1 changed file with 0 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,11 +10,6 @@ Type | Protocol | Port Range | Destination SSH | TCP | 22 | 0.0.0.0/0 HTTP | TCP | 80 | 0.0.0.0/0 Assign `phpMyAdmin` to the new EC2 instance and visit ``` http://YOUR_SERVER_IP -
suvozy revised this gist
Aug 10, 2015 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -126,6 +126,7 @@ Setup RDS with username `awsuser` password `mypassword` ## Security group `rds` Type | Protocol | Port Range | Source ---- | -------- | ---------- | ------ MYSQL/Aurora | TCP | 3306 | sg-abcdefgh (phpMyAdmin) -
suvozy revised this gist
Aug 10, 2015 . 1 changed file with 23 additions and 17 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # Launch an instance http://docs.aws.amazon.com/AmazonVPC/latest/GettingStartedGuide/GetStarted.html # Security group @@ -20,38 +20,38 @@ Assign `phpMyAdmin` to the new EC2 instance and visit http://YOUR_SERVER_IP ``` # Setup EC2 ```shell chmod 400 key.pem ssh -i key.pem ec2-user@YOUR_SERVER_IP ``` ## Root login ```shell sudo -i ``` ## Update and install ```shell yum -y update yum install -y gcc make gcc-c++ yum install -y php55-mysqlnd php55 php55-xml php55-mcrypt php55-mbstring php55-cli mysql55 mysql55-server httpd24 ``` `-y` will tell yum to say yes to all questions. ## Start your engines ```shell service httpd start service mysqld start ``` ## MySQL Setup ```shell /usr/bin/mysqladmin -u root password SUPERSECUREPASSWORD ``` ## Setup startup scripts for apache and MySQL ```shell cd /etc/rc.d/rc3.d rm K15httpd @@ -60,7 +60,7 @@ ln -s ../init.d/mysqld S30mysql ln -s ../init.d/httpd S85httpd ``` ## Install phpMyAdmin ```shell cd /var/www/html wget https://files.phpmyadmin.net/phpMyAdmin/4.4.13.1/phpMyAdmin-4.4.13.1-english.tar.gz @@ -86,7 +86,7 @@ And last, run this command to associate that user with the phpmyadmin folder: chown -R apache.apache phpmyadmin/ ``` ## Install Config ```shell cd /var/www/html/phpmyadmin/ cp config.sample.inc.php config.inc.php @@ -96,7 +96,7 @@ cp config.sample.inc.php config/config.inc.php chmod o+w config/config.inc.php ``` ## Setup Config ```shell nano /var/www/html/phpmyadmin/config.inc.php ``` @@ -105,40 +105,46 @@ $cfg['blowfish_secret'] = '{^QP+-(3mlHy+Gd~FE3mN{gIATs^1lX+T=KVYv{ubK*U0V'; ``` reference: http://www.question-defense.com/tools/phpmyadmin-blowfish-secret-generator ## Restart Server ```shell service httpd restart ``` ## Setup phpMyAdmin ``` http://YOUR_SERVER_IP/phpmyadmin/index.php ``` with username `root` password `SUPERSECUREPASSWORD` ## Remove config folder ```shell rm -rf config ``` #Setup RDS Setup RDS with username `awsuser` password `mypassword` ## Security group `rds` Type | Protocol | Port Range | Source ---- | -------- | ---------- | ------ MYSQL/Aurora | TCP | 3306 | sg-abcdefgh (phpMyAdmin) ## Edit Config ```shell nano /var/www/html/phpmyadmin/config.inc.php ``` ```php $cfg['Servers'][$i]['host'] = 'mydbinstance.abcdefghijkl.us-east-1.rds.amazonaws.com:3306' ``` ## Access phpMyAdmin ``` http://YOUR_SERVER_IP/phpmyadmin/index.php ``` with username `awsuser` password `mypassword` ## phpinfo ```shell nano /var/www/html/info.php ``` @@ -149,7 +155,7 @@ nano /var/www/html/info.php http://YOUR_SERVER_IP/info.php ``` ## Test db connection ```shell nano /var/www/html/db_test.php ``` -
suvozy revised this gist
Aug 10, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -38,7 +38,7 @@ yum -y update yum install -y gcc make gcc-c++ yum install -y php55-mysqlnd php55 php55-xml php55-mcrypt php55-mbstring php55-cli mysql55 mysql55-server httpd24 ``` `-y` will tell yum to say yes to all questions. ##Start your engines ```shell -
suvozy revised this gist
Aug 10, 2015 . 1 changed file with 42 additions and 42 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,56 +22,56 @@ http://YOUR_SERVER_IP #Setup EC2 ```shell chmod 400 key.pem ssh -i key.pem ec2-user@YOUR_SERVER_IP ``` ##Root login ```shell sudo -i ``` ##Update and install ```shell yum -y update yum install -y gcc make gcc-c++ yum install -y php55-mysqlnd php55 php55-xml php55-mcrypt php55-mbstring php55-cli mysql55 mysql55-server httpd24 ``` -y will tell yum to say yes to all questions. ##Start your engines ```shell service httpd start service mysqld start ``` ##MySQL Setup ```shell /usr/bin/mysqladmin -u root password SUPERSECUREPASSWORD ``` ##Setup startup scripts for apache and MySQL ```shell cd /etc/rc.d/rc3.d rm K15httpd rm K36mysqld ln -s ../init.d/mysqld S30mysql ln -s ../init.d/httpd S85httpd ``` ##Install phpMyAdmin ```shell cd /var/www/html wget https://files.phpmyadmin.net/phpMyAdmin/4.4.13.1/phpMyAdmin-4.4.13.1-english.tar.gz tar -xzvf phpMyAdmin-4.4.13.1-english.tar.gz -C /var/www/html mv phpMyAdmin-4.4.13.1-english phpmyadmin rm -rf phpMyAdmin-4.4.13.1-english.tar.gz ``` check for updates: https://www.phpmyadmin.net/downloads/ We now need to add permission for this folder, find the user group (should be apache) with this command: ```shell egrep 'User|Group' /etc/httpd/conf/httpd.conf ``` @@ -82,32 +82,32 @@ Group apache ``` And last, run this command to associate that user with the phpmyadmin folder: ```shell chown -R apache.apache phpmyadmin/ ``` ##Install Config ```shell cd /var/www/html/phpmyadmin/ cp config.sample.inc.php config.inc.php mkdir config chmod o+rw config cp config.sample.inc.php config/config.inc.php chmod o+w config/config.inc.php ``` ##Setup Config ```shell nano /var/www/html/phpmyadmin/config.inc.php ``` ```php $cfg['blowfish_secret'] = '{^QP+-(3mlHy+Gd~FE3mN{gIATs^1lX+T=KVYv{ubK*U0V'; ``` reference: http://www.question-defense.com/tools/phpmyadmin-blowfish-secret-generator ##Restart Server ```shell service httpd restart ``` ##Setup phpMyAdmin @@ -117,16 +117,16 @@ http://YOUR_SERVER_IP/phpmyadmin/index.php with username `root` password `SUPERSECUREPASSWORD` ##Remove config folder ```shell rm -rf config ``` #Setup RDS Setup RDS with username `awsuser` password `mypassword` ##Edit Config ```shell nano /var/www/html/phpmyadmin/config.inc.php ``` ```php $cfg['Servers'][$i]['host'] = 'mydbinstance.abcdefghijkl.us-east-1.rds.amazonaws.com:3306' @@ -139,8 +139,8 @@ http://YOUR_SERVER_IP/phpmyadmin/index.php with username `awsuser` password `mypassword` ##phpinfo ```shell nano /var/www/html/info.php ``` ```php <?php phpinfo(); ?> @@ -150,8 +150,8 @@ http://YOUR_SERVER_IP/info.php ``` ##Test db connection ```shell nano /var/www/html/db_test.php ``` ```php <?php -
suvozy revised this gist
Aug 10, 2015 . 1 changed file with 7 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -142,9 +142,12 @@ with username `awsuser` password `mypassword` ``` sudo nano /var/www/html/info.php ``` ```php <?php phpinfo(); ?> ``` ``` http://YOUR_SERVER_IP/info.php ``` ##Test db connection ``` @@ -160,6 +163,9 @@ var_dump($link); $link = mysqli_connect('localhost', 'root', 'SUPERSECUREPASSWORD', 'information_schema'); var_dump($link); ``` ``` http://YOUR_SERVER_IP/db_test.php ``` #Git Deploy https://gist.github.com/oodavid/1809044 -
suvozy revised this gist
Aug 10, 2015 . 1 changed file with 19 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,25 @@ #Launch an instance http://docs.aws.amazon.com/AmazonVPC/latest/GettingStartedGuide/GetStarted.html # Security group `phpMyAdmin` ## Inbound Type | Protocol | Port Range | Destination ---- | -------- | ---------- | ----------- SSH | TCP | 22 | 0.0.0.0/0 HTTP | TCP | 80 | 0.0.0.0/0 ## Outbound Type | Protocol | Port Range | Destination ---- | -------- | ---------- | ----------- All traffic | All | All | 0.0.0.0/0 Assign `phpMyAdmin` to the new EC2 instance and visit ``` http://YOUR_SERVER_IP ``` #Setup EC2 ``` -
suvozy revised this gist
Aug 9, 2015 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -44,12 +44,12 @@ sudo ln -s ../init.d/httpd S85httpd ##Install phpMyAdmin ``` cd /var/www/html sudo wget https://files.phpmyadmin.net/phpMyAdmin/4.4.13.1/phpMyAdmin-4.4.13.1-english.tar.gz sudo tar -xzvf phpMyAdmin-4.4.13.1-english.tar.gz -C /var/www/html sudo mv phpMyAdmin-4.4.13.1-english phpmyadmin sudo rm -rf phpMyAdmin-4.4.13.1-english.tar.gz ``` check for updates: https://www.phpmyadmin.net/downloads/ We now need to add permission for this folder, find the user group (should be apache) with this command: ``` -
suvozy revised this gist
Jan 18, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -142,5 +142,5 @@ $link = mysqli_connect('localhost', 'root', 'SUPERSECUREPASSWORD', 'information_ var_dump($link); ``` #Git Deploy https://gist.github.com/oodavid/1809044 -
suvozy revised this gist
Nov 21, 2014 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -132,10 +132,12 @@ sudo nano /var/www/html/info.php sudo nano /var/www/html/db_test.php ``` ```php <?php $link = mysqli_connect('mydbinstance.abcdefghijkl.us-east-1.rds.amazonaws.com', 'awsuser', 'mypassword', 'information_schema', 3306); var_dump($link); ``` ```php <?php $link = mysqli_connect('localhost', 'root', 'SUPERSECUREPASSWORD', 'information_schema'); var_dump($link); ``` -
suvozy revised this gist
Jul 12, 2014 . 2 changed files with 0 additions and 44 deletions.There are no files selected for viewing
File renamed without changes.This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,44 +0,0 @@ -
suvozy revised this gist
Jul 12, 2014 . 1 changed file with 144 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,144 @@ #Launch an instance http://docs.aws.amazon.com/AmazonVPC/latest/GettingStartedGuide/GetStarted.html #Setup EC2 ``` chmod 400 key.pem ssh -i key.pem ec2-user@YOUR_SERVER_IP ``` ##Root login ``` sudo -i ``` ##Update and install ``` sudo yum -y update sudo yum install -y gcc make gcc-c++ sudo yum install -y php55-mysqlnd php55 php55-xml php55-mcrypt php55-mbstring php55-cli mysql55 mysql55-server httpd24 ``` -y will tell yum to say yes to all questions. ##Start your engines ``` sudo service httpd start sudo service mysqld start ``` ##MySQL Setup ``` sudo /usr/bin/mysqladmin -u root password SUPERSECUREPASSWORD ``` ##Setup startup scripts for apache and MySQL ``` cd /etc/rc.d/rc3.d sudo rm K15httpd sudo rm K36mysqld sudo ln -s ../init.d/mysqld S30mysql sudo ln -s ../init.d/httpd S85httpd ``` ##Install phpMyAdmin ``` cd /var/www/html sudo wget http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/4.1.7/phpMyAdmin-4.1.7-all-languages.tar.gz sudo tar -xzvf phpMyAdmin-4.1.7-all-languages.tar.gz -C /var/www/html sudo mv phpMyAdmin-4.1.7-all-languages phpmyadmin sudo rm -rf phpMyAdmin-4.1.7-all-languages.tar.gz ``` check for updates: http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/ We now need to add permission for this folder, find the user group (should be apache) with this command: ``` egrep 'User|Group' /etc/httpd/conf/httpd.conf ``` Which will return: ``` User apache Group apache ``` And last, run this command to associate that user with the phpmyadmin folder: ``` sudo chown -R apache.apache phpmyadmin/ ``` ##Install Config ``` cd /var/www/html/phpmyadmin/ sudo cp config.sample.inc.php config.inc.php sudo mkdir config sudo chmod o+rw config sudo cp config.sample.inc.php config/config.inc.php sudo chmod o+w config/config.inc.php ``` ##Setup Config ``` sudo nano /var/www/html/phpmyadmin/config.inc.php ``` ```php $cfg['blowfish_secret'] = '{^QP+-(3mlHy+Gd~FE3mN{gIATs^1lX+T=KVYv{ubK*U0V'; ``` reference: http://www.question-defense.com/tools/phpmyadmin-blowfish-secret-generator ##Restart Server ``` sudo service httpd restart ``` ##Setup phpMyAdmin ``` http://YOUR_SERVER_IP/phpmyadmin/index.php ``` with username `root` password `SUPERSECUREPASSWORD` ##Remove config folder ``` sudo rm -rf config ``` #Setup RDS Setup RDS with username `awsuser` password `mypassword` ##Edit Config ``` sudo nano /var/www/html/phpmyadmin/config.inc.php ``` ```php $cfg['Servers'][$i]['host'] = 'mydbinstance.abcdefghijkl.us-east-1.rds.amazonaws.com:3306' ``` ##Access phpMyAdmin ``` http://YOUR_SERVER_IP/phpmyadmin/index.php ``` with username `awsuser` password `mypassword` ##phpinfo ``` sudo nano /var/www/html/info.php ``` ``` <?php phpinfo(); ?> ``` ##Test db connection ``` sudo nano /var/www/html/db_test.php ``` ```php $link = mysqli_connect('mydbinstance.abcdefghijkl.us-east-1.rds.amazonaws.com', 'awsuser', 'mypassword', 'information_schema', 3306); var_dump($link); ``` ```php $link = mysqli_connect('localhost', 'root', 'SUPERSECUREPASSWORD', 'information_schema'); var_dump($link); ``` #Git Depoly https://gist.github.com/oodavid/1809044 -
suvozy revised this gist
Jul 12, 2014 . 2 changed files with 22 additions and 166 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,44 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,144 +1,44 @@ ``` sudo -i ``` #Build webapp key ``` sudo -Hu webapp ssh-keygen -t rsa # choose "no passphrase" ``` or ``` sudo -Hu webapp ssh-keygen -t rsa -C "server-webapp@rime.co" ``` ##Clone ``` cat /home/webapp/.ssh/id_rsa.pub sudo -Hu webapp git clone git@github.com:suvozit/log-pixel.git /var/www/html ``` #Build Server key ##Generate https://help.github.com/articles/generating-ssh-keys ##Apply ``` cat id_rsa.pub ``` https://github.com/settings/ssh ##Hanlde Error https://help.github.com/articles/error-permission-denied-publickey #Clean html folder ``` cd /var/www/html rm -rf .* * ``` #Clone Source ``` git clone git@github.com:suvozit/log-pixel.git /var/www/html git reset --hard HEAD ``` -
suvozy revised this gist
Jul 12, 2014 . 2 changed files with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes.File renamed without changes. -
suvozy revised this gist
Jul 12, 2014 . 1 changed file with 44 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,44 @@ ``` sudo -i ``` #Build webapp key ``` sudo -Hu webapp ssh-keygen -t rsa # choose "no passphrase" ``` or ``` sudo -Hu webapp ssh-keygen -t rsa -C "server-webapp@rime.co" ``` ##Clone ``` cat /home/webapp/.ssh/id_rsa.pub sudo -Hu webapp git clone git@github.com:suvozit/log-pixel.git /var/www/html ``` #Build Server key ##Generate https://help.github.com/articles/generating-ssh-keys ##Apply ``` cat id_rsa.pub ``` https://github.com/settings/ssh ##Hanlde Error https://help.github.com/articles/error-permission-denied-publickey #Clean html folder ``` cd /var/www/html rm -rf .* * ``` #Clone Source ``` git clone git@github.com:suvozit/log-pixel.git /var/www/html git reset --hard HEAD ``` -
suvozy revised this gist
Feb 26, 2014 . 1 changed file with 18 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -32,6 +32,15 @@ sudo service mysqld start sudo /usr/bin/mysqladmin -u root password SUPERSECUREPASSWORD ``` ##Setup startup scripts for apache and MySQL ``` cd /etc/rc.d/rc3.d sudo rm K15httpd sudo rm K36mysqld sudo ln -s ../init.d/mysqld S30mysql sudo ln -s ../init.d/httpd S85httpd ``` ##Install phpMyAdmin ``` cd /var/www/html @@ -110,10 +119,18 @@ http://YOUR_SERVER_IP/phpmyadmin/index.php ``` with username `awsuser` password `mypassword` ##phpinfo ``` sudo nano /var/www/html/info.php ``` ``` <?php phpinfo(); ?> ``` ##Test db connection ``` sudo nano /var/www/html/db_test.php ``` ```php $link = mysqli_connect('mydbinstance.abcdefghijkl.us-east-1.rds.amazonaws.com', 'awsuser', 'mypassword', 'information_schema', 3306); var_dump($link); -
suvozy revised this gist
Feb 26, 2014 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -121,4 +121,7 @@ var_dump($link); ```php $link = mysqli_connect('localhost', 'root', 'SUPERSECUREPASSWORD', 'information_schema'); var_dump($link); ``` #Git Depoly https://gist.github.com/oodavid/1809044 -
suvozy revised this gist
Feb 15, 2014 . 1 changed file with 7 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,6 +7,13 @@ http://docs.aws.amazon.com/AmazonVPC/latest/GettingStartedGuide/GetStarted.html chmod 400 key.pem ssh -i key.pem ec2-user@YOUR_SERVER_IP ``` ##Root login ``` sudo -i ``` ##Update and install ``` sudo yum -y update sudo yum install -y gcc make gcc-c++ -
suvozy revised this gist
Feb 15, 2014 . 1 changed file with 3 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -35,12 +35,10 @@ sudo rm -rf phpMyAdmin-4.1.7-all-languages.tar.gz ``` check for updates: http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/ We now need to add permission for this folder, find the user group (should be apache) with this command: ``` egrep 'User|Group' /etc/httpd/conf/httpd.conf ``` Which will return: ``` @@ -50,7 +48,7 @@ Group apache And last, run this command to associate that user with the phpmyadmin folder: ``` sudo chown -R apache.apache phpmyadmin/ ``` ##Install Config -
suvozy revised this gist
Feb 15, 2014 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -114,4 +114,6 @@ $link = mysqli_connect('mydbinstance.abcdefghijkl.us-east-1.rds.amazonaws.com', var_dump($link); ``` ```php $link = mysqli_connect('localhost', 'root', 'SUPERSECUREPASSWORD', 'information_schema'); var_dump($link); ``` -
suvozy revised this gist
Feb 15, 2014 . 1 changed file with 2 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -96,7 +96,7 @@ Setup RDS with username `awsuser` password `mypassword` sudo nano /var/www/html/phpmyadmin/config.inc.php ``` ```php $cfg['Servers'][$i]['host'] = 'mydbinstance.abcdefghijkl.us-east-1.rds.amazonaws.com:3306' ``` ##Access phpMyAdmin @@ -114,6 +114,4 @@ $link = mysqli_connect('mydbinstance.abcdefghijkl.us-east-1.rds.amazonaws.com', var_dump($link); ``` ```php $link = mysqli_connect('localhost', 'ro -
suvozy revised this gist
Feb 15, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -85,7 +85,7 @@ with username `root` password `SUPERSECUREPASSWORD` ##Remove config folder ``` sudo rm -rf config ``` #Setup RDS -
suvozy revised this gist
Feb 15, 2014 . 1 changed file with 7 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -56,6 +56,7 @@ sudo chown -R phpmyadmin.apache phpmyadmin/ ##Install Config ``` cd /var/www/html/phpmyadmin/ sudo cp config.sample.inc.php config.inc.php sudo mkdir config sudo chmod o+rw config sudo cp config.sample.inc.php config/config.inc.php @@ -64,7 +65,7 @@ sudo chmod o+w config/config.inc.php ##Setup Config ``` sudo nano /var/www/html/phpmyadmin/config.inc.php ``` ```php $cfg['blowfish_secret'] = '{^QP+-(3mlHy+Gd~FE3mN{gIATs^1lX+T=KVYv{ubK*U0V'; @@ -82,13 +83,17 @@ http://YOUR_SERVER_IP/phpmyadmin/index.php ``` with username `root` password `SUPERSECUREPASSWORD` ##Remove config folder ``` sudo nano rm -rf config ``` #Setup RDS Setup RDS with username `awsuser` password `mypassword` ##Edit Config ``` sudo nano /var/www/html/phpmyadmin/config.inc.php ``` ```php $cfg['Servers'][$i]['host'] = 'mydbinstance.abcdefghijkl.us-east-1.rds.amazonaws.com' -
suvozy revised this gist
Feb 14, 2014 . 1 changed file with 2 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -69,6 +69,7 @@ sudo nano /var/www/html/phpmyadmin/config/config.inc.php ```php $cfg['blowfish_secret'] = '{^QP+-(3mlHy+Gd~FE3mN{gIATs^1lX+T=KVYv{ubK*U0V'; ``` reference: http://www.question-defense.com/tools/phpmyadmin-blowfish-secret-generator ##Restart Server ``` @@ -110,7 +111,4 @@ var_dump($link); ```php $link = mysqli_connect('localhost', 'root', 'SUPERSECUREPASSWORD', 'test'); var_dump($link); ``` -
suvozy revised this gist
Feb 14, 2014 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -53,7 +53,7 @@ And last, run this command to associate that user with the phpmyadmin folder: sudo chown -R phpmyadmin.apache phpmyadmin/ ``` ##Install Config ``` cd /var/www/html/phpmyadmin/ sudo mkdir config @@ -62,7 +62,7 @@ sudo cp config.sample.inc.php config/config.inc.php sudo chmod o+w config/config.inc.php ``` ##Setup Config ``` sudo nano /var/www/html/phpmyadmin/config/config.inc.php ``` @@ -113,4 +113,4 @@ var_dump($link); ``` #References: * WORDPRESS ON LINUX IN THE AMAZON CLOUD WITH MAC - http://caleb -
suvozy revised this gist
Feb 14, 2014 . 1 changed file with 15 additions and 15 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,32 +1,31 @@ #Launch an instance http://docs.aws.amazon.com/AmazonVPC/latest/GettingStartedGuide/GetStarted.html #Setup EC2 ``` chmod 400 key.pem ssh -i key.pem ec2-user@YOUR_SERVER_IP ``` ``` sudo yum -y update sudo yum install -y gcc make gcc-c++ sudo yum install -y php55-mysqlnd php55 php55-xml php55-mcrypt php55-mbstring php55-cli mysql55 mysql55-server httpd24 ``` -y will tell yum to say yes to all questions. ##Start your engines ``` sudo service httpd start sudo service mysqld start ``` ##MySQL Setup ``` sudo /usr/bin/mysqladmin -u root password SUPERSECUREPASSWORD ``` ##Install phpMyAdmin ``` cd /var/www/html sudo wget http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/4.1.7/phpMyAdmin-4.1.7-all-languages.tar.gz @@ -54,7 +53,7 @@ And last, run this command to associate that user with the phpmyadmin folder: sudo chown -R phpmyadmin.apache phpmyadmin/ ``` ###Install Config ``` cd /var/www/html/phpmyadmin/ sudo mkdir config @@ -63,42 +62,44 @@ sudo cp config.sample.inc.php config/config.inc.php sudo chmod o+w config/config.inc.php ``` ###Setup Config ``` sudo nano /var/www/html/phpmyadmin/config/config.inc.php ``` ```php $cfg['blowfish_secret'] = '{^QP+-(3mlHy+Gd~FE3mN{gIATs^1lX+T=KVYv{ubK*U0V'; ``` ##Restart Server ``` sudo service httpd restart ``` ##Setup phpMyAdmin ``` http://YOUR_SERVER_IP/phpmyadmin/index.php ``` with username `root` password `SUPERSECUREPASSWORD` #Setup RDS Setup RDS with username `awsuser` password `mypassword` ##Edit Config ``` sudo nano /var/www/html/phpmyadmin/config/config.inc.php ``` ```php $cfg['Servers'][$i]['host'] = 'mydbinstance.abcdefghijkl.us-east-1.rds.amazonaws.com' ``` ##Access phpMyAdmin ``` http://YOUR_SERVER_IP/phpmyadmin/index.php ``` with username `awsuser` password `mypassword` ##Test db connection ``` sudo nano /var/www/html/info.php ``` @@ -112,5 +113,4 @@ var_dump($link); ``` #References: * WORDPRESS ON LINUX IN THE AMAZON CLOUD WITH MAC - http://calebogden.com/wordpress- -
suvozy revised this gist
Feb 14, 2014 . 1 changed file with 13 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -98,6 +98,19 @@ http://YOUR_SERVER_IP/phpmyadmin/index.php ``` with username `awsuser` password `mypassword` Test db connection ``` sudo nano /var/www/html/info.php ``` ```php $link = mysqli_connect('mydbinstance.abcdefghijkl.us-east-1.rds.amazonaws.com', 'awsuser', 'mypassword', 'information_schema', 3306); var_dump($link); ``` ```php $link = mysqli_connect('localhost', 'root', 'SUPERSECUREPASSWORD', 'test'); var_dump($link); ``` #References: * WORDPRESS ON LINUX IN THE AMAZON CLOUD WITH MAC - http://calebogden.com/wordpress-on-linux-in-the-amazon-cloud-with-mac * phpMyAdmin Blowfish Secret Generator - http://www.question-defense.com/tools/phpmyadmin-blowfish-secret-generator -
suvozy revised this gist
Feb 14, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -89,7 +89,7 @@ Setup RDS with username `awsuser` password `mypassword`. Edit Config sudo nano /var/www/html/phpmyadmin/config/config.inc.php ``` ```php $cfg['Servers'][$i]['host'] = 'mydbinstance.abcdefghijkl.us-east-1.rds.amazonaws.com' ``` Access phpMyAdmin -
suvozy revised this gist
Feb 14, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -86,7 +86,7 @@ with username `root` password `SUPERSECUREPASSWORD` #Setup RDS Setup RDS with username `awsuser` password `mypassword`. Edit Config ``` sudo nano /var/www/html/phpmyadmin/config/config.inc.php ``` ```php $cfg['Servers'][$i]['host'] = 'xxx.xxxxxxxxxxxx.us-east-1.rds.amazonaws.com'
NewerOlder