-
-
Save krishnakanthpps/4fc26518d04d10a287b39ee82d693b86 to your computer and use it in GitHub Desktop.
Revisions
-
thosuperman revised this gist
Sep 22, 2017 . 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 @@ -84,7 +84,7 @@ sudo chkconfig mysqld on :: INSTALL PHP 7.0 WITH MYSQL AND SOME BASICS :::::::::::::::::::::::::::::::: sudo yum install php70 php70-gd php70-imap php70-mbstring php70-mysqlnd php70-opcache php70-pdo php70-pecl-apcu php70-mcrypt sudo service httpd restart echo "<?php phpinfo(); ?>" > /var/www/html/phpinfo.php -
thosuperman revised this gist
Aug 27, 2017 . 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 @@ -93,7 +93,7 @@ echo "<?php phpinfo(); ?>" > /var/www/html/phpinfo.php sudo nano /etc/php.ini expose_php = Off error_log = /var/log/php-error.log date.timezone = "Asia/Ho_Chi_Minh" sudo service httpd restart :: INSTALL PHPMYADMIN :::::::::::::::::::::::::::::::::::::::::::::::::::::::: -
thosuperman revised this gist
Jul 18, 2017 . 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 @@ -117,6 +117,8 @@ sudo service httpd restart :: INSTALL letsencrypt :::::::::::::::::::::::::::::::::::::::::::::::::::::::: sudo service httpd stop sudo service mysqld stop sudo su sudo yum install mod24_ssl yum install python27-devel git git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt /opt/letsencrypt/letsencrypt-auto --debug -
thosuperman revised this gist
Jul 18, 2017 . 1 changed file with 2 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 @@ -36,8 +36,8 @@ sudo nano /etc/httpd/conf.d/vhosts.conf <create log and vhost folders in html> <VirtualHost *:80> ServerName yourdomain.com ServerAlias www.yourdomain.com DocumentRoot "/var/www/html/www.other-site.com" ErrorLog "/var/www/html/www.other-site.com/logs/error_log" CustomLog "/var/www/html/www.other-site.com/logs/access_log" combined -
thosuperman revised this gist
Jul 18, 2017 . 1 changed file with 20 additions and 13 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 @@ -2,6 +2,16 @@ sudo yum update -y :: MAKE SWAP ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: sudo dd if=/dev/zero of=/swapfile bs=1024 count=1024k sudo su mkswap /swapfile swapon /swapfile swapon -s echo /swapfile none swap defaults 0 0 >> /etc/fstab chown root:root /swapfile chmod 0600 /swapfile :: INSTALL WEBSERVER ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: sudo yum install httpd24 @@ -25,19 +35,6 @@ sudo nano /etc/httpd/conf.d/vhosts.conf <create log and vhost folders in html> <VirtualHost *:80> ServerName www.other-site.com ServerAlias *.other-site.com @@ -116,3 +113,13 @@ Listen 9000 </VirtualHost> sudo service httpd restart :: INSTALL letsencrypt :::::::::::::::::::::::::::::::::::::::::::::::::::::::: sudo service httpd stop sudo service mysqld stop yum install python27-devel git git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt /opt/letsencrypt/letsencrypt-auto --debug sudo service httpd restart sudo service mysqld restart -
thosuperman revised this gist
Jul 17, 2017 . 1 changed file with 16 additions and 36 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,43 +96,23 @@ echo "<?php phpinfo(); ?>" > /var/www/html/phpinfo.php sudo nano /etc/php.ini expose_php = Off error_log = /var/log/php-error.log date.timezone = "America/Ho_Chi_Minh" sudo service httpd restart :: INSTALL PHPMYADMIN :::::::::::::::::::::::::::::::::::::::::::::::::::::::: sudo su cd /var/www && wget https://github.com/phpmyadmin/phpmyadmin/archive/RELEASE_4_6_6.zip && unzip RELEASE_4_6_6.zip && mv phpmyadmin-RELEASE_4_6_6 phpmyadmin && rm -rf RELEASE_4_6_6.zip sudo nano /etc/httpd/conf.d/phpmyadmin.conf Listen 9000 <VirtualHost *:9000> DocumentRoot /var/www/phpmyadmin <Directory /var/www/phpmyadmin> # enable the .htaccess rewrites AllowOverride All Options All Require all granted </Directory> </VirtualHost> sudo service httpd restart -
thosuperman revised this gist
Jul 17, 2017 . 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 @@ -87,7 +87,7 @@ sudo chkconfig mysqld on :: INSTALL PHP 7.0 WITH MYSQL AND SOME BASICS :::::::::::::::::::::::::::::::: sudo yum install php70 php70-gd php70-imap php70-mbstring php70-mysqlnd php70-opcache php70-pdo php70-pecl-apcu sudo service httpd restart echo "<?php phpinfo(); ?>" > /var/www/html/phpinfo.php -
Tony Nguyen created this gist
Dec 6, 2016 .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,138 @@ :: UPDATE YUM :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: sudo yum update -y :: INSTALL WEBSERVER ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: sudo yum install httpd24 sudo service httpd start sudo chkconfig httpd on chkconfig --list httpd :: CONFIGURE HTTPD ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: sudo nano /etc/httpd/conf/httpd.conf <Directory "/var/www/html"> Options All AllowOverride All Require all granted </Directory> :: CONFIGURE VHOSTS :::::::::::::::::::::::::::::::::::::::::::::::::::::::::: sudo nano /etc/httpd/conf.d/vhosts.conf <create log and vhost folders in html> <VirtualHost *:80> ServerName localhost DocumentRoot "/var/www/html" ErrorLog "/var/www/html/logs/error_log" CustomLog "/var/www/html/logs/access_log" combined <Directory "/var/www/html"> Options All AllowOverride All Require all granted </Directory> </VirtualHost> <VirtualHost *:80> ServerName www.other-site.com ServerAlias *.other-site.com DocumentRoot "/var/www/html/www.other-site.com" ErrorLog "/var/www/html/www.other-site.com/logs/error_log" CustomLog "/var/www/html/www.other-site.com/logs/access_log" combined <Directory "/var/www/html/www.other-site.com"> Options All AllowOverride All Require all granted </Directory> </VirtualHost> :: ADD EC2 USER TO WWW ::::::::::::::::::::::::::::::::::::::::::::::::::::::: ls -l /var/www sudo groupadd www sudo usermod -a -G www ec2-user <exit> <login> groups sudo chown -R root:www /var/www sudo chmod 2775 /var/www find /var/www -type d -exec sudo chmod 2775 {} + find /var/www -type f -exec sudo chmod 0664 {} + :: ADD APACHE USER TO WWW ::::::::::::::::::::::::::::::::::::::::::::::::::::::: sudo usermod -a -G www apache <also change the apache config to use apache:www> :: INSTALL MYSQL ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: sudo yum localinstall http://repo.mysql.com/mysql-community-release-el6-7.noarch.rpm sudo yum install mysql-community-server sudo service mysqld start sudo /usr/bin/mysql_secure_installation <enter> <new-pass> <new-pass> <Y> <Y> <Y> <Y> sudo chkconfig mysqld on :: INSTALL PHP 7.0 WITH MYSQL AND SOME BASICS :::::::::::::::::::::::::::::::: sudo yum install php70 php70-devel php70-common php70-cli php70-pecl-apc php70-pdo php70-mysql php70-xml php70-gd php70-mbstring php-pear php70-mysqlnd php70-mcrypt sudo service httpd restart echo "<?php phpinfo(); ?>" > /var/www/html/phpinfo.php :: EDIT PHP.INI :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: sudo nano /etc/php.ini expose_php = Off error_log = /var/log/php-error.log date.timezone = "America/Chicago" sudo service httpd restart :: ADD KEY for TRANSMIT FTP :::::::::::::::::::::::::::::::::::::::::::::::::: <cd to directory with key> ssh-add [yourkey].pem rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm yum --enablerepo=remi,remi-test install phpMyAdmin Alias /phpMyAdmin /usr/share/phpMyAdmin Alias /phpmyadmin /usr/share/phpMyAdmin ## Comment below section to allow everyone <Directory /usr/share/phpMyAdmin/> <IfModule !mod_authz_core.c> Order Deny,Allow Deny from All Allow from 192.168.1.0/24 Allow from ::1 </IfModule> </Directory> <Directory /usr/share/phpMyAdmin/libraries/> Order Deny,Allow Deny from All Allow from None </Directory> <Directory /usr/share/phpMyAdmin/setup/lib/> Order Deny,Allow Deny from All Allow from None </Directory> <Directory /usr/share/phpMyAdmin/setup/frames/> Order Deny,Allow Deny from All Allow from None </Directory>