歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> 學習Linux >> linux,linux系統下載

linux,linux系統下載

日期:2017/3/3 18:10:59   编辑:學習Linux

linux,linux系統下載

linux,linux系統下載


在公有雲發布一個個人建的靜態站點
要求:
1、使用騰訊雲申請一個雲主機
2、申請萬網個人域名

3、使用三種web服務器來發布個人的站點



一、首先我選擇了騰訊雲的雲主機:

~1)低消費嘗試一下,當然有錢的可以包年包月

~2) 由於准備安裝的是Linux系統選擇CentOS



~3)基礎網絡,收費便宜點


~4)成功設置好信息大家可以看到我們已經在運營了


~5)通過配置安全組


~6) 新建一個專門為了測試JAVAWEB的安全組


~7) 編輯規則添加三種(apache,tomact,httpd)站點服務器


~8)新建成功




二、域名申請這個大家有錢可以去 萬網 進行申請,不同域名不同的價格。

三、使用三種web服務器來發布個人的站點(apache,tomca,nginix)

大家首先要安裝好這三個服務器,並且打開防火牆,配置好JDK(tomca需要)


開啟防火牆

systemctl enable firewalld.service

systemctl status firewalld.service
reboot


1.Apache。

yum install httpd -y
systemctl start httpd.service
systemctl status httpd.service

systemctl enable httpd.service
systemctl is-enabled httpd.service

firewall-cmd --list-all
firewall-cmd --status

firewall-cmd --add-service=http --permanent

firewall-cmd --reload

firewall-cmd --list-all
在這裡先編輯一下靜態網站內容

cd /

cd var

cd www

cd html

echo "Hello my name is Huweihui ,you can go to my blog www.blog.csdn.net/huhui_">>index.html
chmod 705 index.html

浏覽器通過我的共有雲IP訪問:




3.Tomcat

先安裝JDK







再安裝tomcat

tar -zxvf apache-tomcat-8.0.28.tar.gz
sh /opt/anzhuangbao/apache-tomcat-8.0.28/bin/startup.sh
ps -aux|grep tomcat



firfirewall-cmd --add-port=8080/tcp --permanent

firewall-cmd --reload
firewall-cmd --list-all




外網訪問測試一下:



3.Nginix.
rpm -ivh nginx-release-rhel-7-0.el7.ngx.noarch.rpm
yum installnginx -y
yum install nginx -y
systemctl stop httpd.service
systemctl start nginx.service
systemctl status nginx
firewall-cmd --add-service=http --permanent

cd /etc/nginx/conf.d/
cp default.conf default.conf.bak
vi default.conf

修改文件前:


修改文件後:


重啟服務後可以外網訪問測試。






如果我不對的地方或您有好的方案,請多多包涵,本人還在學習當中。

歡迎大家私信指導,可以共同學習,提升更快
原創文章,如需轉載,請注明參考文章等標注並附上我的博文網址

http://xxxxxx/Linuxjc/1162310.html TechArticle

Copyright © Linux教程網 All Rights Reserved