본문 바로가기

리눅스

[리눅스] 우분투 APM 소스 설치

반응형

우분투 APM 소스 설치

Apache 설치

wget http://archive.apache.org/dist/httpd/httpd-2.4.12.tar.gz
wget http://archive.apache.org/dist/apr/apr-1.5.1.tar.gz
wget http://archive.apache.org/dist/apr/apr-util-1.5.4.tar.gz
tar xvfz httpd-2.4.12.tar.gz
tar xvfz apr-1.5.1.tar.gz -C httpd-2.4.12/srclib/
tar xvfz apr-util-1.5.4.tar.gz -C httpd-2.4.12/srclib/
mv httpd-2.4.12/srclib/apr-1.5.1 httpd-2.4.12/srclib/apr
mv httpd-2.4.12/srclib/apr-util-1.5.4 httpd-2.4.12/srclib/apr-util

 

wget --ftp-user=anonymous ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.36.tar.gz
tar xvfz pcre-8.36.tar.gz
cd pcre-8.36
./configure --prefix=/usr/local/pcre
make && make install

 

apt-get install -y libssl-dev

 

cd httpd-2.4.12
./configure --prefix=/app/apache \
--with-included-apr \
--with-pcre=/usr/local/pcre \
--with-ssl \
--enable-so \
--enable-ssl \
--enable-rewrite \
--with-mpm=worker \
--enable-cache \
--enable-modules=all \
--enable-mods-shared=all
make && make install
cp /app/apache/bin/apachectl /etc/init.d/httpd

MySQL 설치

wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.23.tar.gz

 

apt-get install -y cmake
apt-get install -y libncurses5-dev

 

useradd -m -c "MySQL Server" -d /usr/local/mysql -s /bin/false -u 27 mysql

 

tar xvfx mysql-5.6.23.tar.gz
cd mysql-5.6.23
cmake \
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql \
-DMYSQL_DATADIR=/usr/local/mysql/data \
-DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.sock \
-DSYSCONFDIR=/etc \
-DMYSQL_TCP_PORT=3306 \
-DMYSQL_USER=mysql \
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DWITH_EXTRA_CHARSETS=all \
-DENABLED_LOCAL_INFILE=1 \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_ARCHIVE_STORAGE_ENGINE=1 \
-DWITH_BLACKHOLE_STORAGE_ENGINE=1
make && make install

 

chown mysql.root /usr/local/mysql
chown -R mysql.mysql /usr/local/mysql/data

 

ln -s /usr/local/mysql/bin/mysql /usr/bin/mysql
ln -s /usr/local/mysql/bin/mysqladmin /usr/bin/mysqladmin

 

cd /usr/local/mysql/
./scripts/mysql_install_db --user=mysql --datadir=/usr/local/mysql/data
mv my.cnf /etc/my.cnf
./bin/mysqld_safe &
./bin/mysqladmin -u root password 'mysql-set-password'

PHP 설치

wget http://kr1.php.net/distributions/php-5.5.22.tar.gz
tar xvfz php-5.5.22.tar.gz
cd php-5.5.22
./configure \
--prefix=/app/php \
--with-apxs2=/app/apache/bin/apxs \
--with-config-file-path=/app/apache/conf \
--with-mysql=/usr/local/mysql \
--with-mysql-sock=/usr/local/mysql/mysql.sock \
--with-libdir=lib64 \
--enable-mbstring \
--enable-exif
make && make install
cp php.ini-production /app/apache/conf/php.ini
cd /app/apache/conf/

 

vi /usr/local/apache2/conf/httpd.conf
...
<IfModule dir_module>
    DirectoryIndex index.html index.php
</IfModule>

AddType application/x-gzip .gz .tgz

    AddType application/x-httpd-php .php .html
    AddType application/x-httpd-php-source .phps
...

 

PHP TEST 페이지

echo "<?php phpinfo() ?>" > /app/apache/htdocs/phpinfo.php

 

참고URL

- http://forum.falinux.com/zbxe/index.php?document_srl=627832&mid=lecture_tip

 

728x90
반응형