1 1 CentOS 3 1.1.................................... 3 1.2......................................... 12 2 Java 15 2.1 JDK(JavaSE Development Kit)................. 15 3 Apache Tomcat 17 3.1.................................... 17 3.2................................... 17 3.3 Java..................... 18 4 PostgreSQL 21 4.1.................................... 21 4.2.................... 22 4.3............................. 24 4.4............................. 24 5 27 5.1................................... 27 5.2................................... 27
3 1 CentOS 1.1,, Enter., skip.
4 1 CentOS Next.. Japanese( ), Next.
1.1. 5., (N).. (Y) (N).
6 1 CentOS, (N). #.
1.1. 7,., (N). # GRUB, /dev/hda. NIC, (N).
8 1 CentOS, (N). # / root, (N).
1.1. 9 Server,, (N).,.,, DB Java # ->
10 1 CentOS -> -> FTP -> -> (N).
1.1. 11,., (C). (T),.
12 1 CentOS 1.2. ossmc. #, # root # $. # login:root Password: useradd. # /usr/sbin/useradd ossmc passwd. -> Enter -> ( ) -> Enter.
1.2. 13 # /usr/bin/passwd ossmc Changing password for user user. New UNIX password: Retype new UNIX password: passwd: all authentication tokens updated successfully. SELinux CentOS5 SELinux. SELinux Security-Enhanced Linux, Linux.,. config. # vi /etc/selinux/config <<config >> # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - SELinux is fully disabled. #SELINUX=enforcing SELINUX=disabled # SELINUXTYPE= type of policy in use. Possible values are: # targeted - Only targeted network daemons are protected. # strict - Full SELinux protection. SELINUXTYPE=targeted # SELINUX enforcing disabled
14 1 CentOS. # ->, # yum. # /usr/bin/yum update -y
15 2 Java 2.1 JDK(JavaSE Development Kit) # /usr/local/src (jdk-1 5 0 21 linux-i586-rpm.bin). # chmod a+x jdk-1 5 0 21-linux-i586-rpm.bin #./jdk-1 5 0 21-linux-i586-rpm.bin,. yes, Enter. Sun Microsystems, Inc. Binary Code License Agreement for the JAVA 2 PLATFORM STANDARD EDITION DEVELOPMENT KIT 5.0 SUN MICROSYSTEMS, INC. ( SUN ) IS WILLING TO LICENSE THE SOFTWARE IDENTIFIED BELOW TO YOU ONLY UPON THE : : : desktop computers and servers. Do you agree to the above license terms? [yes or no]. : : inflating: jdk-1 5 0 21-linux-i586.rpm Preparing... ########################### [100%]
16 2 Java 1:jdk ########################### [100%] Done.
17 3 Apache Tomcat 3.1 # /usr/local/src tar (apache-tomcat-5.5.28.tar.gz). # tar xvzf apache-tomcat-5.5.28.tar.gz apache-tomcat-5.5.28. mv. # mv apache-tomcat-5.5.28 /usr/local/tomcat. chown. # chown -R ossmc : ossmc /usr/local/tomcat/ 3.2.,.bash profile. # su - ossmc Password: $ cd / $ vi.bash profile <<.bash profile >>
18 3 Apache Tomcat #.bash profile # Get the aliases and functions if [ -f /.bashrc ]; then. /.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/bin PATH=$PATH:/usr/java/jdk1.5.0 21/bin export PATH unset USERNAME export JAVA HOME=/usr/java/jdk1.5.0 21/ export CATALINA HOME=/usr/local/tomcat export CLASSPATH=$CLASSPATH:$CATALINA HOME/common/lib export CATALINA OPTS= -server -Xms512m -Xmx512m -Xss512k -XX:PermSize=64m -XX:MaxPermSize=64m # # /. $ source.bash profile 3.3 Java JVM. ( )/. -server Java HotSpot Server VM JVM -Xms (*1)
3.3. Java 19 -Xmx (*1) -Xss (*2) -XX:PermSize (*3) -XX:PMaxPermSize (*3) *1 *2 *3
21 4 PostgreSQL 4.1 # /usr/local/src tar (postgresql-8.3.9.tar.gz). # tar xvzf postgresql-8.3.9.tar.gz postgresql-8.3.9. mv., cd. # mv postgresql-8.3.9 /usr/local/src # cd /usr/local/src/postgresql-8.3.9 postgresql.. # /usr/local/pgsql #, configure - -prefix( ) #./configure prefix=/usr/local/pgsql # gmake && gmake install. : : /usr/local/pgsql/lib/pgxs/config/install-sh /bin/sh../config/install-sh -c -m 755./mkinstalldirs /usr/local/pgsql/lib/pgxs/config/mkinstalldirs
22 4 PostgreSQL gmake[1]: Leaving directory /usr/local/src/postgresql-8.3.9/config PostgreSQL installation complete.. chown. # chown -R ossmc : ossmc /usr/local/pgsql/ 4.2.,.bash profile. # su - ossmc Password: $ cd / $ vi.bash profile <<.bash profile >> #.bash profile # Get the aliases and functions if [ -f /.bashrc ]; then. /.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/bin PATH=$PATH:/usr/java/jdk1.5.0 21/bin PATH=$PATH:/usr/local/pgsql/bin export PATH unset USERNAME export JAVA HOME=/usr/java/jdk1.5.0 21/ export CATALINA HOME=/usr/local/tomcat export CLASSPATH=$CLASSPATH:$CATALINA HOME/common/lib
4.2. 23 export CATALINA OPTS= -server -Xms512m -Xmx512m -XX:PermSize=64m -XX:MaxPermSize=64m export POSTGRES HOME=/usr/local/pgsql export PGLIB=$POSTGRES HOME/lib export PGDATA=$POSTGRES HOME/data export MANPATH=$MANPATH:$POSTGRES HOME/man export LD LIBRARY PATH=$LD LIBRARY PATH:$PGLIB # #PGDATA,. $ source.bash profile. $ initdb -W -E UTF-8,. -> Enter -> ( ) -> Enter. The files belonging to this database system will be owned by user ossmc. This user must also own the server process. The database cluster will be initialized with locale ja JP.UTF-8. : : : initializing pg authid... ok Enter new superuser password: Enter it again:.
24 4 PostgreSQL : : Success. You can now start the database server using: postmaster -D /usr/local/pgsql/data or pg ctl -D /usr/local/pgsql/data -l logfile start 4.3 pg ctl. $ pg ctl start 4.4 PostgreSQL, initdb.. createdb. $ createdb example dropdb.
4.4. 25 $ dropdb example
27 5 5.1 pg ctl. $ pg ctl start startup.sh. $ $CATALINA HOME/bin/startup.sh 5.2 shutdown.sh. $ $CATALINA HOME/bin/shutdown.sh pg ctl. $ pg ctl stop
29 2.1 http://creativecommons.org/licenses/by/2.1/jp/legalcode