$ sudo aptitude -y install ruby
$ sudo vim /etc/apache2/mods-enabled/mime.conf
# 218行目:Rubyスクリプトとして扱う拡張子を追記
AddHandler cgi-script .cgi .pl .rb
$ sudo service apache2 restart
* Restarting web server apache2
... waiting ...done.
[2] Rubyテストページを作成して動作確認をします。作成したテストページにWebブラウザでアクセスして、以下のようなページが表示されればOKです。
$ sudo vim /var/www/index.rb
#!/usr/bin/ruby
print "Content-type: text/html\n\n"
print "<html>\n<body>\n"
print "<div style=\"width: 100%; font-size: 40px; font-weight: bold; text-align: center;\">\n"
print "Ruby Test Page<br />"
print Time.now.strftime('%Y/%m/%d')
print "\n</div>\n"
print "</body>\n</html>\n"
$ sudo chmod 705 /var/www/index.rb
Wednesday, January 29, 2014
Tuesday, January 28, 2014
Ubuntu Server 12.04: PHP Install
Ubuntu Server 12.04: PHP Install:
--------------------------------------------------------------------------------
$ sudo aptitude -y install php5 php5-cgi libapache2-mod-php5 php5-common php-pear
$ sudo vim /etc/apache2/mods-enabled/mime.conf
# 219行目あたりにでも追記:PHPとして扱う拡張子を設定
AddHandler php5-script .php
$ sudo service apache2 restart
* Restarting web server apache2
... waiting ...done.
[2] PHPテストページを作成して動作確認をします。以下のようなページが表示されればOKです。
$ sudo vim /var/www/index.php
<html>
<body>
<div style="width: 100%; font-size: 40px; font-weight: bold; text-align:center;">
<?php
print Date("Y/m/d");
?>
</div>
</body>
</html>
--------------------------------------------------------------------------------
$ sudo aptitude -y install php5 php5-cgi libapache2-mod-php5 php5-common php-pear
$ sudo vim /etc/apache2/mods-enabled/mime.conf
# 219行目あたりにでも追記:PHPとして扱う拡張子を設定
AddHandler php5-script .php
$ sudo service apache2 restart
* Restarting web server apache2
... waiting ...done.
[2] PHPテストページを作成して動作確認をします。以下のようなページが表示されればOKです。
$ sudo vim /var/www/index.php
<html>
<body>
<div style="width: 100%; font-size: 40px; font-weight: bold; text-align:center;">
<?php
print Date("Y/m/d");
?>
</div>
</body>
</html>
Saturday, January 18, 2014
Tuesday, January 7, 2014
Ubuntu Server 12.04: Apache2 Web Server Install
Ubuntu Server 12.04: Web Server
--------------------------------------------------------------------------------
$ sudo aptitude -y install apache2
$ sudo vim /etc/apache2/conf.d/security
# 27行目:変更
ServerTokens Prod
# 39行目:変更
ServerSignature Off
$ sudo vim /etc/apache2/mods-enabled/mime.conf
# 218行目:コメント解除し、CGIとして扱う拡張子を設定
AddHandler cgi-script .cgi .pl
$ sudo vim /etc/apache2/sites-available/default
# 2行目:管理者アドレス変更
ServerAdmin webmaster@server.world
# 10行目:変更 ( Indexes は削除 )
Options FollowSymLinks ExecCGI
# 11行目:変更
AllowOverride All
$ ln -s /usr/bin/perl /usr/local/bin/perl
$ sudo service apache2 restart
http://192.168.0.40/
$ sudo vim /var/www/index.cgi
#!/usr/local/bin/perl
print "Content-type: text/html\n\n";
print "<html>\n<body>\n";
print "<div style=\"width: 100%; font-size: 40px; font-weight: bold; text-align: center;\">\n";
print "CGI Test Page";
print "\n</div>\n";
print "</body>\n</html>\n";
$ chmod 705 /var/www/index.cgi
--------------------------------------------------------------------------------
$ sudo aptitude -y install apache2
$ sudo vim /etc/apache2/conf.d/security
# 27行目:変更
ServerTokens Prod
# 39行目:変更
ServerSignature Off
$ sudo vim /etc/apache2/mods-enabled/mime.conf
# 218行目:コメント解除し、CGIとして扱う拡張子を設定
AddHandler cgi-script .cgi .pl
$ sudo vim /etc/apache2/sites-available/default
# 2行目:管理者アドレス変更
ServerAdmin webmaster@server.world
# 10行目:変更 ( Indexes は削除 )
Options FollowSymLinks ExecCGI
# 11行目:変更
AllowOverride All
$ ln -s /usr/bin/perl /usr/local/bin/perl
$ sudo service apache2 restart
http://192.168.0.40/
$ sudo vim /var/www/index.cgi
#!/usr/local/bin/perl
print "Content-type: text/html\n\n";
print "<html>\n<body>\n";
print "<div style=\"width: 100%; font-size: 40px; font-weight: bold; text-align: center;\">\n";
print "CGI Test Page";
print "\n</div>\n";
print "</body>\n</html>\n";
$ chmod 705 /var/www/index.cgi
京都大学病院 - しかしすごい
今日は初めて大学病院行ってきました。しかも京都大学病院。
すごい病院ですね。最先端の病院ですね。弟の診療とけんさ二行きましたが、なんだか逆に感動してしまいました。
すばらしい施設です。自分は人生の中で初めて見ました。
もしかして、東京大学病院はもっとすごいのかな。
すごい病院ですね。最先端の病院ですね。弟の診療とけんさ二行きましたが、なんだか逆に感動してしまいました。
すばらしい施設です。自分は人生の中で初めて見ました。
もしかして、東京大学病院はもっとすごいのかな。
Monday, January 6, 2014
Ubuntu Server 12.04: Static IP
Ubuntu Server 12.04: Static IP
--------------------------------------------------------------------------------
まずは、vimで/etc/network/interfacesを編集します。
$ sudo vim /etc/network/interfaces
下記のような感じで編集
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.0.******* ←固定ip
netmask 255.255.255.**** ←ネットマスク
gateway 192.168.0.*** ←デフォルトゲートウェイ(ルータのipでおk)
最後に
$ sudo /etc/init.d/networking restart
ipconfigでちゃんとなってたらOK
$ sudo vim /etc/resolv.conf
で下記の1行を追加する。
nameserver 192.168.xx.1
保存して終了
Ubuntu Server 12.04: SSH Server is default install with default port:
--------------------------------------------------------------------------------
まずは、vimで/etc/network/interfacesを編集します。
$ sudo vim /etc/network/interfaces
下記のような感じで編集
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.0.******* ←固定ip
netmask 255.255.255.**** ←ネットマスク
gateway 192.168.0.*** ←デフォルトゲートウェイ(ルータのipでおk)
最後に
$ sudo /etc/init.d/networking restart
ipconfigでちゃんとなってたらOK
$ sudo vim /etc/resolv.conf
で下記の1行を追加する。
nameserver 192.168.xx.1
保存して終了
Ubuntu Server 12.04: SSH Server is default install with default port:
Wednesday, January 1, 2014
2014年元旦初詣
2014年元旦です。
時間って早い者ですね。日本にきたのは2000年4月、そろそろ14年になります。
あっというまでした。
本日百舌鳥八幡へ初詣へ行きました。
日本に来て初めておみくじで大吉が出ました。そして今年は馬年ということで、年男です。
なんかわからんけどちょっとうれしいです。
今日は2回初詣行きました。1回目は百舌鳥八幡宮と2回目は天満宮へ行きました。
大阪は住吉大社が一番人気らしいけど、なんだか天満宮へ言ってきました。
今年は年男と言うこともあり、おみくじでも大吉と言うことなので、プライベートを充実していきたい年にしたいと思います。
今年は最高の一年にするぞおおおおお!!!!
Subscribe to:
Comments (Atom)



