freebsd服务器安装

smrx 上传 下载文件
一、最小化安装freebsd6.1
#make install FORCE_PKG_REGISTER="yes" 强制安装
二、设置网络
vi /f
添加:
hostname="st"
ifconfig_lnc0="inet 192.168.10.121 netmask 255.255.255.0"
金开诚
defaultrouter="192.168.10.1"
保存退出
vi /f
添加
nameserver 202.96.209.133
保存退出
运行:
/etc/netstart
三、安装ports
运行sysinstall->Configure->Distributions->ports
四、安装perl
cd /usr/ports/lang/perl5.8 && make install clean
五、安装mysql5.0
用adduser添加用户mysql到mysql组中
make WITH_XCHARSET=all install clean //安装字体包
下载mysql5.0然后运行
tar zxvf mysql.tar.tar
mv mysql-standard-5.0.22-freebsd6.0-i386 /usr/local/mysql
cd /usr/local/mysql
scripts/mysql_install_db --user=mysql
第一次启动mysql服务
bin/mysqld_safe -user=mysql &
修改数据库管理员密码为123456
bin/mysqladmin -uroot password 123456
分类号
cp support-files/mysql.server /usr/local/etc/rc.d/mysql.sh
看看有没有mysqld.s件!
在/f里面加入mysql_enable="YES" 可以让mysqld开机自动启动
apache_enable="YES"
根据/usr/local/etc/rc.d 里Tomcat 启动脚本内的描述,来添加相应控制字串。
/f
在最后加入
mysql_enable="yes"
./mysql -u root -p 登陆
grant all privileges on *.* to 'zhf'@'%' identified by '123456' with grant option;添加用户
方法一:进入MYSQL安装目录 打开MYSQL配置文件 my.ini 或 myf查 max_connections=100  修改为 max_connections=1000 服务里重起MYSQL即可
方法二:MySQL的最大连接数默认是100客户端登录:mysql -uusername -ppassword
设置新的最大连接数为200:mysql> set GLOBAL max_connections=200
显示当前运行的Query:mysql> show processlist
显示当前状态:mysql> show status
退出客户端:mysql> exit
查看当前最大连接数:mysqladmin -uusername -ppassword variables
方法三:以centos 4.4 下面的mysql 5.0.33 手工编译版本为例说明:
  vi /usr/local/mysql/bin/mysqld_safe
  到safe_mysqld编辑它,到mysqld启动的那两行,在后面加上参数 :
  -O max_connections=1500
  具体一点就是下面的位置:
  用红字特别说明:
  then $NOHUP_NICENESS $ledir/$MYSQLD
  $defaults --basedir=$MY_BASEDIR_VERSION
  --datadir=$DATADIR $USER_OPTION
  --pid-file=$pid_file
  --skip-external-locking
  -O max_connections=1500
  >> $err_log 2>&1 else
  eval "$NOHUP_NICENESS $ledir/$MYSQLD
  $defaults --basedir=$MY_BASEDIR_VERSION
  --datadir=$DATADIR $USER_OPTION
  --pid-file=$pid_file
  --skip-external-locking $args
  -O max_connections=1500 >>
  $err_log 2>&1"
  保存。
  # service mysqld restart
  # /usr/local/mysql/bin/mysqladmin -uroot -p variables
  输入root数据库
账号的密码后可看到
  max_connections 1500 即新改动已经生效。
  还有一种方法,
  修改原代码:
  解开MySQL的原代码,进入里面的sql目录修改到下面一行:长春304案件
  {"max_connections", OPT_MAX_CONNECTIONS,
  "The number of simultaneous clients allowed.", (gptr*) &max_connections,
  (gptr*) &max_connections, 0, GET_ULONG, REQUIRED_ARG, 100, 1, 16384, 0, 1,
  0},
  把它改为:
  {"max_connections", OPT_MAX_CONNECTIONS,
  "The number of simultaneous clients allowed.", (gptr*) &max_connections,
  (gptr*) &max_connections, 0, GET_ULONG, REQUIRED_ARG, 1500, 1, 16384, 0, 1,
  0},
  存盘退出,然后./configure ;make;make install可以获得同样的效果。
文章出处:www.diybl/course/7_databases/mysql/myshl/200865/121938.html
六、安装apache2.0
下载apache2.0然后运行
tar zxvf
cd httpd-2.0.59
./configure --prefix=/usr/local/http --enable-so --enable-rewrite
make
make install
make clean
修改f
vi /usr/local/httpd/f
添加
ServerName localhost
西方唯美主义运行
/usr/local/http/bin/apachectl start
自动运行服务
cp /usr/local/http/bin/apachectl /usr/local/etc/rc.d/http.sh
七、安装gd
cd /usr/ports/graphics/gd && make install clean
八、安装libxml2
cd /usr/ports/textproc/libxml2 && make install clean
九、安装t1lib
cd /usr/ports/devel/t1lib/ && make install clean
十、安装PHP5.1
下载php5.1然后运行
tar zxvf
cd php-5.1.4
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php --with-apxs2=/usr/local/http/bin/apxs --with-mysql=/usr/local/mysql --with-gd --with-jpeg-dir=/usr/local/bin --with-zlib-dir=/usr/local/bin --with-freetype-dir --with-xpm-dir=/usr/loacl/bin --with-t1lib
--with-t1lib --with-pdo-mysql=/usr/local/mysql --enable-mbstring
make
make install
make clean
cp php.ini-dist /usr/local/php/php.ini
修改apache配置文件
vi /usr/local/http/f
添加
AddType application/x-httpd-php .php
修改DirectoryIndex为
DirectoryIndex index.html index.php
保存退出
重启apache服务
安装全部完成
此日志来自QQ邮箱!方便快捷写Qzone的新方式,详情请进>>
使用portsnap更新ports
portsnap简介:
portsnap从6.0开始引进系统,给与用户方便的更新系统ports
portsnap的命令比较少
fetch 获取数据
extract 释放全部ports
update 更新ports
地址:
(网通)矛盾农村三部曲
使用方法:
/f 里面更改
SERVERNAME=
SERVERNAME=
SERVERNAME=
SERVERNAME=
第一次使用可以 portsnap fetch extract
以后使用可以 portsnap fetch update
如果写在cron可以用 portsnap cron update
dsn创建
/
nf dns设置自己建立文件
x.xxx
上海 ns.sta 202.96.199.132
go to the goal
202.96.199.133
202.96.209.5
202.96.209.133
安装软件前,建议先
#ee /f
在文件里添加下面这行:
MASTER_SITE_OVERRIDE=ftp:///pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}
指定ports软件首先从国内下载。否则所有软件从国外下载,有时候速度实在是不行。
或者(推荐)
MASTER_SITE_BACKUP?=ftp:///pub/FreeBSD/distfiles/${DIST_SUBDIR}/ \
ftp:///pub/FreeBSD/distfiles/${DIST_SUBDIR}/ \
ftp://ftp./pub/FreeBSD/distfiles/${DIST_SUBDIR}/ \
ftp:///pub/FreeBSD/distfiles/${DIST_SUBDIR}/
MASTER_SITE_OVERRIDE?=${MASTER_SITE_BACKUP}
apache和不同的tomcat连接
/forum/viewtopic.php?t=35885&highlight=tomcat

本文发布于:2024-09-20 19:54:14,感谢您对本站的认可!

本文链接:https://www.17tex.com/xueshu/688239.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:安装   下载   修改   文件   退出   目录   添加
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2024 Comsenz Inc.Powered by © 易纺专利技术学习网 豫ICP备2022007602号 豫公网安备41160202000603 站长QQ:729038198 关于我们 投诉建议