UbuntuServer: Unterschied zwischen den Versionen

Aus Info-Theke
Zur Navigation springen Zur Suche springen
 
(Eine dazwischenliegende Version von einem anderen Benutzer wird nicht angezeigt)
Zeile 8: Zeile 8:
== Entwicklung ==
== Entwicklung ==
<pre>apt-get install php-dev php-mbstring php-pear
<pre>apt-get install php-dev php-mbstring php-pear
</pre>
== Testseite ==
/etc/nginx/sites-available/test:
<pre>server {
        listen 80;
        server_name aqua test;
        root /srv/www/test/;
        index index.php index.html;
access_log /var/log/nginx/a_test.log;
error_log /var/log/nginx/e_test.log;
        location / {
                try_files $uri $uri/ /index.php?q=$uri&$args;
        }
        location ~ \.php$ {
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_request_buffering off;
include fastcgi_params;
        }
}
</pre>
</pre>
== ssh-Zugang ==
== ssh-Zugang ==
<pre>USR=wk
<pre>USR=wk
mkdir /home/$USR/.ssh
mkdir /home/$USR/.ssh
echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDH6ejWbYoDgg2qAsyS+T7Wk3mmS/USAoM76+9QyUMZMN5SgLXeQ2x9SmIV9ul6rxYvNgSnP243YpfeAvlvMILxzsdG5q0xG33uGYfjHHA2Z74ou2UsK6Yj2thW4d4BtSNK6CJKqIqdWJJvS2GfMQBHOW93m++UjS9e46hzP7MJRf3r3myfPIwiCHGuk2fmeaNqQsFMX/yPUulGAq2DR4gFlh1PESwdn3WwG1Uz+c21B08j8EEefiYZi2XPq2+uCXMBp8hpayLKRLVYXfF8MhT21CmAhmZAtZ0jq7c8YU9hyhrCjPpDy+UecGKz3YdJw7A+HOEdrdgC+ZP31191L0W3 wk@mint18" >/home/$USR/authorized_keys
echo >/home/$USR/.ssh/authorized_keys "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDH6ejWbYoDgg2qAsyS+T7Wk3mmS/USAoM76+9QyUMZMN5SgLXeQ2x9SmIV9ul6rxYvNgSnP243YpfeAvlvMILxzsdG5q0xG33uGYfjHHA2Z74ou2UsK6Yj2thW4d4BtSNK6CJKqIqdWJJvS2GfMQBHOW93m++UjS9e46hzP7MJRf3r3myfPIwiCHGuk2fmeaNqQsFMX/yPUulGAq2DR4gFlh1PESwdn3WwG1Uz+c21B08j8EEefiYZi2XPq2+uCXMBp8hpayLKRLVYXfF8MhT21CmAhmZAtZ0jq7c8YU9hyhrCjPpDy+UecGKz3YdJw7A+HOEdrdgC+ZP31191L0W3 wk@mint18"  
chown -R $USR.$USR /home/$USR/.ssh ; chmod 750 /home/$USR/.ssh ; chmod 600 /home/$USR/.ssh/authorized_keys
chown -R $USR.$USR /home/$USR/.ssh ; chmod 750 /home/$USR/.ssh ; chmod 600 /home/$USR/.ssh/authorized_keys
</pre>
</pre>

Aktuelle Version vom 14. Juni 2017, 08:23 Uhr


Beispiel für einen Ubuntu 16.04 Server (ohne GUI)

nginx + php7 + mysql[Bearbeiten]

apt-get install nginx-full php-fpm mysql-server php-mysql

Entwicklung[Bearbeiten]

apt-get install php-dev php-mbstring php-pear

Testseite[Bearbeiten]

/etc/nginx/sites-available/test:

server {
        listen 80;
        server_name aqua test;
        root /srv/www/test/;
        index index.php index.html;
	access_log /var/log/nginx/a_test.log;
	error_log /var/log/nginx/e_test.log;
        location / {
                try_files $uri $uri/ /index.php?q=$uri&$args;
        }
         location ~ \.php$ {
		fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
		fastcgi_param PATH_INFO $fastcgi_path_info;
		fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
		fastcgi_request_buffering off;
		include fastcgi_params;

        }
}

ssh-Zugang[Bearbeiten]

USR=wk
mkdir /home/$USR/.ssh
echo >/home/$USR/.ssh/authorized_keys "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDH6ejWbYoDgg2qAsyS+T7Wk3mmS/USAoM76+9QyUMZMN5SgLXeQ2x9SmIV9ul6rxYvNgSnP243YpfeAvlvMILxzsdG5q0xG33uGYfjHHA2Z74ou2UsK6Yj2thW4d4BtSNK6CJKqIqdWJJvS2GfMQBHOW93m++UjS9e46hzP7MJRf3r3myfPIwiCHGuk2fmeaNqQsFMX/yPUulGAq2DR4gFlh1PESwdn3WwG1Uz+c21B08j8EEefiYZi2XPq2+uCXMBp8hpayLKRLVYXfF8MhT21CmAhmZAtZ0jq7c8YU9hyhrCjPpDy+UecGKz3YdJw7A+HOEdrdgC+ZP31191L0W3 wk@mint18" 
chown -R $USR.$USR /home/$USR/.ssh ; chmod 750 /home/$USR/.ssh ; chmod 600 /home/$USR/.ssh/authorized_keys