Last active
May 15, 2019 15:35
-
-
Save mnlcandelaria/3b71162bce6d579b590c5712bbc63dfc to your computer and use it in GitHub Desktop.
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 characters
| cd /; | |
| mkdir server; sudo chmod 755 server; sudo chown -R Manly server; mkdir server/public; mkdir server/hosts; mkdir server/conf; mkdir server/conf/apache; | |
| cd server/conf/apache; | |
| echo '# set document root' > server.conf | |
| echo 'DocumentRoot "/server"' >> server.conf | |
| echo '' >> server.conf | |
| echo '# set public to be used' >> server.conf | |
| echo '<Directory "/server/public">' >> server.conf | |
| echo ' Options Indexes FollowSymLinks' >> server.conf | |
| echo ' AllowOverride All' >> server.conf | |
| echo ' Require all granted' >> server.conf | |
| echo '</Directory>' >> server.conf | |
| echo '' >> server.conf | |
| echo '# set hosts to be used' >> server.conf | |
| echo '<Directory "/server/hosts">' >> server.conf | |
| echo ' Options Indexes FollowSymLinks' >> server.conf | |
| echo ' AllowOverride All' >> server.conf | |
| echo ' Require all granted' >> server.conf | |
| echo '</Directory>' >> server.conf | |
| echo '' >> server.conf | |
| echo '# vhost alias' >> server.conf | |
| echo '<VirtualHost *:80>' >> server.conf | |
| echo ' ServerAlias *' >> server.conf | |
| echo ' UseCanonicalName Off' >> server.conf | |
| echo ' ServerAdmin [email protected]' >> server.conf | |
| echo ' VirtualDocumentRoot /server/hosts/%0/current' >> server.conf | |
| echo ' VirtualScriptAlias /server/hosts/%0/current' >> server.conf | |
| echo '</VirtualHost>' >> server.conf | |
| # include to httpd.conf | |
| cd /etc/apache2 | |
| echo '' >> httpd.conf | |
| echo '# server conf' >> httpd.conf | |
| echo 'Include /server/conf/apache/*.conf' >> httpd.conf | |
| # uncomment on /etc/apache2/httpd.conf | |
| # LoadModule vhost_alias_module libexec/apache2/mod_vhost_alias.so | |
| # LoadModule rewrite_module libexec/apache2/mod_rewrite.so | |
| # LoadModule php5_module libexec/apache2/libphp5.so | |
| echo '<IfModule mod_status.c>' >> httpd.conf | |
| # Allow server status reports generated by mod_status, | |
| # with the URL of http://servername/server-status | |
| # Change the ".example.com" to match your domain to enable. | |
| # | |
| echo ' <Location /server-status>' >> httpd.conf | |
| echo ' SetHandler server-status' >> httpd.conf | |
| # Order deny,allow | |
| # Allow from all | |
| echo ' Require all granted' >> httpd.conf | |
| echo ' </Location>' >> httpd.conf | |
| echo '</IfModule>' >> httpd.conf | |
| # restart apache | |
| sudo apachectl restart | |
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 characters
| sudo add-apt-repository universe | |
| sudo apt update | |
| sudo apt install exfat-fuse exfat-utils |
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 characters
| # installing homebrew | |
| # The missing package manager for OS X | |
| /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| brew update | |
| # installig wget | |
| brew install wget | |
| #installing php (cli) | |
| brew install homebrew/php/php56-amqp | |
| # php 5.6 | |
| curl -s http://php-osx.liip.ch/install.sh | bash -s 5.6 | |
| # mcrypt-extension for some frameworks like laravel | |
| brew install php56-mcrypt | |
| # installing mysql | |
| brew install mysql | |
| # brew services start mysql (running in background) | |
| # mysql.server start | |
| # log to mysql and run this | |
| # set global sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; | |
| # set session sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; | |
| # rabbitmq | |
| brew install rabbitmq | |
| # brew services start rabbitmq (running in background) | |
| # rabbitmq-server | |
| # add to ~/.bash_profile | |
| # export PATH=/usr/local/sbin:$PATH | |
| # redis | |
| brew install redis | |
| # brew services start redis (running in background) | |
| # redis-server | |
| # mongo | |
| brew install mongodb | |
| # php mongo driver | |
| brew install php56-mongodb | |
| # brew services start mongo (running in background) | |
| #php 7 | |
| brew tap homebrew/dupes | |
| brew tap homebrew/versions | |
| brew tap homebrew/homebrew-php | |
| brew unlink php56 | |
| brew install php70 | |
| curl -s http://php-osx.liip.ch/install.sh | bash -s 7.1 | |
| # phpmyadmin | |
| Alias /phpmyadmin /usr/local/share/phpmyadmin | |
| <Directory /usr/local/share/phpmyadmin/> | |
| Options Indexes FollowSymLinks MultiViews | |
| AllowOverride All | |
| <IfModule mod_authz_core.c> | |
| Require all granted | |
| </IfModule> | |
| <IfModule !mod_authz_core.c> | |
| Order allow,deny | |
| Allow from all | |
| </IfModule> | |
| </Directory> | |
| https://accounts.google.com/DisplayUnlockCaptcha | |
| //If errors persist after unlocking the account | |
| //We have to allow access for less secure apps | |
| https://www.google.com/settings/security/lesssecureapps | |
| #git clone git://github.com/mkoppanen/php-zmq.git | |
| #cd php-zmq | |
| #phpize && ./configure | |
| #make && make install | |
| #extension=zmq.so |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment