shell script安裝apache mysql php

2009-05-13 06:39:12来源:未知 阅读 ()

新老客户大回馈,云服务器低至5折

shell script安裝apache mysql php
#!/bin/tcsh
#Program:
#       This program is used to install
# portsnap/wget/sudo
# ##### cvsup-without-gui/fastest_cvsup/portupgrade/wget/sudo #####
# Freebsd 6.1
# Mysql 5.1.
# Apache 2.2.3
# Php 5.1.6
# zendoptimizer 3.0.1
#History:
#2006/09/14     J       First release
#tcsh install.sh &
#FORCE_PKG_REGISTER
#set time & portsnap update
echo '5       5       *       *       *       root    /usr/sbin/ntpdate time.stdtime.gov.tw >/dev/null' >> /etc/crontab
echo '0       3       *       *       *       root    portsnap -I cron update && pkg_version -vIL=' >> /etc/crontab
#set NIC
echo 'ifconfig_eth0="DHCP"' >> /etc/rc.conf
echo 'ifconfig_fxp0="DHCP"' >> /etc/rc.conf
echo 'ifconfig_rl0="DHCP"' >> /etc/rc.conf
echo 'ifconfig_vr0="DHCP"' >> /etc/rc.conf
#set syslog
echo 'syslogd_flags="-ss"' >> /etc/rc.conf
#desiable sendmail
echo 'sendmail_enable="NONE"' >> /etc/rc.conf
#enable sshd
echo 'sshd_enable="YES"' >> /etc/rc.conf
#update source
cd /usr/src
make update
##### Use below when OS before Freebsd 6.x  #####
#install ports
#cd /usr/ports/devel/gettext
#make OPTIONS=of install clean
#cd /usr/ports/lang/ruby18
#make USE_RUBY="YES" install clean
#cd /usr/ports/net/cvsup-without-gui
#make install clean
#cd /usr/ports/sysutils/fastest_cvsup/
#make OPTIONS=of install clean
#cp /usr/share/examples/cvsup/ports-supfile /root/
#echo '*default host=cvsup.tw.freebsd.org' >> /root/ports-supfile
#rehash
#cvsup -L 2 -h `(fastest_cvsup -q -c tw)` /root/ports-supfile
#cd /usr/ports/sysutils/portupgrade
#make OPTIONS=of install clean
#rehash
#portsdb -Uu
#pkgdb -F
#portupgrade -aWy
#####
#use ports
portsnap fetch
portsnap extract
portsnap fetch
portsnap update
#install wget
cd /usr/ports/devel/gettext
make OPTIONS=of install clean
cd /usr/ports/ftp/wget
make install clean
#install sudo
cd /usr/ports/security/sudo
make OPTIONS=of install clean
##### vi /usr/local/etc/sudoers #####
#install mysql 5.1.11
cd /usr/ports/databases/mysql51-server/
make WITH_CHARSET="utf8" WITH_XCHARSET="all" WITH_COLLATION="utf8_general_ci" WITH_LINUXTHREADS="yes" WITH_PROC_SCOPE_PTH="yes" BUILD_OPTIMIZED="yes" BUILD_STATIC="yes" SKIP_DNS_CHECK="yes" OVERWRITE_DB="yes" WITHOUT_INNODB="yes" install clean

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:FreeBSD 6.0 安装、优化、使用详细教程

下一篇:FreeBSD 6.2-BETA2 WebServer架设总结