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 bixuan@ourlinux.net
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
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10752043/viewspace-940389/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 安裝 Lantern (Arch Linux)Linux
- Arch Linux安裝macOSLinuxMac
- ARM 和 龍芯上 Arch Linux 安裝手記Linux
- Vmware Station安裝Arch LinuxLinux
- Arch Linux 安裝 AnboxLinux
- Arch Linux 安裝簡明流程Linux
- Arch Linux中安裝AnacondaLinux
- 安裝 WPS Office (Arch Linux)Linux
- 安裝“花園明朝”字型(Arch Linux)Linux
- 如何在 Arch Linux 上安裝和設定 KDE 桌面環境?Linux
- Alpha上安裝Linux(轉)Linux
- windows 安裝 opensslWindows
- Centos安裝opensslCentOS
- Openssl的安裝
- Homebrew 安裝 openssl
- 如何在 Arch Linux 中安裝深度桌面(DDE)Linux
- 安裝和配置 ASP.NET 4(Arch Linux)ASP.NETLinux
- Arch linux下安裝bochs失敗解決Linux
- Arch! 從安裝開始
- Windows安裝使用OpensslWindows
- openssl安裝與部署
- Ubuntu中安裝OpenSSLUbuntu
- Linux安裝boost、libevent、zlib、OpenSSL庫Linux
- Linux上JDK的 安裝和解除安裝 詳細 (轉)LinuxJDK
- windows10上安裝OpenSSL_1.1.1d_x64Windows
- 初級:如何在 Arch Linux 中安裝 Yay AUR 助手Linux
- OpenSSL + Windows 下載安裝Windows
- CentOS6.5 安裝opensslCentOS
- 在TurboLinux上的安裝 Informix for Linux(轉)LinuxORM
- python openssl模組如何安裝?Python
- php安裝openssl 擴充套件PHP套件
- linux上安裝ELKLinux
- linux上安裝mongodbLinuxMongoDB
- linux 上安裝kapacitorLinux
- linux上安裝mysqlLinuxMySql
- linux上安裝VNCLinuxVNC
- linux上安裝oracleLinuxOracle
- Linux上安裝gitLinuxGit