resin php extensions sockets,linux 有关笔记

linux 相关笔记

==系统安装==

1.启动服务器

2.10秒内按F10进入DELL UNIFIED SERVER CONFIGURATION

3.进入左侧OS Deployment菜单

4.点击右侧Deploy OS链接

5.插入Cent OS 5.5 x64光盘

6.选择 Red Hat Enterorise Linux 5.5 64-bit,点击next

7.在 Insert OS Media(Step 2 of 3) 页面 点击next

8.提示 内容不匹配页面,点击Yes

9.Reboot the System(Step 3 of 3)页面 点击Finish

10.服务器重启,进入Cent OS5.5安装界面

11.输入 linux text

12.CD Found 页面,选择 Skip

13.Cent OS欢迎页,选择 OK

14.Language Selection页面,选择 English ,点击OK

15.Keyboard Selection页面,选择us,点击OK

16.Partition Type页面,选择 Remove all partition on selected drives and create default layout. 点击OK

17.警告页面,提示remove all data,选择 Yes

18.Review Partition Layout 页面,选择 No

19.设置eth0和eth1

1 选择 Activate on boot,Enable IPv4 support,Enable IPv6 support,点击OK

2 IPv4设置选择 Manual address configration

3 IPv6设置选择 Automatic neighbor discovery

20.设置完毕eht0和eth1,选择OK

21.设置网关,点击OK

22.设置Hostname,localhost,点击OK

32.设置时区,选择 Asia/Shanghai,点击OK

33.设置root密码

34.选择安装包:Server,选中 Customise software selection,点击OK

35.选择:Administration Tools,Base,Development Libraries,Development Tools,Editors,Legacy Network Server,Lagacy Sofware Development,

Legacy Software Support,Network Servers,Server Configuration Tools,System Tools,Text-based Internet,点击OK

36.Installation to begin 点击OK

37.取出安装光盘,点击Reboot,重启

38.运行Firewall configuration,全部 Disable

========================================================================

==基础指令安装==

1.yum install lrzsz

==========================

==安装Mysql==

1. 准备mysql-5.0.45.tar.gz

2. tar zxvf mysql-5.0.45.tar.gz

3. cd mysql-5.0.45

4. groupadd mysql

5. useradd -g mysql mysql

6. ./configure --prefix=/usr/local/mysql --with-charset=utf8 --with-extra-charsets=gbk

7. make

8. make install

9. cp support-files/my-large.cnf /etc/my.cnf

10. cd /usr/local/mysql

11. chown -R mysql .

12. chgrp -R mysql .

13. bin/mysql_install_db --user=mysql

14. chown -R root .

15. chown -R mysql var

16. cp /usr/local/mysql/share/mysql/mysql.server /etc/init.d/mysqld

17. chkconfig --add mysqld

18. chkconfig --level 2345 mysqld on

19. service mysqld start

20. bin/mysqladmin -u root password 123456

21. cd /usr/local/bin, ln -s /usr/local/mysql/bin/mysql mysql

测试 :

mysql -u root -p (输入密码 123456)

show databases; use test;show tables;

========================================================================

==安装Java==

1. 准备jdk-6u14-linux-x64.bin

2. chmod 777 jdk-6u14-linux-x64.bin,运行 ./jdk-6u14-linux-x64.bin

3. 标准下一步

4. mv ./jdk1.6.0_14 /usr/local/

5. cd /usr/local

6. ln -s /usr/local/jdk1.6.0_14 jdk

7. vi /etc/profile

添加

JAVA_HOME=/usr/local/jdk

JAVA_BIN=/usr/local/jdk/bin

PATH=$PATH:$JAVA_HOME/bin

CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

export JAVA_HOME JAVA_BIN PATH CLASSPATH

================================================

==安装Resin==

1. 准备resin-pro-3.1.9.tar.gz

2. tar zxvf resin-pro-3.1.9.tar.gz

3. mv ./resin-pro-3.1.9 /usr/local/

4. cd /usr/local/

5. ln -s /usr/local/resin-pro-3.1.9 resin

6. cd resin

7. ./configure

8. make

9. make install

10. cp contrib/init.resin /etc/init.d/resin

11. chmod +x /etc/rc.d/init.d/resin

12. chkconfig --add resin

13. chkconfig --level 2345 resin on

14. 注释 /etc/init.d/resin log_ 相关函数定义 vi /etc/init.d/resin 找到调用log_***函数的地方,将其前面加#注释(函数定义不注释),共四处,

a)log_daemon_msg "Starting resin"   b)log_end_msg $? c)log_daemon_msg "Stopping resin" d)log_end_msg $?

15. service resin start

================================================

==相关类库安装1==

1.准备 jasper-1.900.1.zip jpegsrc.v6b.tar.gz libpng-1.2.24.tar.gz pcre-7.9.tar.gz

2. tar zxvf libpng-1.2.24.tar.gz

3. cd libpng-1.2.24

4. ./configure  && make && make install && cd..

5. unzip jasper-1.900.1.zip

6. cd jasper-1.900.1

7. ./configure  && make && make install && cd..

8. tar zxvf jpegsrc.v6b.tar.gz

9. cd jpeg-6b

10. ./configure  && make && make install-lib && cd..

11. tar -zxvf pcre-7.9.tar.gz

12. cd pcre-7.9

13. ./configure  && make && make install && cd..

==================

==安装nginx==

1. 准备nginx-0.7.61.tar.gz

2. tar zxvf nginx-0.7.61.tar.gz

3. cd nginx-0.7.61

4. ./configure && make && make install && cd..

5. cd /usr/local/nginx/sbin

6. ./nginx

7. vi /etc/rc.local 增加一行 /usr/local/nginx/sbin/nginx

==========================

==相关类库安装2==

yum install net-snmp net-snmp-libs net-snmp-utils net-snmp-devel

========================

到这里

==安装php==

1. 准备php-5.2.6.tar.gz ZendOptimizer-3.3.4-linux-glibc23-x86_64.tar.gz lighttpd-1.4.19.tar.gz

2. tar zxvf php-5.2.6.tar.gz

3. cd php-5.2.6

4. ./configure --with-mysql=/usr/local/mysql --enable-fastcgi --with-snmp --enable-sockets --with-gd

5. make && make install

6. cp php.ini-recommended  /usr/local/lib/php.ini 并修改 short_open_tag = Off 为 short_open_tag = On

7. cd..

8. tar zxvf ZendOptimizer-3.3.4-linux-glibc23-x86_64.tar.gz

9. cd ZendOptimizer-3.3.4-linux-glibc23-x86_64

10. cd data/5_2_x_comp

11. cp ./ZendOptimizer.so ./TS

12. cd -

10. ./install

11.  OK; EXIT; Yes; OK; 设置/usr/local/lib OK; No; OK;OK

12. tar zxvf lighttpd-1.4.19.tar.gz

13. cd lighttpd-1.4.19

14. ./configure

15. make

16. cp src/spawn-fcgi /usr/local/bin

17. /usr/local/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -u nobody -g nobody -C 5 -f /usr/local/bin/php-cgi

18. vi /etc/rc.local 增加一行 /usr/local/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -u nobody -g nobody -C 5 -f /usr/local/bin/php-cgi

测试php的安装:

在 vi /usr/local/nginx/conf/nginx.conf ,在此文件的server的{ } 中加入 一下内容:

location ~ \.php$ {

root           html ;

fastcgi_pass   127.0.0.1:9000;

fastcgi_index  index.php;

fastcgi_param SCRIPT_FILENAME /usr/local/nginx/html$fastcgi_script_name;

include        fastcgi_params;

}

把i.php文件放到/usr/local/nginx/html下, (i.php 可以到20的/usr/local/nginx/html/i.php 这里找)

重启nginx:

cd /usr/local/nginx/logs

kill -HUP `cat nginx.pid`

然后访问 http://ip:port/i.php 能看到内容,就说明php安装成功

================================

==相关类库安装3==

1. vi /etc/yum.repos.d/CentOS-Base.repo

添加

[dag]

name=Dag RPM Repository for Red Hat Enterprise Linux

baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag

gpgcheck=1

gpgkey=http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt

enabled=1

2. yum install rrdtool

========================

==安装Cacti==

1. 准备 cacti-0.8.7g.tar.gz

2. tar zxvf cacti-0.8.7g.tar.gz

3. mv ./cacti-0.8.7g /opt/

4. cd /opt

5. ln -s /opt/cacti-0.8.7g cacti

6. cd cacti

7. /usr/local/mysql/bin/mysqladmin -u root -p create cacti //输入密码 123456

8. /usr/local/mysql/bin/mysql -u root -p cacti < cacti.sql

9. useradd cactiuser

10. vi /etc/snmp/snmpd.conf

==========

更改 1、com2sec notConfigUser  default      public

改为:com2sec notConfigUser (你想监控的那台机器的IP)      public

2、access  notConfigGroup ""      any      noauth    exact  systemview  none

none

改为:access  notConfigGroup ""      any      noauth    exact  all  none

none

3、#view all    included  .1        80

将前面的 # 注释 去掉。

保存退出 :wq

service snmpd restart

增加 snmpd 开机启动,通过setup 选择“系统服务”,找到snmpd,空格选择此项

============

11. chown -R cactiuser ./rra

12. chown -R cactiuser ./log

13. vi ./include/config.php 修改

===

$database_type = “mysql”;

$database_default = “cacti”;

$database_hostname = “localhost”;

$database_username = “cactiuser”; //对应第7步的用户 root

$database_password = “cactipw”;   //对应第7步时输入的密码

===

14. su cactiuser

15. crontab -e 添加

*/5 * * * * /usr/local/bin/php /opt/cacti/poller.php > /dev/null 2>&1

16. exit

17.执行

===

wget http://www.cacti.net/downloads/patches/0.8.7g/data_source_deactivate.patch

wget http://www.cacti.net/downloads/patches/0.8.7g/graph_list_view.patch

wget http://www.cacti.net/downloads/patches/0.8.7g/html_output.patch

wget http://www.cacti.net/downloads/patches/0.8.7g/ldap_group_authenication.patch

wget http://www.cacti.net/downloads/patches/0.8.7g/script_server_command_line_parse.patch

wget http://www.cacti.net/downloads/patches/0.8.7g/ping.patch

wget http://www.cacti.net/downloads/patches/0.8.7g/poller_interval.patch

patch -p1 -N < data_source_deactivate.patch

patch -p1 -N < graph_list_view.patch

patch -p1 -N < html_output.patch

patch -p1 -N < ldap_group_authenication.patch

patch -p1 -N < script_server_command_line_parse.patch

patch -p1 -N < ping.patch

patch -p1 -N < poller_interval.patch

===

vi /usr/local/nginx/conf/nginx.conf

在其中加入:

location ~ \.php$ {

root   /opt/cacti;

fastcgi_pass   127.0.0.1:9000;

fastcgi_index  index.php;

fastcgi_param SCRIPT_FILENAME /opt/cacti$fastcgi_script_name;

include        fastcgi_params;

}

保存退出

页面配置next->new install -> finish -> 输入用户名和密码

============================================================

打开防火墙,并开启80和22端口

1.setup ,打开防火墙,并保存

2.service network restart (重启network)

查看防火墙状态:

/etc/init.d/iptables status

3. 输入 接收80 和22 端口的指令

/sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT

/sbin/iptables -I INPUT -p tcp --dport 22 -j ACCEPT

4. 保存iptables

/etc/rc.d/init.d/iptables save

5. 设置iptables为自动启动

chkconfig --level 2345 iptables on

/etc/init.d/iptables restart

centos5.5

yum install openssh-server

yum -y install lrzsz

useradd fify

svnadmin create /usr/local/svn/yixin

建立版本库:

svnadmin create /usr/local/svn/svnroot

svnadmin create /opt/svndata/repos2

修改版本库配置文件:

版本库1:

vi /opt/svndata/repos1/conf/svnserve.conf

开启SVN服务:svnserve -d  或者 /usr/local/svn/bin/svnserve -d

检测服务是否开启:netstat -ntlp如果看到3690的端口正常开放了,证明SVN启动了。

svn命令:

lsof -i :3690   查看svn是否启动

ps aux |grep ’svn’ 查找所有svn启动的进程

kill -9 2505    杀死2505这个查找到的svn进程

svnserve -d -r /usr/local/svn/yixin 启动svn(可以把这个放到/etc/local/rc.local文件中,实现开机自启动)

svn up                      //更新文件

svn ci -m’aaa’ test.php     //提交文件

svn delete test.php         //删除test.php

svn co svn://172.19.5.12 ./    //检出一份版本库文件到当前目录

apache

./configure --prefix=/usr/local/apache2 --enable-dav --enable-so --enable-maintainer-mode --with-apr=/usr/local/apr/bin/apr-1-config --with-apr-util=/usr/local/apr/bin/apu-1-config

apache2的开机自启:

vi /etc/rc.local

加入 /usr/local/apache2/bin/apachectl start

svn

./configure --prefix=/usr/local/svn --with-apxs=/usr/local/apache2/bin/apxs --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr

neon

./configure --with-apxs=/usr/local/apache2/bin/apxs --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr --with-ssl

./configure --sysconfdir=/etc --enable-ssl --enable-modules

LoadModule dav_svn_module modules/mod_dav_svn.so

LoadModule authz_svn_module modules/mod_authz_svn.so

DAV svn

SVNPath /usr/local/svn/svnroot

/usr/local/sbin/apachectl restart

/usr/local/apache2/bin/apachectl restart

svn添加用户

htpasswd -m /usr/local/svn/svnroot Username2

把/usr/local/subversion/repository目录下的所有文件和子目录添加读写权限

#chmod  –R  o+rw  /usr/local/subversion/repository

svn list --verbose file:///usr/local/svn/svnroot

LoadModule dav_svn_module modules/mod_dav_svn.so

LoadModule authz_svn_module modules/mod_authz_svn.so

DAV svn

SVNPath /var/svn/svnroot

AuthzSVNAccessFile /var/svn/svnroot/conf/authz

#SVNListParentPath on

AuthType Basic

AuthName "Repo Auth"

AuthUserFile /var/svn/svnroot/conf/passwd

Require valid-user

GY5WR-62Y9N-M8DAQ-UGWG9-MVKT4

-enable-lib64

创建用户

htpasswd -m /usr/local/svn/conf/passwd lijunpeng (md5加密)

htpasswd -b /usr/local/svn/conf/passwd yanyiyao yanyiyao (非md5加密,目前用这个)

创建svn库

/var/svn

./createSVNRoot.sh webadmin (webadmin为仓库名称)

cd /usr/local/svn/conf/

vi authz

添加权限

[webadmin:/]

@architect = rw

@tech = rw

* =

修改权限的文件

/usr/local/svn/conf/authz

share1机器web访问地址

http://share1:8080/cgi-bin/html/login.html?3.2.4.0315T

resin 位置

cd /usr/local/resin

service resin start

service resin stop

我把服务器的resin装上了

用service的方式启动和关闭

路径是/usr/local/resin/

前台地址:http://www.myhuile.net:8080/

启动nginx 进入 : /usr/local/nginx/logs  kill -HUP `cat nginx.pid`

jira 重启:

停止

cd /opt/oa/jira/bin

./shutdown.sh

cd /opt/oa/jira/data

ll -a

rm .jira-home.lock

./startup.sh

你可能感兴趣的:(resin,php,extensions,sockets)