https://njuptaaa.github.io/docs/#/noj/guide/deploy
1.php
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get -y install php7.3-fpm php7.3-mysql php7.3-curl php7.3-json php7.3-mbstring php7.3-xml php7.3-intl php7.3-gd php7.3-zip
php -v
To enable PHP 7.3 FPM in Apache2 do:
NOTICE: a2enmod proxy_fcgi setenvif
NOTICE: a2enconf php7.3-fpm
PS:安装其他扩展(按需安装)
sudo apt-get install php7.3-gd
sudo apt-get install php7.3-soap
sudo apt-get install php7.3-gmp
sudo apt-get install php7.3-odbc
sudo apt-get install php7.3-pspell
sudo apt-get install php7.3-bcmath
sudo apt-get install php7.3-enchant
sudo apt-get install php7.3-ldap
sudo apt-get install php7.3-opcache
sudo apt-get install php7.3-readline
sudo apt-get install php7.3-sqlite3
sudo apt-get install php7.3-xmlrpc
sudo apt-get install php7.3-bz2
sudo apt-get install php7.3-interbase
sudo apt-get install php7.3-pgsql
sudo apt-get install php7.3-recode
sudo apt-get install php7.3-sybase
sudo apt-get install php7.3-xsl
sudo apt-get install php7.3-cgi
sudo apt-get install php7.3-dba
sudo apt-get install php7.3-phpdbg
sudo apt-get install php7.3-snmp
sudo apt-get install php7.3-tidy
sudo apt-get install php7.3-zip
2.composer
wget https://getcomposer.org/composer.phar
mv composer.phar composer
chmod +x composer
sudo mv composer /usr/local/bin
3.MySQL
sudo apt-get install mysql-server
sudo mysql_secure_installation
systemctl status mysql.service
https://www.cnblogs.com/cpl9412290130/p/9583868.html
4. Redis
sudo apt-get install redis-server
ps -agx|grep redis
5. clone
cd NOJ
git clone https://e.coding.net/mfstem/coding-code-guide/NOJ.git
6. apache2
sudo apt install apache2
sudo vim /etc/apache2/sites-enabled/000-default.conf
(vim)
DocumentRoot /var/www/html ...(你自己设定的文件目录)
systemctl restart apache2.service