位置: 编程技术 - 正文

Solaris 10 OS 快速安?配置 Apache + Mysql + php(solaris ssh offline)

编辑:rootadmin
前言:本文的阅读对象是为已经有 Apache、MySQL 和 php 基本的操作经验的人员编写。主要讲求正确和快速安装。致于,Apache、MySQL 和 php详细设定、修改方面和软件测试,在这里不会详谈。设定、测试与启动 Apache2 Solaris 已经内置安装了 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 服务器名称,预设为 .0.0.1 · 在 ServerAdmin 设定正确的 E-mail 地址4. 使用以下指令启动 Apache# svcadm enable apache2然后,试一试从新启动 Solaris ,看一看 Apache 能不自动启动。基本网页文件位置为 /var/apache2/htdocs 。设定、测试与启动 MySQLSolaris 已经内置安装了 MySQL。安装者必须要用 Root 身份登入系统。以下的安装步骤可以在 /usr/sfw/src/mysql/Docs 目录中找到。1.用 root 身份 login 到 Console mode 中,并且进行数据库的事前准备。# /usr/sfw/bin/mysql_install_dbPreparing db tablePreparing host tablePreparing user tablePreparing func tablePreparing tables_priv tablePreparing columns_priv tableInstalling all prepared tables :: /usr/sfw/sbin/mysqld: Shutdown Complete<snip...>2.建立 mysql user 和 group ,并且更改数据目录的群组。# groupadd mysql# useradd -g mysql mysql# chgrp -R mysql /var/mysql# chmod -R /var/mysql# installf SUNWmysqlr /var/mysql d 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 -pEnter password: new-password+-----------+| Databases |+-----------+| mysql || test |+-----------+# ./mysql -u root -pEnter password: new-passwordWelcome to the MySQL monitor. Commands end with ; or g.Your MySQL connection id is 3 to server version: 4.0.-standardType 'help;' or 'h' for help. Type 'c' to clear the buffer.mysql> show databases;+-----------+| Databases |+-----------+| mysql || test |+-----------+2 rows in set (0. sec)mysql> quit;Bye8.设定 Solaris Server 在启动和关机时,自动运行和停止MySQL Server。# ln /etc/sfw/mysql/mysql.server /etc/rc3.d/Smysql# ln /etc/sfw/mysql/mysql.server /etc/rc0.d/Kmysql# ln /etc/sfw/mysql/mysql.server /etc/rc1.d/Kmysql# ln /etc/sfw/mysql/mysql.server /etc/rc2.d/Kmysql# ln /etc/sfw/mysql/mysql.server /etc/rcS.d/Kmysql9.然后,试一试从新启动 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-getroot:/# mkdir /usr/local/srcroot:/# cd /usr/local/srcroot:/usr/local/src# wget 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 Dont forget to update /opt/csw/etc/pkg-get.conf with your nearest archive site.The selected base directory </opt/csw> must exist before installationis attempted.Do you want this directory created now [y,n,?,q] yUsing </opt/csw> 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-userpermission during the process of installing this package.Do you want to continue with the installation of <CSWpkgget> [y,n,?] yInstalling pkg_get - CSW version of automated package download tool as <CSWpkgget>## 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 <none> ]## Executing postinstall script.Installing /opt/csw/etc/pkg-get.conf.csw to pkg-get.confInstallation of <CSWpkgget> was successful.root:/usr/local/src# cd / root:/#4. 检查是否安装好 pkg-get 和 wget的位置root:/# which pkg-get/opt/csw/bin/pkg-getroot:/# which wget/usr/sfw/bin/wget5. 安装完整的 wget 软件root:/# pkg-get -i wget注意:将会出现大量文字,不用担心,只要完成安装就可以。6. 移除旧版本的 wgetroot:/# cd /usr/sfw/binroot:/usr/sfw/bin# mv wget wget.origroot:/usr/sfw/bin# exit# bash# export PS1='u:w#'root:/# 7. 检查wget新的位置是否正确root:/# which wget/opt/csw/bin/wget8. 检查 GNU Autoconf 的版本是否为 2. 或以上root:/# which autoconf && autoconf --version | head -2/opt/csw/bin/autoconfautoconf (GNU Autoconf) 2.Written by David J. MacKenzie and Akim Demaille.如果不是为 2. 或以上版本或根本没有这个程序,执行以下指令:root:/# pkg-get -i autoconf9. 检查 GNU automake 的版本是否为 1.8.3 或以上root:/# which automake && automake --version | head -2/opt/csw/bin/automakeautomake (GNU automake) 1.8.3Written by Tom Tromey <tromey@redhat.com>.如果不是为1.8.3 或以上版本或根本没有这个程序,执行以下指令:root:/# pkg-get -i automake. 检查 GNU sed version 的版本是否为 4.1.4 或以上root:/# which gsed && gsed --version | head -2/opt/csw/bin/gsedGNU sed version 4.1.4Copyright (C) Free Software Foundation, Inc.如果不是为 4.1.4 或以上版本或根本没有这个程序,执行以下指令:root:/# pkg-get -i gsed. 检查 gcc 的版本是否为 3.4.3 或以上root:/# which gcc && gcc --version | head -2/usr/sfw/bin/gccgcc (GCC) 3.4.3 (csl-sol-3_4-branch+sol_rpath)Copyright (C) Free Software Foundation, Inc.如果不是为 3.4.3 或以上版本或根本没有这个程序,执行以下指令:root:/# pkg-get -i gcc . 检查 GNU Make 的版本是否为 3. 或以上root:/# which gmake && gmake --version | head -2/usr/sfw/bin/gmakeGNU Make 3.Copyright (C) Free Software Foundation, Inc.如果不是为 3. 或以上版本或根本没有这个程序,执行以下指令:root:/# pkg-get -i gmake . 检查 flex version 的版本是否为 2.5.4 或以上root:/# which flex && flex --version | head -2/usr/sfw/bin/flexflex version 2.5.4如果不是为 2.5.4 或以上版本或根本没有这个程序,执行以下指令:root:/# pkg-get -i flex . 检查 GNU Bison 的版本是否为 1. 或以上root:/# which bison && bison --version | head -2/usr/sfw/bin/bisonbison (GNU Bison) 1.Written by Robert Corbett and Richard Stallman.如果不是为 1. 或以上版本或根本没有这个程序,执行以下指令:root:/# pkg-get -i bison . 检查 GNU M4 的版本是否为 1.4.3 或以上root:/# which gm4 && gm4 --version | head -2/opt/csw/bin/gm4GNU M4 1.4.3Written by Rene' Seindal.如果不是为 1.4.3 或以上版本或根本没有这个程序,执行以下指令:root:/# pkg-get -i gm4 . 检查 Perl 的版本是否为 5.8 或以上root:/# which perl && perl -v | head -2/usr/bin/perl This is perl, v5.8.4 built for ipc-solaris-int如果不是为 5.8 或以上版本或根本没有这个程序,执行以下指令:root:/# pkg-get -i perl . 检查 GNU zip 的版本是否为 1.3.3 或以上root:/# which gunzip && gunzip -V | head -2/usr/bin/gunzipgunzip 1.3.3-patch.1(--) 如果不是为 1.3.3 或以上版本或根本没有这个程序,执行以下指令:root:/# pkg-get -i gunzip . 检查 GNU tar 的版本是否为 1. 或以上root:/# which gtar && gtar --version | head -2/usr/sfw/bin/gtartar (GNU tar) 1.Copyright (C) Free Software Foundation, Inc.如果不是为 1. 或以上版本或根本没有这个程序,执行以下指令:root:/# pkg-get -i gtar . 安装 libxml2 版本 2.6.在安装 libxml2 之前有一点要特别注意,这程序不可以安装在需要 mount 的 Driver 上。因为,在启动 Solaris 时,当执行自动启动 Apache/php 时需要直接使用 libxml2,但这个时候,mount Driver 是还未启动的。很多时候,都有习惯把 /usr/local 放在 mount driver 上。如果你也有这个习惯,请特别注意,不要把 libxml2 安装在 /usr/local 上。否则,当 Solaris 从启后, Apache/php 便不能自动启动,只能人手启动了。在正常情况下,安装 libxml2,安装程序的预设安装路径为 /usr/local,这个安装路径是可以更改的。以下例子,将会把 libxml2 安装在 /usr/slocal 上。root:/# cd /usr/local/srcroot:/usr/local/src# wget mkdir /usr/slocalroot:/usr/local/src# cp libxml2-2.6..tar.gz /usr/slocal/root:/usr/local/src# cd /usr/slocal root:/usr/slocal# gunzip -cd libxml2-2.6..tar.gz | gtar xvpf -...root:/usr/slocal# cd libxml2-2.6.root:/usr/slocal/libxml2-2.6.# ./configure --prefix=/usr/slocal...root:/usr/slocal/libxml2-2.6.# gmake...root:/usr/slocal/libxml2-2.6.# gmake install . 如果系统中没有这个档案 /etc/apache2/httpd.conf root:/# cp /etc/apache2/httpd.conf-example /etc/apache2/httpd.conf编辑 /etc/apache2/httpd.conf§ 设定你所需要的 ServerName 服务器名称,预设为 .0.0.1 § 在 ServerAdmin 设定正确的 E-mail 地址 . 下载最新版本的PHP ( )root:/# cd /usr/local/srcroot:/usr/local/src# wget cp php-5.1.2.tar.gz .. root:/usr/local/src# cd .. root:/usr/local# gunzip -cd php-5.1.2.tar.gz | gtar xvpf -...root:/usr/local# cd php-5.1.2root:/usr/local/php-5.1.2# ./configure --with-apxs2=/usr/apache2/bin/apxs --with-mysql=/usr/sfw/ --enable-dbase --with-libxml-dir=/usr/slocal --with-config-file-path=/etc/apache2 --with-gd-dir=/opt/sfw/bin --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib --with-zlib --enable-mbstring ...root:/usr/local/php-5.1.2# gmake...root:/usr/local/php-5.1.2# gmake install . . Installing PHP SAPI module: apache2handler. /var/apache2/build/instdso.sh SH_LIBTOOL='/var/apache2/build/libtool' libphp5.la /usr/apache2/libexec. /var/apache2/build/libtool --mode=install cp libphp5.la /usr/apache2/libexec/. cp .libs/libphp5.so /usr/apache2/libexec/libphp5.so. chmod +x /usr/apache2/libexec/libphp5.so. cp .libs/libphp5.lai /usr/apache2/libexec/libphp5.la. libtool: install: warning: remember to run `libtool --finish /build/php-5.1.2/libs'. chmod /usr/apache2/libexec/libphp5.so. [activating module `php5' in /etc/apache2/httpd.conf]. Installing PHP CLI binary: /usr/local/bin/. Installing PHP CLI man page: /usr/local/man/man1/. Installing build environment: /usr/local/lib/php/build/. Installing header files: /usr/local/include/php/. Installing helper programs: /usr/local/bin/. program: phpize. program: php-config. Installing man pages: /usr/local/man/man1/. page: phpize.. page: php-config.. Installing PEAR environment: /usr/local/lib/php/. [PEAR] Archive_Tar - installed: 1.3.. [PEAR] Console_Getopt - installed: 1.. pear/PEAR can optionally use package "pear/XML_RPC" (version >= 1.4.0). [PEAR] PEAR - installed: 1.4.. Wrote PEAR system config file at: /usr/local/etc/pear.conf. You may want to add: /usr/local/lib/php to your php.ini include_path. Installing PDO headers: /usr/local/include/php/ext/pdo/ root:/usr/local/php-5.1.2# cp php.ini-dist /etc/apache2/php.ini root:/usr/local/php-5.1.2#. 进入 apache2 设定文件目录root:/usr/local/php-5.1.2# cd /etc/apache2root:/etc/apache2# . 如果要设定其它 php 的选项,请编辑 /etc/apache2/php.ini . 编辑 httpd.conf 文件安装完 php 后,php 会在 /etc/apache2/httpd.conf 内加入以下句子,请检查清楚,这句子是否存在:LoadModule php5_module libexec/libphp5.so请在 /etc/apache2/httpd.conf 的最后一行手动加入以下句子:AddType application/x-httpd-php .php. 启动 Apache2 和测试# svcadm enable apache2# svcs | grep -i apache2online :: svc:/network/http:apache. 然后,试一试从新启动 Solaris ,看一看 Apache2 能不自动启动。如果不能自动启动,而只能手动启动,请看清楚第项的说明。预设 Apache2 设定文件位置为 /etc/apach2/httpd.conf 。

推荐整理分享Solaris 10 OS 快速安?配置 Apache + Mysql + php(solaris ssh offline),希望有所帮助,仅作参考,欢迎阅读内容。

Solaris 10 OS 快速安?配置 Apache + Mysql + php(solaris ssh offline)

文章相关热门搜索词:solaris 10安装,solaris 11.4,solaris 10安装,solaris 11.3,solaris 11.3,solaris104,solaris命令,solaris 11.4,内容如对您有帮助,希望把文章链接给更多的朋友!

solaris中添加删除磁盘和分区 如何在solaris中添加删除磁盘和分区建意你先看IDE和SCSI分配名称以下例子是格式化PrimaryIDEMaster硬盘查看IDE和SCSI分配名称后,我们知道PrimaryIDEMaster硬盘名

Solaris系统下使用u盘和移动硬盘 1、直接插上u盘,然后ls-l/dev/usb,看是否发现usb设备。2、在/etc/dsk里查询到usb对应的设备名称(ls-l/dev/dsk)3、直接monunt-Fpcfs/dev/dsk/c1t0d0s0/mnt然后就可以了。

solaris下VNC的安?方法 1.首先下?vnc-3.3.3r2_sun4_sosV_5.5.tgz用tar命令解压缩,tar-xvfvnc-3.3.3r2_sun4_sosV_5.5.tgzcdvnc-3.3.3r2_sun4_sosV_5.5mkdir-p/usr/local/vnc/classes建立一个目录cpclasses/*/usr/local/vnc/c

标签: solaris ssh offline

本文链接地址:https://www.jiuchutong.com/biancheng/354236.html 转载请保留说明!

上一篇:Solaris8安装OPENSSH方法(openssl安装教程)

下一篇:solaris中添加删除磁盘和分区(solaris删除文件命令)

  • 个人独资企业要注意什么
  • 明股实债的风险与防范
  • 公司换股东需要本人去吗
  • 兼职人员的工资怎么算
  • 代销商品怎么交增值税
  • 利润是非限定净现值吗
  • 差旅费计入工资成本吗
  • 甲公司自2018年3月1日开始自行研发一款新兴产品
  • 通用定额发票真伪查询系统
  • 装饰费是否计算缴纳土地增值税
  • 进口汽车消费税的计算公式
  • 有形动产租赁服务
  • 公司开办费有哪些
  • 一般纳税人季报利润表怎么填
  • 应交增值税进项税额转出借贷方向表示什么
  • 商品非正常损耗收取的赔偿款账务处理怎么做?
  • 用于研发的设备会计分录
  • 劳务费的专用发票有哪些
  • 企业自主研发的成功案例
  • 资产减值准备是
  • 计提结转本月城建税怎么做账?
  • 少缴纳社保怎么要求支付赔偿金
  • 航天信息开票步骤
  • 安家费要还吗
  • 企业从事生产经营活动时所持有的基本信念
  • 车船税为什么没有优惠
  • 企业上月份销售收入在本月份发生销售折让时
  • 预付的费用没有还没有收到发票
  • 电子发票怎么冲红字
  • 发票两边的孔怎么做
  • 冲销坏账怎么做分录
  • 财政补贴会计入养老金一起发放吗
  • linux硬件设备分为
  • 国企收到财政补贴
  • 固定资产后续支出资本化和费用化
  • Smarty3配置及入门语法
  • 资产负债表利润表的勾稽关系
  • 房地产企业预缴增值税如何申报
  • 数据分析课
  • 用jsp实现用户登录验证
  • 行政单位核销其他应付款分录
  • 引导式申报带出来的开票额与金税盘显示的不一致
  • 企业并购的主要特征是a扩大企业规模
  • mysql导出结果
  • 百旺连接服务器失败,是否使用离线文件进行更新
  • 将房产以股权形式出售
  • 废料收入是什么会计分录
  • sql2000数据库怎么删除数据
  • 小规模减免附加税会计分录怎么做
  • 质量赔偿金
  • 专利年费计入哪里
  • 小规模纳税人取得普通发票可以抵扣吗
  • 租农民土地
  • 一般纳税人购买汽车会计分录
  • 核定征收需要什么资料
  • 资产利润表
  • 火车票进项抵扣需要认证吗
  • 实际利率与名义利率的换算
  • 工业企业外购材料支付的采购费用应计入什么账户
  • windows 配置
  • ccs 运行
  • win7系统步骤
  • centos下虚拟机
  • win8系统怎么远程电脑
  • avgorange是什么文件
  • scardsvr32.exe - scardsvr32是什么进程 有什么用
  • win10电脑提示
  • win8系统崩溃无法开机
  • 高通umb
  • cocos2dx怎么用啊
  • jquery1.8
  • async/await与promise(nodejs中的异步操作问题)
  • js脚本使用教程
  • 纳税人识别号是几位数
  • 河南省税务局冯伟
  • 贵州国家电子税务局登录入口
  • 合伙企业所得税账务处理
  • 电子低保证书在哪找
  • 中国税务网发票怎么开
  • 税务培训主题
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

    网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

    友情链接: 武汉网站建设