shell script安裝apache mysql php
2009-05-13 06:39:12来源:未知 阅读 ()
#!/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下WEBCAM 2009-05-13
- FreeBSD中启用SSH 2009-05-13
- apache22 在freebsd下的 问题 2009-05-13
- freebsd7.0 apache php squid 反向代理 2009-05-13
- UNIX学习(6) 2009-05-13
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash