CentOS 7 에 php 설치하기 (디비와 아파치를 설치한후 마지막에 php를 설치한다.)
설치 가능한 php 버전을 확인해 본다.
확인해 보니 버전이 php 5.4.16 이다.
[root@localhost ~]# yum list | grep php
graphviz-php.x86_64 2.30.1-18.el7 base
php.x86_64 5.4.16-23.el7_0.3 updates
php-bcmath.x86_64 5.4.16-23.el7_0.3 updates
php-cli.x86_64 5.4.16-23.el7_0.3 updates
php-common.x86_64 5.4.16-23.el7_0.3 updates
php-dba.x86_64 5.4.16-23.el7_0.3 updates
php-devel.x86_64 5.4.16-23.el7_0.3 updates
php-embedded.x86_64 5.4.16-23.el7_0.3 updates
php-enchant.x86_64 5.4.16-23.el7_0.3 updates
php-fpm.x86_64 5.4.16-23.el7_0.3 updates
php-gd.x86_64 5.4.16-23.el7_0.3 updates
php-intl.x86_64 5.4.16-23.el7_0.3 updates
php-ldap.x86_64 5.4.16-23.el7_0.3 updates
php-mbstring.x86_64 5.4.16-23.el7_0.3 updates
php-mysql.x86_64 5.4.16-23.el7_0.3 updates
php-mysqlnd.x86_64 5.4.16-23.el7_0.3 updates
php-odbc.x86_64 5.4.16-23.el7_0.3 updates
php-pdo.x86_64 5.4.16-23.el7_0.3 updates
php-pear.noarch 1:1.9.4-21.el7 base
php-pecl-memcache.x86_64 3.0.8-4.el7 base
php-pgsql.x86_64 5.4.16-23.el7_0.3 updates
php-process.x86_64 5.4.16-23.el7_0.3 updates
php-pspell.x86_64 5.4.16-23.el7_0.3 updates
php-recode.x86_64 5.4.16-23.el7_0.3 updates
php-snmp.x86_64 5.4.16-23.el7_0.3 updates
php-soap.x86_64 5.4.16-23.el7_0.3 updates
php-xml.x86_64 5.4.16-23.el7_0.3 updates
php-xmlrpc.x86_64 5.4.16-23.el7_0.3 updates
rrdtool-php.x86_64 1.4.8-8.el7 base
uuid-php.x86_64 1.6.2-26.el7 base
php를 설치한다.
중간에 y를 선택해 준다. 연관 패키지이다.
[root@localhost ~]# yum install php php-mysql php-gd php-pear
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: centos.tt.co.kr
* extras: centos.tt.co.kr
* updates: centos.tt.co.kr
Resolving Dependencies
--> Running transaction check
---> Package php.x86_64 0:5.4.16-23.el7_0.3 will be installed
--> Processing Dependency: php-common(x86-64) = 5.4.16-23.el7_0.3 for package: php-5.4.16-23.el7_0.3.x86_64
--> Processing Dependency: php-cli(x86-64) = 5.4.16-23.el7_0.3 for package: php-5.4.16-23.el7_0.3.x86_64
---> Package php-gd.x86_64 0:5.4.16-23.el7_0.3 will be installed
--> Processing Dependency: libt1.so.5()(64bit) for package: php-gd-5.4.16-23.el7_0.3.x86_64
---> Package php-mysql.x86_64 0:5.4.16-23.el7_0.3 will be installed
--> Processing Dependency: php-pdo(x86-64) = 5.4.16-23.el7_0.3 for package: php-mysql-5.4.16-23.el7_0.3.x86_64
---> Package php-pear.noarch 1:1.9.4-21.el7 will be installed
--> Processing Dependency: php-xml for package: 1:php-pear-1.9.4-21.el7.noarch
--> Processing Dependency: php-posix for package: 1:php-pear-1.9.4-21.el7.noarch
--> Running transaction check
---> Package php-cli.x86_64 0:5.4.16-23.el7_0.3 will be installed
---> Package php-common.x86_64 0:5.4.16-23.el7_0.3 will be installed
--> Processing Dependency: libzip.so.2()(64bit) for package: php-common-5.4.16-23.el7_0.3.x86_64
---> Package php-pdo.x86_64 0:5.4.16-23.el7_0.3 will be installed
---> Package php-process.x86_64 0:5.4.16-23.el7_0.3 will be installed
---> Package php-xml.x86_64 0:5.4.16-23.el7_0.3 will be installed
---> Package t1lib.x86_64 0:5.1.2-14.el7 will be installed
--> Running transaction check
---> Package libzip.x86_64 0:0.10.1-8.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
php x86_64 5.4.16-23.el7_0.3 updates 1.3 M
php-gd x86_64 5.4.16-23.el7_0.3 updates 124 k
php-mysql x86_64 5.4.16-23.el7_0.3 updates 97 k
php-pear noarch 1:1.9.4-21.el7 base 357 k
Installing for dependencies:
libzip x86_64 0.10.1-8.el7 base 48 k
php-cli x86_64 5.4.16-23.el7_0.3 updates 2.7 M
php-common x86_64 5.4.16-23.el7_0.3 updates 561 k
php-pdo x86_64 5.4.16-23.el7_0.3 updates 95 k
php-process x86_64 5.4.16-23.el7_0.3 updates 52 k
php-xml x86_64 5.4.16-23.el7_0.3 updates 122 k
t1lib x86_64 5.1.2-14.el7 base 166 k
Transaction Summary
================================================================================
Install 4 Packages (+7 Dependent packages)
Total download size: 5.7 M
Installed size: 21 M
Is this ok [y/d/N]: y
Downloading packages:
(1/11): libzip-0.10.1-8.el7.x86_64.rpm | 48 kB 00:00
(2/11): php-5.4.16-23.el7_0.3.x86_64.rpm | 1.3 MB 00:01
(3/11): php-gd-5.4.16-23.el7_0.3.x86_64.rpm | 124 kB 00:01
(4/11): php-pdo-5.4.16-23.el7_0.3.x86_64.rpm | 95 kB 00:00
(5/11): php-common-5.4.16-23.el7_0.3.x86_64.rpm | 561 kB 00:01
(6/11): php-process-5.4.16-23.el7_0.3.x86_64.rpm | 52 kB 00:00
(7/11): php-xml-5.4.16-23.el7_0.3.x86_64.rpm | 122 kB 00:00
(8/11): php-mysql-5.4.16-23.el7_0.3.x86_64.rpm | 97 kB 00:00
(9/11): php-pear-1.9.4-21.el7.noarch.rpm | 357 kB 00:00
(10/11): php-cli-5.4.16-23.el7_0.3.x86_64.rpm | 2.7 MB 00:01
(11/11): t1lib-5.1.2-14.el7.x86_64.rpm | 166 kB 00:00
--------------------------------------------------------------------------------
Total 2.7 MB/s | 5.7 MB 00:02
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : libzip-0.10.1-8.el7.x86_64 1/11
Installing : php-common-5.4.16-23.el7_0.3.x86_64 2/11
Installing : php-cli-5.4.16-23.el7_0.3.x86_64 3/11
Installing : php-pdo-5.4.16-23.el7_0.3.x86_64 4/11
Installing : php-process-5.4.16-23.el7_0.3.x86_64 5/11
Installing : php-xml-5.4.16-23.el7_0.3.x86_64 6/11
Installing : t1lib-5.1.2-14.el7.x86_64 7/11
Installing : php-gd-5.4.16-23.el7_0.3.x86_64 8/11
Installing : 1:php-pear-1.9.4-21.el7.noarch 9/11
Installing : php-mysql-5.4.16-23.el7_0.3.x86_64 10/11
Installing : php-5.4.16-23.el7_0.3.x86_64 11/11
Verifying : php-common-5.4.16-23.el7_0.3.x86_64 1/11
Verifying : php-pdo-5.4.16-23.el7_0.3.x86_64 2/11
Verifying : t1lib-5.1.2-14.el7.x86_64 3/11
Verifying : php-process-5.4.16-23.el7_0.3.x86_64 4/11
Verifying : php-5.4.16-23.el7_0.3.x86_64 5/11
Verifying : php-gd-5.4.16-23.el7_0.3.x86_64 6/11
Verifying : php-xml-5.4.16-23.el7_0.3.x86_64 7/11
Verifying : php-mysql-5.4.16-23.el7_0.3.x86_64 8/11
Verifying : php-cli-5.4.16-23.el7_0.3.x86_64 9/11
Verifying : libzip-0.10.1-8.el7.x86_64 10/11
Verifying : 1:php-pear-1.9.4-21.el7.noarch 11/11
Installed:
php.x86_64 0:5.4.16-23.el7_0.3 php-gd.x86_64 0:5.4.16-23.el7_0.3
php-mysql.x86_64 0:5.4.16-23.el7_0.3 php-pear.noarch 1:1.9.4-21.el7
Dependency Installed:
libzip.x86_64 0:0.10.1-8.el7 php-cli.x86_64 0:5.4.16-23.el7_0.3
php-common.x86_64 0:5.4.16-23.el7_0.3 php-pdo.x86_64 0:5.4.16-23.el7_0.3
php-process.x86_64 0:5.4.16-23.el7_0.3 php-xml.x86_64 0:5.4.16-23.el7_0.3
t1lib.x86_64 0:5.1.2-14.el7
Complete!
설치가 완료 되었다.
아파치를 재시작해 준다.
[root@localhost ~]# systemctl restart httpd.service
홈페이지에서 php 정보를 확인하기 위해 info.php 파일을 만든다.
[root@localhost ~]# vi /var/www/html/info.php
내용은 아래와 같이 입력한다.
<?php
phpinfo();
?>
참고로 저장하고 빠져 나올때는 ESC 키를 누른 후에 손을 땐후
:wq
입력하면 저장후 빠져 나온다.
아파치를 재시작해 준다.
[root@localhost ~]# systemctl restart httpd.service
CentOS에 깔려 있는 브라우저 파이어 폭스를 실행해서 php 정보를 확인해 본다.
주소창에 입력
localhost/info.php
참고사항
PHP 설치 경로 : /usr/lib64/php
PHP 설정파일 경로 : /etc/php.ini
[출처]http://www.websaram.com/bbs/board.php?bo_table=web_server&wr_id=52
2015년 11월 12일 목요일
CentOS 7 아파치 웹서버 설치
아파치가 설치되어 있나 확인해 본다.
결과는 없다.
[root@localhost ~]# which httpd
/usr/bin/which: no httpd in (/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin)
아파치는 최신 버전을 설치한다.
먼저 아파치 버전을 확인해 본다.
[root@localhost ~]# yum list | grep httpd
httpd.x86_64 2.4.6-19.el7.centos updates
httpd-devel.x86_64 2.4.6-19.el7.centos updates
httpd-manual.noarch 2.4.6-19.el7.centos updates
httpd-tools.x86_64 2.4.6-19.el7.centos updates
libmicrohttpd.i686 0.9.33-2.el7 base
libmicrohttpd.x86_64 0.9.33-2.el7 base
libmicrohttpd-devel.i686 0.9.33-2.el7 base
libmicrohttpd-devel.x86_64 0.9.33-2.el7 base
libmicrohttpd-doc.noarch 0.9.33-2.el7 base
아파치를 설치한다.
설치중 관련 패키지를 설치할 것이냐고 묻는데 y라고 입력하고 엔터를 치자.
[root@localhost ~]# yum install httpd
Loaded plugins: fastestmirror, langpacks
base | 3.6 kB 00:00
extras | 3.4 kB 00:00
mariadb | 1.9 kB 00:00
updates | 3.4 kB 00:00
Loading mirror speeds from cached hostfile
* base: centos.tt.co.kr
* extras: centos.tt.co.kr
* updates: centos.tt.co.kr
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.4.6-19.el7.centos will be installed
--> Processing Dependency: httpd-tools = 2.4.6-19.el7.centos for package: httpd-2.4.6-19.el7.centos.x86_64
--> Processing Dependency: /etc/mime.types for package: httpd-2.4.6-19.el7.centos.x86_64
--> Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd-2.4.6-19.el7.centos.x86_64
--> Processing Dependency: libapr-1.so.0()(64bit) for package: httpd-2.4.6-19.el7.centos.x86_64
--> Running transaction check
---> Package apr.x86_64 0:1.4.8-3.el7 will be installed
---> Package apr-util.x86_64 0:1.5.2-6.el7 will be installed
---> Package httpd-tools.x86_64 0:2.4.6-19.el7.centos will be installed
---> Package mailcap.noarch 0:2.1.41-2.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
httpd x86_64 2.4.6-19.el7.centos updates 2.7 M
Installing for dependencies:
apr x86_64 1.4.8-3.el7 base 103 k
apr-util x86_64 1.5.2-6.el7 base 92 k
httpd-tools x86_64 2.4.6-19.el7.centos updates 78 k
mailcap noarch 2.1.41-2.el7 base 31 k
Transaction Summary
================================================================================
Install 1 Package (+4 Dependent packages)
Total download size: 3.0 M
Installed size: 10 M
Is this ok [y/d/N]: y
Downloading packages:
(1/5): mailcap-2.1.41-2.el7.noarch.rpm | 31 kB 00:00
(2/5): httpd-tools-2.4.6-19.el7.centos.x86_64.rpm | 78 kB 00:00
(3/5): apr-1.4.8-3.el7.x86_64.rpm | 103 kB 00:00
(4/5): apr-util-1.5.2-6.el7.x86_64.rpm | 92 kB 00:00
(5/5): httpd-2.4.6-19.el7.centos.x86_64.rpm | 2.7 MB 00:01
--------------------------------------------------------------------------------
Total 1.5 MB/s | 3.0 MB 00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : apr-1.4.8-3.el7.x86_64 1/5
Installing : apr-util-1.5.2-6.el7.x86_64 2/5
Installing : httpd-tools-2.4.6-19.el7.centos.x86_64 3/5
Installing : mailcap-2.1.41-2.el7.noarch 4/5
Installing : httpd-2.4.6-19.el7.centos.x86_64 5/5
Verifying : httpd-2.4.6-19.el7.centos.x86_64 1/5
Verifying : mailcap-2.1.41-2.el7.noarch 2/5
Verifying : httpd-tools-2.4.6-19.el7.centos.x86_64 3/5
Verifying : apr-util-1.5.2-6.el7.x86_64 4/5
Verifying : apr-1.4.8-3.el7.x86_64 5/5
Installed:
httpd.x86_64 0:2.4.6-19.el7.centos
Dependency Installed:
apr.x86_64 0:1.4.8-3.el7 apr-util.x86_64 0:1.5.2-6.el7
httpd-tools.x86_64 0:2.4.6-19.el7.centos mailcap.noarch 0:2.1.41-2.el7
Complete!
설치가 완료 되었다.
아파치 버전을 확인해 보자.
[root@localhost ~]# httpd -v
Server version: Apache/2.4.6 (CentOS)
Server built: Jan 12 2015 13:22:31
아파치를 시작해 보자.
명령어가 조금 바뀌었다고 한다. 예전 명령어를 자동으로 현재의 명령어를 바꾸어서 실행해 준다.
[root@localhost ~]# service httpd start
Redirecting to /bin/systemctl start httpd.service
아파치 상태를 확인해 보자.
[root@localhost ~]# service httpd status
Redirecting to /bin/systemctl status httpd.service
httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled)
Active: active (running) since 금 2015-02-13 20:50:28 KST; 2min 16s ago
Main PID: 16657 (httpd)
Status: "Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec"
CGroup: /system.slice/httpd.service
├─16657 /usr/sbin/httpd -DFOREGROUND
├─16658 /usr/sbin/httpd -DFOREGROUND
├─16659 /usr/sbin/httpd -DFOREGROUND
├─16662 /usr/sbin/httpd -DFOREGROUND
├─16663 /usr/sbin/httpd -DFOREGROUND
└─16665 /usr/sbin/httpd -DFOREGROUND
2월 13 20:50:27 localhost.localdomain systemd[1]: Starting The Apache HTTP ...
2월 13 20:50:27 localhost.localdomain httpd[16657]: AH00558: httpd: Could n...
2월 13 20:50:28 localhost.localdomain systemd[1]: Started The Apache HTTP S...
Hint: Some lines were ellipsized, use -l to show in full.
부팅할 때 아파치를 자동으로 시작하도록 설정한다.
[root@localhost ~]# systemctl enable httpd.service
ln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service'
바로 위에서 설정한 값이 제대로 입력 되었는지 확인해 본다.
enabled면 제대로 된 것이다.
[root@localhost ~]# systemctl list-unit-files --type=service |grep httpd
httpd.service enabled
[root@localhost ~]#
제대로 설치 되었는지 확인해 본다.
centos에 기본으로 설치된 브라우저 파이어폭스에서 아래와 같이 입력해 본다.
http://localhost/
실제 홈페이지 경로는 /var/www/html
아파치 프로그램이 설치된 경로는 /etc/httpd
아파치 설정파일 경로는 /etc/httpd/conf/httpd.conf
아파치(httpd) 시작/멈춤/재시작 명령어
시작 systemctl start httpd.service
멈춤 systemctl stop httpd.service
재시작 systemctl restart httpd.service
아파치 설정파일 에러검사
[root@localhost ~]# apachectl configtest
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
Syntax OK
아직 설정 파일을 전혀 수정하지 않은 상태.
아직 도메인등을 설정하지 않아서 위와 같이 출력이 된다.
마지막에 systax ok이면 정상.
[출처]http://www.websaram.com/bbs/board.php?bo_table=web_server&wr_id=51
[참조]http://tecadmin.net/install-tomcat-8-on-centos-rhel-and-ubuntu/#
[참조]http://blog.lael.be/post/1721
결과는 없다.
[root@localhost ~]# which httpd
/usr/bin/which: no httpd in (/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin)
아파치는 최신 버전을 설치한다.
먼저 아파치 버전을 확인해 본다.
[root@localhost ~]# yum list | grep httpd
httpd.x86_64 2.4.6-19.el7.centos updates
httpd-devel.x86_64 2.4.6-19.el7.centos updates
httpd-manual.noarch 2.4.6-19.el7.centos updates
httpd-tools.x86_64 2.4.6-19.el7.centos updates
libmicrohttpd.i686 0.9.33-2.el7 base
libmicrohttpd.x86_64 0.9.33-2.el7 base
libmicrohttpd-devel.i686 0.9.33-2.el7 base
libmicrohttpd-devel.x86_64 0.9.33-2.el7 base
libmicrohttpd-doc.noarch 0.9.33-2.el7 base
아파치를 설치한다.
설치중 관련 패키지를 설치할 것이냐고 묻는데 y라고 입력하고 엔터를 치자.
[root@localhost ~]# yum install httpd
Loaded plugins: fastestmirror, langpacks
base | 3.6 kB 00:00
extras | 3.4 kB 00:00
mariadb | 1.9 kB 00:00
updates | 3.4 kB 00:00
Loading mirror speeds from cached hostfile
* base: centos.tt.co.kr
* extras: centos.tt.co.kr
* updates: centos.tt.co.kr
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.4.6-19.el7.centos will be installed
--> Processing Dependency: httpd-tools = 2.4.6-19.el7.centos for package: httpd-2.4.6-19.el7.centos.x86_64
--> Processing Dependency: /etc/mime.types for package: httpd-2.4.6-19.el7.centos.x86_64
--> Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd-2.4.6-19.el7.centos.x86_64
--> Processing Dependency: libapr-1.so.0()(64bit) for package: httpd-2.4.6-19.el7.centos.x86_64
--> Running transaction check
---> Package apr.x86_64 0:1.4.8-3.el7 will be installed
---> Package apr-util.x86_64 0:1.5.2-6.el7 will be installed
---> Package httpd-tools.x86_64 0:2.4.6-19.el7.centos will be installed
---> Package mailcap.noarch 0:2.1.41-2.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
httpd x86_64 2.4.6-19.el7.centos updates 2.7 M
Installing for dependencies:
apr x86_64 1.4.8-3.el7 base 103 k
apr-util x86_64 1.5.2-6.el7 base 92 k
httpd-tools x86_64 2.4.6-19.el7.centos updates 78 k
mailcap noarch 2.1.41-2.el7 base 31 k
Transaction Summary
================================================================================
Install 1 Package (+4 Dependent packages)
Total download size: 3.0 M
Installed size: 10 M
Is this ok [y/d/N]: y
Downloading packages:
(1/5): mailcap-2.1.41-2.el7.noarch.rpm | 31 kB 00:00
(2/5): httpd-tools-2.4.6-19.el7.centos.x86_64.rpm | 78 kB 00:00
(3/5): apr-1.4.8-3.el7.x86_64.rpm | 103 kB 00:00
(4/5): apr-util-1.5.2-6.el7.x86_64.rpm | 92 kB 00:00
(5/5): httpd-2.4.6-19.el7.centos.x86_64.rpm | 2.7 MB 00:01
--------------------------------------------------------------------------------
Total 1.5 MB/s | 3.0 MB 00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : apr-1.4.8-3.el7.x86_64 1/5
Installing : apr-util-1.5.2-6.el7.x86_64 2/5
Installing : httpd-tools-2.4.6-19.el7.centos.x86_64 3/5
Installing : mailcap-2.1.41-2.el7.noarch 4/5
Installing : httpd-2.4.6-19.el7.centos.x86_64 5/5
Verifying : httpd-2.4.6-19.el7.centos.x86_64 1/5
Verifying : mailcap-2.1.41-2.el7.noarch 2/5
Verifying : httpd-tools-2.4.6-19.el7.centos.x86_64 3/5
Verifying : apr-util-1.5.2-6.el7.x86_64 4/5
Verifying : apr-1.4.8-3.el7.x86_64 5/5
Installed:
httpd.x86_64 0:2.4.6-19.el7.centos
Dependency Installed:
apr.x86_64 0:1.4.8-3.el7 apr-util.x86_64 0:1.5.2-6.el7
httpd-tools.x86_64 0:2.4.6-19.el7.centos mailcap.noarch 0:2.1.41-2.el7
Complete!
설치가 완료 되었다.
아파치 버전을 확인해 보자.
[root@localhost ~]# httpd -v
Server version: Apache/2.4.6 (CentOS)
Server built: Jan 12 2015 13:22:31
아파치를 시작해 보자.
명령어가 조금 바뀌었다고 한다. 예전 명령어를 자동으로 현재의 명령어를 바꾸어서 실행해 준다.
[root@localhost ~]# service httpd start
Redirecting to /bin/systemctl start httpd.service
아파치 상태를 확인해 보자.
[root@localhost ~]# service httpd status
Redirecting to /bin/systemctl status httpd.service
httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled)
Active: active (running) since 금 2015-02-13 20:50:28 KST; 2min 16s ago
Main PID: 16657 (httpd)
Status: "Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec"
CGroup: /system.slice/httpd.service
├─16657 /usr/sbin/httpd -DFOREGROUND
├─16658 /usr/sbin/httpd -DFOREGROUND
├─16659 /usr/sbin/httpd -DFOREGROUND
├─16662 /usr/sbin/httpd -DFOREGROUND
├─16663 /usr/sbin/httpd -DFOREGROUND
└─16665 /usr/sbin/httpd -DFOREGROUND
2월 13 20:50:27 localhost.localdomain systemd[1]: Starting The Apache HTTP ...
2월 13 20:50:27 localhost.localdomain httpd[16657]: AH00558: httpd: Could n...
2월 13 20:50:28 localhost.localdomain systemd[1]: Started The Apache HTTP S...
Hint: Some lines were ellipsized, use -l to show in full.
부팅할 때 아파치를 자동으로 시작하도록 설정한다.
[root@localhost ~]# systemctl enable httpd.service
ln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service'
바로 위에서 설정한 값이 제대로 입력 되었는지 확인해 본다.
enabled면 제대로 된 것이다.
[root@localhost ~]# systemctl list-unit-files --type=service |grep httpd
httpd.service enabled
[root@localhost ~]#
제대로 설치 되었는지 확인해 본다.
centos에 기본으로 설치된 브라우저 파이어폭스에서 아래와 같이 입력해 본다.
http://localhost/
실제 홈페이지 경로는 /var/www/html
아파치 프로그램이 설치된 경로는 /etc/httpd
아파치 설정파일 경로는 /etc/httpd/conf/httpd.conf
아파치(httpd) 시작/멈춤/재시작 명령어
시작 systemctl start httpd.service
멈춤 systemctl stop httpd.service
재시작 systemctl restart httpd.service
아파치 설정파일 에러검사
[root@localhost ~]# apachectl configtest
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
Syntax OK
아직 설정 파일을 전혀 수정하지 않은 상태.
아직 도메인등을 설정하지 않아서 위와 같이 출력이 된다.
마지막에 systax ok이면 정상.
[출처]http://www.websaram.com/bbs/board.php?bo_table=web_server&wr_id=51
[참조]http://tecadmin.net/install-tomcat-8-on-centos-rhel-and-ubuntu/#
[참조]http://blog.lael.be/post/1721
피드 구독하기:
글 (Atom)
vsftpd FTP 서버 접속은 성공하였으나, "디렉토리 목록 조회 실패" 현상 발생시
FTP Passive 모드를 활성화 필요. 1. vsftpd 설정 변경 /etc/vsftpd/vsftpd.conf 상에 아래 내용 추가 기입 #passive modpasv_enable=YES pasv_min_port=5001 pasv...
-
from PIL import Image, ImageTk E : Unable to locate package python3 - pil E : Unable to locate package python3 - imaging - tk $sudo ...
-
FTP Passive 모드를 활성화 필요. 1. vsftpd 설정 변경 /etc/vsftpd/vsftpd.conf 상에 아래 내용 추가 기입 #passive modpasv_enable=YES pasv_min_port=5001 pasv...