1.vi /etc/skel/.bash_logout
# ~/.bash_logout
rm -rf $HOME/.bash_history
rm -rf $HOME/.mysql_history
clear
2.vi /root/.bash_logout
# ~/.bash_logout
rm -rf $HOME/.bash_history
rm -rf $HOME/.mysql_history
clear
3.vi /etc/inittab
# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
#2:2345:respawn:/sbin/mingetty tty2
#3:2345:respawn:/sbin/mingetty tty3
#4:2345:respawn:/sbin/mingetty tty4
#5:2345:respawn:/sbin/mingetty tty5
#6:2345:respawn:/sbin/mingetty tty6
# Run xdm in runlevel 5
# xdm is now a separate service
#x:5:respawn:/etc/X11/prefdm -nodaemon
4.vi /etc/profile
/usr/local/mysql/bin path 추가
pathmunge /sbin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
#######################################
pathmunge /usr/local/mysql/bin
########################################
HISTSIZE=30
HISTFILESIZE=30
TMOUT=1800
########################################
if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
INPUTRC=/etc/inputrc
fi
######################################
pathmunge /usr/local/mysql/bin after
######################################
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTFILESIZE TMOUT INPUTRC ##########
5.vi /etc/issue /etc/issue.net
6. /etc/ anonymous ftp 설정해제
anonymous_enable=NO
chroot_local_user=YES
9.vi /etc/securetty
tty1
tty2
tty3
tty4
tty5
tty6
10.vi /etc/ssh/sshd_config
#######################################################################
# $OpenBSD: sshd_config,v 1.56 2002/06/20 23:37:12 markus Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value.
Port 22
Protocol 2,1
#ListenAddress 0.0.0.0
#ListenAddress ::
# HostKey for protocol version 1
HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 768
# Logging
#obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
SyslogFacility AUTHPRIV
LogLevel INFO
# Authentication:
LoginGraceTime 600
PermitRootLogin no
StrictModes yes
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
# rhosts authentication should not be used
RhostsAuthentication no
# Don't read the user's ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
IgnoreUserKnownHosts no
# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication yes
PermitEmptyPasswords no
# Change to no to disable s/key passwords
ChallengeResponseAuthentication yes
# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#AFSTokenPassing no
# Kerberos TGT Passing only works with the AFS kaserver
#KerberosTgtPassing no
# Set this to 'yes' to enable PAM keyboard-interactive authentication
# Warning: enabling this may bypass the setting of 'PasswordAuthentication'
PAMAuthenticationViaKbdInt yes
#X11Forwarding no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
PrintMotd yes
PrintLastLog yes
KeepAlive yes
UseLogin no
UsePrivilegeSeparation yes
Compression yes
#MaxStartups 10
# no default banner path
#Banner /some/path
#VerifyReverseMapping no
# override default of no subsystems
Subsystem sftp /usr/libexec/openssh/sftp-server
#########################################################################
11.vi /etc/pam.d/su
auth sufficient /lib/security/pam_rootok.so debug
auth required /lib/security/pam_wheel.so group=wheel
auth sufficient /lib/security/pam_wheel.so group=wheel
위에것만 쓴다.
##########################################################################
#%PAM-1.0
auth sufficient /lib/security/pam_rootok.so debug
auth required /lib/security/pam_wheel.so group=wheel
# Uncomment the following line to implicitly trust users in the "wheel" group.
auth sufficient /lib/security/pam_wheel.so group=wheel
# Uncomment the following line to require a user to be in the "wheel" group.
#auth required /lib/security/pam_wheel.so use_uid
auth required /lib/security/pam_stack.so service=system-auth
account required /lib/security/pam_stack.so service=system-auth
password required /lib/security/pam_stack.so service=system-auth
session required /lib/security/pam_stack.so service=system-auth
session optional /lib/security/pam_xauth.so
##########################################################################
12.vi /etc/group
wheel:x:10:root,admin
13. /etc/passwd
userdel adm
userdel lp
userdel sync
userdel shutdown
userdel halt
userdel news
userdel operator
userdel games
userdel gopher
userdel rpcuser
userdel nfsnobody
userdel rpc
14. dbbackup.sh home계정 backup
15. fstab
/와 /boot만 빼고 다 준다.
############################################################################
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
LABEL=/home /home ext3 defaults,nodev 1 2
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
LABEL=/tmp /tmp ext3 defaults,nodev,nosuid,noexec
1 2
LABEL=/usr /usr ext3 defaults,nodev 1 2
LABEL=/usr/local /usr/local ext3 defaults,nodev 1 2
LABEL=/var /var ext3 defaults,nodev 1 2
/dev/hda2 swap swap defaults 0 0
############################################################################
16. kernel 등등 패키지 업그레이드
ncftp ftp.kreonet.net
17. 계정 정리
rc.local 파일에
chmod 500 /proc 추가
chmod 500 /proc
chmod 701 /bin
chmod 700 /boot
chmod 701 /dev
chmod 701 /home
chmod 700 /mnt
chmod 700 /root
chmod 701 /usr
chmod 751 /var
chmod 750 /etc/cron.*
chmod 640 /etc/crontab
chmod 750 /etc/default
chmod 600 /etc/exports
chmod 600 /etc/fstab
chmod 600 /etc/gpm-root.conf
chmod 600 /etc/host.conf
chmod 600 /etc/hosts
chmod 600 /etc/hosts.allow
chmod 600 /etc/hosts.deny
chmod 600 /etc/identd.conf
chmod 600 /etc/initlog.conf
chmod 600 /etc/inittab
chmod 400 /etc/issue
chmod 400 /etc/issue.net
chmod 600 /etc/krb.conf
chmod 600 /etc/krb5.conf
chmod 600 /etc/ld.so.conf
chmod 600 /etc/ldap.conf
chmod 600 /etc/lilo.conf
chmod 600 /etc/login.defs
chmod 600 /etc/logrotate.conf
chmod 750 /etc/logrotate.d
chmod 600 /etc/lpd.conf
chmod 600 /etc/ltrace.conf
chmod 600 /etc/modules.conf
chmod 600 /etc/modules.conf~
chmod 600 /etc/mtab
chmod 650 /etc/my.cnf
chmod 640 /etc/named.conf
chown named.named /etc/named.conf
chmod 600 /etc/nscd.conf
chmod 600 /etc/nsswitch.conf
chmod 600 /etc/pbm2ppa.conf
chmod 600 /etc/pine.conf
chmod 600 /etc/pnm2ppa.conf
chmod 600 /etc/pwdb.conf
chmod 600 /etc/radvd.conf
chmod 750 /etc/rc.d
chmod 600 /etc/redhat-release
chmod 750 /etc/rpm
chmod 600 /etc/rpc
chmod 440 /etc/screenrc
chmod 600 /etc/securetty
chmod 750 /etc/security
chmod 600 /etc/services
chmod 700 /etc/skel
chmod 750 /etc/smrsh
chmod 750 /etc/ssh
chmod 750 /etc/sysconfig
chmod 600 /etc/sysctl.conf
chmod 600 /etc/syslog.conf
chmod 600 /etc/tcp.smtp
chmod 600 /etc/updatedb.conf
chmod 600 /etc/xinetd.conf
chmod 751 /etc/xinetd.d
chmod 600 /etc/yp.conf
chmod 600 /etc/ypserv.conf
chmod 750 /var/log
chmod 751 /var/named
chmod 700 /usr/local/src
chmod 701 /usr/local/apache/cgi-bin
chmod 700 /usr/local/apache/conf
chmod 701 /usr/local/apache/htdocs
chmod 700 /usr/local/apache/logs
chmod 700 /usr/bin/chage
chmod 500 /usr/bin/wall
chmod 700 /usr/bin/chfn
chmod 700 /usr/bin/write
chmod 700 /usr/sbin/usernetctl
chmod 700 /bin/mount
chmod 700 /bin/umount
chmod 700 /sbin/netreport
chmod 700 /bin/rpm
chmod 550 /bin/ps
chmod 550 /bin/netstat
chmod 550 /bin/dmesg
chmod 550 /bin/df
chmod 550 /usr/bin/who
chmod 550 /usr/bin/finger
chmod 550 /usr/bin/last
chmod 550 /usr/bin/top
chmod 550 /usr/bin/w
chmod 550 /usr/bin/uptime
chmod 550 /usr/sbin/useradd
chmod 550 /usr/sbin/userdel
chmod 700 /usr/sbin/groupdel
chmod 700 /usr/sbin/usermod
#chmod 555 /bin/ping
#chmod 555 /usr/bin/find
chmod 600 /var/log/wtmp
chmod 600 /var/log/lastlog
chmod 600 /var/log/dmesg
chmod 600 /var/run/utmp
chmod 750 /usr/bin/rlogin
chmod 750 /usr/bin/rcp
chmod 755 /usr/bin/gpasswd
chmod 755 /usr/bin/at
chmod 711 /usr/bin/newgrp
chmod 755 /usr/bin/crontab
chmod 750 /usr/bin/rsh
chmod 111 /usr/bin/sudo
#chmod 755 /usr/bin/ssh
#chmod 755 /usr/sbin/traceroute
chmod 755 /usr/sbin/traceroute6
chmod 755 /usr/sbin/ping6
chmod 711 /usr/bin/chsh
#chmod 600 /usr/local/apache/conf/*
18. sendmail.mc 설정
divert(-1)
dnl This is the sendmail macro config file. If you make changes to this file,
dnl you need the sendmail-cf rpm installed and then have to generate a
dnl new /etc/mail/sendmail.cf by running the following command:
dnl
dnl m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')
VERSIONID(`linux setup for Red Hat Linux')dnl
OSTYPE(`linux')
dnl Uncomment and edit the following line if your mail needs to be sent out
dnl through an external mail server:
dnl define(`SMART_HOST',`smtp.your.provider')
define(`confDEF_USER_ID',``8:12'')dnl
undefine(`UUCP_RELAY')dnl
undefine(`BITNET_RELAY')dnl
dnl define(`confAUTO_REBUILD')dnl
define(`confTO_CONNECT', `1m')dnl
define(`confTRY_NULL_MX_LIST',true)dnl
define(`confDONT_PROBE_INTERFACES',true)dnl
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
define(`ALIAS_FILE', `/etc/aliases')dnl
dnl define(`STATUS_FILE', `/etc/mail/statistics')dnl
define(`UUCP_MAILER_MAX', `2000000')dnl
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
define(`confAUTH_OPTIONS', `A')dnl
TRUST_AUTH_MECH(`DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', `DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
dnl define(`confCACERT_PATH',`/usr/share/ssl/certs')
dnl define(`confCACERT',`/usr/share/ssl/certs/ca-bundle.crt')
dnl define(`confSERVER_CERT',`/usr/share/ssl/certs/sendmail.pem')
dnl define(`confSERVER_KEY',`/usr/share/ssl/certs/sendmail.pem')
dnl define(`confTO_QUEUEWARN', `4h')dnl
dnl define(`confTO_QUEUERETURN', `5d')dnl
dnl define(`confQUEUE_LA', `12')dnl
dnl define(`confREFUSE_LA', `18')dnl
define(`confTO_IDENT', `0')dnl
dnl FEATURE(delay_checks)dnl
FEATURE(`no_default_msa',`dnl')dnl
FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl
FEATURE(redirect)dnl
FEATURE(always_add_domain)dnl
FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl
dnl The '-t' option will retry delivery if e.g. the user runs over his quota.
FEATURE(local_procmail,`',`procmail -t -Y -a $h -d $u')dnl
FEATURE(`access_db',`hash -T<TMPF> -o /etc/mail/access.db')dnl
FEATURE(`blacklist_recipients')dnl
EXPOSED_USER(`root')dnl
dnl This changes sendmail to only listen on the loopback device 127.0.0.1
dnl and not on any other network devices. Comment this out if you want
dnl to accept email over the network.
DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA')
dnl NOTE: binding both IPv4 and IPv6 daemon to the same port requires
dnl a kernel patch
dnl DAEMON_OPTIONS(`port=smtp,Addr=::1, Name=MTA-v6, Family=inet6')
dnl We strongly recommend to comment this one out if you want to protect
dnl yourself from spam. However, the laptop and users on computers that do
dnl not have 24x7 DNS do need this.
FEATURE(`accept_unresolvable_domains')dnl
dnl FEATURE(`relay_based_on_MX')dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
Cwlocalhost.localdomain
18-1. m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
19. vi /etc/sysconfig/iptables
# Firewall configuration written by lokkit
# Manual customization of this file is not recommended.
# Note: ifup-post will punch the current nameservers through the
# firewall; such entries will *not* be listed here.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Lokkit-0-50-INPUT - [0:0]
-A INPUT -j RH-Lokkit-0-50-INPUT
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 22 --syn -j ACCEPT
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 23 --syn -j ACCEPT
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 25 --syn -j ACCEPT
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 80 --syn -j ACCEPT
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 21 --syn -j ACCEPT
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 110 --syn -j ACCEPT
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 143 --syn -j ACCEPT
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 53 --syn -j ACCEPT
-A RH-Lokkit-0-50-INPUT -p udp -m udp --dport 53 -j ACCEPT
-A RH-Lokkit-0-50-INPUT -i lo -j ACCEPT
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 0:1023 --syn -j REJECT
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 2049 --syn -j REJECT
-A RH-Lokkit-0-50-INPUT -p udp -m udp --dport 0:1023 -j REJECT
-A RH-Lokkit-0-50-INPUT -p udp -m udp --dport 2049 -j REJECT
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 6000:6009 --syn -j REJECT
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 7100 --syn -j REJECT
COMMIT
20. vi /etc/cron.daily/dbbackup.sh
#!/bin/sh
find /backup/mysqldump -ctime +10 \-exec rm -f {} \;
#
######################################################
##
## [백업하는 자료]
##
## 0. 날짜별로 백업(예: filename-20010310-04.xxx)
## 1. 시스템 날짜 수정(rdate)
## 2. mysql 모든 DB를 .sql 이나 .sql.gz 형태로 백업
## 3. 기타(아직 없음)
##
## * 나머지 설정 파일은 일주일에 한번이나 두번 정도로
## 백업하는 것이 적당.
##
######################################################
##
## [관리자가 꼭 설정해야할 내용 - 10가지]
##
## [0] MySQL DB를 백업할까요?
## 1 = yes(DB를 백업합니다.)
## 0 = no (DB를 백업하지 않습니다.) *** 이하 설정할 필요없음 ***
mysql_dbdump="1"
## [1] MySQL이 어떠한 이유 등으로 가동중이지 않을 경우에 메일을
## 받을 볼 user나 메일 주소 설정.
##
## 만약 메일을 받아 보기를 원치 않는다면 다음 설정을 주석(#)
## 으로 처리하거나 공백으로 설정
##
#reportmailto="san2"
## [2] 기본 백업 디렉토리 설정(수동으로 디렉토리 만들 필요없음)
##
backupdir="/backup"
## [3] MySQL DB 서버(클라이언트가 아님)
## localhost인 경우 localhost로 설정하세요.
##
mysql_host="localhost"
## [4] MySQL DB root 암호(시스템 root 암호 아님)
## **이 파일의 퍼미션에 주의 **
##
mysql_rootpasswd="gkehdgus"
## [5] MySQL DB dump 디렉토리(뒤 부분, 수동으로 디렉토리 만들 필요없음)
##
mysql_backupdir="${backupdir}/mysqldump"
## [6] MySQL DB dump 프로그램
## RPM으로 설치했다면 'which mysqldump'의 결과 명시
##
mysql_dump="/usr/local/mysql/bin/mysqldump"
## [7] MySQL DB show 프로그램
## RPM으로 설치했다면 'which mysqlshow'의 결과 명시
##
mysql_show="/usr/local/mysql/bin/mysqlshow"
## [8] dump한 DB를 압축하시겠습니까?
## 1 = yes(예: dbname-20010310-04.sql.gz)
## 0 = no (예: dbname-20010310-04.sql)
##
db_compress="1"
## [9] 전체 DB 중 포함시키지 않을 DB 설정
## 각 DB의 구분은 "또는 연산자(|)"로 다음과 같이 구분
## 기본 값으로는 test와 test2로 설정되어 있음.
##
not_dump_db="test|test2"
##
## 설정 내용 끝(이하 수정할 필요 없음)
##
######################################################
######################################################
##
## 시스템 시간 설정 조정
##
#/usr/bin/rdate -s time.kriss.re.kr | clock -w >/dev/null 2>&1
/usr/bin/rdate -s time.kriss.re.kr >/dev/null 2>&1
## MySQL DB를 백업하지 않는다면 종료함.
##
if [ "$mysql_dbdump" != "1" ] ; then
exit 0
fi
## 파일을 구분하기 위해서 날짜-시간으로 설정
##
sysdtime=`date +%Y%m%d-%H`
## MySQL DB dump
##
## MySQL 접속 파라미터
##
mysql_connect="-h $mysql_host -u root -p$mysql_rootpasswd"
## MySQL 모든 DB 축출
## 앞에서 설정한 $not_dump_db는 제외됨
##
mysql_DBs=`$mysql_show $mysql_connect 2>/dev/null | egrep -v "(${not_dump_db}|Databases|\+)" | awk '{print $2}'`
## 실제로 DB를 dump 하는 함수
##
mysql_dump_work() {
mysql_each_DB="$1"
mysql_dump_file="${mysql_backupdir}/${mysql_each_DB}-${sysdtime}.sql"
$mysql_dump $mysql_connect $mysql_each_DB > $mysql_dump_file
if [ "$db_compress" = "1" ] ; then
gzip -f9 $mysql_dump_file
fi
}
if [ "$mysql_DBs" != "" ] ; then
if [ ! -d "$mysql_backupdir" ] ; then
mkdir -p "$mysql_backupdir"
chmod 700 "$mysql_backupdir"
fi
## All DB dump to one file(.sql) !!!!
## Verbal advice --> LSN tip board : 'lubzzon'
## --all-databases > all_db.sql
##
for mysql_DB in $mysql_DBs ; do
mysql_dump_work $mysql_DB
done
#chmod 600 $mysql_backupdir
#chown root mysql_backupdir
else
## MySQL이 가동중이지 않을 경우
## 주) 아래에서 ${IFS}=$IFS HTML에서 <BR>과 같음.
##
if [ "$reportmailto" != "" ] ; then
mailsubject="dailydump.cron report [${HOSTNAME}]"
mailmessages="MySQL이 가동하지 않거나 DB가 없습니다.${IFS}MySQL 서버(${mysql_host}) 확인하세요!!!"
echo "$mailmessages" | mail -s "$mailsubject" "$reportmailto" >/dev/null 2>&1
fi
fi
exit 0
21. vi /etc/cron.weekly/homebackup.sh
#!/bin/sh
# 디렉토리 설정하실때 끝에 꼭 / 넣어주세요.
home_root="/home/"
backup_home_root="/backup/home/"
cd $home_root
echo "백업 중입니다"
for home_name in $(ls)
do
if [ -d "$home_root/$home_name" ] ; then
echo "tar -cvzf $backup_home_root$home_name.tar.gz $home_name"
tar -czf "$backup_home_root$home_name.tar.gz" "$home_name"
fi
done
22. vi /etc/named.conf
logging {
category lame-servers { null; };
category cname { null; };
category response-checks { null; };
category notify { null; };
};
23. vi /usr/local/apache/conf/apache.conf
<Directory /home/*>
AllowOverride FileInfo AuthConfig Limit
Options MultiViews SymLinksIfOwnerMatch Includes ExecCGI
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>
<IfModule mod_dir.c>
DirectoryIndex index.php index.php3 index.html index.htm index.jsp
</IfModule>
# And for PHP 4.x, use:
AddType application/x-httpd-php .php .php3 .inc .ph .htm
AddType application/x-httpd-php-source .phps
24. ntsysv
crond
imap
ipop3
iptables
named
network
random
sendmail
sshd
syslog
telnet
vsftpd
xinetd
###############################################################
1. mysql
mysql 패스워드 지정하기
>#mysqladmin -u root password new-passwd
mysql 패스워드 바꾸기
>#killall mysqld
>#/usr/local/mysql/bin/safe_mysqld --skip-grant &
>#/usr/local/mysql/bin/mysql mysql
mysql>UPDATE user SET Password=PASSWORD('111111')WHERE user='root';
mysql>FLUSH PRIVILEGES;
2. apache 설정 (httpd.conf)
<IfModule mod_dir.c>
DirectoryIndex index.html index.html index.php index.php3 index.cgi
</IfModule>
AddType application/x-tar .tgz
AddType application/x-httpd-php .php .php3 .php4 .html .htm
AddType application/x-httpd-php-source .phps