Rootop 服务器运维与web架构

2012-12-17
发表者 Venus
-bash: ./br.sh: /bin/bash^M: bad interpreter: No such file or directory已关闭评论

-bash: ./br.sh: /bin/bash^M: bad interpreter: No such file or directory

        编写的脚本执行时报错:
-bash: ./br.sh: /bin/bash^M: bad interpreter: No such file or directory

我这里是因为文件的保存编码格式有误。

在此介绍两种方法把dos格式转换为UNIX格式。

1、用vi打开脚本
命令:
:set ff

会显示出当前脚本为fileformat=dos还是fileformat=unix, 可以用:set ff=unix 更改为unix格式, 然后保存退出,再次执行。
2.可以用命令 dos2unix 转换

[root@localhost ~]# dos2unix scripts.sh

如果没有这个命令,安装dos2unix这个rpm包。

2012-12-12
发表者 Venus
libtool: install: error: cannot install `libaprutil-1.la’ to a directory not ending in已关闭评论

libtool: install: error: cannot install `libaprutil-1.la’ to a directory not ending in

     编译apache时候的一个报错:

libtool: install: error: cannot install `libaprutil-1.la’ to a directory not ending in xxx

解决:

make clean all

重新编译。这是因为./configure时候指定的一个参数因某些问题终止编译过程,再次./configure时又指定了另一个路径导致已经生成的Makefile错误。需要清除之前的信息。

2012-12-10
发表者 Venus
清空history历史命令记录已关闭评论

清空history历史命令记录

今天在清空历史命令时候只记得cat null设备到隐藏文件中,man了一下找到c参数,作此记录。

在用户家目录下有几个隐藏的文件:

~/.bash_history 存放用户历史命令。
~/.bash_profile 用户登陆系统时执行。
~/.bash_rc 用户登陆系统或者打卡新的终端shell时执行。
~/.bash_logout用户退出系统时执行。

如果要清除执行过的历史命令有两种方法:
1、history -c  
#Clear the history list by deleting all the entries.#

2、/dev/null 是一个空的块设备,没有任何内容,可以cat此设备然后输出到 .bash_history 文件中。

[root@localhost ~]# cat /dev/null >~/.bash_history

2012-12-07
发表者 Venus
Oracle10G官网下载地址已关闭评论

Oracle10G官网下载地址

Oracle Database 10g Release 2 (10.2.0.1.0)  
Enterprise/Standard Edition for Microsoft Windows (32-bit)

http://download.oracle.com/otn/nt/oracle10g/10201/10201_database_win32.zip
http://download.oracle.com/otn/nt/oracle10g/10201/10201_client_win32.zip
http://download.oracle.com/otn/nt/oracle10g/10201/10201_clusterware_win32.zip
http://download.oracle.com/otn/nt/oracle10g/10201/10201_gateways_win32.zip

Oracle Database 10g Release 2 (10.2.0.1.0) Enterprise/Standard Edition for Microsoft Windows (x64)

http://download.oracle.com/otn/nt/oracle10g/10201/102010_win64_x64_database.zip
http://download.oracle.com/otn/nt/oracle10g/10201/102010_win64_x64_client.zip
http://download.oracle.com/otn/nt/oracle10g/10201/102010_win64_x64_clusterware.zip

Oracle Database 10g Release 2 (10.2.0.1.0) Enterprise/Standard Edition for Linux x86

http://download.oracle.com/otn/linux/oracle10g/10201/10201_database_linux32.zip
http://download.oracle.com/otn/linux/oracle10g/10201/10201_client_linux32.zip
http://download.oracle.com/otn/linux/oracle10g/10201/10201_gateways_linux32.zip

Oracle Database 10g Release 2 (10.2.0.1.0) Enterprise/Standard Edition for Linux x86-64

http://download.oracle.com/otn/linux/oracle10g/10201/10201_database_linux_x86_64.cpio.gz
http://download.oracle.com/otn/linux/oracle10g/10201/10201_client_linux_x86_64.cpio.gz
http://download.oracle.com/otn/linux/oracle10g/10201/10201_clusterware_linux_x86_64.cpio.gz
http://download.oracle.com/otn/linux/oracle10g/10201/10201_gateways_linux_x86_64.cpio.gz

像AIX solaris 这么牛的就不贴了。

2012-12-05
发表者 Venus
lamp常用编译参数已关闭评论

lamp常用编译参数


yum -y install gcc gcc-c++  make automake autoconf kernel-devel ncurses-devel libxml2-devel openssl-devel curl-devel libjpeg-devel libpng-devel  pcre-devel libtool-libs freetype-devel gd zlib-devel file bison patch mlocate flex diffutils   readline-devel glibc-devel glib2-devel bzip2-devel gettext-devel libcap-devel libmcrypt-devel
apache编译参数:
./configure --prefix=/usr/local/apache --with-included-apr --enable-mods-shared=all     全部模块
useradd mysql
mysql编译参数:
./configure --prefix=/usr/local/mysql/ --localstatedir=/usr/local/mysql/data --without-debug --with-unix-socket-path=/tmp/mysql.sock --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --enable-assembler --with-extra-charsets=all --with-pthread --with-plugins=all     全部引擎

cp support-files/my-medium.cnf /etc/my.cnf

/usr/local/mysql/bin/mysql_install_db --user=mysql

chown -R root.mysql /usr/local/mysql
chown -R mysql /usr/local/mysql/data

/usr/local/mysql/bin/mysqladmin -u root password '新密码'
php编译参数:
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --with-openssl --with-zlib --enable-bcmath --with-bz2 --with-curl --enable-ftp --with-gd --enable-gd-native-ttf --with-gettext --with-mhash --enable-mbstring --with-mcrypt --enable-soap --enable-zip --enable-json --with-iconv=/usr/local/libiconv --with-mysql=/usr/local/mysql --without-pear

仅供编译参考