Google

Linux下的Apache、mysql和PHP安装设置

先配置环境 以redhat 5.3 和CentOS 5.2 为例:

LINUX创建用户的命令
useradd -g test -d /home/test1 -s /etc/bash -m test1
注解:-g 所属组  -d 家目录  -s 所用的SHELL
删除用户命令
userdel -r test1 
注解:-r 是删除用户家目录
创建密码命令
passwd

先关闭系统SeLinux,以便能顺利安装软件。/etc/selinux/config
把 SELINUX=enforcing 注释掉:#SELINUX=enforcing ,然后新加一行为:SELINUX=disabled
libgomp-4.1.2-42.el5.i386.rpm
kernel-headers-2.6.18-128.16.el5.i386.rpm
glibc-headers-2.5-2.4.i386.rpm
glibc-devel-2.5-2.4.i386.rpm
gcc-4.1.2-42.el5.i386.rpm
zlib-devel-1.2.3-3.i386.rpm
zlib-1.2.3-3.i386.rpm
libstdc++-devel-4.1.2-42.el5.i386.rpm
libstdc++-4.1.2-42.el5.i386.rpm
gcc-c++-4.1.2-42.el5.i386.rpm
—————————————————————
apache2 httpd-2.2.11
./configure \
–prefix=/data/apache2 \
–enable-module=so \
–enable-deflate=shared \
–enable-expires=shared \
–enable-rewrite=shared \
–enable-cache \
–enable-file-cache \
–enable-mem-cache \
–enable-disk-cache \
–enable-static-support \
–enable-static-htpasswd \
–enable-static-htdigest \
–enable-static-rotatelogs \
–enable-static-logresolve \
–enable-static-htdbm \
–enable-static-ab \
–enable-static-checkgid \
–disable-cgid \
–disable-cgi \
–disable-userdir \
–with-mpm=worker \
–enable-authn-dbm=shared \
–enable-authn-anon=shared \
–enable-authn-dbd=shared \
–enable-auth-basic=shared

注释
./configure //配置源代码树
–prefix=/usr/local/apache2
–enable-module=so //打开 so 模块,so 模块是用来提 DSO 支持的 apache 核心模块
或者用下面的参数,因为是在php时,可能生成不了libphp5.so的错误,如有错误时可以试改一下看看。
–with-enable=so
–enable-deflate=shared //支持网页压缩
–enable-expires=shared //支持 HTTP 控制
–enable-rewrite=shared //支持 URL 重写
–enable-cache   //支持缓存
–enable-file-cache   //支持文件缓存
–enable-mem-cache   //支持记忆缓存
–enable-disk-cache   //支持磁盘缓存
–enable-static-support //支持静态连接(默认为动态连接)
–enable-static-htpasswd //使用静态连接编译 htpasswd – 管理用于基本认证的用户文件
–enable-static-htdigest //使用静态连接编译 htdigest – 管理用于摘要认证的用户文件
–enable-static-rotatelogs //使用静态连接编译 rotatelogs – 滚动 Apache 日志的管道日志程序
–enable-static-logresolve //使用静态连接编译 logresolve – 解析 Apache 日志中的IP地址为主机名
–enable-static-htdbm //使用静态连接编译 htdbm – 操作 DBM 密码数据库
–enable-static-ab //使用静态连接编译 ab – Apache HTTP 服务器性能测试工具
–enable-static-checkgid //使用静态连接编译 checkgid
–disable-cgid //禁止用一个外部 CGI 守护进程执行CGI脚本
–disable-cgi //禁止编译 CGI 版本的 PHP
–disable-userdir //禁止用户从自己的主目录中提供页面
–with-mpm=worker // 让apache以worker方式运行
–enable-authn-dbm=shared // 对动态数据库进行操作。Rewrite时需要。

make
make install

然后
apache2/bin/apachectl start

如出现下面错误
httpd: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName

就在apache配置文件httpd.conf中找到#ServerName www.example.com 这一行 把前面的#去掉。
修改www.example.com为自己的域名或者是ip地址,出现 这种现象的原因是安装的机器名不是localhost,修改过机器名引起的。
设置开机自动启动
然后在apachectl文件第二行添加以下几行(大概在文件顶部,约第二行的地方):
在第2行加入
# chkconfig: – 85 15
# description: Apache is a World Wide Web server.  It is used to serve \
#              HTML files and CGI.
最后,运行chkconfig把Apache添加到系统的启动服务组里面:
ln -s apachectl /etc/init.d/httpd
不好时就直接拷贝
cp apachectl /etc/init.d/httpd
# chkconfig – -del httpd
# chkconfig – -add httpd
# chkconfig – -level 345 httpd on

或者编辑/etc/rc.d/rc.local
把/server/apache2/bin/apachectl start 加入进去

apache2.2以后的虚拟主机配置在extra目录下httpd-vhost.conf,不是在conf/httpd.conf里修改。
—————————————————————
mysql5 安装
mysql(二进制源码包安装,不需要编译)

以root身份登录
1.#adduser 新建一个用户mysql,组mysql
2.把下载的mysql-XXX.tar.gz拷贝到 /usr/local/下
3.# cd /usr/local/
# gunzip < mysql-XXX.tar.gz | tar xvf-
# ln -s mysql-XXX mysql
# cd mysql
# 从support-files目录拷贝个my-*.cnf文件到/etc/my.cnf下

mysql下面有5个my-xxxx.cnf文件
my-small.cnf 最小配置安装,内存<=64M,数据数量最少
my-large.cnf 内存=512M
my-medium.cnf 32M<内存<64M,或者内存有128M,但是数据库与web服务器公用内存
my-huge.cnf 1G<内存<2G,服务器主要运行mysql
my-innodb-heavy-4G.cnf 最大配置安装,内存至少4G

# groupadd mysql #建立mysql组
# useradd mysql -g mysql #建立mysql用户并且加入到mysql组中

建立用户后我们就初始化表 (注意:必须先执行本步骤后才能进行以下步骤)

# ./scripts/mysql_install_db –user=mysql #初试化表并且规定用mysql用户来访问

初始化表以后就开始给mysql和root用户设定访问权限, 我们先到安装mysql的目录:

# cd /usr/local/mysql

然后设置权限

# chown -R root . #设定root能访问/usr/local/mysql
# chown -R mysql data #设定mysql用户能访问/usr/local/mysql/data ,里面存的是mysql的数据库文件
# chown -R mysql data/. #设定mysql用户能访问/usr/local/mysql/data下的所有文件
# chown -R mysql data/mysql/. #设定mysql用户能访问/usr/local/mysql/data/mysql下的所有文件
# chgrp -R mysql . #设定mysql组能够访问/usr/local/mysql

设置完成后,基本上就装好了,好了,我们运行一下我们的mysql:

# /usr/local/mysql/bin/mysqld_safe –user=mysql &

如果没有问题的话,应该会出现类似这样的提示:

[1] 42264
# Starting mysqld daemon with databases from /usr/local/mysql/var
这就证明你安装成功了,如果出现:

[1] 42264
# Starting mysqld daemon with databases from /usr/local/mysql/var
040818 10:53:45 mysqld ended

则证明你的mysql运行不来,请查看错误日志: /usr/local/mysql/data/*.err 然后确定安装是否成功,如果没有成功,请检查上面的步
骤是否正确.

bin/mysqladmin -u root password “password”
修改root用户的密码
bin/mysql -u root -p
如果正常的话,用这个名字可以登录,在输入密码后,出现mysql > 的提示符表明登录成功。用quit命令可退出

以下命令用于设置mysql开机自动运行
cd mysql
再次进入解压后的目录,即源码目录。
cp support-files/mysql.server /etc/init.d/mysql
将mysql.server这个文件copy到/etc/init.d/目录下,并更名为mysql
chmod 755 /etc/init.d/mysql
给/etc/init.d/mysql这个文件赋予“执行”权限
(注意 :如果你安装的不在/usr/local下 ,需要修改拷贝到 /etc/init.d/mysql中的路径,不然就会出现下面的错误。
# If you install MySQL on some other places than /usr/local/mysql, then you

basedir=/data/mysql

datadir=/data/mysql/data
改路径

/etc/init.d/mysql: line 260: my_print_defaults: command not found
/etc/init.d/mysql: line 263: my_print_defaults: command not found
/etc/init.d/mysql: line 292: cd: /usr/local/mysql: 没有那个文件或目录
Starting MySQLCouldn’t find MySQL manager (./bin/mysqlmanager) or server (./bin/mysqld_safe)
[失败]
)
chkconfig –level 345 mysql on
加入到开机自动运行,运行级别为3 4 5
service mysql restart
重启mysql服务

如果没有加入chkconfig的话,停止和重起用下面的命令
mysqladmin -u root -p shutdown
mysqld_safe –user=mysql &

另一种开机后立即启动!
[root@test mysql]# vi /etc/rc.d/rc.local
# 将底下这一行加入这个档案的最后面一行喔!
cd /usr/local/mysql; /usr/local/mysql/bin/safe_mysqld –user=mysql &
# 这样一来,每次开机就可以自动的启动 MySQL ?!
# 注:由于很多网友回复之问题中发现,如果没有加上 cd /usr/local/mysql 时,
# 会导致无法自动于开机的时候启动,因此,请大家记得加上这个动作呢!
—————————————————————
安装GD-2.0.33 (需要先安装下面的包)

安装ZLIB2
cd /home/biaoest
tar -zxvf zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure
不要用–prefix自定义安装目录,否则可能会影响后面安装,可能出现的错误:
configure: error: zlib not installed
安装完后还需安装 libbzip2-level 和 libbzip2 ,可以在安装盘中找rpm包。

安装libpng-1.2.10
tar -zxvf libpng-1.2.10.tar.gz
./configure –prefix=/data/apache2/modlib/png
make
make install
如果出现下面错误:
configure: error: zlib not installed
请回到zlib,重新安装一次,最好先make clean

如果你的机器是64位,并且在安装png时候出现下面错误:
/usr/bin/ld: /usr/local/lib/libz.a(compress.o): relocation R_X86_64_32 can not be used when making a shared object;
recompile with -fPIC
/usr/local/lib/libz.a: could not read symbols: Bad value
collect2: ld returned 1 exit status

修补办法(接上面步骤):
vi Makefile
找到 CFLAGS=-O3 -DUSE_MMAP
在后面加入-fPIC,即变成CFLAGS=-O3 -DUSE_MMAP -fPIC
接下面步骤
tar -zxvf libpng-1.2.10.tar.gz
./configuer –prefix=/data/apache2/modlib/png
make
make install

安装JPEG6
先建立目录,否则可能会出现类型下面错误:
/usr/bin/install -c cjpeg /server/apache2/modlib/jpeg6/bin/cjpeg
/usr/bin/install: cannot create regular file `/server/apache2/modlib/jpeg6/bin/cjpeg’: No such file or directory
make: *** [install] Error 1

解决办法:
mkdir /usr/local/apache2/modlib
mkdir /usr/local/apache2/modlib/jpeg6
mkdir /usr/local/apache2/modlib/jpeg6/bin
mkdir /usr/local/apache2/modlib/jpeg6/lib
mkdir /usr/local/apache2/modlib/jpeg6/include
mkdir /usr/local/apache2/modlib/jpeg6/man
mkdir /usr/local/apache2/modlib/jpeg6/man/man1

tar -zxvf jpegsrc.v6b.tar.gz
cd jpegsrc.v6b.
./configure –prefix=/data/apache2/modlib/jpeg6

在php编译的时候,可能会出现configure: error: libjpeg.(a|so) not found.
重新编译一下你的libjpeg

如果你的机器是64位,并且在安装gd时候出现下面错误:
/usr/bin/ld: /server/apache2/modlib/jpeg6//lib/libjpeg.a(compress.o): relocation R_X86_64_32 can not be used when
making a shared object; recompile with -fPIC
/server/apache2/modlib/jpeg6//lib/libjpeg.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [libgd.la] Error 1

解决办法:
vi Makefile
找到 CFLAGS= -O2 -I$(srcdir)
在后面加入-fPIC,即变成CFLAGS= -O2 -I$(srcdir) –fPIC

make
make install-lib  ****重要!
make install
安装freetype
cd /home/biaoest
tar -zxvf freetype-2.2.1.tar.gz
cd freetype-2.2.1
./configure –prefix=/data/apache2/modlib/freetype
make
出现这个错误,忽略不管,意思是错把系统内核当成unix
make: Nothing to be done for `unix’.

make install
安装GD
cd /home/biaoest
tar -zxvf gd-2.0.33.tar.gz
cd gd-2.0.33
./configure \
–prefix=/data/apache2/modlib/gd2 \
–with-jpeg=/data/apache2/modlib/jpeg6 \
–with-png=/data/apache2/modlib/png \
–with-zlib \
–with-freetype=/data/apache2/modlib/freetype

make

如果出现下面错误:
gd_png.c:825: warning: data definition has no type or storage class
make[2]: *** [gd_png.lo] Error 1
需要修改vi gd_png.c,找到 #include “png.h”改成#include “/data/apache2/modlib/png/include/png.h” ,就是添加路径。

make install
—————————————————————
安装libiconv
应该先安装这个,不然可能下面的 libxml2无法安装,libiconv的 版本一定要新,系统自带的libiconv函数支持有时不好 ,所以才
使用这个东西,当然,也可以使用其他版本的libiconv库。
除提供对西欧字符集的支持外,libiconv库还提供了对各种亚洲字符集(包括汉字、日文、韩文)的支持:
Chinese
EUC-CN, HZ, GBK, GB18030, EUC-TW, BIG5, CP950, BIG5-HKSCS, ISO-2022-CN, ISO-2022-CN-EXT
Japanese
EUC-JP, SHIFT_JIS, CP932, ISO-2022-JP, ISO-2022-JP-2, ISO-2022-JP-1
Korean
EUC-KR, CP949, ISO-2022-KR, JOHAB 。
tar -zxvf libiconv-1.9.2.tar.gz
./configure –enable-static=yes
make
make install

增加”—enable-static=yes”选项是为了生成静态库。完成配置后,执行make编译libiconv库。
完成编译后,可以通过”make install”命令安装libiconv环境。
安装libmcrypt 支持mcrypt 扩展
libmcrypt-2.5.8.tar
./configure  使用默认安装
make
make install
—————————————————————
安装Libxml2
libxml2-2.6.30.tar.gz
./configure 使用默认安装
make
make install

安装Libxslt 1.1.24
./configure –prefix=/data/apache2/modlib/libxslt –with-libxml

make
make install
安装 Bzip2-1.0.2
简单的办法直接到安装盘中找。

Bzip2的内容
Bzip2 是块排序文件压缩器,比传统的gzip生成更高压缩比的文件。

安装下列程序: bunzip2 (link to bzip2), bzcat (link to bzip2), bzcmp, bzdiff, bzegrep, bzfgrep, bzgrep, bzip2,
bzip2recover, bzless 和 bzmore

安装下列库文件: libbz2.a, libbz2.so (link to libbz2.so.1.0), libbz2.so.1.0 (link to libbz2.so.1.0.2) 和
libbz2.so.1.0.2

Bzip2 安装依赖关系
Bzip2 依赖于: Bash, Binutils, Coreutils, Diffutils, GCC, Glibc, Make.

安装 Bzip2
Bzip2软件包没有configure脚本。编译和安装它比较直接了当:

make PREFIX=/tools install

安装tiff
tiff-3.8.1.tar.gz
./configure
make
make install
—————————————————————
configure 和make时如有错误, collect2: ld returned 1 exit status  make: *** [libphp5.la] Error 1 ,这时应从新解压一次包,在安装,可能是解压的包有问题。如不是在考虑其他的问题。

php
./configure \
–prefix=/data/php \
–with-apxs2=/data/apache2/bin/apxs \
–with-zlib-dir \
–with-bz2 \
–with-libxml-dir \
–with-gd=/data/apache2/modlib/gd2 \
–with-freetype-dir=/data/apache2/modlib/freetype \
–with-jpeg-dir=/data/apache2/modlib/jpeg6 \
–with-png-dir=/data/apache2/modlib/png \
–with-ttf \
–enable-mbstring \
如果不能用时改成
–enable-mbstring=all \
–with-mcrypt \
–with-mysql=/data/mysql \
–with-mysqli=/data/mysql/bin/mysql_config \
–with-config-file-path=/etc \ 指定php.ini文件所在的目录,cp php.ini-dist文件时就到这里,改名php.ini
–with-iconv \ 调用libiconv函数库 ,支持多种字符集转换。
–enable-static=yes \ =yes是和前面static编译的一样,如果编译的是其他的,对应改一下,不加=yes这个参数,可能编译不了。用于变量,声明这个变量的存储单元静态分配,从程序运算开始到结束这个变量的存储单元不变化。static常用
于全局量,一是存在里面的值始终有效,不因进退出子程序数值消失,另外static的变量运算速度比非静态分配的快。
libsepol-devel-1.15.2-1.el5.i386.rpm
libselinux-devel-1.33.4-5.1.el5.i386
e2fsprogs-devel-1.39-20.el5.i386.rpm
keyutils-libs-devel-1.2-1.el5.i386.rpm
krb5-devel-1.6.1-31.el5.i386.rpm
openssl-devel-0.9.8e-7.el5.i386.rpm
libidn-devel-0.6.5-1.1.i386.rpm
curl-devel-7.15.5-2.el5.i386
–with-curl=/data/apache2/modlib/curl 不用不安装
–with-openssl \
–with-xmlrpc \xml-rpc扩展已经集成在php中了,为了异构系统的通信而产生的,使用基于XML的HTTP的远程调用提供一种标准的机
制,而省去建立一种新协议的需求。目前进行Web Service通信有两种协议标准,一种是XML-RPC,另外一种是SOAP。XML-RPC比较简
单,出现时间比较早,SOAP比较复杂,主要是一些需要稳定、健壮、安全并且复杂交互的时候使用。

–disable-debug \
其中 –disable-debug 一定要, 因为下面的 zend optimizer 优化工具,在php- disable -debug状态下才能运行.. 你的 phpinfo() 才会显示 with-zend optimizer..

下面几项一直没测试通
–disable-ipv6 \ 支持 ipv6
–with-tiff-dir \
cp php.ini-dist /etc/php.ini   cp的位置就是–with-config-file-path=/etc,这个地方不要错了,不然zend安不上.

整合apache 与php
# vi /data/apache2/conf/httpd.conf
在最后一行加上:
AddType application/x-httpd-php .php
查找:(设置 WEB 默认文件)
DirectoryIndex index.html
替换为:
DirectoryIndex index.php index.html index.htm //在 WEB 目录不到默认文件,httpd 就会执行 /var/www/error/noindex.html
找到这一段:
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be “All”, “None”, or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride none
更改为AllowOverride all
允许apache rewrite
保存httpd.conf,退出。
# /data/apache2/bin/apachectl restart //重启 Apache
—————————————————————
安装 Zend Optimizer
# tar xzvf ZendOptimizer-3.2.0-linux-glibc21-i386.tar.gz
# ./ZendOptimizer-3.2.0-linux-glibc21-i386/install.sh
按照它的提示一步步进行就行了。

Zend的安装目录请自行设置,之后会询问php.ini文件所在目录、apach的安装目录下的bin目录,请确认无误后输入。
安装完成后会询问要不要重起apache。
php.ini文件会被转移到Zend目录下的etc目录下,原来的php.ini文件被改名为php.ini-zend_optimizer.bak。

配置Apache的虚拟目录

<VirtualHost 127.0.0.1>
ServerName www.yourdomain.com
DocumentRoot “/opt/iNewS4/htdocs” #域名的根目录直接指向静态目录,这样就可以直接使用域名访问静态首页
Alias /admincp “/opt/iNewS4\AdminCP” #这个是iNewS的后台管理地址,可以复杂一点
Alias /Install “/opt/iNewS4\Install” #这个可以在安装完成删除
</VirtualHost>

将上面的内容放到httpd.conf中好使了,但是和网上说的不太一致
如果改端口,要在Listen 80 下面增设其他监听端口,如 Listen 81

出现 apache 403错误 You don’t have permission to access on this server.

配置文件httpd.conf,找到这么一段:
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
deny from all
Satisfy all
</Directory>
然后试着把deny from all中的deny改成了allow,保存后重起了apache。

以上配置还在测试。
—————————————————————
ssh安装

# cd /usr/src/usr.bin
# tar xvfz …/openssh-5.2.tar.gz
# cd ssh
# make obj
# make cleandir
# make depend
# make
# make install
# cp ssh_config sshd_config /etc/ssh
# /etc/init.d/ssh start

# vi /etc/ssh/sshd_config  ← 用vi打开SSH的配置文件

#Protocol 2,1 ← 找到此行将行头“#”删除,再将行末的“,1”删除,只允许SSH2方式的连接

Protocol 2 ← 修改后变为此状态,仅使用SSH2

#ServerKeyBits 768 ← 找到这一行,将行首的“#”去掉,并将768改为1024

ServerKeyBits 1024 ← 修改后变为此状态,将ServerKey强度改为1024比特

#PermitRootLogin yes  ← 找到这一行,将行首的“#”去掉,并将yes改为no

PermitRootLogin no  ← 修改后变为此状态,不允许用root进行登录

#PasswordAuthentication yes ← 找到这一行,将yes改为no

PasswordAuthentication no ← 修改后变为此状态,不允许密码方式的登录

#PermitEmptyPasswords no  ← 找到此行将行头的“#”删除,不允许空密码登录

PermitEmptyPasswords no  ← 修改后变为此状态,禁止空密码进行登录

sshd_config祥解

Protocol 2 #使用协议版本2
Port 22 #sshd监听22端口
ListenAddress 192.168.7.1 #sshd只监听目标ip为192.168.7.1的请求
AllowGroups wheel myguest #允许wheel组和myguest组的用户登录
AllowUsers teczm authen@192.168.8.5 #允许来自以上组的teczm用户和authen用户登录,
#且authen用户只能从主机192.168.8.5登录
#DenyGroups #拒绝登录的组,参数设置和AllowGroups一样
#DenyUsers #拒绝登录的用户,参数设置和AllowUsers一样
#AllowTcpForwarding yes #是否转发的TCP包都被允许。默认是 “yes”。
LoginGraceTime 60 #60秒内客户端不能登录即登录超时,sshd切断连接。
KeyRegenerationInterval 1800 #1800秒(30分钟)后自动重新生成服务器的密匙。
MaxStartups 3 #设置同时发生的未验证的并发量,即同时可以有几个
UseDNS no #不使用DNS查询客户端。
PermitRootLogin no #不允许root登录,root可由wheel组用户登录后su。
X11Forwarding no #禁止用户运行远程主机上的X程序。
UseLogin yes #禁止X11Forwarding
#认证配置(口令认证、PAM认证、非对称密钥认证任选其一)
#口令认证
PubkeyAuthentication no #不使用非对称密钥认证
PasswordAuthentication yes #使用口令认证
PermitEmptyPasswords no #不允许使用空密码的用户登录
#PAM认证
PasswordAuthentication no #不使用口令认证
UsePAM #使用pam认证
ChallengeResponseAuthentication yes #允许挑战应答方式
#非对称密钥认证
PasswordAuthentication no #不使用口令认证
PubkeyAuthentication yes #使用非对称密钥认证
AuthorizedKeysFile .ssh/authorized_keys #用户认证使用的公钥。
# su – centospub ← 登录为一般用户centospub

[centospub@sample ~]$ ssh-keygen -t rsa  ← 建立公钥与私钥
Generating public/private rsa key pair.
Enter file in which to save the key (/home/kaz/.ssh/id_rsa):  ← 钥匙的文件名,这里保持默认直接回车
Created directory ‘/home/kaz/.ssh’
Enter passphrase (empty for no passphrase):  ← 输入口令
Enter same passphrase again:   ← 再次输入口令
Your identification has been saved in /home/kaz/.ssh/id_rsa.
Your public key has been saved in /home/kaz/.ssh/id_rsa.pub.
The key fingerprint is:
tf:rs:e3:7s:28:59:5s:93:fe:33:84:01:cj:65:3b:8e xxx

ssh 其它软件key添加
F-Secure SSH Client 生成的key要用下面方法添加
参数 _i -f 生成的文件将会清除原authorized_keys文件中的其它key,所以在用这个命令时先生成其它的文件名,然后再用cat XXX >> authorized_keys,合并文件即可。
ssh-keygen -i -f XXX.pub(代表的客户端生成的文件) > .ssh/XXX  XXX代表的是.ssh下的authorized_keys
XXX如果后缀是.pub可能运行不了命令,将文件XXX.pub 改成XXX就可以了

putty生成的key使用方法详解

最后开启SeLinux
允许下面的模块运行,命令:
chcon -t textrel_shlib_t ‘/data/apache2/modlib/gd2/lib/libgd.so.2.0.0′
chcon -t textrel_shlib_t ‘/data/mysql/lib/libmysqlclient_r.so.15′
chcon -t textrel_shlib_t ‘/data/apache2/modules/libphp5.so’

Tags: , ,

5 Responses to “Linux下的Apache、mysql和PHP安装设置”

  1. TomsPepererce Says:

    Monte Rosa. north face jackets straightforward styles, the brand name wins inside of the hearts of both equally out of doors enthusiasts and fashion hunters.

  2. CocaduriHoido Says:

    for geese deterrenceGoose Hunting 101 Aspect 1 – Geese and FlywaysWhether you are about to embark on the gooselesser snow geese (together with blue) increased snow geese and Ross’ geeseThe time period “dark geese” generally referswinterIn new a long time the online globe is producing so rapidlyFor instance online suppliers movement about around thethe perfect winter coats for the fierce climates againSo shall we focus on 2011 Canada goose apparelconsumersAs the value of both equally jackets are equivalent they are nonetheless some strategies for the people who are swing between canada goose state visitorsAgain the period is fairly short along with the window of opportunity to set up guided trips on clubhardly ever don the traditional caribou pores and skin parkas in favor of your fashionable equivalentIt may well be considered a little bit perplexingcoldWell I’m thrilled now since I have a very Russian ushanka hat picked up in StPetersberg that’s amazinglythroughout the premier periodIn case you might be Jackets was born in expeditionary naval coat travelling to collegemade for Antarctic scientific expeditions the Expedition Parka is amazingly resilient and perfectly

  3. shuppopsicugh Says:

    hope can know much information About it!|Thank you for Posting & I got to read nice information on your site.|Thank you for useful info. :-) |Thanks for this

  4. migroksdefmuzachary172 Says:

    information|thanks for great informations It’s a wonderful |Good job. I’m definitely going to bookmark you! |Thanks for good information that comes out to

  5. pdc925GoporbibraKat Says:

    That i frequently browse your blog and try to still find it worth it to read. Thinking it was about time that i inform you about…Preserve up the good function

Leave a Reply 留下一个回复

用户名和电子邮件必需填写(填写信息不会被公开)