1. yum으로 mysql설치하기
* yum -y install mysql mysql-server
* chkconfig --levels 235 mysqld on //서버를 부팅할 때 mysql서비스가 자동으로 실행할 수 있도록 설정
* /etc/init.d/mysqld start //mysql을 실행 합니다.
* cp /usr/share/mysql/my-huge.cnf /etc/my.cnf
* cat /etc/passwd //mysql 계정이 있는지 확인후 없다면 생성
* useradd -d /usr/local/mysql -s /sbin/nologin mysql //계정생성
* cd /usr/bin //참고로 rpm으로 설치했으때 mysql실행 명령어 폴더위치 입니다.
* chown -R root /usr/bin
* chown -R mysql /var/lib/mysql
* chgrp -R mysql /usr/bin/mysql
* 디비 생성하기
* /usr/bin/mysql_install_db --user=mysql
* /usr/bin/mysqladmin -uroot password 임시비번
* /usr/bin/mysql -u root -p mysql //임시패스워드로접속
* use mysql; //데이터베이스체인지
* update user set password=password('비번') where user='root';
* show databases; //디비생성확인
* flush privileges; //새로고침
* DB 사용자추가
* /usr/bin/mysql -u root -p
* use mysql;
* create database 디비명;
* grant all on 디비명. * TO 디비명@localhost identified by '비번' with grant option;
* flush privileges;
2. yum으로 httpd설치
* yum yum -y install httpd
* chkconfig --levels 2345 httpd on //부팅시 자동시작하게 설정
* vi /etc/httpd/conf/httpd.conf 파일 수정
* User nobody
* Group nobody
* ServerName 이이피
* DirectoryIndex index.html index.htm index.php
* AddType application/x-gzip .gz .tgz 이 줄을 찾아 아래에 2줄 추가.
* AddType application/x-httpd-php .php .php3 .php4 .html .htm .do
* AddType application/x-httpd-php-source .phps
* AllowOverride None => AllowOverride All
* AddHandler cgi-script .cgi 주석 삭제 => AddHandler cgi-script .cgi
* /etc/rc.d/init.d/httpd start 아파치 시작
3. yum으로 php설치
* php관련 라이브러리설치
* yum -y install gd gd-devel libpng libpng-devel libjpeg libjpeg-devel freetype freetype-devel fontconfig fontconfig-devel libxml2 libxml2-devel openssl openssl-devel gmp gmp-devel mhash mhash-devel libmcrypt libmcrypt-devel mysql-server pphp-mysql php-devel php-gd php-mbstring php-mhash
* yum yum -y install php
* vi /etc/httpd/conf.d/php.conf 파일 php설정
* AddHandler php5-script .php .htm .html //수정
* AddType application/x-httpd-php-source .phps .php .html .html //수정
이렇게해서 서버구축했고 홈페이지 잘돌아갑니다.
그런데 소스설치와 yum설치의 차이점을 알여주세요
댓글 1개
13년 전
소스 설치는 커스텀 설치라 필요한 부분만 설치하면 되므로 서버가 빠릿하게 반응하는데
Yum 이나 RPM 설치는 의존성을 보므로 의존성 관련 라이브러리도 죄다 설치해줘야 하죠~
당근 서버의 자원을 더 점유하게되고 추후 자유로운 커스터마이징시 좀 골룸할때가 있죠~
근데 전 둘다 해보니 속도나 자원먹는거나 별반 차이가 없어서 그냥 RPM 설치로 끝내고
맙니다. 물론 하드용량은 더 잡아먹지만....요즘 같은때에 크게 신경쓸 부분은 아니죠~
Yum 이나 RPM 설치는 의존성을 보므로 의존성 관련 라이브러리도 죄다 설치해줘야 하죠~
당근 서버의 자원을 더 점유하게되고 추후 자유로운 커스터마이징시 좀 골룸할때가 있죠~
근데 전 둘다 해보니 속도나 자원먹는거나 별반 차이가 없어서 그냥 RPM 설치로 끝내고
맙니다. 물론 하드용량은 더 잡아먹지만....요즘 같은때에 크게 신경쓸 부분은 아니죠~
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 7930 | 9년 전 | 375 | ||
| 7929 | 9년 전 | 267 | ||
| 7928 | 9년 전 | 377 | ||
| 7927 | 9년 전 | 299 | ||
| 7926 | 9년 전 | 648 | ||
| 7925 | 9년 전 | 316 | ||
| 7924 | 9년 전 | 290 | ||
| 7923 | 9년 전 | 323 | ||
| 7922 | 9년 전 | 345 | ||
| 7921 | 9년 전 | 376 | ||
| 7920 | 9년 전 | 298 | ||
| 7919 | 9년 전 | 313 | ||
| 7918 | 9년 전 | 477 | ||
| 7917 | 9년 전 | 318 | ||
| 7916 | 9년 전 | 385 | ||
| 7915 | 9년 전 | 371 | ||
| 7914 | 9년 전 | 382 | ||
| 7913 | 9년 전 | 508 | ||
| 7912 | 9년 전 | 383 | ||
| 7911 | 9년 전 | 334 | ||
| 7910 | 9년 전 | 367 | ||
| 7909 | 9년 전 | 471 | ||
| 7908 | 9년 전 | 370 | ||
| 7907 | 9년 전 | 326 | ||
| 7906 | 9년 전 | 338 | ||
| 7905 | 9년 전 | 329 | ||
| 7904 | 9년 전 | 300 | ||
| 7903 | 9년 전 | 302 | ||
| 7902 | 9년 전 | 516 | ||
| 7901 |
|
9년 전 | 716 | |
| 7900 | 9년 전 | 541 | ||
| 7899 | 9년 전 | 349 | ||
| 7898 | 9년 전 | 341 | ||
| 7897 | 9년 전 | 297 | ||
| 7896 | 9년 전 | 319 | ||
| 7895 | 9년 전 | 427 | ||
| 7894 | 9년 전 | 349 | ||
| 7893 | 9년 전 | 281 | ||
| 7892 | 9년 전 | 330 | ||
| 7891 | 9년 전 | 719 | ||
| 7890 | 9년 전 | 1177 | ||
| 7889 | 9년 전 | 734 | ||
| 7888 |
limsy1987
|
9년 전 | 531 | |
| 7887 | 9년 전 | 504 | ||
| 7886 | 9년 전 | 395 | ||
| 7885 | 9년 전 | 365 | ||
| 7884 | 9년 전 | 373 | ||
| 7883 | 9년 전 | 359 | ||
| 7882 | 9년 전 | 372 | ||
| 7881 | 9년 전 | 400 | ||
| 7880 | 9년 전 | 525 | ||
| 7879 | 9년 전 | 420 | ||
| 7878 | 9년 전 | 1161 | ||
| 7877 | 9년 전 | 714 | ||
| 7876 | 9년 전 | 438 | ||
| 7875 | 9년 전 | 514 | ||
| 7874 |
|
9년 전 | 783 | |
| 7873 | 9년 전 | 484 | ||
| 7872 | 9년 전 | 620 | ||
| 7871 | 9년 전 | 448 | ||
| 7870 | 9년 전 | 575 | ||
| 7869 | 9년 전 | 395 | ||
| 7868 | 9년 전 | 384 | ||
| 7867 | 9년 전 | 382 | ||
| 7866 | 9년 전 | 444 | ||
| 7865 | 9년 전 | 406 | ||
| 7864 | 9년 전 | 470 | ||
| 7863 | 9년 전 | 457 | ||
| 7862 | 9년 전 | 437 | ||
| 7861 | 9년 전 | 595 | ||
| 7860 | 9년 전 | 595 | ||
| 7859 | 9년 전 | 371 | ||
| 7858 | 9년 전 | 673 | ||
| 7857 | 9년 전 | 1024 | ||
| 7856 | 9년 전 | 485 | ||
| 7855 | 9년 전 | 703 | ||
| 7854 | 9년 전 | 700 | ||
| 7853 | 9년 전 | 546 | ||
| 7852 | 9년 전 | 475 | ||
| 7851 | 9년 전 | 448 | ||
| 7850 | 9년 전 | 552 | ||
| 7849 | 9년 전 | 318 | ||
| 7848 | 9년 전 | 370 | ||
| 7847 | 9년 전 | 593 | ||
| 7846 | 9년 전 | 408 | ||
| 7845 | 9년 전 | 371 | ||
| 7844 | 9년 전 | 368 | ||
| 7843 | 9년 전 | 378 | ||
| 7842 | 9년 전 | 371 | ||
| 7841 | 9년 전 | 356 | ||
| 7840 | 9년 전 | 364 | ||
| 7839 | 9년 전 | 397 | ||
| 7838 | 9년 전 | 482 | ||
| 7837 | 9년 전 | 325 | ||
| 7836 | 9년 전 | 363 | ||
| 7835 | 9년 전 | 443 | ||
| 7834 |
|
9년 전 | 1171 | |
| 7833 | 9년 전 | 379 | ||
| 7832 | 9년 전 | 378 | ||
| 7831 | 9년 전 | 512 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기