중급자를 위한 리눅스 서버 세팅 순서와 자동 설치 스크립트 소스 - 부분 1

리눅스 서버를 세팅할 때 대략 스물 서너가지를 세팅해야되더군요.
너무 불편하고 답답해서 스크립트로 작성해서 자동 세팅되게 해봤는데...편하더라구요.
제가 리눅스 서버 세팅할 때 사용하는 자동설치 스크립트 소스입니다.
알기 쉽게 부분별로 올리도록 하겠습니다.
중급자분들은 소스를 보시면 아실꺼에요.
시리즈별로 이어서 각기 자동설치 스크립트를 만들어 사용하시면 될꺼에요.

0. mysql 설치 - php 보다 먼저 설치한다.

tar -xzvf mysql-3.23.51.tar.gz &&
cd mysql-3.23.51 &&
groupadd -g 27 mysql &&
mkdir /usr/local/mysql &&
useradd -c mysql -d /usr/local/mysql/data -g mysql -s /bin/false mysql &&
rm -rf /usr/local/mysql &&
CFLAGS="-03 -mpentiumpro" \
CXX=gcc \
CXXFLAGS="-3 -mpentiumpro -felide-constructors -fno-exceptions -fno-rtti" \
./configure \
--prefix=/usr/local/mysql \
--localstatedir=/usr/local/mysql/data \
--with-charset=euc_kr \
--with-mysqld-user=mysql \
--sysconfdir=/etc \
--with-client-ldflags=-all-static \
--with-mysqld-ldflags=-all-static \
--enable-assembler \
--without-debug \
--without-bench \
--with-innodb &&
make &&
make install &&
cd /usr/local/mysql &&
cp share/mysql/my-medium.cnf /etc/my.cnf &&
cd /usr/local/mysql/bin &&
./mysql_install_db &&
chown -R root.mysql /usr/local/mysql &&
chown -R mysql /usr/local/mysql/data &&
cd /usr/local/mysql &&
cp share/mysql/mysql-log-rotate /etc/logrotate.d/mysql &&
cp share/mysql/mysql.server /etc/rc.d/init.d/mysql &&
cd bin &&
./safe_mysqld &


** 파일링크
ln -sf /usr/local/mysql/bin/* /usr/local/bin/. &&
/etc/rc.d/init.d/mysql stop &&
/etc/rc.d/init.d/mysql start &&
mysqladmin -u root password 'tksgkdml9425' &&
mysqladmin -p shutdown


cd /etc/rc3.d &&
ln -s ../init.d/mysql S85mysql &&
ln -s ../init.d/mysql K85mysql &&
cd /etc/rc5.d &&
ln -s ../init.d/mysql S85mysql &&
ln -s ../init.d/mysql K85mysql &&
cd ../init.d &&
chmod 755 mysql


옵션>> mysql 동시접속자 수 증가

확인방법 :
mysqladmin -u root -p variables | grep max_connection
/etc/rc.d/init.d/mysql stop &&
cd /usr/local/mysql/bin &&
safe_mysqld -O max_connections=1000 & &&
mysqladmin -u root -p variables | grep max_connection<div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 17:32:05 Linux에서 이동 됨]</div>
|

댓글 1개

컴파일러 버전과 커널도 함께 알려주심 더욱 좋을듯..
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

태그 필터 (최대 3개) 전체 개발자 소스 기타 mysql 팁자료실 javascript php linux flash 정규표현식 jquery node.js mobile 웹서버 os 프로그램 강좌 썸네일 이미지관련 도로명주소 그누보드5 기획자 견적서 계약서 기획서 마케팅 제안서 seo 통계 서식 통계자료 퍼블리셔 html css 반응형 웹접근성 퍼블리싱 표준화 반응형웹 홈페이지기초 부트스트랩 angularjs 포럼 스크린리더 센스리더 개발자톡 개발자팁 퍼블리셔톡 퍼블리셔팁 기획자톡 기획자팁 프로그램강좌 퍼블리싱강좌
+
제목 글쓴이 날짜 조회
19년 전 조회 3,138
19년 전 조회 2,374
19년 전 조회 2,367
19년 전 조회 2,310
19년 전 조회 2,932
19년 전 조회 2,632
19년 전 조회 3,486
19년 전 조회 3,344
19년 전 조회 1,970
19년 전 조회 2,894
19년 전 조회 7,975
19년 전 조회 2,655
19년 전 조회 3,261
19년 전 조회 3,032
19년 전 조회 3,147
19년 전 조회 2,373
19년 전 조회 2,604
19년 전 조회 4,202
19년 전 조회 2,395
19년 전 조회 4,381
19년 전 조회 2,554
19년 전 조회 2,232
19년 전 조회 2,468
19년 전 조회 2,028
19년 전 조회 2,552
19년 전 조회 2,340
19년 전 조회 3,217
19년 전 조회 1,999
19년 전 조회 3,675
19년 전 조회 2,852
19년 전 조회 3,578
19년 전 조회 3,597
19년 전 조회 3,298
19년 전 조회 5,579
19년 전 조회 2,321
19년 전 조회 2,360
19년 전 조회 2,472
19년 전 조회 3,538
19년 전 조회 3,862
19년 전 조회 3,886
19년 전 조회 2,497
19년 전 조회 2,535
19년 전 조회 2,830
19년 전 조회 3,158
19년 전 조회 2,591
19년 전 조회 2,764
19년 전 조회 2,611
19년 전 조회 2,348
19년 전 조회 3,365
19년 전 조회 3,446
19년 전 조회 3,161
19년 전 조회 4,998
19년 전 조회 2,836
19년 전 조회 3,453
19년 전 조회 3,279
19년 전 조회 2,148
19년 전 조회 3,274
19년 전 조회 2,008
19년 전 조회 2,466
19년 전 조회 2,554
19년 전 조회 4,122
19년 전 조회 3,314
19년 전 조회 3,234
19년 전 조회 2,680
19년 전 조회 2,145
19년 전 조회 1,785
19년 전 조회 2,565
19년 전 조회 2,475
19년 전 조회 1,945
19년 전 조회 1,960
19년 전 조회 2,739
19년 전 조회 2,705
19년 전 조회 2,023
19년 전 조회 2,249
19년 전 조회 3,433
19년 전 조회 2,082
19년 전 조회 2,614
19년 전 조회 2,691
19년 전 조회 2,804
19년 전 조회 3,068
19년 전 조회 2,705
19년 전 조회 3,115
19년 전 조회 2,888
19년 전 조회 3,651
19년 전 조회 2,012
19년 전 조회 2,859
19년 전 조회 2,518
19년 전 조회 2,150
19년 전 조회 2,569
19년 전 조회 1,997
19년 전 조회 5,559
19년 전 조회 2,405
19년 전 조회 4,368
19년 전 조회 2,434
19년 전 조회 1,994
19년 전 조회 2,721
19년 전 조회 2,469
19년 전 조회 2,657
19년 전 조회 2,309
19년 전 조회 4,060