Last active
April 21, 2016 11:18
Revisions
-
groovelab revised this gist
Feb 11, 2016 . 1 changed file with 6 additions and 5 deletions.There are no files selected for viewing
This file contains 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,9 +35,9 @@ $ sudo dpkg-reconfigure tzdata #### スナップショットからSwiftをインストール ``` $ wget https://swift.org/builds/development/ubuntu1510/swift-DEVELOPMENT-SNAPSHOT-2016-02-08-a/swift-DEVELOPMENT-SNAPSHOT-2016-02-08-a-ubuntu15.10.tar.gz $ tar xzf swift-DEVELOPMENT-SNAPSHOT-2016-02-08-a-ubuntu15.10.tar.gz $ cd swift-DEVELOPMENT-SNAPSHOT-2016-02-08-a-ubuntu15.10/ $ sudo chown -R root:root usr/ $ cd usr $ sudo cp -fR ./* /usr/ @@ -47,7 +47,7 @@ $ sudo cp -fR ./* /usr/ ``` $ sudo apt-get update $ sudo apt-get upgrade $ sudo apt-get -y install clang $ sudo apt-get clean ``` #### Swiftの動作確認 @@ -63,7 +63,8 @@ $ swift ## RPMパッケージをインストール ``` $ sudo apt-get -y install libssl-dev libevent-dev libsqlite3-dev libicu-dev libcurl4-openssl-dev uuid-dev make make-guile ``` ## PerfectLibをインストール -
groovelab revised this gist
Jan 19, 2016 . 1 changed file with 10 additions and 5 deletions.There are no files selected for viewing
This file contains 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 @@ -76,7 +76,10 @@ $ cd Perfect/PerfectLib $ sudo make clean $ sudo make $ sudo make install $ ll /usr/local/lib/*Perfect* /usr/local/lib/PerfectLib.so -> (your_home)/swift/Perfect/PerfectLib/PerfectLib.so /usr/local/lib/PerfectLib.swiftdoc -> (your_home)/swift/Perfect/PerfectLib/PerfectLib.swiftdoc /usr/local/lib/PerfectLib.swiftmodule -> (your_home)/swift/Perfect/PerfectLib/PerfectLib.swiftmodule $ cd ../../ ``` @@ -85,9 +88,11 @@ $ cd ../../ $ cd Perfect/PerfectServer $ sudo make clean $ sudo make $ sudo ln -sf "$(pwd)/perfectserverfcgi" /usr/local/bin/ $ sudo ln -sf "$(pwd)/perfectserverhttp" /usr/local/bin/ $ ll /usr/local/bin/perfect* /usr/local/bin/perfectserverfcgi -> (your_home)/SwiftBBS/Perfect/PerfectServer/perfectserverfcgi /usr/local/bin/perfectserverhttp -> (your_home)/SwiftBBS/Perfect/PerfectServer/perfectserverhttp $ cd ../../ ``` @@ -141,7 +146,7 @@ $ sudo make $ sudo mv mod_perfect.so /usr/lib/apache2/modules/ $ sudo chown root:root /usr/lib/apache2/modules/mod_perfect.so $ sudo chmod 644 /usr/lib/apache2/modules/mod_perfect.so $ ll /usr/lib/apache2/modules/mod_perfect.so ``` #### apacheの設定 -
groovelab revised this gist
Jan 18, 2016 . 2 changed files with 7 additions and 7 deletions.There are no files selected for viewing
This file contains 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 @@ -63,9 +63,7 @@ $ swift ## RPMパッケージをインストール ``` $ sudo apt-get -y install libssl-dev libevent-dev libsqlite3-dev make make-guile ``` ## PerfectLibをインストール @@ -79,18 +77,18 @@ $ sudo make clean $ sudo make $ sudo make install $ ls -al /usr/local/lib/*Perfect* $ cd ../../ ``` ## PerfectServerをインストール ``` $ cd Perfect/PerfectServer $ sudo make clean $ sudo make $ sudo ln -sf perfectserverfcgi /usr/local/lib/ $ sudo ln -sf perfectserverhttp /usr/local/lib/ $ ls -al /usr/local/bin/perfect* $ cd ../../ ``` This file contains 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,5 +1,7 @@ #! /bin/sh CWD=`dirname "${0}"` cd "${CWD}" PIDFILE="perfectserverfcgi.pid" do_start() { -
groovelab revised this gist
Jan 15, 2016 . 1 changed file with 6 additions and 6 deletions.There are no files selected for viewing
This file contains 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 @@ -75,8 +75,8 @@ $ mkdir swift $ cd swift $ git clone https://github.com/PerfectlySoft/Perfect.git $ cd Perfect/PerfectLib $ sudo make clean $ sudo make $ sudo make install $ ls -al /usr/local/lib/*Perfect* ``` @@ -85,8 +85,8 @@ $ ls -al /usr/local/lib/*Perfect* ``` $ cd ~/swift $ cd Perfect/PerfectServer $ sudo make clean $ sudo make $ cd /usr/local/bin/ $ sudo ln -s ~/swift/Perfect/PerfectServer/perfectserverfcgi $ sudo ln -s ~/swift/Perfect/PerfectServer/perfectserverhttp @@ -139,7 +139,7 @@ $ sudo ./perfectServerFcgi.sh restart ``` $ sudo apt-get -y install apache2 $ cd Connectors/mod_perfect/ $ sudo make $ sudo mv mod_perfect.so /usr/lib/apache2/modules/ $ sudo chown root:root /usr/lib/apache2/modules/mod_perfect.so $ sudo chmod 644 /usr/lib/apache2/modules/mod_perfect.so @@ -164,7 +164,7 @@ http://aws.your.domain へアクセス #### .soファイル ``` $ cd ~/swift/Perfect/Examples/ $ sudo make $ cd /var/www $ sudo mkdir PerfectLibraries $ sudo ln -s ~/swift/Perfect/Examples/URL\ Routing/URLRouting.so -
groovelab revised this gist
Jan 7, 2016 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains 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 @@ -101,6 +101,7 @@ $ ls -al /usr/local/bin/perfect* ``` $ cd /var/www $ sudo vi perfectServerHttp.sh $ sudo chmod +x perfectServerHttp.sh $ sudo ./perfectServerHttp.sh start ``` @@ -123,6 +124,7 @@ http://aws.your.domain:8181 へアクセス ``` $ cd /var/www $ sudo vi perfectServerFcgi.sh $ sudo chmod +x perfectServerFcgi.sh $ sudo ./perfectServerFcgi.sh start ``` -
groovelab revised this gist
Jan 7, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains 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 @@ -78,7 +78,7 @@ $ cd Perfect/PerfectLib $ make clean $ make $ sudo make install $ ls -al /usr/local/lib/*Perfect* ``` ## PerfectServerをインストール -
groovelab revised this gist
Jan 7, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains 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 @@ -74,7 +74,7 @@ $ cd ~ $ mkdir swift $ cd swift $ git clone https://github.com/PerfectlySoft/Perfect.git $ cd Perfect/PerfectLib $ make clean $ make $ sudo make install -
groovelab revised this gist
Jan 7, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains 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 @@ -40,7 +40,7 @@ $ tar xzf swift-2.2-SNAPSHOT-2015-12-22-a-ubuntu15.10.tar.gz $ cd swift-2.2-SNAPSHOT-2015-12-22-a-ubuntu15.10/ $ sudo chown -R root:root usr/ $ cd usr $ sudo cp -fR ./* /usr/ ``` #### RPMパッケージをインストール -
groovelab revised this gist
Jan 1, 2016 . 1 changed file with 23 additions and 4 deletions.There are no files selected for viewing
This file contains 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,22 +1,41 @@ #! /bin/sh PIDFILE="perfectserverfcgi.pid" do_start() { if [ -e $PIDFILE ]; then echo "already started, because $PIDFILE exists" exit 1 fi perfectserverfcgi & echo $! > $PIDFILE echo "start PID=$!" } do_stop() { if [ ! -e $PIDFILE ]; then echo "not started" exit 1 fi PID=$(cat $PIDFILE) kill -9 $PID rm $PIDFILE echo "stop PID=$PID" } case "$1" in start) do_start ;; stop) do_stop ;; restart) do_stop do_start ;; esac exit 0 -
groovelab revised this gist
Dec 27, 2015 . 1 changed file with 8 additions and 4 deletions.There are no files selected for viewing
This file contains 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 @@ -194,7 +194,11 @@ $ sudo cp ~/swift/Perfect/Examples/Tap\ Tracker/*.mustache taptracker/ $ ./perfectServerFcgi.sh restart ``` #### ブラウザから動作確認 * Authenticator * http://aws.your.domain/authenticator/ * Upload Enumerator * http://aws.your.domain/uploadfile/ * Tap Tracker * http://aws.your.domain/taptracker/ * URL Routing * http://aws.your.domain/foo/hogehoge/baz -
groovelab revised this gist
Dec 27, 2015 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains 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 @@ -184,8 +184,10 @@ $ sudo cp ~/swift/Perfect/Examples/Tap\ Tracker/*.mustache taptracker/ ``` > そのままだと Authenticatorが正しく動作しないので以下のように修正 ``` - document.location = '/login' + document.location = location.pathname + '/login' ``` #### PerfectServerを再起動 ``` -
groovelab revised this gist
Dec 27, 2015 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains 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 @@ -183,6 +183,10 @@ $ sudo cp ~/swift/Perfect/Examples/Upload\ Enumerator/Upload\ Enumerator/*.musta $ sudo cp ~/swift/Perfect/Examples/Tap\ Tracker/*.mustache taptracker/ ``` > そのままだと Authenticatorが正しく動作しないので以下のように修正 - document.location = '/login' + document.location = location.pathname + '/login' #### PerfectServerを再起動 ``` $ ./perfectServerFcgi.sh restart -
groovelab revised this gist
Dec 27, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains 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,7 +117,7 @@ http://aws.your.domain:8181 へアクセス #### Perfect Server FastCGI を起動 **Perfect Server FastCGI** はApacheからFastCGIとしてリクエストを処理するインターフェース > 以後、Perfect Server Httpは起動せず、*Perfect Server FastCGI*のみを起動する * 起動スクリプトを作成 ``` -
groovelab revised this gist
Dec 27, 2015 . 1 changed file with 12 additions and 12 deletions.There are no files selected for viewing
This file contains 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 @@ -94,46 +94,46 @@ $ ls -al /usr/local/bin/perfect* ``` #### Perfect Server HTTP を起動 **Perfect Server HTTP** はport:8181 でHTTPリクエストを受け付けるSwift製Webサーバ * 起動スクリプトを作成 ``` $ cd /var/www $ sudo vi perfectServerHttp.sh $ sudo ./perfectServerHttp.sh start ``` * usage ``` $ sudo ./perfectServerHttp.sh start $ sudo ./perfectServerHttp.sh stop $ sudo ./perfectServerHttp.sh restart ``` * ブラウザから動作確認 http://aws.your.domain:8181 へアクセス #### Perfect Server FastCGI を起動 **Perfect Server FastCGI** はApacheからFastCGIとしてリクエストを処理するインターフェース > 以下、Perfect Server Httpは起動せず、*Perfect Server FastCGI*のみを起動する * 起動スクリプトを作成 ``` $ cd /var/www $ sudo vi perfectServerFcgi.sh $ sudo ./perfectServerFcgi.sh start ``` * usage ``` $ sudo ./perfectServerFcgi.sh start $ sudo ./perfectServerFcgi.sh stop $ sudo ./perfectServerFcgi.sh restart ``` #### mod_perfect インストール ``` $ sudo apt-get -y install apache2 $ cd Connectors/mod_perfect/ @@ -144,7 +144,7 @@ $ sudo chmod 644 /usr/lib/apache2/modules/mod_perfect.so $ ls -al /usr/lib/apache2/modules/mod_perfect.so ``` #### apacheの設定 ``` $ cd /etc/apache2 $ sudo vi mods-available/perfect.load @@ -159,7 +159,7 @@ $ sudo service apache2 start http://aws.your.domain へアクセス ## Exampleのデプロイ #### .soファイル ``` $ cd ~/swift/Perfect/Examples/ $ make @@ -171,7 +171,7 @@ $ sudo ln -s ~/swift/Perfect/Examples/Upload\ Enumerator/UploadEnumerator.so $ sudo ln -s ~/swift/Perfect/Examples/Tap\ Tracker/TapTrackerServer.so ``` #### .mustacheファイル ``` $ cd /var/www $ cd html @@ -183,7 +183,7 @@ $ sudo cp ~/swift/Perfect/Examples/Upload\ Enumerator/Upload\ Enumerator/*.musta $ sudo cp ~/swift/Perfect/Examples/Tap\ Tracker/*.mustache taptracker/ ``` #### PerfectServerを再起動 ``` $ ./perfectServerFcgi.sh restart ``` -
groovelab revised this gist
Dec 27, 2015 . 5 changed files with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes.File renamed without changes.File renamed without changes.File renamed without changes.File renamed without changes. -
groovelab revised this gist
Dec 27, 2015 . 3 changed files with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes.File renamed without changes.File renamed without changes. -
groovelab revised this gist
Dec 27, 2015 . 4 changed files with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes.File renamed without changes.File renamed without changes.File renamed without changes. -
groovelab revised this gist
Dec 27, 2015 . No changes.There are no files selected for viewing
-
groovelab revised this gist
Dec 27, 2015 . No changes.There are no files selected for viewing
-
groovelab revised this gist
Dec 27, 2015 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains 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,6 +93,7 @@ $ sudo ln -s ~/swift/Perfect/PerfectServer/perfectserverhttp $ ls -al /usr/local/bin/perfect* ``` ### Perfect Server HTTP を起動 **Perfect Server HTTP** はport:8181 でHTTPリクエストを受け付けるSwift製Webサーバ -
groovelab revised this gist
Dec 27, 2015 . No changes.There are no files selected for viewing
-
groovelab revised this gist
Dec 27, 2015 . 1 changed file with 0 additions and 3 deletions.There are no files selected for viewing
This file contains 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,3 @@ # AWS ## EC2インスタンスを作成 #### AMI -
groovelab revised this gist
Dec 27, 2015 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains 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,3 +1,6 @@ # UbuntuでSwiftとPerfectLibのサンプルを動かしてみる --------------------------------------- # AWS ## EC2インスタンスを作成 #### AMI -
groovelab revised this gist
Dec 27, 2015 . 1 changed file with 8 additions and 14 deletions.There are no files selected for viewing
This file contains 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,6 +116,8 @@ http://aws.your.domain:8181 へアクセス ### Perfect Server FastCGI を起動 **Perfect Server FastCGI** はApacheからFastCGIとしてリクエストを処理するインターフェース > 以下、Perfect Server Httpは起動せず、*Perfect Server FastCGI*のみを起動する #### 起動スクリプトを作成 ``` $ cd /var/www @@ -166,13 +168,12 @@ $ sudo ln -s ~/swift/Perfect/Examples/URL\ Routing/URLRouting.so $ sudo ln -s ~/swift/Perfect/Examples/Authenticator/AuthenticatorServer.so $ sudo ln -s ~/swift/Perfect/Examples/Upload\ Enumerator/UploadEnumerator.so $ sudo ln -s ~/swift/Perfect/Examples/Tap\ Tracker/TapTrackerServer.so ``` ### .mustacheファイル ``` $ cd /var/www $ cd html $ sudo mkdir authenticator $ sudo mkdir taptracker $ sudo mkdir uploadfile @@ -183,17 +184,10 @@ $ sudo cp ~/swift/Perfect/Examples/Tap\ Tracker/*.mustache taptracker/ ### PerfectServerを再起動 ``` $ ./perfectServerFcgi.sh restart ``` #### ブラウザから動作確認 * http://aws.your.domain/authenticator/ * http://aws.your.domain/uploadfile/ * http://aws.your.domain/taptracker/ * http://aws.your.domain/foo/hogehoge/baz -
groovelab revised this gist
Dec 27, 2015 . 1 changed file with 2 additions and 25 deletions.There are no files selected for viewing
This file contains 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,35 +1,12 @@ <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www/webroot ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined # for perfect <Directory "/var/www/webroot"> Require all granted DirectoryIndex index.mustache index.html </Directory> -
groovelab revised this gist
Dec 27, 2015 . 1 changed file with 62 additions and 0 deletions.There are no files selected for viewing
This file contains 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,62 @@ <VirtualHost *:80> # The ServerName directive sets the request scheme, hostname and port that # the server uses to identify itself. This is used when creating # redirection URLs. In the context of virtual hosts, the ServerName # specifies what hostname must appear in the request's Host: header to # match this virtual host. For the default virtual host (this file) this # value is not decisive as it is used as a last resort host regardless. # However, you must set it for any further virtual host explicitly. #ServerName www.example.com ServerAdmin webmaster@localhost DocumentRoot /var/www/html # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, # error, crit, alert, emerg. # It is also possible to configure the loglevel for particular # modules, e.g. #LogLevel info ssl:warn ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined # For most configuration files from conf-available/, which are # enabled or disabled at a global level, it is possible to # include a line for only one particular virtual host. For example the # following line enables the CGI configuration for this host only # after it has been globally disabled with "a2disconf". #Include conf-available/serve-cgi-bin.conf # for perfect <Directory "/var/www/html"> Require all granted DirectoryIndex index.mustache index.html </Directory> RewriteEngine on # unless a directory, remove trailing slash RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d RewriteRule ^(.*)/$ $1 [R=301,L] # resolve .mustache file for extensionless mustache urls RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME}\.mustache -f RewriteRule ^(.*)$ $1.mustache [NC,PT,L] # redirect external .mustache requests to extensionless url RewriteCond %{THE_REQUEST} ^[A-Z]+\ /([^/]+/)*[^.#?\ ]+\.mustache([#?][^\ ]*)?\ HTTP/ RewriteRule ^(([^/]+/)*[^.]+)\.mustache $1 [R=301,L] <Location ~ "^.*\.[Mm][Uu][Ss][Tt][Aa][Cc][Hh][Ee]$"> SetHandler perfect-handler </Location> # for using Perfect's URL routing system RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d RewriteRule (.*) - [L,NS,H=perfect-handler] </VirtualHost> -
groovelab renamed this gist
Dec 27, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
groovelab renamed this gist
Dec 27, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
groovelab revised this gist
Dec 27, 2015 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains 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 @@ LoadModule perfect_module /usr/lib/apache2/modules/mod_perfect.so -
groovelab revised this gist
Dec 27, 2015 . 1 changed file with 33 additions and 4 deletions.There are no files selected for viewing
This file contains 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 @@ -11,7 +11,7 @@ SSH, HTTP を許可 #### elastic IP xxx.xxx.xxx.xxx -> EC2インスタンスに割り当て #### DNS aws.your.domain A xxx.xxx.xxx.xxx 追加 ## ssh #### キーペアを作成する @@ -56,6 +56,7 @@ $ swift --version $ swift ``` --------------------------------------- # PerfectLib インストール * 公式サイト [PerfectLib](https://www.perfect.org/) * 公式ドキュメント [Github](https://github.com/PerfectlySoft/Perfect) @@ -110,7 +111,7 @@ $ sudo ./perfectServerHttp.sh restart ``` #### ブラウザから動作確認 http://aws.your.domain:8181 へアクセス ### Perfect Server FastCGI を起動 **Perfect Server FastCGI** はApacheからFastCGIとしてリクエストを処理するインターフェース @@ -152,9 +153,10 @@ $ sudo service apache2 start ``` #### ブラウザから動作確認 http://aws.your.domain へアクセス ## Exampleのデプロイ ### .soファイル ``` $ cd ~/swift/Perfect/Examples/ $ make @@ -165,6 +167,33 @@ $ sudo ln -s ~/swift/Perfect/Examples/Authenticator/AuthenticatorServer.so $ sudo ln -s ~/swift/Perfect/Examples/Upload\ Enumerator/UploadEnumerator.so $ sudo ln -s ~/swift/Perfect/Examples/Tap\ Tracker/TapTrackerServer.so $ cd ../ ``` ### .mustacheファイル ``` $ sudo mkdir webroot $ cd webroot $ sudo mkdir authenticator $ sudo mkdir taptracker $ sudo mkdir uploadfile $ sudo cp ~/swift/Perfect/Examples/Authenticator/Authenticator/*.mustache authenticator/ $ sudo cp ~/swift/Perfect/Examples/Upload\ Enumerator/Upload\ Enumerator/*.mustache uploadfile/ $ sudo cp ~/swift/Perfect/Examples/Tap\ Tracker/*.mustache taptracker/ ``` ### PerfectServerを再起動 ``` $ ./perfectServerHttp.sh restart $ ./perfectServerFcgi.sh restart ``` #### ブラウザから動作確認 * Perfect Server Http * http://aws.your.domain:8181/authenticator/ * http://aws.your.domain:8181/uploadfile/ * http://aws.your.domain:8181/taptracker/ * http://aws.your.domain:8181/foo/hogehoge/baz * Perfect Server FastCGI * http://aws.your.domain/authenticator/ * http://aws.your.domain/uploadfile/ * http://aws.your.domain/taptracker/ * http://aws.your.domain/foo/hogehoge/baz
NewerOlder