Ubuntu Server安全Webserver搭建流程
生活随笔
收集整理的這篇文章主要介紹了
Ubuntu Server安全Webserver搭建流程
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
之前整過CentOS。整了Ubuntu才發(fā)現(xiàn),Ubuntu簡單多了~~不知道性能相比又怎樣。
以Ubtuntu 14.04為例。記錄一下搭建流程。
一、SSHserver
第一件事當(dāng)然是ssh,默認(rèn)安裝后vi /etc/ssh/sshd_config。改動配置文件。
改動/etc/hosts.allow
sshd: 192.168.1. , 192.168.0. : allow改動/etc/hosts.deny
sshd : ALL二、系統(tǒng)更新
先更新源,用以Trusty Tahr (14.04)為例,其它版本號看配置生成器
deb http://mirrors.ustc.edu.cn/ubuntu/ trusty main restricted universe multiverse deb http://mirrors.ustc.edu.cn/ubuntu/ trusty-security main restricted universe multiverse deb http://mirrors.ustc.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse deb http://mirrors.ustc.edu.cn/ubuntu/ trusty-proposed main restricted universe multiverse deb http://mirrors.ustc.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse deb-src http://mirrors.ustc.edu.cn/ubuntu/ trusty main restricted universe multiverse deb-src http://mirrors.ustc.edu.cn/ubuntu/ trusty-security main restricted universe multiverse deb-src http://mirrors.ustc.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse deb-src http://mirrors.ustc.edu.cn/ubuntu/ trusty-proposed main restricted universe multiverse deb-src http://mirrors.ustc.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse再更新apt-get
sudo apt-get updatesudo apt-get upgrade然后更新系統(tǒng) sudo apt-get install update三、Samba網(wǎng)上鄰居安裝
1. 安裝 apt-get install samba
2.為samba創(chuàng)建ubuntu系統(tǒng)已經(jīng)存在的用戶somebody:
smbpasswd -a somebody然后會提示你輸入password,這是訪問網(wǎng)上鄰居目錄的password。3.改動配置文件:
cp /etc/samba/smb.conf /etc/samba/smb.conf.bak vi /etc/samba/smb.conf在其后添加共享文件夾: [share]path = /home/somebody/samba_shareavailable = yes browseable = yes public = no writable = yes4. 重新啟動samba就能夠像windows一樣訪問 /etc/init.d/samba restart四、安裝apache2
sudo apt-get install apache2裝好后訪問http://localhost就能夠看到“It Works!”
apache2配置文件在/etc/apache2/apache2.conf,web文件夾在/var/www/html
默認(rèn)用戶是www-data。定義在./envvars文件里
其它配置文件在:./sites-enabled/*.conf
轉(zhuǎn)載于:https://www.cnblogs.com/zfyouxi/p/5262829.html
創(chuàng)作挑戰(zhàn)賽新人創(chuàng)作獎勵來咯,堅(jiān)持創(chuàng)作打卡瓜分現(xiàn)金大獎總結(jié)
以上是生活随笔為你收集整理的Ubuntu Server安全Webserver搭建流程的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: xbox控制台小帮手是什么(微软Xbox
- 下一篇: debian及ubuntu挂载本地硬盘的