通過 SSH 完全安裝 Joomla
設定機器以執行安裝指令碼如下:
## Install needed commands (apt-add-repository)
apt-get update
apt-get -y install software-properties-common -q
apt-get -y install python-software-properties -q
### Install apache
apt-add-repository ppa:ptn107/apache
apt-get update
apt-get install -y apache2
## Install git
apt-get install -y git
## Intall mysql
debconf-set-selections <<< 'mysql-server mysql-server/root_password password qweasd'
debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password qweasd'
apt-get -y install mysql-server
## mysql_secure_installation
### Install PHP7
apt-add-repository -y ppa:ondrej/php
apt-get update
apt-get install php7.0 php7.0-fpm php7.0-mysql php7.0-xml libapache2-mod-php7.0 php7.0-curl php7.0-sqlite php7.0-xdebug php7.0-mcrypt php7.0-gd php-mbstring -y
a2enmod proxy_fcgi setenvif
a2enmod mcrypt
a2enconf php7.0-fpm
apache2ctl restart
這將設定 PHP7 所需的 Apache 2.4
另外,你可能想要在 Joomla 子資料夾中安裝 phpMyAdmin
wget --no-check-certificate https://files.phpmyadmin.net/phpMyAdmin/4.6.3/phpMyAdmin-4.6.3-all-languages.zip -P /var/tmp/
unzip /var/tmp/phpMyAdmin-4.6.3-all-languages.zip -d /var/public_html/
mv phpMyAdmin-4.6.3-all-languages phpmyadmin
mv phpmyadmin/config.sample.inc.php phpmyadmin/config.inc.php