LAPM 01

2017. 5. 25. 23:52Work/LAPM

728x90
반응형

linux Apache PHP MySQL

 

 

http://zamezzz.tistory.com/6     :) 리눅스 환경 설치(CentOS)

http://jguru-study.tistory.com/29     :) 기본 설정 사이트(APM)

http://egloos.zum.com/igniter/v/11022746    :) APM 설치 및 가동에 필요한 패키지 설치 부분 참고

 

https://sourceforge.net/projects/pcre/files/pcre/8.37/     :) pcre 사이트

http://ftp.neowiz.com/apache/httpd/     :) Apache httpd 사이트

http://mirror.apache-kr.org/httpd/        :) httpd 사이트

 

http://torrki.com/?p=190 :) 아파치 httpd 여는데 참고함 이쪽 부분도 설정 추가 해주어야 함

 

http://parkck.tistory.com/7 :) mysql cmake 여기서 설치됨

http://jguru-study.tistory.com/30 :) cmake 끝나고 여기서 설정함

 

https://itcenter.yjc.ac.kr/xe_board_tech_linux/453 :) php 기본 설정함

./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-apxs2=/usr/local/apache/bin/apxs --with-config-file-path=/usr/local/apache/conf --with-regex=php --with-zlib --disable-debug --enable-calendar --enable-ftp --enable-sockets --enable-sysvsem --enable-sysvshm --with-gd --enable-mbstring 사용

 

https://www.phpschool.com/gnuboard4/bbs/board.php?bo_table=qna_install&wr_id=109659 :) php 오류 수정

--with-freetype 이거 사용함 make: *** [sapi/cli/php] 오류 1  였었음

 

AddType application/x-httpd-php .php .php3 .php4 .inc 
AddType application/x-httpd-php-source .phps                이 두개 잘 쓰기(httpd 설정 부분임)

 

Parse error: syntax error, unexpected T_STRING 에러시에 <? phpinfo(); ?> 쓰기

 

http://jguru-study.tistory.com/31 :) cp php.ini 부터 사용 PHP 환경설정쪽

 

https://www.phpschool.com/gnuboard4/bbs/board.php?bo_table=qna_install&wr_id=58365 :) php -mysql 연동

https://opentutorials.org/course/62/5174  :) php -mysql 연동

 

http://citylock.tistory.com/202    :) 아파치 htpdocs 디렉토리 변경

http://citylock.tistory.com/201    :) 아파치 htpdocs 디렉토리 변경 후 퍼미션 문제

 

Apache 설정 apr, apr-util, pcre 라이브러리, httpd

 

./configure

make 시 오류 많이 났었는데 기본 설정 사이트(APM)에 보면서 차례대로 해주어야 한다.

 

mysql 설치시 위치 오류가 많이 났었는데 경로를 제대로 파악하고 봐야 합니다.

 

php 설치시 에러(대부분 설치 에러)

http://narusika.tistory.com/entry/php-컨피그-에러    :) 참고 하였습니다. 

 

Configure: error: mcrypt.h not found. Please reinstall libmcrypt.   에러날때

wget http://ftp.linux.co.kr/pub/etc/libmcrypt-2.5.7.tar.gz

    tar zxvfp libmcrypt-2.5.7.tar.gz

    cd libmcrypt-2.5.7

    ./configure && make && make install

 
configure 오류시 : configure: error: Don't know how to define struct flock on this system, set --enable-opcache=no
해결방법 : 심볼릭 링크 생성
# ln -s /usr/local/mysql/lib/libmysqlclient.so /usr/lib
# ln -s /usr/local/mysql/lib/libmysqlclient.so /usr/lib64/
# ln -s /usr/local/mysql/lib/libmysqlclient.so.18 /usr/lib
# ln -s /usr/local/mysql/lib/libmysqlclient.so.18 /usr/lib64/
 
reboot 해주기
 

php 다운 및 컴파일 중 make 에서 요런 에러 뜨면

/private/tmp/php56-mG2H1D/php-5.6.0/ext/zip/lib/zipint.h:118:2: error: unsupported size of off_t
#error unsupported size of off_t
 ^
1 error generated.
make: *** [ext/zip/lib/zip_close.lo] Error 1

./configure line부분 에서

--enable-zip 부분 지우고 다시 ./configure

 

error while loading shared libraries libmcrypt.so.4 에러가 나면

export LD_LIBRARY_PATH=/usr/local/lib 처리

 

failed to open stream permission denied 에러시

 

SELinux가 실행 중이면 다음을 사용하여 / home 디렉토리에서 읽을 수있는 권한을 httpd에 부여해야 할 수 있습니다.

 sudo setsebool httpd_read_user_content=1

 

chcon -Rt httpd_sys_content_rw_t storage/

 

selinux 현재 상태

sestatus -v

비활성화일땐

SELinux status:                disabled

 

활성중일땐

SELinux status: enabled 
SELinuxfs mount: /selinux 
Current mode: enforcing 
Mode from config file: enforcing 
Policy version: 18 
Policy from config file: targeted 

Policy booleans: 
allow_ypbind active 
dhcpd_disable_trans inactive 어쩌구 저쩌구...

 

selinux 설정 해제

- vi 를 통해 "/etc/selinux/config" 에 접속해서 아래와 같이 disabled

[root@ns1 log]# vi /etc/selinux/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=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted

 

 

Windows Mysql 비밀번호 초기화 방법

 

1. services.msc 열어서 mysql 중지2.

mysqld --skip-grant-tables 혹은 mysqld --skip-grant

3. mysql (새창 열어서)

4. use mysql;

5. show tables;

6. describe user;

7. update user set authentication_string=password('1111') where user='root';

 

728x90
반응형

'Work > LAPM' 카테고리의 다른 글

LAPM 03  (0) 2017.06.17
LAPM 02  (0) 2017.05.30