arch linux上安装 httpd+php+mysql+ openssl

您没有发表评论的权限。

在arch linux安装则是非常的容易,只要执行:
# pacman -Sy apache php mysql openssl
根据提示选择输入Y即可安装!

1.修改apache配置文件
默认的情况,apache是不支持PHP的,请修改配置文件:
vi /etc/httpd/conf/httpd.conf

#LoadModule php5_module lib/apache/libphp5.so
的#去掉:
LoadModule php5_module lib/apache/libphp5.so

因为apache默认的情况没有启动ssl,所以要:
1) 修改/etc/conf.d/httpd
把: HTTPD_USE_SSL="no"
改成:HTTPD_USE_SSL="yes"

2) 生成CA的key
# cd /etc/httpd/conf
# openssl req -new -x509 -newkey rsa:1024 -days 3650 -keyout server.key -out server.crt
# openssl rsa -in server.key -out server.key

3) 修改/etc/httpd/conf/ssl.conf

SSLCertificateFile /etc/httpd/conf/server.crt
SSLCertificateKeyFile /etc/httpd/conf/server.key

最后启动apache
/etc/rc.d/httpd start

2.启动mysql
/etc/rc.d/mysqld start

最后你可以打开WEB测试一下:
简单吧?

下面是我的ssl文件:


Listen 443
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl

SSLPassPhraseDialog builtin

SSLSessionCache dbm:/var/log/httpd/ssl_scache
SSLSessionCacheTimeout 300

SSLMutex file:/var/log/httpd/ssl_mutex

SSLRandomSeed startup builtin
SSLRandomSeed connect builtin

# 这里我写直接的IP地址

DocumentRoot "/data/blog"
ServerName blog.ourlinux.net:443
ServerAdmin [email protected]
ErrorLog /var/log/httpd/blog.ourlinux.net_443_error_log
TransferLog /var/log/httpd/blog.ourlinux.net_443_access_log

SSLEngine on

SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL

SSLCertificateFile /etc/httpd/conf/server.crt

SSLCertificateKeyFile /etc/httpd/conf/server.key

SSLCACertificatePath /etc/httpd/conf/ssl_blog.ourlinux.net
SSLCACertificateFile /etc/httpd/conf/server.crt

SSLVerifyClient require
SSLVerifyDepth 1


SSLOptions +StdEnvVars


SSLOptions +StdEnvVars

SetEnvIf User-Agent ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0

CustomLog /var/log/httpd/ssl_request_log \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

补充:因为我这里的ssl里有虚拟主机,所以务必在:httpd.conf里加上:
NameVirtualHost ip:443
这句!
每次修改配置文件,请记着:reload
# /etc/rc.d/httpd reload

演示地址:http://blog.ourlinux.net

本文地址:http://www1.ourlinux.net/bbs/showforum.php?showtopic=459 如要转载请注明:碧轩居-(http://www.ourlinux.net)

评论

评论查看选项

选择您喜欢的显示评论的模式,并点击"保存设置"来激活您所做的改变。
barbour coats for women 提交者: jrtygf
barbour coats for women 提交者: jrtygf
Coach Outlet Store Online 提交者: a258038274
What you may enjoy 提交者: jiaduo
custom nfl jerseys 提交者: hwewyri564wrfw
fake oakleys 提交者: oakley6
jordan shoes 提交者: rrrr
sales 提交者: rrrr
jordan shoes for sale 提交者: rrrr
red sole shoes 提交者: rrrr
christian louboutin boots 提交者: rrrr
sales 提交者: suanye
nba shoes 提交者: suanye
jordan shoes 提交者: suanye
バーバリーマフラー 提交者: timberland
dqmzvwl 提交者: kwtuqm
Bags involving style: To 提交者: lishaohong163
There is no better way to 提交者: zhu
If you would like become a 提交者: xiaoxing000
p / p p only heard your 提交者: lishaohong163
red bottoms shoes 提交者: vvvv
jordan shoes for sale 提交者: vvvv
red sole shoes 提交者: vvvv
sbpwnyj 提交者: kwtuqm
office site for nike air max shoes 提交者: shoes99
Cheap Derrick Rose Adidas Shoes 提交者: shoes99
christian louboutin shoes 提交者: shoes99
cheap christian louboutin uk 提交者: shoes99
dr dre beats tour 提交者: drdrebeats197
Faye Wong and his wife 提交者: huaxiangseo
CHI Hair Products jerseys 提交者: aahh
Coach Factory Online 提交者: Coach Factory Online
ルイヴィトン アウトレット 提交者: yzf983221
Welcome To Supra Footwear 提交者: goodsfashion
www.ralphlaurening.dk is 提交者: goodsfashion
www.ralphlaurening.dk is 提交者: goodsfashion
href="http://www.supratksocie 提交者: goodsfashion
That usually took place 提交者: 9445
Or even make a film of 提交者: lishaohong163
Produced by Samsung,You can 提交者: zjh
coach outlet online 提交者: coach outlet online2
Welcome to Coach outlet 提交者: kei111
Ugg boots emerged as a 提交者: yaya
Mr. Bo is also tied to Neil 提交者: lishaohong163
true religion jeans cheap 提交者: yaoyao1118
airmax cheap nike air 提交者: jgfhrutru
airmax cheap nike air 提交者: jgfhrutru
airmax cheap nike air 提交者: jgfhrutru
coach outlet 提交者: coach outlet
super slim pills 提交者: jsrj