L.A.M.P
$ cat /proc/cpuinfo
$ cat /etc/os-release
$ sudo dpkg --configure -a
$ sudo nano /etc/hosts
$ sudo hostnamectl set-hostname new-one
$ newgrp
$ apt-get install nano wget curl perl sudo -y
$ sudo apt update && sudo apt upgrade
$ sudo apt install apache2 apache2-utils -y
$ sudo systemctl start apache2
$ sudo systemctl enable apache2
http://i.p
$ sudo apt install mariadb-server mariadb-client -y
$ mariadb-secure-installation
$ apt install -y php libapache2-mod-php php-cli php-fpm php-json php-pdo php-mysql php-zip php-gd php-mbstring
$ apt install -y php-curl php-xml php-pear php-bcmath
$ sudo systemctl restart apache2
$ sudo nano /var/www/info.php
http://i.p/info.php
$ sudo mkdir -p /var/www/your-domain
$ sudo chown -R www-data:www-data /var/www/your-domain
$ sudo chmod -R 755 /var/www/your-domain
$ sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/your-domain.conf
$ sudo nano /etc/apache2/sites-available/your-domain.conf
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName your-domain.com
ServerAlias www.your-domain
DocumentRoot /var/www/your-domain
ErrorLog ${APACHE_LOG_DIR}/your-domain_error.log
CustomLog ${APACHE_LOG_DIR}/your-domain_access.log combined
</VirtualHost>
$ sudo a2ensite your-domain.conf
$ sudo a2dissite 000-default.conf
$ sudo systemctl reload apache2
$ nano /var/www/your-domain/index.php
write something.....
$ sudo wget http://storage.skydance.cc/uptime.php
sudo a2enmod rewrite
sudo systemctl restart apache2
sudo apt install php-opcache -y
==Install Let's Encrypt=====
$ sudo apt install certbot python3-certbot-apache
$ sudo certbot --apache
email address
terms
your_domain
redirect all HTTP traffic to HTTPS:
Certbot has created a new SSL virtual host configuration
$ sudo cat /etc/apache2/sites-available/your_domain-le-ssl.conf
$ sudo cat /etc/apache2/sites-available/your_domain.conf
(already wrote:redirect all HTTP traffic to HTTPS)
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
$ sudo systemctl enable certbot.timer
$ sudo systemctl start certbot.timer
$ sudo certbot renew --dry-run
$ sudo systemctl reload apache2
=======Webmin=======
$ curl -o setup-repos.sh https://raw.githubusercontent.com/webmin/webmin/master/setup-repos.sh
$ sh setup-repos.sh
$ apt -y install webmin --install-recommends
( change port: $ sudo nano -w /etc/webmin/miniserv.conf )
$ sudo apt install phpmyadmin -y
$ sudo phpenmod mbstring
$ sudo systemctl restart apache2
http://i.p/phpmyadmin
$ sudo apt install php-opcache -y
Posted :
Saturday 29th of August 2015 @ 03:47 PM— Tags :
apache