LAMP
with VirtualBox
And so on...
桌面版本 > 18.04 LTS > 64位元
Select file you just download
./ : Current Folder
current/
└── path/
└── to/
└── file
../ : Parent Folder
../
├── current/
└── path/
└── to/
└── file
[t510599@INFOR-II ~]$ cd ~
[t510599@INFOR-II ~]$ pwd
/home/t510599~ : /home/{username}
Usage: mv [OPTION]... SOURCE... DIRECTORY
# move file to parent directory
mv some.file ../
# move file and rename
mv some.file ../rename.file
# cp work as the same
cp some.file ../
cp some.file ../rename.fileMake Directory
Usage: mkdir [OPTION]... DIRECTORY...
# make a new directory
mkdir mydirRemove
Usage: rm [OPTION]... [FILE]...
# remove a file
rm file
# remove files
rm file1 file2 file3
# remove directory
rm -rf mydir/sudo rm -rf --no-preserve-root /ip: 192.168.xxx.xxx
ip address showcommand:
sudo apt-get install openssh-serverdefault user/password : fs/fs
nano index.phpwget https://wordpress.org/latest.zip
wget ftp://ftp.tc.edu.tw/iso/Ubuntu/bionic/ubuntu-18.04.1-desktop-amd64.isosudo apt-cache search python | grep pipsudo apt-get update
sudo apt-get install apache2 php7.2 php7.2-mysql mariadb-serverupdate everytime before you install
sudo systemctl start apache2
sudo systemctl stop apache2
sudo systemctl restart apache2# run command with root permission
sudo apt-get install sl
# login as root
sudo -isudo apt-get install apache2
Files are stored at /var/www/html
sudo apt-get install phpcd /var/www/html
nano index.php<?php phpinfo(); ?>Create index.php with:
connect : localhost/index.php
sudo apt-get install mariadb-server php-mysqlsudo systemctl restart apache2Then restart Apache
sudo mysql_secure_installationEnter current password for root (enter for none):
Set root password? [Y/n] y
New password:
Re-enter new password:
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] y
Reload privilege tables now? [Y/n] yFile management
File Transfer Protocol
檔案傳輸協定是用於在網路上進行檔案傳輸的一套標準協定,使用客戶/伺服器模式。它屬於網路傳輸協定的應用層。檔案傳送(file transfer)和檔案存取(file access)之間的區別在於:前者由FTP提供,後者由如NFS等應用系統提供。
sudo apt-get install proftpd# clean up all files in the directory
cd /var/www/html/
sudo rm *
# download file
sudo wget http://wordpress.org/latest.tar.gz
# extract file
sudo tar xzf latest.tar.gz
# move the contents of the extracted wordpress directory to the current directory
sudo mv wordpress/* .
# clean up
sudo rm -rf wordpress latest.tar.gz
# change owner to Apache's user
sudo chown -R www-data: .sudo mysql -u root -pLogin to mysql shell:
-- create a database for wordpress
CREATE DATABASE `wordpress`;
-- create an user for wordpress
CREATE USER 'wordpress'@'localhost' IDENTIFIED BY 'password';
-- grant all privileges of "wordpress" database to "wordpress" user
GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpress'@'localhost';
FLUSH PRIVILEGES;
quit;Run SQL queries:
Connect to localhost or 192.168.xxx.xxx.
Fill the field with your own settings
Fill the field with your own settings
Wordpress 以強大的外掛系統著稱。
其中不乏各種功能的外掛,有些能新增回饋表單,而其中甚至還能夠將 wordpress 直接打造成購物車。
若是平常要將部落格搬到其他主機上,會有許多繁複的動作,而透過這個外掛,你能輕鬆自在的備份所有東西並且上傳到其他站點。