goo blog サービス終了のお知らせ 

インターネット巡回生活

ほぼほぼ、書きなぐり雑記かも

Linuxサーバーをつくってみる その10

2013-12-10 | 日常
つながることは分かったので、xamppの世界に戻してみる

apacheの設定が最初のハードルなので(前回はうまくいかなかった)この部分をしばらく探求することになる
基本の設定ファイルは /opt/lampp/etc/httpd.conf (の初期状態)
うーむ、そもそも サクラエディタのマクロを組んで行番号付きのテキストにしないとダメだなあ、、、delphiで作るほうが楽かな

#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/trunk/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/trunk/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path. If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so 'log/access_log'
# with ServerRoot set to '/www' will be interpreted by the
# server as '/www/log/access_log', where as '/log/access_log' will be
# interpreted as '/log/access_log'.

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# Do not add a slash at the end of the directory path. If you point
# ServerRoot at a non-local disk, be sure to specify a local disk on the
# Mutex directive, if file-based mutexes are used. If you wish to share the
# same ServerRoot for multiple httpd daemons, you will need to change at
# least PidFile.
#
ServerRoot "/opt/lampp"

#
# Mutex: Allows you to set the mutex mechanism and mutex file directory
# for individual mutexes, or change the global defaults
#
# Uncomment and change the directory if mutexes are file-based and the default
# mutex file directory is not on a local disk or is not appropriate for some
# other reason.
#
# Mutex default:logs

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 80

#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_dbd_module modules/mod_authn_dbd.so
LoadModule authn_socache_module modules/mod_authn_socache.so
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_dbd_module modules/mod_authz_dbd.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_form_module modules/mod_auth_form.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule allowmethods_module modules/mod_allowmethods.so
LoadModule file_cache_module modules/mod_file_cache.so
LoadModule cache_module modules/mod_cache.so
LoadModule cache_disk_module modules/mod_cache_disk.so
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
LoadModule socache_dbm_module modules/mod_socache_dbm.so
LoadModule socache_memcache_module modules/mod_socache_memcache.so
LoadModule dbd_module modules/mod_dbd.so
LoadModule bucketeer_module modules/mod_bucketeer.so
LoadModule dumpio_module modules/mod_dumpio.so
LoadModule echo_module modules/mod_echo.so
LoadModule case_filter_module modules/mod_case_filter.so
LoadModule case_filter_in_module modules/mod_case_filter_in.so
LoadModule buffer_module modules/mod_buffer.so
LoadModule ratelimit_module modules/mod_ratelimit.so
LoadModule reqtimeout_module modules/mod_reqtimeout.so
LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule request_module modules/mod_request.so
LoadModule include_module modules/mod_include.so
LoadModule filter_module modules/mod_filter.so
LoadModule substitute_module modules/mod_substitute.so
LoadModule sed_module modules/mod_sed.so
LoadModule charset_lite_module modules/mod_charset_lite.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule mime_module modules/mod_mime.so
LoadModule ldap_module modules/mod_ldap.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule log_debug_module modules/mod_log_debug.so
LoadModule logio_module modules/mod_logio.so
LoadModule env_module modules/mod_env.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule unique_id_module modules/mod_unique_id.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule version_module modules/mod_version.so
LoadModule remoteip_module modules/mod_remoteip.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
LoadModule proxy_scgi_module modules/mod_proxy_scgi.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_express_module modules/mod_proxy_express.so
LoadModule session_module modules/mod_session.so
LoadModule session_cookie_module modules/mod_session_cookie.so
LoadModule session_dbd_module modules/mod_session_dbd.so
LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
LoadModule ssl_module modules/mod_ssl.so
LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so
LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so
LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so
LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so
LoadModule unixd_module modules/mod_unixd.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule info_module modules/mod_info.so
LoadModule suexec_module modules/mod_suexec.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule cgid_module modules/mod_cgid.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so

<IfDefine JUSTTOMAKEAPXSHAPPY>
LoadModule php4_module modules/libphp4.so
LoadModule php5_module modules/libphp5.so
</IfDefine>

<IfModule unixd_module>
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User daemon
Group daemon
</IfModule>

# 'Main' server configuration
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition. These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#

#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed. This address appears on some server-generated pages, such
# as error documents. e.g. admin@your-domain.com
#
ServerAdmin you@example.com

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
#ServerName www.example.com:@@Port@@
# XAMPP
ServerName localhost

#
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other
# <Directory> blocks below.
#
<Directory />
AllowOverride none
Require all denied
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/opt/lampp/htdocs"
<Directory "/opt/lampp/htdocs">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/trunk/mod/core.html#options
# for more information.
#
#Options Indexes FollowSymLinks
# XAMPP
Options Indexes FollowSymLinks ExecCGI Includes

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
#AllowOverride None
# since XAMPP 1.4:
AllowOverride All

#
# Controls who can get stuff from this server.
#
Require all granted
</Directory>

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
#DirectoryIndex index.html
# XAMPP
DirectoryIndex index.html index.html.var index.php index.php3 index.php4
</IfModule>

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<Files ".ht*">
Require all denied
</Files>

#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here. If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog "logs/error_log"

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn

<IfModule log_config_module>
#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common

<IfModule logio_module>
# You need to enable mod_logio.c to use %I and %O
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>

#
# The location and format of the access logfile (Common Logfile Format).
# If you do not define any access logfiles within a <VirtualHost>
# container, they will be logged here. Contrariwise, if you *do*
# define per-<VirtualHost> access logfiles, transactions will be
# logged therein and *not* in this file.
#
CustomLog "logs/access_log" common

#
# If you prefer a logfile with access, agent, and referer information
# (Combined Logfile Format) you can use the following directive.
#
#CustomLog "logs/access_log" combined
</IfModule>

<IfModule alias_module>
#
# Redirect: Allows you to tell clients about documents that used to
# exist in your server's namespace, but do not anymore. The client
# will make a new request for the document at its new location.
# Example:
# Redirect permanent /foo http://www.example.com/bar

#
# Alias: Maps web paths into filesystem paths and is used to
# access content that does not live under the DocumentRoot.
# Example:
# Alias /webpath /full/filesystem/path
#
# If you include a trailing / on /webpath then the server will
# require it to be present in the URL. You will also likely
# need to provide a <Directory> section to allow access to
# the filesystem path.

#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the target directory are treated as applications and
# run by the server when requested rather than as documents sent to the
# client. The same rules about trailing "/" apply to ScriptAlias
# directives as to Alias.
#
ScriptAlias /cgi-bin/ "/opt/lampp/cgi-bin/"

</IfModule>

<IfModule cgid_module>
#
# ScriptSock: On threaded servers, designate the path to the UNIX
# socket used to communicate with the CGI daemon of mod_cgid.
#
#Scriptsock logs/cgisock
</IfModule>

#
# "/opt/lampp/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/opt/lampp/cgi-bin">
AllowOverride None
Options None
Require all granted
</Directory>

<IfModule mime_module>
#
# TypesConfig points to the file containing the list of mappings from
# filename extension to MIME-type.
#
TypesConfig etc/mime.types

#
# AddType allows you to add to or override the MIME configuration
# file specified in TypesConfig for specific file types.
#
#AddType application/x-gzip .tgz
#
# AddEncoding allows you to have certain browsers uncompress
# information on the fly. Note: Not all browsers support this.
#
#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz
#
# If the AddEncoding directives above are commented-out, then you
# probably should define those extensions to indicate media types:
#
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz

#
# AddHandler allows you to map certain file extensions to "handlers":
# actions unrelated to filetype. These can be either built into the server
# or added with the Action directive (see below)
#
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#
#AddHandler cgi-script .cgi
# XAMPP, since LAMPP 0.9.8:
AddHandler cgi-script .cgi .pl

# For type maps (negotiated resources):
#AddHandler type-map var

#
# Filters allow you to process content before it is sent to the client.
#
# To parse .shtml files for server-side includes (SSI):
# (You will also need to add "Includes" to the "Options" directive.)
#
# XAMPP
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
</IfModule>

#
# The mod_mime_magic module allows the server to use various hints from the
# contents of the file itself to determine its type. The MIMEMagicFile
# directive tells the module where the hint definitions are located.
#
#MIMEMagicFile etc/magic

#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
#

#
# MaxRanges: Maximum number of Ranges in a request before
# returning the entire resource, or one of the special
# values 'default', 'none' or 'unlimited'.
# Default setting is to accept 200 Ranges.
#MaxRanges unlimited

#
# EnableMMAP and EnableSendfile: On systems that support it,
# memory-mapping or the sendfile syscall may be used to deliver
# files. This usually improves server performance, but must
# be turned off when serving from networked-mounted
# filesystems or if support for these functions is otherwise
# broken on your system.
# Defaults: EnableMMAP On, EnableSendfile Off
#
EnableMMAP off
EnableSendfile off

# Supplemental configuration
#
# The configuration files in the etc/extra/ directory can be
# included to add extra features or to modify the default configuration of
# the server, or you may simply copy their contents here and change as
# necessary.

# Server-pool management (MPM specific)
#Include etc/extra/httpd-mpm.conf

# Multi-language error messages
Include etc/extra/httpd-multilang-errordoc.conf

# Fancy directory listings
Include etc/extra/httpd-autoindex.conf

# Language settings
#Include etc/extra/httpd-languages.conf

# User home directories
#Include etc/extra/httpd-userdir.conf

# Real-time info on requests and configuration
#Include etc/extra/httpd-info.conf

# Virtual hosts
#Include etc/extra/httpd-vhosts.conf

# Local access to the Apache HTTP Server Manual
#Include etc/extra/httpd-manual.conf

# Distributed authoring and versioning (WebDAV)
#Include etc/extra/httpd-dav.conf

# Various default settings
Include etc/extra/httpd-default.conf

# Configure mod_proxy_html to understand HTML4/XHTML1
<IfModule proxy_html_module>
Include etc/extra/proxy-html.conf
</IfModule>

# Secure (SSL/TLS) connections
<IfModule ssl_module>
# XAMPP
<IfDefine SSL>
Include etc/extra/httpd-ssl.conf
</IfDefine>
</IfModule>
#
# Note: The following must must be present to support
# starting without SSL on platforms with no /dev/random equivalent
# but a statically compiled-in mod_ssl.
#
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>

# XAMPP
Include etc/extra/httpd-xampp.conf
Include "/opt/lampp/apache2/conf/httpd.conf"

## このファイルは xampp 2013/12/10 /opt/lampp/extra/httpd-xampp.conf
#<IfDefine PHP4>
#LoadModule php4_module modules/libphp4.so
#</IfDefine>
#<IfDefine PHP5>
#LoadModule php5_module modules/libphp5.so
#</IfDefine>

# We will enable it by default
#<IfDefine PHP>
LoadModule php5_module modules/libphp5.so
#</IfDefine>

LoadModule perl_module modules/mod_perl.so

Alias /phpmyadmin "/opt/lampp/phpmyadmin"
Alias /phpsqliteadmin "/opt/lampp/phpsqliteadmin"

# since XAMPP 1.4.3
<Directory "/opt/lampp/phpmyadmin">
AllowOverride AuthConfig Limit
Require all granted
</Directory>

<Directory "/opt/lampp/phpsqliteadmin">
AllowOverride AuthConfig Limit
Order allow,deny
Allow from all
</Directory>

# since LAMPP 1.0RC1
AddType application/x-httpd-php .php .php3 .php4

XBitHack on

# since 0.9.8 we've mod_perl
<IfModule mod_perl.c>
AddHandler perl-script .pl
PerlHandler ModPerl::PerlRunPrefork
PerlOptions +ParseHeaders
PerlSendHeader On
</IfModule>

# demo for mod_perl responsehandler
#PerlModule Apache::CurrentTime
#<Location /time>
# SetHandler modperl
# PerlResponseHandler Apache::CurrentTime
#</Location>

# AcceptMutex sysvsem is default but on some systems we need this
# thanks to jeff ort for this hint
#AcceptMutex flock
#LockFile /opt/lampp/logs/accept.lock

# this makes mod_dbd happy - oswald, 02aug06
# mod_dbd doesn't work in Apache 2.2.3: getting always heaps of "glibc detected *** corrupted double-linked list" on shutdown - oswald, 10sep06
#DBDriver sqlite3

#
# New XAMPP security concept
#
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Deny from all
Allow from ::1 127.0.0.0/8 \
fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
fe80::/10 169.254.0.0/16

ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>

## xampp このファイルは /opt/lampp/apache2/conf/httpd.conf 2013/12/10

Alias /bitnami/ "/opt/lampp/apache2/htdocs/"
Alias /bitnami "/opt/lampp/apache2/htdocs"

<Directory "/opt/lampp/apache2/htdocs">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>

コメント (1485)
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする

統計環境R で散布図作成

2013-12-09 | 日常
体重、身長の散布図を作成したい。男女別に色分けして作成したいがどうすればいいか。


#ここから
x <- c(53,38,72,64,51)
y <- c(160,150,180,170,165)
z <- c(1,0,1,0,1)
z_col <- ifelse(z == 0,"red","blue")
plot(x,y,col=z_col,pch=16)
# とりあえず、ここまで

#あまりにもシンプルなので、いろいろ設定してみる
plot(x,y,col=z_col,pch=16,cex=1.5
,main="身長、体重の男女別散布図", xlab="体重",ylab="身長")

#凡例も追加、ちなみに、最初の2つの引数はグラフ上の
#位置(x,y)なので、あなたのデータでは調整が必要
#普通は、位置を決めるプログラムを書いたりする
#(excelみたいなオートマチックではない)
#、、手動で位置決めとかはあるが。

legend(62,160, c("女","男"), cex=1.5, pch=16,col=c("red","blue"))


#回帰線を引いてみる
xy.lm <- lm(y~x)
abline(xy.lm,col="black",lwd=2,lty=2)

#回帰分析の結果
summary(xy.lm)

# 身長(y) = 118.6119 + x * 0.8343
コメント
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする

Linuxサーバーをつくってみる その9

2013-12-05 | 日常
* アンインストール
XAMPPをアンインストールするには、以下のコマンド入力するだけです:
rm -rf /opt/lampp
これで終わりです。

10章Webサーバーを作る
素直にApache HTTP Server を導入する。
yum install httpd httpd-manual

vi /etc/httpd/conf/httpd.conf


運用として、Linuxユーザーごとに、ページを持てる運用にしてみる。
よく、HPアドレスの最終レベルが ~(チルダ)始めるページというのは、
この運用なんですね。
ユーザーディレクトリ作成(/~ユーザー名/)
サービスの起動

service httpd start

サービスの自動起動登録
chkconfig httpd on


とりあえず、yahoo!のburiburipipiのページを転送してみる。
カウンタは死んでしまうが普通に表示できる。

コメント (2)
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする

最近の順位

2013-12-03 | 日常
知恵袋トップ>インターネット、PCと家電カテゴリ選択>インターネットカテゴリ選択>インターネットラジオ

まあ、こんなことやっているわけです
コメント
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする

Linuxサーバーをつくってみる その8

2013-12-02 | 日常
XAMPP
たくさんの人が経験上、Apache Web ServerとMySQL、PHP、Perlのインストールと連携が難しいと知っています。
XAMPPはMySQLやPHPやPerlを含んだApacheディストリビューションとして簡単にインストールすることができます。インストールは、「ダウンロードして、展開して、実行するだけ」。本当にとても簡単です。

現在XAMPPには4つのバージョンがあります:
* XAMPP for Linux
Linux版(SuSE, RedHat, Mandrake,Debianでテストを行っています)
次のソフトウェアが含まれています:
Apache, MySQL, PHP & PEAR, Perl, ProFTPD, phpMyAdmin, OpenSSL, GD, Freetype2, libjpeg, libpng, gdbm, zlib, expat, Sablotron, libxml, Ming, Webalizer, pdf class, ncurses, mod_perl, FreeTDS, gettext, mcrypt, mhash, eAccelerator, SQLite, IMAP C-Client。

まあ、そういうことで、各ソフトのそこそこ新しい安定版を一気にセットアップできる。
ですが、
XAMPPは開発者の皆様が、簡単にApacheの環境を構築できることを目的に設計されています。そのため、開発しやすいよう、XAMPPのデフォルト設定はすべての機能が有効になっています。

デフォルトの設定では、セキュリティ上好ましくありません。本番環境で利用するには十分なセキュリティが確保できません。このような環境のままXAMPPは使わないでください。
LAMPP 0.9.5以降であれば、次のコマンドでXAMPPのセキュリティ設定を行うことができます。
»/opt/lampp/lampp security«.

セキュリティ設定をおこなう。
しかし!!
 ルーター越しの接続ができない。サーバーまで外から届くので、Apacheのパラメータ設定だけなのだが
うーん、、何日もジタバタしたが、結構難しい。
コメント
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする

Linuxサーバーをつくってみる その7

2013-11-29 | 日常
第8章はDNSサーバーの設定、第9章はメールサーバーの設定となっているが固定IPでないとこの機能は使いにくい。
第10章はWebサーバーを作るでApacheのセットアップなのだが、いまXAMPP
をセットアップして、お手軽にやろうとしているが、初期画面はでるのだが、修正しようとするとうーん、Apacheは難しい。ジタバタと作業中。
コメント (4)
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする

Linuxサーバーをつくってみる その6

2013-11-28 | 日常
第7章Linuxをリモート操作する (その2)

日本では、Tera Termというのがわりと有名らしいが、なぜか接続ができない。
仕方ないので、PuTTY(パティ)というのを探し当てた。これなら、普通にログインできる。
WinSCPもセットアップせよ。というのでやってみる。
これも大丈夫。ただ、rootでのログインを規制しているので、まあ、セットアップ作業中は結構不便。
うーん、サーバーは机からはちょっと離れたところに置かざるをえないので、ultra VNCで
つなごうかとも思うが、これは少し先の話にしよう。
コメント
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする

Linuxサーバーをつくってみる その5

2013-11-26 | 日常
第7章Linuxをリモート操作する (その1)
SSH(Secure Shell)という、暗号化された通信で接続する。

sshd の設定(sshd_config)
(1)使用するプロトコルは2だけ
× Protocol 2,1
○ Protocol 2
(2)rootではログオンできない
× #PermitRootLogin
○ PermitRootLogin yes
(3)パスワード認証をおこなう(デフォルト)
 PasswordAuthentication yes


SSHD_CONFIG (5)
(4)AllowUsers (許可するユーザ)
このキーワードにはいくつかのユーザ名パターンをスペースで区切って指定します。これが指定されると、そのパターンのどれかにマッチするユーザだけがログインを許可されます。有効なのはユーザの「名前」だけで、数字で表されたユーザ ID は認識されません。デフォルトでは、ログインはすべてのユーザに許可されています。もしこのパターンが USER@HOST という形をとっている時は、ユーザ名 USER と ホスト名 HOST を別々にチェックでき、特定のホストからの特定のユーザのログインを制限することができます。allow/deny 関連の項目は以下の順に処理されます:DenyUsers 、AllowUsers 、DenyGroups 、そして最後にAllowGroups 。


sshd_configを編集したら
SSHサーバの再起動
service sshd restart

ちなみに、linux起動時にsshdが起動させるためには、
chkconfig sshd on
コメント
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする

Linuxサーバーをつくってみる その4

2013-11-25 | 日常
第6章サーバーを準備する

 ここでそもそも問題なのだが、ifconfigで ネットワークアダブタが見えない。
AMDマザーは認識されないのか??とか思い、増設用のネットワークカードを仕入れて挿しても変わらない。
色々あるそうなんだが、結論は、
ifconfig -a

で表示されれば、boot時にonにしていない可能性が高い。

ifconfigでeth0が表示されない
/etc/sysconfig/network-scripts/ifcfg-eth0 にて

ONBOOTがnoになっていたのでyesに変更

#ONBOOT=no
ONBOOT=yes
BOOTPROTO=static
DEVICE=eth0
IPADDR=xxx.xxx.xxx.xxx
NETMASK=255.255.255.0
IPV6ADDR=
IPV6INIT=yes

networkを再起動

service network restart

これでifconfigにも表示され、eth0が有効になりました。


ということで、めでたしめでたし




コメント
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする

Linuxサーバーをつくってみる その3

2013-11-22 | 日常
第4章Linuxを準備する
ユーザーの意味を確認しよう

グループというイメージは実際使ってみないとわかんないけど、個人運用だと一生分からないかも。
今日勉強になったのは、rootに切り替える時は、「su」ではなくて「su -」の方が良いらしい。

SELinuxは無効にしろ! うん、うん、 設定すると大変らしい

vi /set/selinux/config
SELINUX=disabled

第5章 回線とネットワークを準備する

ここで本とちがうのは、私の場合フレッツ光ということ。なので、ルーター機能はCTUという装置になる。
と、わわるまでに、多少手こずった。ルーターを買うのか?、だったら無線LANにしちゃうかとか妄想したがまあ、買わなくてもいいと
わかった。

でも、CTUへのアクセス手段がわからん!!
(当初のフレッツCDとかないし)、、、googleを頼りに、パスワード等はわかっていたのでなんとかなった。


Linuxで自宅サーバー公開(TOP) >>フレッツ光プレミアム(CTU設定)
http://shikichi.ddo.jp/ntt_flets_set.html

まあ、サーバー側が準備できていないと、ダイナミックDNSで公開したところでなんともならんので、この章はあとで。
コメント
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする

Linuxサーバーをつくってみる その2

2013-11-21 | 日常
第3章基本操作をマスターする
 基本的なコマンドを憶えるのだが、まあ、薄くは知識があるので(Solarisから数えれば10年以上じゃん、、、この学習蓄積能力の低さには呆れるが)、、、 どのコマンドも一度は使ったことがある。
 イマイチなのが シンボリックリンクというので、たぶんwinでいうショートカットのことだと思うのだが、環境変数でそれに似た機能があるような気もするが、何に使うものやら、エンドユーザーにはわからん。

正規表現系というのは、MS-DOSの時代から忌み嫌って近づかない世界だが、ふーん、ブランケット[]で複数候補を指定することができるんだ。中かっこ{ }もある。ブランケットは1文字、中かっこが文字列か。

jobsはホストコンピュータと似ているかな。こんな実装になるんだろうね。

vi これは、ホストコンピュータで初めてスクリーンエディタを使ったのを思い出す。ホストも最初はlineエディタの拡張で育ったんじゃないかという(回線スピードの遅さの問題だろうけど)そういうのと同じ育ちの貧しさをなんとなく感じるなあ。
とりあえず
{ins}で編集して、
{esc}: w
{esc}: q

コメント
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする

Linuxサーバーをつくってみる その1

2013-11-20 | 日常
なんの脈絡もないが、linuxサーバーを構築してみることにする。
まあ、最近、前向きに取り組めるようになってまいりまして、ここで一発、人生が終わるまでにlinuxを勉強しようかという気持ちになってきたわけです。

実際のところ、色々な意味で「ケチケチ時代」に突入するわけでして、この手の基礎技術があれば面白いことができるかもと思っています。

当面の目標は、「自宅にサーバーを持ち、外部アクセスができる」です。
そのうち、LPICでも受験しようかとも思ってます(勤め先の近所に受験会場があることも判明したし)。


とりあえず、この本で始めることにする
できるPRO CentOS 6 サーバー (できるプロシリーズ)

まあ、初心者とはいうものの、多少は触ったこともあるし、DOS世代なのでリダイレクトとかあの辺の感覚は分からないでもないので、一応サクサクいく。

第1章 Linuxについて知る
  飛ばし
第2章 Linuxをインストールする
  最初はキーボードが変(Englishキーボードでセットアップするとキートップ表示と実際がずれる)だったり、後述のネットワークアダブタが認識しなくて10回位やり直したけど、教科書に従い英語環境で日本語キーボードで入れるのがポイント、、まあそれにしてもGUIじゃないと、大海原に放り出された感がひとしおですなあ。
 


コメント (2)
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする

2013年度2学期

2013-09-28 | 日常
とりあえず2学期放送の予約ファイルをアップロードしました。

p.s.

 え、、gooが有料化になりますね。元々お金を払っているので変わんないんですけど、そろそろこのブログも潮時でしょうかね。
移行を考えます。
コメント (4)
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする

arrows

2013-07-24 | 日常
data <- read.csv("d:/test/dat.txt",head=T)
data2 <-data.frame(data[,2],data[,3,],data[,5],data[,6])
row.names(data2) <-data[,1]

colnames(data2) <- c("h9売り場面積","h19売り場面積","h9年間販売額","h19年間販売額")
summary(data2[,1:4])
library(maptools)

plot(data2[,1],data2[,3],cex=0.2)
arrows(data2[,1],data2[,3],data2[,2],data2[,4],length=0.1,angle=6,code=2)
pointLabel(x=data2[,2], y=data2[,4], labels=rownames(data2),cex=0.6)

points(data2[,2],data2[,4],pch=2,col=2)

コメント
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする

RRT 集中放送分の予約ファイルUpload

2013-07-16 | 日常
暑いですね。今年の夏は『千年猛暑』とか、、うーむ クーラー無し生活ですけど何とかなるもんでしょうか??


・ネット環境が不要の放送大学録音ソフト
・NHKの週間番組表を読んで24時間タイトル分割録音ができるソフト

 という、ナロー感溢れる、スポットソフトなんですけど、一応集中放送の予約ファイルを上げておきます。

buriburipipiのへやのRRTからダウンロード
コメント
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする