쎄지오 그룹웨어 기본 설치순서
1. OS 설치(리눅스 Redhat기반) Centos4,5,6)
kernel 2.6이상의 Redhat 기반의 리눅스 O/S, Postgresql 7.4 버전 이상, Postfix 2.0 이상,
→ 쎄지오 서비스 시작 명령
service shttpd restart
service shttpd stop
service shttpd start
Cent OS 6.10 설치 메뉴얼(윈도우 설치 후 환경설정)
getenforce
vi /etc/selinux/config
disabled :wq
/etc/rc.d/init.d/iptables restart
reboot
vi iptables.sh
#!/bin/bash
trust_host=’192.168.0.0/24′
my_host=’192.168.0.240′
/sbin/iptables -F
/sbin/iptables -X
/sbin/iptables -P INPUT DROP
/sbin/iptables -P OUTPUT ACCEPT
/sbin/iptables -P FORWARD DROP
/sbin/iptables -A INPUT -m state –state ESTABLISHED,RELATED -j ACCEPT
/sbin/iptables -A INPUT -s 127.0.0.1 -d 127.0.0.1 -j ACCEPT
/sbin/iptables -A INPUT -p icmp –icmp-type echo-request -s $trust_host \
-d $my_host -m limit –limit 1/m –limit-burst 5 -j ACCEPT
/sbin/iptables -A INPUT -p tcp -m state –state NEW -m tcp -s $trust_host \
-d $my_host –dport 22 -j ACCEPT
:wq
/etc/rc.d/init.d/iptables save
/etc/rc.d/init.d/iptables restart
sh iptables.sh
yum -y install yum-plugin-priorities
sed -i -e “s/\]$/\]\npriority=1/g” /etc/yum.repos.d/CentOS-Base.repo
yum -y install epel-release
sed -i -e “s/\]$/\]\npriority=5/g” /etc/yum.repos.d/epel.repo
sed -i -e “s/enabled=1/enabled=0/g” /etc/yum.repos.d/epel.repo
yum –enablerepo=epel install [Package]
yum -y install centos-release-scl-rh centos-release-scl
sed -i -e “s/\]$/\]\npriority=10/g” /etc/yum.repos.d/CentOS-SCLo-scl.repo
sed -i -e “s/\]$/\]\npriority=10/g” /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo
sed -i -e “s/enabled=1/enabled=0/g” /etc/yum.repos.d/CentOS-SCLo-scl.repo
sed -i -e “s/enabled=1/enabled=0/g” /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo
yum –enablerepo=centos-sclo-rh install [Package]
yum –enablerepo=centos-sclo-sclo install [Package]
yum -y install http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
sed -i -e “s/\]$/\]\npriority=10/g” /etc/yum.repos.d/remi-safe.repo
sed -i -e “s/enabled=1/enabled=0/g” /etc/yum.repos.d/remi-safe.repo
yum –enablerepo=remi-safe install [Package]
yum -y install ntp
vi /etc/ntp.conf
restrict 192.168.0.0 mask 255.255.255.0 nomodify notrap
/etc/rc.d/init.d/ntpd start
chkconfig ntpd on
iptables -I INPUT 5 -p udp -m state –state NEW -m udp –dport 123 -j ACCEPT
/etc/rc.d/init.d/iptables save
/etc/rc.d/init.d/iptables restart
ntpq -p
yum -y install php php-mbstring php-pear
vi /etc/php.ini
date.timezone =”Asia/Seoul”
/etc/rc.d/init.d/httpd restart
yum -y install httpd
vi /etc/httpd/conf/httpd.conf
ServerTokens Prod
KeepAlive On
ServerAdmin root@ycis.co.kr
AllowOverride All
ServerName ycis.co.kr:80
DirectoryIndex index.html index.htm
ServerSignature Off
/etc/rc.d/init.d/httpd start
chkconfig httpd on
iptables -I INPUT 5 -p tcp -m state –state NEW -m tcp –dport 80 -j ACCEPT
88,110,143,25,587,10000,783,5432
/etc/rc.d/init.d/iptables save
/etc/rc.d/init.d/iptables restart
webmin-rpm설치
yum -y install perl-Net-SSLeay
yum -y install http://download.webmin.com/download/yum/webmin-1.941-1.noarch.rpm
테마 다운로드 http://theme.winfuture.it/bootstrap.wbt.gz
vi /etc/webmin/miniserv.conf
allow=127.0.0.1 192.168.0.0/24 추가 접근권한 없으면 다접속
/etc/rc.d/init.d/webmin restart
웹 오류시-
vi /etc/webmin/config
referers_none=1 라인을 찾아서 삭제
쎄지오설치 전 프로그램 설치=======================================================
yum -y install openssl* 다시 설치시 맨마지막설치
yum -y install postfix*
yum -y install postgresql*
yum remove sendmail
chkconfig –del sendmail
chkconfig sendmail off
chkconfig –list sendmail
alternatives –config mta
chkconfig postfix on systemctl enable postfix.service
chkconfig –list postfix 2,3,4,5 on 0,6 off 표시 systemctl start postfix.service
service postfix restart systemctl restart postfix.service
chkconfig postfix on
yum -y install spamassassin
yum -y install cyrus-sasl
yum -y install gcc*
yum -y install openssl-devel*
yum -y install pam-devel*
yum -y install cyrus-sasl*
권한설정
chmod 444 /etc/services
[도메인 설정]
DNS 클라이언트
gw.ycis.co.kr
호스트 주소
mail.ycis.co.kr
쎄지오관리에서
호스트네임
gw.ycis.co.kr
Email호스트
ycis.co.kr
iptables -I INPUT 5 -p tcp -m state –state NEW -m tcp –dport 88 -j ACCEPT
/etc/rc.d/init.d/iptables save
/etc/rc.d/init.d/iptables restart
/etc/init.d/spamassassin start
/etc/init.d/spamassassin restart
chkconfig spamassassin on
** install phpPgAdmin **
yum –enablerepo=epel -y install phpPgAdmin php-pgsql
vi /etc/phpPgAdmin/config.inc.php
$conf[‘servers’][0][‘host’] = ‘ localhost’;
$conf[‘owned_only’] = true;
vi /var/lib/pgsql/data/pg_hba.conf
host all all 127.0.0.1/32 md5
host all all 10.0.0.0/24 md5
host all all ::1/128 md5
vi /etc/httpd/conf.d/phpPgAdmin.conf
Allow from 127.0.0.1 192.168.0.0/24
/etc/rc.d/init.d/httpd restart
http://192.168.0.240/phpPgAdmin/
ID: segio
PASS: segio
쎄지오 설치 전에 컴파일 실행=======================================================
segio-cyrus-sasl.tgz 서버에 업로드
압축해제 : tar xvzf segio-cyrus-sasl.tgz
cd segio-cyrus-sasl-2.1.23
컴파일 명령를 실행
make clean; ./configure –prefix=/usr/local/sasl
* 오류나면 make clean; ./configure –prefix=/usr/local/sasl –with-des=no
Makefile 편집:
vi saslauthd/Makefile
LIBS = -lresolv
LIBS = -lresolv -lssl 변경
make / make install 실행 :
make ; make install
– ( make 시에 에러가 날 경우 make ; make install ./configure –prefix=/usr/local/sasl –with-des=no 로 한뒤 다시 make )
실행파일 수정
vi /etc/init.d/saslauthd
path=/usr/sbin/saslauthd
path=/usr/local/sasl/sbin/saslauthd 수정
vi /etc/sysconfig/saslauthd
MECH=pam
MECH=shadow 수정
service saslauthd start
service saslauthd stop
chkconfig saslauthd on
쎄지오 설치 =========================================
sh install.sh
아이디 : sysop
비밀번호: segio
=================================================
vi /etc/shttpd/conf/hosts.conf 에 메일 관련 설정 확인
vi /etc/postfix/
Spamassassin 설정 변경
웹메일 포스트픽스(postfix)설정
vi /etc/postfix/main.cf
virtual_mailbox_domains = hash:/etc/shttpd/conf/postfix_domains
virtual_transport = segio
# virtual_alias_maps = hash:/etc/shttpd/conf/postfix_aliases
segio_destination_recipient_limit = 1
vi /etc/postfix/master.cf
# segio webmail MDA service setting 4 all virtual mail receive
segio unix – n n – – pipe flags=DRO user=segio argv=/etc/shttpd/bin/_mail -d ${recipient}
service postfix restart
vi /etc/postfix/master.cf
spamassassin unix – n n – – pipe user=segio argv=/usr/bin/spamc -f -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}
smtp inet n – n – – smtpd -o content_filter=spamassassin
submission inet n – n – – smtpd -o content_filter=spamassassin
service postfix restart
쪽지폴더
cd /home/www/html/cell000/folder/html
mv segio segio_backup
백업본 복사후 압축품
tar -xvzf segio.tar.gz
ex) tar -xvzf data.tar.gz 압축푸는법
tar -xvzf home.tar.gz
tar -xvzf board.tar.gz
cd /home/www/html/cell000/folder
tar -xvzf html.tar.gz
3. /home/segio/cell000/etc/passwd 기존파일 카피후 다운로드 후 압로드 변경
/home/segio/cell000/data/
/home/segio/cell000/home/
/home/segio/cell000/board/
/home/www/html/cell000/folder/html/segio/
cd /home/www/html/cell000/folder/html/segio/
ex) mv cell000 cell000_backup 백업 폴더명 변경
ex) tar -xvzf data.tar.gz 압축푸는법
tar -xvzf home.tar.gz
tar -xvzf board.tar.gz
cd /home/www/html/cell000/folder/html/segio/
tar -xvzf segio.tar.gz
cd /home/www/html/cell000/etc/
passwd 파일 업로드
Postgresql 8.3 이상 버전 데이터베이스 최적화
vi /var/lib/pgsql/data/postgresql.conf 파일에서 아래와 같이 수정
track_counts=on
autovacuum = on
autovacuum_naptime = 60
autovacuum_vacuum_threshold = 1000
autovacuum_analyze_threshold = 500
autovacuum_vacuum_scale_factor = 0.4
autovacuum_analyze_scale_factor = 0.2
autovacuum_vacuum_cost_delay = -1
autovacuum_vacuum_cost_limit = -1
cd /home/segio
.spamassassin 디렉토리가 있는지 확인 없으면 생성
.spamassassin 디렉토리 하위에 user_prefs 파일이 있는지 확인 없으면 생성
vi user_prefs 수정 * 메일 한번 보내고 나면
required_score 11.0
rewrite_header subject [*SPAM*]
report_safe 1
use_bayes 1
bayes_auto_learn 1
skip_rbl_checks 0
use_razor2 1
use_pyzor 1
/etc/init.d/spamassassin restart
chkconfig spamassassin on
– postfix, spamassassin을 재실행하여 동작여부 확인
5. 동작여부 확인
postfix
/etc/init.d/postfix status
spamassassin
/etc/init.d/spamassassin status
===================================================
* 백업 복원 방법*
service shttpd stop
데이터베이스 백업 pg_dump -Usegio cell_000 > cell_000.dump
데이터베이스 복원 psql -Usegio -f cell_000.dump cell_000
패스워드 segio
service postgresql reload
*사용자 패스워드 백업 및 복원*
/home/segio/cell000/etc/passwd
아이디 : sysop
비밀번호: segio
– 솔루션 관련 폴더 –
cd /home/segio/cell000
mv board board_backup
mv data data_backup
mv home home_backup
cd /home/segio/cell000/folder
mv html html_backup
cd /home/segio/cell000/etc/
mv passwd passwd_backup
백업은
pg_dump -Usegio cell_000 >cell_000.dump
vi /var/lib/pgsql/data/pg_hba.conf trust 변경후 복원
복원은
psql -Usegio -f psql -Usegio -f cell_000.dump cell_000
vi /var/lib/pgsql/data/pg_hba.conf md5 변경후 적용
service postgresql reload
service postgresql stop
vi /var/lib/pgsql/data/pg_hba.conf
host all all 127.0.0.1/32 md5
host all all 10.0.0.0/24 md5
host all all ::1/128 md5
md5를 trust 로 모두 변경 저장
service postgresql start
su – postgres
psql -c “alter user postgres with password ‘password'”
service postgresql stop
service postgresql start
service postgresql restart
http://ycis.co.kr:88 (localhost)
segio id
id: sysop
pass: segio
참고: 쎄지오 로그 자동 삭제
vi /etc/shttpd/conf/shttpd.conf
off
@@@@@ 데이터 복원 전에 관리자 계정으로 접속후 사용자 1명은 추가후에 데이터 복원 @@@@@
그래야 쪽지 기능 사용가능.
***** 데이터 복원후에 사용자계정에서 사용자별 확인버튼을 1화 저장으로 눌러줘야 사용자 인증됨. *****
SEGIO 삭제
/etc/shttpd 삭제
① “cd /etc”를 입력하여 shttpd 폴더가 들어있는 etc폴더로 이동합니다.
② “ls”를 입력하여 ”shttpd”폴더가 있는지 확인합니다.
③ “shttpd”폴더가 있다면 “mv shttpd shttpd_backup”를 입력하여 기존의 shttpd 폴더명을 바꾸어줍니다.(삭제 효과)
/홈디렉터리/cell000 삭제
① “cd /home/segio/”를 입력하여 홈디렉터리로 이동합니다.
② “ls”를 입력하여 ”cell000″폴더가 있는지 확인합니다.
③ “cell000″폴더가 있다면 “mv cell000 cell000_backup”를 입력하여 기존의 cell000폴더명을 바꾸어줍니다.(삭제 효과)
/var/lib/pgsql 파일 삭제
① “cd /var/lib/pgsql”를 입력하여 db디렉토리로 이동합니다.
② rm 명령어를 통해 pgsql 디렉토리 내의 파일을 모두 삭제합니다.
.
쎄지오 기본 아이디 패스워드
1. /etc/shttpd —> 설정파일 및 엔진(데몬) 파일 위치
2. /home/segio —> 솔루션관련 모든 데이타 파일 위치
3. /var/liv/pgsql —> DB 파일 위치
service shttpd stop
service shttpd start
service shttpd restart
2. service postgresql stop
service postgresql start
service postgresql restart
centos7 ——-명령어 모음————————
systemctl start ntpd
systemctl enable ntpd
firewall-cmd –add-service=ntp –permanent
firewall-cmd –reload
systemctl status firewalld
systemctl stop firewalld
systemctl start firewalld
systemctl enable firewalld
iptables -I INPUT 5 -p tcp -m state –state NEW -m tcp –dport 80 -j ACCEPT
systemctl stop webmin
systemctl start webmin
systemctl enable webmin
firewall-cmd –permanent –zone=public –add-port=80/tcp
systemctl start spamassassin
systemctl restart spamassassin
systemctl enable spamassassin