cp support-files/my-medium.cnf /etc/my.cnf
# 设置引导文件
cp /usr/local/mysql/share/mysql/mysql.server /etc/init.d/mysqld
cd /etc/rc3.d
ln -s ../init.d/mysqld S90mysql
ln -s ../init.d/mysqld K90mysql
# load lib
ln -s /usr/local/mysql/include/mysql /usr/include/mysql
ln -s /usr/local/mysql/lib/mysql /usr/lib/mysql
echo /usr/lib/mysql >> /etc/ld.so.conf
ldconfig
# 启动数据库
cd /usr/local/mysql/bin
./mysql_safed --user=mysql &
# 连接测试
cd /uca/local/mysql/bin
./mysql -u root
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 1 to server version: 3.23.44
Type "help;" or "h" for help. Type "c" to clear the buffer.
mysql>
##############################################
# mysql 安装完毕
##############################################
### 安装 Apache-2.0.45
cd /bak/httpd-2.0.45
CC=gcc CFLAGS="-O6" CXX=gcc CXXFLAGS="-O6 -felide-constructors -fno-exceptions -fno-rtti"
./configure --disable-nls --with-ld=/usr/ccs/bin/ld --with-as=/usr/ccs/bin/as --prefix=/usr/local/apache --with-charset=gb2312 --with-extra-charsets=all --enable-so --disable-nls
make
make install
# 创建符号连接
cp /usr/local/apache/bin/apachectl /etc/init.d/httpd
ln -s /etc/init.d/httpd /etc/rc3.d/S90http
ln -s /etc/init.d/httpd /etc/rc3.d/K90http
ln -s /usr/local/apache/bin/apachectl /bin/apache
ln -s /usr/local/mysql/bin/mysql /bin/mysql
### 安装php-4.3.1
cd /bak/php-4.3.1
CC=gcc CFLAGS="-O6" CXX=gcc CXXFLAGS="-O6 -felide-constructors -fno-exceptions -fno-rtti"
./configure --with-charset=gb2312 --with-extra-charsets=all --with-mysql=/usr/local/mysql --with-apxs2=/usr/local/apache/bin/apxs --enable-track-vars --enable-force-cgi-redirect --enable-pic --enable-inline-optimiation --enable-memory-limit --enable-bcmath
### ./configure --disable-nls --with-ld=/usr/ccs/bin/ld --with-as=/usr/ccs/bin/as --with-charset=gb2312 --with-extra-charsets=all --with-mysql=/usr/local/mysql --with-apxs2=/usr/local/apache/bin/apxs --with-config-file-path=/usr/local/apache/conf --enable-track-vars --enable-force-cgi-redirect --enable-pic --enable-inline-optimiation --enable-memory-limit --enable-bcmath --enable-shmop --enable-versioning --enable-calendar --enable-dbx --enable-dio --enable-mcal
make
make install
cp php.ini-dist /usr/local/lib/php.ini
###cp php.ini-dist /usr/local/apache/conf/php.ini
*************以上内容已编入setup.sh脚本文件中**************
### 修改配置文件
----------------------
vi /usr/local/apache/conf/httpd.conf
# 加入以下行(装载php4模块并指定.php 文件)
# LimitRequestBody (指定php处理的请求数据大小,以下指定为 20M)
LoadModule php4_module modules/libphp4.so
SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 20971520
#注解以下行(在文本前加#),使apache显示中文,具体原因未知
ForceLanguagePriority Prefer Fallback
AddDefaultCharset ISO-8859-1
#加入默认的引导文件index.php(找到DirectoryIndex,修改如下:)
DirectoryIndex index.php index.HTML index.html.var
# 设置你的服务器的域名或IP地址及监听端口
ServerName 192.168.0.10:80
#指定网站目录(假设为 /apache 目录)
DocumentRoot "/apache"
#把Group改一下,改成
Group=nobody
默认的是Group=-1,在SOLARIS上不行 。
###编辑php.ini配置文件
-------------------------
vi /usr/local/apache/conf/php.ini
#找到并修改以下参数
max_execution_time = 600 ;最大运行时间 600 秒
max_input_time = 600 ;最大输出时间 600秒
memory_limit = 20M ;最大内存限制 20M
file_uploads = On ;允许上载文件
upload_max_filesize = 20M ;最大文件大小 20M
post_max_size = 20M ;php可接受的 post 方法大小 20M
session.auto_start = 1 ;session自动启动
推荐阅读
- 使用终端安装 Solaris 9
- Solaris 8 使用及编辑PostScript字体
- Solaris 8 设置终端 TTY
- Solaris 常见问题
- Solaris 管理员常用命令
- Solaris 硬盘挂在Linux上
- Solaris 使用技巧
- 添加了ssh软件安装 Solaris 系统安全实施总结
- Solaris 一次挂盘经历
- 防止 Solaris 溢出的方法