當前位置:首頁 » 密碼管理 » linux支持https訪問

linux支持https訪問

發布時間: 2022-11-12 23:21:45

A. linux Centos 怎麼安裝更新根證書實現支持https訪問

第一步、 安裝系統及所需工具1. 使用最小化安裝盤安裝系統,設置好網路環境配置信息
2. 安裝所需工具包
# yum install openssh-server
# yum install wget
# yum update
# yum install setuptool
系統服務配置 # yum install ntsysv
安裝網路配置 # yum install system-config-network-tui
防火牆配置 # yum install system-config-firewall
# yum -y install gcc gcc-c++ autoconf make
# yum -y install vim
關機備份 # shutdown -h now

二、安裝openssl
切換到/tmp目錄下(安裝約定軟體全放在此目錄下)
cd /tmp
# tar zxvf openssl-1.0.0a.tar.gz
# cd openssl-1.0.0a
# ./config --prefix=/usr/local/openssl
# make && make install

三、創建證書
1.解壓工具包
# tar zxvf ssl.ca-0.1.tar.gz
# cd ssl.ca-0.1
2.創建根證書
# ./new-root-ca.sh
No Root CA key round. Generating one
Generating RSA private key, 1024 bit long molus
....++++++

B. Linux Centos 怎麼安裝更新根證書實現支持https訪問

Linux Centos 安裝部署SSL證書實現https加密訪問問題請咨詢沃通CA(wosign.com)技術支持,快速幫助解決問題。

C. linux apache 怎麼支持https

1、 確認是否安裝ssl模塊
是否有mod_ssl.so文件

2、 生成證書和密鑰

linux下

步驟1:生成密鑰

命令:openssl genrsa 1024 > server.key

說明:這是用128位rsa演算法生成密鑰,得到server.key文件

步驟2: 生成證書請求文件

命令:openssl req -new -key server.key > server.csr

說明:這是用步驟1的密鑰生成證書請求文件server.csr, 這一步提很多問題,一一輸入

步驟3: 生成證書

命令:openssl req -x509 -days 365 -key server.key -in server.csr > server.crt

說明:這是用步驟1,2的的密鑰和證書請求生成證書server.crt,-days參數指明證書有效期,單位為天

window下

步驟1:生成密鑰
命令:openssl genrsa 1024 > server.key
說明:這是用128位rsa演算法生成密鑰,得到server.key文件

步驟2: 生成證書請求文件
命令:openssl req -config D:\work_soft\Apache2.2\conf\openssl.cnf -new -key server.key > server.csr
說明:這是用步驟1的密鑰生成證書請求文件server.csr, 這一步提很多問題,一一輸入

步驟3: 生成證書
命令:openssl req -config D:\work_soft\Apache2.2\conf\openssl.cnf -x509 -days 365 -key server.key -in server.csr > server.crt
說明:這是用步驟1,2的的密鑰和證書請求生成證書server.crt,-days參數指明證書有效期,單位為天

把得到的server.key和server.crt文件拷貝到apache的對應目錄

3、 配置apache

l 修改httpd-ssl.conf文件

D. Linux Centos 怎麼安裝更新根證書實現支持https訪問

其實很簡單就是一個命令:
mozroots --import --ask-remove
或者使用:
sudo update-ca-certificates

E. linux裡面https默認埠是多少

http訪問埠是80,https訪問的埠是443。

F. Linux Centos 怎麼安裝更新根證書實現支持https訪問

使用沃通SSL精靈,申請一張沃通免費SSL證書就可以了,ssl精靈全自動一鍵申請和部署SSL證書。很方便。

G. linux伺服器配置https

截止回答時,該網站https已經正確配置,可以正常訪問,一般出現上述問題由於默認文件名設置不正確,網站根目錄設置不正確,列目錄功能異常開啟等原因

H. Linux Centos 怎麼安裝更新根證書實現支持https訪問

1. 使用最小化安裝盤安裝系統,設置好網路環境配置信息
2. 安裝所需工具包
# yum install openssh-server
# yum install wget
# yum update
# yum install setuptool
系統服務配置 # yum install ntsysv
安裝網路配置 # yum install system-config-network-tui
防火牆配置 # yum install system-config-firewall
# yum -y install gcc gcc-c++ autoconf make
# yum -y install vim
關機備份 # shutdown -h now

二、安裝openssl
切換到/tmp目錄下(安裝約定軟體全放在此目錄下)
cd /tmp
# tar zxvf openssl-1.0.0a.tar.gz
# cd openssl-1.0.0a
# ./config --prefix=/usr/local/openssl
# make && make install

三、創建證書
1.解壓工具包
# tar zxvf ssl.ca-0.1.tar.gz
# cd ssl.ca-0.1
2.創建根證書
# ./new-root-ca.sh
No Root CA key round. Generating one
Generating RSA private key, 1024 bit long molus
....++++++
...................++++++
e is 65537 (0x10001)
Enter pass phrase for ca.key:
Verifying - Enter pass phrase for ca.key:
Self-sign the root CA...
Enter pass phrase for ca.key:
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [MY]:cn
State or Province Name (full name) [Perak]:cn
Locality Name (eg, city) [Sitiawan]:cn
Organization Name (eg, company) [My Directory Sdn Bhd]:cn
Organizational Unit Name (eg, section) [Certification Services Division]:cn
Common Name (eg, MD Root CA) []:172.16.17.132 //這里填站點域名,我是測試的就填ip
Email Address []:[email protected]
這個過程要設置證書密碼,要記住這個密碼後面要用到,還有證書的其它信息:國家、地區、公司名稱,域名,郵箱等,這些信息也要記住,與後面創建的證書主體信息一致
3.創建伺服器證書
# ./new-server-cert.sh server
...
即創建一個名為server的伺服器證書,主體信息與上面的一致就可,我這里就不貼出來了
簽名剛才生成的伺服器證書
# ./sign-server-cert.sh server
這個過程要輸入根證書密碼,後面都選Y即可
4.創建客戶端證書,如果是單向認證,這一步可以跳過
# ./new-user-cert.sh client
...
這里要注意證書信息不能與其它證書完全一樣,這里修改Email與伺服器證書不一樣就行
簽名客戶端證書
# ./sign-user-cert.sh client
轉換成p12格式證書,這樣才能在瀏覽器上安裝
# ./p12.sh client
下載並安裝client.p12證書
關機備份 # shutdown -h now
三、安裝Apache及其所需依賴軟體
# tar zxvf httpd-2.2.23.tar.gz
# cd httpd-2.2.23
# ./configure --prefix=/usr/local/apache \
--enable-ssl \
--enable-rewrite \
--enable-so \
--with-ssl=/usr/local/openssl
# make && make install
可以啟動httpd看看,啟動命令是/usr/local/apache/bin/apachectl start,在瀏覽器中訪問看看,顯示 It workds!說明安裝成功了

四、配置httpd
1.修改httpd.conf
#Include conf/extra/httpd-ssl.conf 把這句前面的#去掉
2.將前面生成的證書拷貝到conf/ssl 下
# mkdir ssl
# cd ssl
# cp /tmp/ssl.ca-0.1/ca.crt ./
# cp /tmp/ssl.ca-0.1/server.* ./
2.修改httpd-ssl.conf
SSLCertificateFile 「/usr/local/apache/conf/ssl/server.crt」
SSLCertificateKeyFile 「/usr/local/apache/conf/ssl/server.key」
下面是開啟客戶端認證,如果是單向認證就不用開啟了
SSLCACertificateFile 「/usr/local/apache/conf/ssl/ca.crt」
SSLVerifyClient require
SSLVerifyDepth 10

五、重啟httpd
[root@localhost extra]# ../../bin/apachectl -t
Syntax OK
[root@localhost extra]# ../../bin/apachectl stop
[root@localhost extra]# ../../bin/apachectl -D SSL -k start

六、安裝並配置Mysql
1、安裝Mysql
添加一個mysql標准組
# groupadd mysql
添加mysql用戶並加到mysql組中
# useradd -g mysql mysql
# tar zxvf mysql-5.0.45.tar.gz
# cd mysql-5.0.45
# ./configure \
--prefix=/usr/local/mysql/ \
--with-extra-charsets=all
出現錯誤:
checking for tgetent in -lncurses... no
checking for tgetent in -lcurses... no
checking for tgetent in -ltermcap... no
checking for tgetent in -ltinfo... no
checking for termcap functions library... configure: error: No curses/termcap library found
分析:缺少ncurses安裝包
解決:
# yum install ncurses-devel
# make && make install
2、配置Mysql
創建MySQL資料庫伺服器的配置文件
# cp support-files/my-medium.cnf /etc/my.cnf
用mysql用戶創建授權表,創建成功後,會在/usr/local/mysql目錄下生成一個var目錄
# /usr/local/mysql/bin/mysql_install_db --user=mysql
將文件的所有屬性改為root用戶
# chown -R root /usr/local/mysql
將數據目錄的所有屬性改為mysql用戶
# chown -R mysql /usr/local/mysql/var
將組屬性改為mysql組
# chgrp -R mysql /usr/local/mysql
啟動資料庫
# /usr/local/mysql/bin/mysqld_safe --user=mysql &
查看3306埠是否開啟
# netstat -tnl|grep 3306
簡單的測試
# /usr/local/mysql/bin/mysqladmin version
查看所有mysql參數
# /usr/local/mysql/bin/mysqladmin variables
設置Mysql開機自啟動
# cp /tmp/mysql-5.0.45/support-files/mysql.server /etc/rc.d/init.d/mysqld
# chown root.root /etc/rc.d/init.d/mysqld
# chmod 755 /etc/rc.d/init.d/mysqld
# chkconfig --add mysqld
# chkconfig --list mysqld
# chkconfig --levels 245 mysqld off
3、Mysql安全性設置
沒有密碼可以直接登錄本機伺服器
# /usr/local/mysql/bin/mysql -u root
查看mysql用戶許可權信息
mysql> select * from mysql.user;
刪除非localhost的主機
mysql> DELETE FROM mysql.user WHERE Host='localhost' AND User='';
刷新授權表
mysql> FLUSH PRIVILEGES;
為root用戶添加密碼
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('yuwan1986');
再次進入Mysql客戶端
# /usr/local/mysql/bin/mysql -u root -h localhost -p
關閉MySQL資料庫
# /usr/local/mysql/bin/mysqladmin -u root -p shutdown

七、 安裝和配置php
# tar zxvf php-5.2.6.tar.gz
# cd /tmp/php-5.2.6
# ./configure \
--prefix=/usr/local/php \
--with-config-file-path=/usr/local/php/etc \
--with-apxs2=/usr/local/apache/bin/apxs \
--with-mysql=/usr/local/mysql/
# make && make install
出現依賴錯誤,直接使用yum安裝即可
# yum -y install libxml2 libxml2-devel
簡單配置PHP
cp ./php.ini-dist /usr/local/php/etc/php.ini
使用vi編輯apache配置文件
# vim /usr/local/apache/conf/httpd.conf
添加這一條代碼
Addtype application/x-httpd-php .php .phtml
重啟Apache
# /usr/local/apache/bin/apachectl restart
簡單測試一下對PHP的支持

八、安裝安裝phpMyAdmin
1. 拷貝目錄到指定位置並改名為phpmyadmin
# tar zxvf phpMyAdmin-3.3.4-all-languages.tar.gz
# cp -a phpMyAdmin-3.3.4-all-languages /usr/local/apache/htdocs/phpmyadmin
# cd /usr/local/apache/htdocs/phpmyadmin/
# cp config.sample.inc.php config.inc.php
2. 配置phpMyAdmin
# vim /usr/local/apache/htdocs/phpmyadmin/config.inc.php
將auth_type 改為http
$cfg['Servers'][$i]['auth_type'] = 'http';
最後設置開機啟動項:
編輯開機啟動文件# vim /etc/rc.d/rc.local添加
service mysqld start
/usr/local/apache/bin/apachectl -D SSL -k start
至此簡單配置完成,可以安裝到伺服器上了

I. linux 中php如何開啟 https

https這個是Apache或者ngnix那邊加的

比如Apache
yum install openssl mod_ssl

生成相應的證書文件忽略你可以網路下

vi /etc/httpd/conf.d/ssl.conf
制定下剛剛的證書文件位置

重啟下httpd

J. linux 中php如何開啟 https

https這個是Apache或者ngnix那邊加的
比如Apache
yum
install
openssl
mod_ssl
生成相應的證書文件忽略你可以網路下
vi
/etc/httpd/conf.d/ssl.conf
制定下剛剛的證書文件位置
重啟下httpd

熱點內容
內置存儲卡可以拆嗎 發布:2025-05-18 04:16:35 瀏覽:336
編譯原理課時設置 發布:2025-05-18 04:13:28 瀏覽:378
linux中進入ip地址伺服器 發布:2025-05-18 04:11:21 瀏覽:612
java用什麼軟體寫 發布:2025-05-18 03:56:19 瀏覽:32
linux配置vim編譯c 發布:2025-05-18 03:55:07 瀏覽:107
砸百鬼腳本 發布:2025-05-18 03:53:34 瀏覽:945
安卓手機如何拍視頻和蘋果一樣 發布:2025-05-18 03:40:47 瀏覽:742
為什麼安卓手機連不上蘋果7熱點 發布:2025-05-18 03:40:13 瀏覽:803
網卡訪問 發布:2025-05-18 03:35:04 瀏覽:511
接收和發送伺服器地址 發布:2025-05-18 03:33:48 瀏覽:372