Szerverek telepítési howto-k

https://www.howtoforge.com/tutorial/install-apache-with-php-and-mysql-lamp-on-debian-jessie/

https://www.howtoforge.com/tutorial/install-apache-with-php-and-mysql-on-ubuntu-16-04-lamp/

https://www.linode.com/docs/web-servers/apache/install-php-fpm-and-apache-on-debian-8

https://github.com/Froxlor/Froxlor/wiki/apache2-with-fcgid

https://www.digitalocean.com/community/tutorials/how-to-use-apache-http-server-as-reverse-proxy-using-mod_proxy-extension

Domain létrehozása fcgi-php-apache2 konfiguráción

#!/bin/bash
useradd $1
mkdir /home/$1
mkdir /home/$1/$1.$2
mkdir /home/$1/logs
chown $1:$1 /home/$1 -R *
passwd $1 
passwd -u $1
usermod -s /bin/bash $1
usermod -a -G $1 www-data
chmod 750 /home/$1



echo "<VirtualHost *:80>
 ServerAdmin webmaster@localhost
 ServerName $1.$2
 ServerAlias www.$1.$2
 DocumentRoot /home/$1/$1.$2
 ErrorLog /home/$1/logs/error.log
 CustomLog /home/$1/logs/access.log combined
 
 <IfModule mod_fastcgi.c>
 AddType application/x-httpd-fastphp5 .php
 Action application/x-httpd-fastphp5 /php5-fcgi
 Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi-$1.$2
 FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi-$1.$2 -socket /var/run/php5-fpm-$1.$2.sock -idle-timeout 300 -pass-header Authorization
 </IfModule>
 
</VirtualHost>

<Directory /home/$1/$1.$2/>
 Options FollowSymLinks MultiViews
 AllowOverride All
 Order allow,deny
 allow from all
</Directory>
" > /etc/apache2/sites-available/$1.$2.conf

echo "[$1.$2]

user = $1
group = $1

listen = /var/run/php5-fpm-$1.$2.sock

listen.owner = www-data
listen.group = www-data

pm = dynamic

pm.max_children = 20

pm.start_servers = 2

pm.min_spare_servers = 1

pm.max_spare_servers = 20

chdir = /" > /etc/php5/fpm/pool.d/$1.$2.conf

a2ensite $1.$2.conf

systemctl restart php5-fpm.service
service apache2 restart

echo 127.0.0.1 $1.$2 >> /etc/hosts

							

php7 szerver telepítés debian 9-en

apt-get -y install curl mysql-server mysql-client mariadb-server mariadb-client apache2 php7.0 libapache2-mod-php7.0 php7.0-mysql php7.0-curl php7.0-gd php7.0-intl php-pear php-imagick php7.0-imap php7.0-mcrypt php-memcache php7.0-pspell php7.0-recode php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl php7.0-mbstring php-gettext phpmyadmin git php7.0-zip 
mysql_secure_installation

mysql -u root -p

CREATE USER 'admin'@'localhost' IDENTIFIED BY 'jelszó';
GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
exit;

curl -sL https://deb.nodesource.com/setup_8.x | bash -
apt-get install -y nodejs build-essential
npm install -g google-closure-compiler-js

 

Debian 9 telepítése konzolból

VBoxManage createvm --name "lariondev" --ostype Debian_64 --register
VBoxManage modifyvm "lariondev" --memory 1000
VBoxManage createhd --filename "lariondev.vdi" --size 16000
VBoxManage storagectl "lariondev" --name "IDE Controller" --add ide --controller PIIX4
VBoxManage storageattach "lariondev" --storagectl "IDE Controller" --port 0 --device 0 --type hdd --medium "lariondev.vdi"
VBoxManage storageattach "lariondev" --storagectl "IDE Controller" --port 0 --device 1 --type dvddrive --medium /disks/2T/installers/debian-9.1.0-amd64-netinst.iso
VBoxManage modifyvm "lariondev" --vrde on
VBoxManage modifyvm "lariondev" --vrdeport 5555

VBoxManage modifyvm "lariondev" --nic1 bridged --bridgeadapter1 enp2s0

VBoxManage startvm "lariondev" --type headless