Centos6 Yum APM Simple Install

서버 2014. 12. 11. 14:45

Centos6 Yum APM Simple install - 부제 : Yum으로 간단 설치해보기

 

Centos6 가상서버에서 APM 설치 해보고 싶지 않나요..

 

Centos6 Netinstall 설치가이드 Part II를 보고 난 후 추가적인 작업 진행을 하고자 합니다.

 

눈으로 보는 쉽게 설치하기 Part II - 1 설치진행해보죠..

 

가상서버 실행 후 접속 해봅니다.

 

가상서버에서 유저를 생성후 원격으로 putty로 접속해봅니다.

 

한글 Putty는 여기서 다운로드 받아 바로 실행하면 됩니다. -> https://bitbucket.org/daybreaker/iputty/wiki/Home

 

마루웹, Maruweb마루웹 Maruweb

 

Yum APM Install 설치 시작 

 

[root@localhost ~]# yum install httpd httpd-devel

 

[root@localhost ~]# yum install mysql mysql-server

 

[root@localhost ~]# yum install php php-devel php-mbstring php-gd php-xml php-xmlrpc php-pear

 

설치 후 버전 확인

 

[root@localhost ~]# rpm -qa |grep httpd
httpd-devel-2.2.15-39.el6.centos.x86_64
httpd-2.2.15-39.el6.centos.x86_64
httpd-tools-2.2.15-39.el6.centos.x86_64
[root@localhost ~]# rpm -qa |grep mysql
mysql-server-5.1.73-3.el6_5.x86_64
mysql-5.1.73-3.el6_5.x86_64
mysql-libs-5.1.73-3.el6_5.x86_64
[root@localhost ~]# rpm -qa |grep php
php-cli-5.3.3-40.el6_6.x86_64
php-devel-5.3.3-40.el6_6.x86_64
php-xml-5.3.3-40.el6_6.x86_64
php-mbstring-5.3.3-40.el6_6.x86_64
php-common-5.3.3-40.el6_6.x86_64
php-5.3.3-40.el6_6.x86_64
php-pear-1.9.4-4.el6.noarch
php-gd-5.3.3-40.el6_6.x86_64
php-xmlrpc-5.3.3-40.el6_6.x86_64
[root@localhost ~]#

 

여기까지 Yum 으로 APM 기본 패키지 설치 완료상태입니다. 웹브라우저로 확인할수 있는 초간단 수정내용만

정리 해봅니다.

 

[root@localhost ~]# cd /etc/
[root@localhost etc]# vi php.ini

 

수정전

[Date]
; Defines the default timezone used by the date functions
; http://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone
;date.timezone =

 

수정후

[Date]
; Defines the default timezone used by the date functions
; http://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone
date.timezone = Asia/Seoul

 

[root@localhost conf]# /etc/init.d/httpd start
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName                                                          [  OK  ]

 

[root@localhost conf]# mysql_install_db
Installing MySQL system tables...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'

Alternatively you can run:
/usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/bin/mysqlbug script!

 

[root@localhost conf]# /usr/bin/mysql_secure_installation

 


NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!


In order to log into MySQL to secure it, we'll need the current
password for the root user.  If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Enter current password for root (enter for none):
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Enter current password for root (enter for none):
Aborting!

Cleaning up...

 

위에 문제가 생겼군요..mysql daemon실행이 되지고 않았으며, mysql 디렉토리에 이상있는지 확인해봐야 됩니다.
[root@localhost conf]# cd /var/lib/mysql/
[root@localhost mysql]# ls
mysql  test
[root@localhost mysql]# ll
total 8
drwx------. 2 mysql root 4096 Dec 11 21:34 mysql
drwx------. 2 mysql root 4096 Dec 11 21:34 test
[root@localhost mysql]# chown -R mysql mysql - 디렉토리 유저 mysql 변경
[root@localhost mysql]# chgrp -R mysql mysql - 디렉토리 그룹 mysql 변경

 

[root@localhost mysql]# /etc/init.d/mysqld start - 데몬 스타트
Starting mysqld:                                           [  OK  ]
[root@localhost mysql]#

 

[root@localhost mysql]# /usr/bin/mysql_secure_installation - Mysql 기본 보안 적용

 

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!


In order to log into MySQL to secure it, we'll need the current
password for the root user.  If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.

Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y
 ... Success!

By default, MySQL comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
 ... Success!

Cleaning up...

 

All done!  If you've completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!


[root@localhost mysql]#

 

데몬 프로세스 확인

 

[root@localhost mysql]# ps aux |grep httpd
root      5246  0.0  0.5 278776  9920 ?        Ss   21:33   0:00 /usr/sbin/httpd
apache    5248  0.0  0.3 278776  6184 ?        S    21:33   0:00 /usr/sbin/httpd
apache    5249  0.0  0.3 278776  6096 ?        S    21:33   0:00 /usr/sbin/httpd
apache    5250  0.0  0.3 278776  6096 ?        S    21:33   0:00 /usr/sbin/httpd
apache    5251  0.0  0.2 278776  5444 ?        S    21:33   0:00 /usr/sbin/httpd
apache    5252  0.0  0.2 278776  5444 ?        S    21:33   0:00 /usr/sbin/httpd
apache    5253  0.0  0.2 278776  5444 ?        S    21:33   0:00 /usr/sbin/httpd
apache    5254  0.0  0.2 278776  5444 ?        S    21:33   0:00 /usr/sbin/httpd
apache    5255  0.0  0.2 278776  5444 ?        S    21:33   0:00 /usr/sbin/httpd
root      5512  1.0  0.0 103244   852 pts/0    S+   21:38   0:00 grep httpd
[root@localhost mysql]# ps aux |grep mysql
root      5347  0.1  0.0 106064  1484 pts/0    S    21:36   0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --pid-file=/var/run/mysqld/mysqld.pid --basedir=/usr --user=mysql
mysql     5449  0.4  1.4 367976 27852 pts/0    Sl   21:36   0:00 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.sock
root      5514  1.0  0.0 103244   856 pts/0    S+   21:38   0:00 grep mysql
[root@localhost mysql]#

 

 

웹브라우저로 확인해본다.

 

 

마루웹,Maruweb마루웹 Maruweb

 

 

 

'서버' 카테고리의 다른 글

WinSvr 2003, WinSvr 2008R2 서버 Firewall에서 Ping(ICMP) Enable  (0) 2014.12.15
Ubuntu 14.04 LTS apm install  (0) 2014.12.11
freebsd version download  (0) 2014.12.11
Web Cache Server - Varnish  (0) 2014.12.10
Ubuntu Package 설치  (0) 2014.12.10