[root@localhost ~]# mysql -V
mysql Ver xx.x Distrib x.xx.x-MariaDB, for Linux (x86_64) using readline 5.1
1) 기본 세팅을 진행합니다. (Mysql_secure_installation)
[root@localhost ~]# mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
haven't set the root password yet, you should just press enter here.
Enter current password for root (enter for none): ///패스워드 없기 때문에 엔터
........ 나머지 선택사항도 엔터 눌러주시면 됩니다. (필요에 따라 변경 하셔도 됩니다.)
2) Mysql 접속 방법
[root@localhost ~]# mysql -uroot -p
Enter password: /// mysql_secure_installation 시 작성한 패스워드 입력
############################## 레포지스트리 확인 #######################################
[root@localhost ~]# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.kakao.com
* extras: mirror.kakao.com
* updates: mirror.kakao.com
repo id repo name status
!base/7/x86_64 CentOS-7 - Base 10,072
!extras/7/x86_64 CentOS-7 - Extras 500
!mariadb MariaDB 98
!nginx/x86_64 nginx repo 256
!updates/7/x86_64 CentOS-7 - Updates 3,187
repolist: 14,113
레포지스트리 내 아파치 패키지 조회 하는 방법 (1)
[root@localhost src]# yum search php
......
====================================== N/S matched: php ======================================
emacs-php-mode.noarch : Major GNU Emacs mode for editing PHP code
graphviz-php.x86_64 : PHP extension for graphviz
php.x86_64 : PHP scripting language for creating dynamic web sites
php-bcmath.x86_64 : A module for PHP applications for using the bcmath library
php-cli.x86_64 : Command-line interface for PHP
php-common.x86_64 : Common files for PHP
php-dba.x86_64 : A database abstraction layer module for PHP applications
php-devel.x86_64 : Files needed for building PHP extensions
......
[root@localhost src]# yum info php
Available Packages
Name : php
Arch : x86_64
Version : 5.4.16
Release : 48.el7
Size : 1.4 M
Repo : base/7/x86_64
Summary : PHP scripting language for creating dynamic web sites
URL : http://www.php.net/
License : PHP and Zend and BSD
Description : PHP is an HTML-embedded scripting language. PHP attempts to make it
......
레포지스트리 내 아파치 패키지 조회 하는 방법 (2)
[root@localhost ~]# yum list php*
php.x86_64 5.4.16-48.el7 base
........
# yum install https://rpms.remirepo.net/enterprise/remi-release-7.rpm // repo 다운로드
# yum install -y httpd
################ 레포 정상 설치 확인 ##############
[root@localhost ~]# yum repolist
......
remi-safe Safe Remi's RPM repository for Enterprise Linux 7 - x86_64 4,660
################ 레포 enable #####################
yum-config-manager --enable remi-php7x
ex) yum-config-manager --enable remi-php74
(2) RPM 하나하나 수동 설치 (권장 X)
####### rpm 파일 다운로드(예시) #######
[root@localhost ~]# rpm -ivh ImageMagick-6.9.10.68-3.el7.x86_64.rpm
####### 에러 발생시 (예시)#########
[root@localhost ~]# rpm -ivh ImageMagick-6.9.10.68-3.el7.x86_64.rpm
오류: Failed dependencies:
libHalf.so.6()(64bit) is needed by ImageMagick-6.9.10.68-3.el7.x86_64
libICE.so.6()(64bit) is needed by ImageMagick-6.9.10.68-3.el7.x86_64
..........
필요한 rpm 파일을 의존성에 맞추어 필요한 rpm 파일(버전)에 맞추어 설치한다.
[root@localhost ~]# rpm -ivh libHalf.so.xxxxxxxxxxx.rpm
[root@localhost ~]# cd /usr/local/src
###### 필요 설치 패키지 툴 설치 ######
yum install -y make wget gcc g++ gcc-c++ autoconf automake libtool pkgconfig \
findutils openssl openssl-devel openldap-devel pcre-devel libxml2-devel lua-devel \
curl curl-devel libcurl-devel expat-devel flex zlib-devel
###### source zip 파일 다운로드 #######
[root@localhost ~]# cd /usr/local/src
wget http://apache.tt.co.kr//httpd/httpd-2.4.41.tar.gz
wget http://mirror.23media.de/apache/apr/apr-1.6.2.tar.gz
wget http://mirror.23media.de/apache/apr/apr-util-1.6.0.tar.gz
wget http://mirror.23media.de/apache/apr/apr-iconv-1.2.1.tar.gz
wget https://ftp.pcre.org/pub/pcre/pcre-8.41.tar.gz
##### 압축 풀기 #####
tar xvf httpd-2.4.41.tar.gz
tar xvf apr-1.6.2.tar.gz
tar xvf apr-util-1.6.0.tar.gz
tar xvf apr-iconv-1.2.1.tar.gz
tar xvf pcre-8.41.tar.gz
##### 파일 이동 ######
mv apr-1.6.2 ./httpd-2.4.41/srclib/apr
mv apr-util-1.6.0 ./httpd-2.4.41/srclib/apr-util
3-2) 설치 순서
Apr -> pcre -> httpd 설치 순서
##### 컴파일 설치 진행 #####
cd apr-1.6.2
./configure --prefix /usr/local/apr-1.6.2
make && make install
##### 컴파일 설치 진행(2) #####
cd /usr/local/src/pcre-8.41
./configure
make
make install
##### 컴파일 설치 진행(3) ######
cd /usr/local/src/httpd-2.4.27
./configure --prefix=/usr/local/apache2
make
make install
### 추가 옵션 넣을 경우 ###
./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr \
--with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre \
--enable-so --enable-rewrite --with-mpm=worker --enable-ssl --with-ssl=/usr
(--with-mpm=prefork or --with-mpm=worker)
--enable-mods=shared 넣으면 동적 설치 =? /usr/local/apache/modules 들어가서 .so인거 확인 가능.
--> ServerName : Localhost 로 수정 필요할수도 있음
make
make install
httpd(아파치) 옵션 등 자세히 알고 싶으면 클릭
※ 에러 발생시
##### 오류 1 #####
[ xml/apr_xml.c:35:19: error: expat.h: No such file or directory ]
--> 모듈 설치 안되어 있음
sol : yum install expat-devel + gcc*
##### 오류 2 ######
config.status: executing libtool commands
rm: cannot remove `libtoolT': No such file or directory
config.status: executing default commands
config.status: include/apr.h is unchanged
config.status: include/arch/unix/apr_private.h is unchanged
----> libtool 복사
sol : cp -arp libtool libtoolT
##### 오류 3 ######
make[1]: Entering directory `/usr/local/src/APM_setup/apr-1.6.2'
/bin/sh /libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -I./include -I/usr/local/src/APM_setup/apr-1.4.2/include/arch/unix -I./include/arch/unix -I/usr/local/src/APM_setup/apr-1.4.2/include/arch/unix -I/usr/local/src/APM_setup/apr-1.4.2/include -o passwd/apr_getpass.lo -c passwd/apr_getpass.c && touch passwd/apr_getpass.lo
/bin/sh: /libtool: No such file or directory
make[1]: *** [passwd/apr_getpass.lo] Error 127
make[1]: Leaving directory `/usr/local/src/APM_setup/apr-1.6.2'
make: *** [all-recursive] Error 1
----> 심볼릭 링크 설정
sol : ln -s /usr/bin/libtool /
sol : make clean