ubuntu server 搭建自己的個人部落格及其他網站

來源:互聯網
上載者:User

標籤:

一, 安裝apache2伺服器

sudo apt-get install apache2

二,安裝mysql伺服器

sudo apt-get install mysql-server

此時會提示輸入Mysql伺服器的密碼 自己隨意就好

三,安裝php5 ubuntu14.04 || php7 ubuntu 16.04

sudo apt-get install php5

 安裝php的其他2個庫,不然無法訪問index.php

sudo apt-get install libapache2-mod-php5sudo apt-get install libapache2-mod-php

四,安裝 mysql

sudo apt-get install mysql

五,配置自己的網站模板,採用typecho

此時需要注意的是,需要更改apache2的設定

nano /etc/apache2/sites-available/000-default.conf

將其中的 /var/www/html 改為 /var/www/

六,重啟Apache

sudo service apcahe2 restart

七,wget 你需要下載的模板的連結,https://github.com/typecho/typecho/releases/download/v1.0-14.10.10-release/1.0.14.10.10.-release.tar.gz

wget https://github.com/typecho/typecho/releases/download/v1.0-14.10.10-release/1.0.14.10.10.-release.tar.gz

八,解壓下載的檔案,有的vps內建某些vps供應商會幫你裝好,如果沒有 apt-get install unzip
unzip <下載的檔案名稱>
系統會把解壓後的檔案放到目前的目錄/typecho檔案夾裡。

複製
cp -r ./typecho/* /var/www/

修改/var/www的許可權
chmod -R /var/www

九,建立自己的資料庫

mysql -u root -p 資料庫密碼

資料庫密碼為之前設定的,

建立資料庫

create database typecho;

之後exit退出mysql

十,登入自己vps的ip或者網域名稱

完成自己的設定就可以訪問了,此時,搭建自己的個人網站到此結束!

ubuntu server 搭建自己的個人部落格及其他網站

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.