중급자를 위한 리눅스 서버 세팅 순서와 자동 설치 스크립트 소스 - 부분 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개

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

프로그램

+
제목 글쓴이 날짜 조회
19년 전 조회 2,972
19년 전 조회 2,198
19년 전 조회 2,221
19년 전 조회 2,160
19년 전 조회 2,765
19년 전 조회 2,476
19년 전 조회 3,340
19년 전 조회 3,193
19년 전 조회 1,821
19년 전 조회 2,733
19년 전 조회 7,822
19년 전 조회 2,495
19년 전 조회 3,103
19년 전 조회 2,852
19년 전 조회 3,009
19년 전 조회 2,215
19년 전 조회 2,445
19년 전 조회 4,068
19년 전 조회 2,222
19년 전 조회 4,221
19년 전 조회 2,379
19년 전 조회 2,075
19년 전 조회 2,324
19년 전 조회 1,865
19년 전 조회 2,403
19년 전 조회 2,193
19년 전 조회 3,062
19년 전 조회 1,845
19년 전 조회 3,539
19년 전 조회 2,695
19년 전 조회 3,440
19년 전 조회 3,441
19년 전 조회 3,143
19년 전 조회 5,431
19년 전 조회 2,164
19년 전 조회 2,214
19년 전 조회 2,309
19년 전 조회 3,389
19년 전 조회 3,697
19년 전 조회 3,741
19년 전 조회 2,348
19년 전 조회 2,390
19년 전 조회 2,685
19년 전 조회 3,032
19년 전 조회 2,456
19년 전 조회 2,621
19년 전 조회 2,443
19년 전 조회 2,202
19년 전 조회 3,228
19년 전 조회 3,288
19년 전 조회 3,024
19년 전 조회 4,858
19년 전 조회 2,687
19년 전 조회 3,301
19년 전 조회 3,132
19년 전 조회 1,981
19년 전 조회 3,122
19년 전 조회 1,863
19년 전 조회 2,331
19년 전 조회 2,402
19년 전 조회 3,982
19년 전 조회 3,167
19년 전 조회 3,093
19년 전 조회 2,536
19년 전 조회 1,996
19년 전 조회 1,639
19년 전 조회 2,408
19년 전 조회 2,327
19년 전 조회 1,816
19년 전 조회 1,813
19년 전 조회 2,602
19년 전 조회 2,577
19년 전 조회 1,875
19년 전 조회 2,107
19년 전 조회 3,293
19년 전 조회 1,948
19년 전 조회 2,491
19년 전 조회 2,566
19년 전 조회 2,659
19년 전 조회 2,934
19년 전 조회 2,560
19년 전 조회 2,974
19년 전 조회 2,758
19년 전 조회 3,511
19년 전 조회 1,868
19년 전 조회 2,730
19년 전 조회 2,368
19년 전 조회 2,018
19년 전 조회 2,425
19년 전 조회 1,870
19년 전 조회 5,438
19년 전 조회 2,257
19년 전 조회 4,240
19년 전 조회 2,296
19년 전 조회 1,845
19년 전 조회 2,587
19년 전 조회 2,330
19년 전 조회 2,527
19년 전 조회 2,164
19년 전 조회 3,910
🐛 버그신고