shayantl
June 3rd, 2019, 20:09
سلام دوستان
پیش نیاز
دبین 9
به ترتیب دستورات را اجرا نمایید.
sudo dpkg-reconfigure tzdata
sudo apt update && sudo apt upgrade -y
sudo apt install -y curl wget vim git unzip socat bash-completion apt-transport-https build-essential
sudo apt install -y php7.0 php7.0-cli php7.0-fpm php7.0-common php7.0-mysql
sudo apt install -y mariadb-server
sudo mysql_secure_installation
سوالات رو اینجوری جواب بدید
Would you like to setup VALIDATE PASSWORD plugin? NNew password: your_secure_passwordRe-enter new password: your_secure_passwordRemove anonymous users? [Y/n] YDisallow root login remotely? [Y/n] YRemove test database and access to it? [Y/n] YReload privilege tables now? [Y/n] Y
sudo mysql -u root -p# Enter password
mariadb> CREATE DATABASE dbname;mariadb> GRANT ALL ON dbname.* TO 'username' IDENTIFIED BY 'password';mariadb> FLUSH PRIVILEGES;
mariadb> exit
sudo su - rootgit clone https://github.com/Neilpang/acme.sh.gitcd acme.sh ./acme.sh --install --accountemail your_email@example.comsource ~/.bashrccd ~
# RSA 2048acme.sh --issue --standalone -d example.com --keylength 2048# ECDSAacme.sh --issue --standalone -d example.com --keylength ec-256
acme.sh --list
mkdir -p /etc/letsecnrypt/example.comsudo mkdir -p /etc/letsencrypt/example.com_ecc
# RSAacme.sh --install-cert -d example.com --cert-file /etc/letsencrypt/example.com/cert.pem --key-file /etc/letsencrypt/example.com/private.key --fullchain-file /etc/letsencrypt/example.com/fullchain.pem --reloadcmd "sudo systemctl reload nginx.service"# ECC/ECDSAacme.sh --install-cert -d example.com --ecc --cert-file /etc/letsencrypt/example.com_ecc/cert.pem --key-file /etc/letsencrypt/example.com_ecc/private.key --fullchain-file /etc/letsencrypt/example.com_ecc/fullchain.pem --reloadcmd "sudo systemctl reload nginx.service"
exit
sudo apt install -y nginx
vim /etc/nginx/sites-available/phorum.conf
server { listen 80; listen 443 ssl; server_name example.com; root /var/www/phorum;
ssl_certificate /etc/letsencrypt/example.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/example.com/private.key; ssl_certificate /etc/letsencrypt/example.com_ecc/fullchain.pem; ssl_certificate_key /etc/letsencrypt/example.com_ecc/private.key;
index index.php index.html;
location / { try_files $uri $uri/ /index.php?$query_string; }
location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; }}
sudo ln -s /etc/nginx/sites-available/phorum.conf /etc/nginx/sites-enabled
sudo systemctl reload nginx.service
sudo mkdir -p /var/www/phorum
sudo chown -R [your_user]:[your_user] /var/www/phorum
cd /var/www/phorum
wget https://www.phorum.org/downloads/phorum-5.2.23.tar.gz
tar xvzf phorum-5.2.23.tar.gzrm phorum-5.2.23.tar.gzmv Core-phorum_5_2_23/* . && mv Core-phorum_5_2_23/.* .rmdir Core-phorum_5_2_23
cp include/db/config.php.sample include/db/config.php
vim include/db/config.php
sudo chown -R www-data:www-data /var/www/phorum
برای پایان نصب این صفحه رو باز کنید.
http://forum.example.com/admin.php
تمام
پیش نیاز
دبین 9
به ترتیب دستورات را اجرا نمایید.
sudo dpkg-reconfigure tzdata
sudo apt update && sudo apt upgrade -y
sudo apt install -y curl wget vim git unzip socat bash-completion apt-transport-https build-essential
sudo apt install -y php7.0 php7.0-cli php7.0-fpm php7.0-common php7.0-mysql
sudo apt install -y mariadb-server
sudo mysql_secure_installation
سوالات رو اینجوری جواب بدید
Would you like to setup VALIDATE PASSWORD plugin? NNew password: your_secure_passwordRe-enter new password: your_secure_passwordRemove anonymous users? [Y/n] YDisallow root login remotely? [Y/n] YRemove test database and access to it? [Y/n] YReload privilege tables now? [Y/n] Y
sudo mysql -u root -p# Enter password
mariadb> CREATE DATABASE dbname;mariadb> GRANT ALL ON dbname.* TO 'username' IDENTIFIED BY 'password';mariadb> FLUSH PRIVILEGES;
mariadb> exit
sudo su - rootgit clone https://github.com/Neilpang/acme.sh.gitcd acme.sh ./acme.sh --install --accountemail your_email@example.comsource ~/.bashrccd ~
# RSA 2048acme.sh --issue --standalone -d example.com --keylength 2048# ECDSAacme.sh --issue --standalone -d example.com --keylength ec-256
acme.sh --list
mkdir -p /etc/letsecnrypt/example.comsudo mkdir -p /etc/letsencrypt/example.com_ecc
# RSAacme.sh --install-cert -d example.com --cert-file /etc/letsencrypt/example.com/cert.pem --key-file /etc/letsencrypt/example.com/private.key --fullchain-file /etc/letsencrypt/example.com/fullchain.pem --reloadcmd "sudo systemctl reload nginx.service"# ECC/ECDSAacme.sh --install-cert -d example.com --ecc --cert-file /etc/letsencrypt/example.com_ecc/cert.pem --key-file /etc/letsencrypt/example.com_ecc/private.key --fullchain-file /etc/letsencrypt/example.com_ecc/fullchain.pem --reloadcmd "sudo systemctl reload nginx.service"
exit
sudo apt install -y nginx
vim /etc/nginx/sites-available/phorum.conf
server { listen 80; listen 443 ssl; server_name example.com; root /var/www/phorum;
ssl_certificate /etc/letsencrypt/example.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/example.com/private.key; ssl_certificate /etc/letsencrypt/example.com_ecc/fullchain.pem; ssl_certificate_key /etc/letsencrypt/example.com_ecc/private.key;
index index.php index.html;
location / { try_files $uri $uri/ /index.php?$query_string; }
location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; }}
sudo ln -s /etc/nginx/sites-available/phorum.conf /etc/nginx/sites-enabled
sudo systemctl reload nginx.service
sudo mkdir -p /var/www/phorum
sudo chown -R [your_user]:[your_user] /var/www/phorum
cd /var/www/phorum
wget https://www.phorum.org/downloads/phorum-5.2.23.tar.gz
tar xvzf phorum-5.2.23.tar.gzrm phorum-5.2.23.tar.gzmv Core-phorum_5_2_23/* . && mv Core-phorum_5_2_23/.* .rmdir Core-phorum_5_2_23
cp include/db/config.php.sample include/db/config.php
vim include/db/config.php
sudo chown -R www-data:www-data /var/www/phorum
برای پایان نصب این صفحه رو باز کنید.
http://forum.example.com/admin.php
تمام