HP-UX学习笔记

1.设置提示符前面显示完整路径

在/usr/lt/下编辑.profile

增加下面两行

PS1='${PWD}>'
export PS1

如果要支持输入中文

再增加一行

stty -istrip  -parity cs8

2.执行.profile

/usr/lu>. ./.profile
在HP-UX平台上配置Apache需要注意的问题

HP-UX平台上配置Apache,和在其他平台上有所不同。需要设置用户和组,注意下面这段httpd.conf中的说明:



#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
#  . On SCO (ODT 3) use "User nouser" and "Group nogroup".
#  . On HPUX you may not be able to use shared memory as nobody, and the
#    suggested workaround is to create a user www and use that user.
#  NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
#  when the value of (unsigned)Group is above 60000;
#  don't use Group #-1 on these systems!
#
User nobody
Group #-1


需要修把User/Group修改为实际存在的用户和该用户所在的组名。
比如:
User www
Group other

否则,apache将无法正常启动。
4.把/usr/local/bin加入路径环境变量,加入/etc/PATH

在HP-UX上安装apache和Mysql和PHP的最简单过程
下载
mysql-max-4.0.20-hp-hpux11.11-hppa2.0w-64bit.tar.gz
httpd-2.0.50.tar.gz
php-4.3.8.tar.gz
首先解压缩
gzip -d *gz
再释放tar文件
tar xvf *tar
进入httpd-2.0.50和php-4.3.8
./configure
make
make install
注意在httpd.conf中有个地方
#  . On HPUX you may not be able to use shared memory as nobody, and the
#    suggested workaround is to create a user www and use that user.
#  NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
#  when the value of (unsigned)Group is above 60000;
#  don't use Group #-1 on these systems!
#
要改成下面的
User www
Group other
不然httpd无法启动
httpd -k start
注意我们没有用模块方式编译PHP必须在
httpd.conf加入
ScriptAlias /php/ "/usr/local/bin/"
AddType application/x-httpd-php .php .phtml
Action application/x-httpd-php "/php/php"

注意如果要使PHP能识别.php文件必须把.php文件的属性改成
chmod 755 *.php
进入mysql-max-4.0.20-hp-hpux11.11-hppa2.0w-64bit
按照INSTALL-BINARY说的做

     shell> groupadd mysql
     shell> useradd -g mysql mysql
     shell> cd /usr/local
     shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
     shell> ln -s full-path-to-mysql-VERSION-OS mysql
     shell> cd mysql
     shell> scripts/mysql_install_db --user=mysql
     shell> chown -R root  .
     shell> chown -R mysql data
     shell> chgrp -R mysql .
     shell> bin/mysqld_safe --user=mysql &

注意把mysql-max-4.0.20-hp-hpux11.11-hppa2.0w-64bit目录直接mv过/usr/local去就不用
做第四行

一个有用的命令
如果建了一个包含“!”的目录名如Disczu!
通常的cp不能复制
可以这么干
find . -inum 1324 - exec cp -r {} Disczu

你可能感兴趣的:(HP-UX学习笔记)