您现在的位置是:网站首页> 编程资料编程资料
Solaris 10 OS 快速安裝配置 Apache + Mysql + php_Solaris_操作系统_
2023-03-29
675人已围观
简介 Solaris 10 OS 快速安裝配置 Apache + Mysql + php_Solaris_操作系统_
前言:本文的阅读对象是为已经有 Apache、MySQL 和 php 基本的操作经验的人员编写。主要讲求正确和快速安装。致于,Apache、MySQL 和 php详细设定、修改方面和软件测试,在这里不会详谈。设定、测试与启动 Apache2 Solaris 10 已经内置安装了 Apache 2.xx,只需要做一些设定便可以使用。1. 首先用 Root 了登入文字模式系统 ( Console Mode ) 2. 复制 /etc/apache2/httpd.conf-example 到 /etc/apache2/httpd.conf # cp /etc/apache2/httpd.conf-example /etc/apache2/httpd.conf3. 编辑 /etc/apache2/httpd.conf· 设定你所需要的 ServerName 服务器名称,预设为 127.0.0.1 · 在 ServerAdmin 设定正确的 E-mail 地址4. 使用以下指令启动 Apache# svcadm enable apache2然后,试一试从新启动 Solaris ,看一看 Apache 能不自动启动。基本网页文件位置为 /var/apache2/htdocs 。设定、测试与启动 MySQLSolaris 10 已经内置安装了 MySQL。安装者必须要用 Root 身份登入系统。以下的安装步骤可以在 /usr/sfw/src/mysql/Docs 目录中找到。1.用 root 身份 login 到 Console mode 中,并且进行数据库的事前准备。
# /usr/sfw/bin/mysql_install_db
Preparing db table
Preparing host table
Preparing user table
Preparing func table
Preparing tables_priv table
Preparing columns_priv table
Installing all prepared tables
060118 21:24:03 /usr/sfw/sbin/mysqld: Shutdown Complete
2.建立 mysql user 和 group ,并且更改数据目录的群组。
# groupadd mysql
# useradd -g mysql mysql
# chgrp -R mysql /var/mysql
# chmod -R 770 /var/mysql
# installf SUNWmysqlr /var/mysql d 770 root mysql3.预设 MySQL 设定文件位置为 /var/mysql/my.cnf 4.复制 MySQL 设定文件到预设位置
# cp /usr/sfw/share/mysql/my-medium.cnf /var/mysql/my.cnf5.手动启动 mysql
# /usr/sfw/sbin/mysqld_safe --user=mysql &6.设定 MySQL 的 root user密码 ( 下文中的 new-password 为你想要的密码,你可以自行更改为你喜欢的密码。因为安全理由,切密不要使用 new-password 为你的密码,一定要更改 )
# cd /usr/sfw/bin
# ./mysqladmin -u root password 'new-password'
# ./mysqladmin -u root -h `hostname` password 'new-password'7.测试 MySQL Server
# ./mysqlshow -p
Enter password: new-password
+-----------+
| Databases |
+-----------+
| mysql |
| test |
+-----------+
# ./mysql -u root -p
Enter password: new-password
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 4.0.20-standard
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>show databases;
+-----------+
| Databases |
+-----------+
| mysql |
| test |
+-----------+
2 rows in set (0.00 sec)
mysql>quit;
Bye8.设定 Solaris Server 在启动和关机时,自动运行和停止MySQL Server。
# ln /etc/sfw/mysql/mysql.server /etc/rc3.d/S99mysql
# ln /etc/sfw/mysql/mysql.server /etc/rc0.d/K00mysql
# ln /etc/sfw/mysql/mysql.server /etc/rc1.d/K00mysql
# ln /etc/sfw/mysql/mysql.server /etc/rc2.d/K00mysql
# ln /etc/sfw/mysql/mysql.server /etc/rcS.d/K00mysql9.然后,试一试从新启动 Solaris ,看一看 MySQL 能不自动启动。预设 MySQL 设定文件位置为 /var/mysql/my.cnf 。下载与设定 PHP1. 用 root 身份 login 到 Console mode 中。2. 检查清楚 PATH 是否包含 /opt/csw/bin 和 /usr/sfw/bin,如果没有,请自行加上。
# bash
# export PS1='\u:\w#'
root:/# echo $PATH
/opt/csw/bin:/usr/sfw/bin:/usr/sbin:/usr/bin:/usr/openwin/bin:/usr/dt/bin:/usr/ccs/bin3. 安装 pkg-get
root:/# mkdir /usr/local/src
root:/# cd /usr/local/src
root:/usr/local/src# wget http://www.blastwave.org/pkg_get.pkg
root:/usr/local/src# cp pkg_get.pkg ..
root:/usr/local/src# pkgadd -d pkg_get.pkg all
You may use and copy this software without charge, as you see fit.
The software is copyright (C) Philip Brown, Nov 2002
Dont forget to update /opt/csw/etc/pkg-get.conf with your nearest archive site.
The selected base directory must exist before installation
is attempted.
Do you want this directory created now [y,n,?,q] y
Using as the package base directory.
## Processing package information.
## Processing system information.
2 package pathnames are already properly installed.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.
This package contains scripts which will be executed with super-user
permission during the process of installing this package.
Do you want to continue with the installation of [y,n,?] y
Installing pkg_get - CSW version of automated package download tool as
## Installing part 1 of 1.
/opt/csw/bin/pkg-get
/opt/csw/etc/pkg-get.conf.csw
/opt/csw/share/man/man1m/pkg-get.1m
/var/pkg-get/admin-fullauto
[ verifying class ]
## Executing postinstall script.
Installing /opt/csw/etc/pkg-get.conf.csw to pkg-get.conf
Installation of was successful.
root:/usr/local/src# cd /
root:/#4. 检查是否安装好 pkg-get 和 wget的位置
root:/# which pkg-get
/opt/csw/bin/pkg-get
root:/# which wget
/usr/sfw/bin/wget5. 安装完整的 wget 软件
root:/# pkg-get -i wget
注意:将会出现大量文字,不用担心,只要完成安装就可以。6. 移除旧版本的 wget
root:/# cd /usr/sfw/bin
root:/usr/sfw/bin# mv wget wget.orig
root:/usr/sfw/bin# exit
# bash
#提示: 本文由神整理自网络,如有侵权请联系本站删除!
本站声明:
1、本站所有资源均来源于互联网,不保证100%完整、不提供任何技术支持;
2、本站所发布的文章以及附件仅限用于学习和研究目的;不得将用于商业或者非法用途;否则由此产生的法律后果,本站概不负责!
# /usr/sfw/bin/mysql_install_db
Preparing db table
Preparing host table
Preparing user table
Preparing func table
Preparing tables_priv table
Preparing columns_priv table
Installing all prepared tables
060118 21:24:03 /usr/sfw/sbin/mysqld: Shutdown Complete
# groupadd mysql
# useradd -g mysql mysql
# chgrp -R mysql /var/mysql
# chmod -R 770 /var/mysql
# installf SUNWmysqlr /var/mysql d 770 root mysql3.预设 MySQL 设定文件位置为 /var/mysql/my.cnf 4.复制 MySQL 设定文件到预设位置
# cp /usr/sfw/share/mysql/my-medium.cnf /var/mysql/my.cnf5.手动启动 mysql
# /usr/sfw/sbin/mysqld_safe --user=mysql &6.设定 MySQL 的 root user密码 ( 下文中的 new-password 为你想要的密码,你可以自行更改为你喜欢的密码。因为安全理由,切密不要使用 new-password 为你的密码,一定要更改 )
# cd /usr/sfw/bin
# ./mysqladmin -u root password 'new-password'
# ./mysqladmin -u root -h `hostname` password 'new-password'7.测试 MySQL Server
# ./mysqlshow -p
Enter password: new-password
+-----------+
| Databases |
+-----------+
| mysql |
| test |
+-----------+
# ./mysql -u root -p
Enter password: new-password
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 4.0.20-standard
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>show databases;
+-----------+
| Databases |
+-----------+
| mysql |
| test |
+-----------+
2 rows in set (0.00 sec)
mysql>quit;
Bye8.设定 Solaris Server 在启动和关机时,自动运行和停止MySQL Server。
# ln /etc/sfw/mysql/mysql.server /etc/rc3.d/S99mysql
# ln /etc/sfw/mysql/mysql.server /etc/rc0.d/K00mysql
# ln /etc/sfw/mysql/mysql.server /etc/rc1.d/K00mysql
# ln /etc/sfw/mysql/mysql.server /etc/rc2.d/K00mysql
# ln /etc/sfw/mysql/mysql.server /etc/rcS.d/K00mysql9.然后,试一试从新启动 Solaris ,看一看 MySQL 能不自动启动。预设 MySQL 设定文件位置为 /var/mysql/my.cnf 。下载与设定 PHP1. 用 root 身份 login 到 Console mode 中。2. 检查清楚 PATH 是否包含 /opt/csw/bin 和 /usr/sfw/bin,如果没有,请自行加上。
# bash
# export PS1='\u:\w#'
root:/# echo $PATH
/opt/csw/bin:/usr/sfw/bin:/usr/sbin:/usr/bin:/usr/openwin/bin:/usr/dt/bin:/usr/ccs/bin3. 安装 pkg-get
root:/# mkdir /usr/local/src
root:/# cd /usr/local/src
root:/usr/local/src# wget http://www.blastwave.org/pkg_get.pkg
root:/usr/local/src# cp pkg_get.pkg ..
root:/usr/local/src# pkgadd -d pkg_get.pkg all
You may use and copy this software without charge, as you see fit.
The software is copyright (C) Philip Brown, Nov 2002
Dont forget to update /opt/csw/etc/pkg-get.conf with your nearest archive site.
The selected base directory must exist before installation
is attempted.
Do you want this directory created now [y,n,?,q] y
Using as the package base directory.
## Processing package information.
## Processing system information.
2 package pathnames are already properly installed.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.
This package contains scripts which will be executed with super-user
permission during the process of installing this package.
Do you want to continue with the installation of
Installing pkg_get - CSW version of automated package download tool as
## Installing part 1 of 1.
/opt/csw/bin/pkg-get
/opt/csw/etc/pkg-get.conf.csw
/opt/csw/share/man/man1m/pkg-get.1m
/var/pkg-get/admin-fullauto
[ verifying class
## Executing postinstall script.
Installing /opt/csw/etc/pkg-get.conf.csw to pkg-get.conf
Installation of
root:/usr/local/src#
root:/#4. 检查是否安装好 pkg-get 和 wget的位置
root:/# which pkg-get
/opt/csw/bin/pkg-get
root:/# which wget
/usr/sfw/bin/wget5. 安装完整的 wget 软件
root:/# pkg-get -i wget
注意:将会出现大量文字,不用担心,只要完成安装就可以。6. 移除旧版本的 wget
root:/# cd /usr/sfw/bin
root:/usr/sfw/bin# mv wget wget.orig
root:/usr/sfw/bin# exit
# bash
#提示: 本文由神整理自网络,如有侵权请联系本站删除!
本站声明:
1、本站所有资源均来源于互联网,不保证100%完整、不提供任何技术支持;
2、本站所发布的文章以及附件仅限用于学习和研究目的;不得将用于商业或者非法用途;否则由此产生的法律后果,本站概不负责!
相关内容
- solaris 显示乱码的解决方法_Solaris_操作系统_
- Solaris8安装OPENSSH方法_Solaris_操作系统_
- Xmanager连接远程Solaris_Solaris_操作系统_
- SUN常用系统维护命令_Solaris_操作系统_
- solaris操作系统各目录的作用_Solaris_操作系统_
- Solaris系统下如何挂载光驱_Solaris_操作系统_
- solaris网络和IP设置基础_Solaris_操作系统_
- Solaris系统配置VNC远程桌面_Solaris_操作系统_
- Solaris 10安装和配置SSH_Solaris_操作系统_
- Solaris系统多用户模式下系统备份和多分区写入磁带_Solaris_操作系统_
