1 2 3 4 5 6 7 8 |
tigervncserver -localhost no :1 Make it permanent by adding into the file /etc/vnc.conf the option: $localhost = "no" Even though the file reads that the default is localhost=no that is not the case. |
1 2 3 4 5 6 7 8 |
tigervncserver -localhost no :1 Make it permanent by adding into the file /etc/vnc.conf the option: $localhost = "no" Even though the file reads that the default is localhost=no that is not the case. |
1 |
https://www.mono-project.com/download/stable/#download-lin-fedora |
1 |
docker logs --tail 50 --follow --timestamps mediawiki_web_1 (container name) |
1 2 3 |
# Docker usermod : usermod -aG docker username # The rest of this article assumes you are running the docker command as a user in the docker user group. If you choose not to, please prepend the commands with sudo. |
1 2 3 4 5 6 7 |
# Change Var Path for Docker # FROM: ExecStart=/usr/bin/docker daemon -H fd:// # TO: ExecStart=/usr/bin/docker daemon -g /dev/dev.kutayzorlu.com-vg-kutay-1/docker-300GB -H fd:// |
1 2 |
# Docker Search Containers or images docker search ubuntu |
Nginx
1 2 3 4 |
server { client_max_body_size 100M; ... } |
Apache
1 |
LimitRequestBody 104857600 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
It's failing because passwd manipulates a temporary file, and then attempts to rename it to /etc/shadow. This fails because /etc/shadow is a mountpoint -- which cannot be replaced -- which results in this error (captured using strace) rename("/etc/nshadow", "/etc/shadow") = -1 EBUSY (Device or resource busy) You can reproduce this trivially from the command line: # cd /etc # touch foo # mv foo shadow mv: cannot move 'foo' to 'shadow': Device or resource busy You could work around this by mounting a directory containing my_shadow and my_passwd somewhere else, and then symlinking /etc/passwd and /etc/shadow in the container appropriately: $ docker run -it --rm -v $PWD/my_etc:/my_etc centos [root@kutayzorlu.com /]# ln -sf /my_etc/my_passwd /etc/passwd [root@kutayzorlu.com /]# ln -sf /my_etc/my_shadow /etc/shadow [root@kutayzorlu.com /]# ls -l /etc/{shadow,passwd} lrwxrwxrwx. 1 root root 17 Oct 8 17:48 /etc/passwd -> /my_etc/my_passwd lrwxrwxrwx. 1 root root 17 Oct 8 17:48 /etc/shadow -> /my_etc/my_shadow [root@kutayzorlu.com /]# passwd root Changing password for user root. New password: Retype new password: passwd: all authentication tokens updated successfully. [root@kutayzorlu.com /]# |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
<?php ini_set("session.auto_start", 0); require('fpdf.php'); $pdf = new FPDF(); $pdf->AddPage() $pdf->SetFont('Arial','B',16); $pdf->Cell(40,10,'Hello World!'); $pdf->Output(); ?> <?php ob_start(); require('fpdf.php'); $pdf = new FPDF(); $pdf->AddPage() $pdf->SetFont('Arial','B',16); $pdf->Cell(40,10,'Hello World!'); $pdf->Output(); ob_end_flush(); ?> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
Install Library Files * Extrac the downloaded zip archive * Copy the Smarty library files to your system. - cp -r libs /usr/local/lib/php/Smarty $> cd YOUR_DOWNLOAD_DIR $> gtar -zxvf Smarty-3.0.tar.gz $> mkdir /usr/local/lib/php/Smarty $> cp -r Smarty-3.0/libs/* /usr/local/lib/php/Smarty /usr/local/lib/php/Smarty/ debug.tpl plugins/ Smarty.class.php sysplugins/ * You will need four directories setup for Smarty to work. These files are for templates, compiled templates, cached templates and config files. You may or may not use caching or config files, but it is a good idea to set them up anyways. It is also recommended to place them outside of the web server document root. The web server PHP user will need write access to the cache and compile directories as well. In our example, the document root is /web/www.kutayzorlu.com/docs and the web server username is "nobody". We will keep our Smarty files under /web/www.kutayzorlu.com/smarty/. If you are using FTP/sFTP, your FTP software should help you with setting the file permissions. 775 means user/group = read/write, other = read. $> cd /web/www.kutayzorlu.com $> mkdir smarty $> mkdir smarty/templates $> mkdir smarty/templates_c $> mkdir smarty/cache $> mkdir smarty/configs $> chown nobody:nobody smarty/templates_c $> chown nobody:nobody smarty/cache $> chmod 775 smarty/templates_c $> chmod 775 smarty/cache # --------------------------------------------------------- $> cd /web/www.example.com/docs $> mkdir myapp $> cd myapp $> vi index.php $ vi index.php <?php // put full path to Smarty.class.php require('/usr/local/lib/php/Smarty/Smarty.class.php'); $smarty = new Smarty(); $smarty->setTemplateDir('/web/www.kutayzorlu.com/smarty/templates'); $smarty->setCompileDir('/web/www.kutayzorlu.com/smarty/templates_c'); $smarty->setCacheDir('/web/www.kutayzorlu.com/smarty/cache'); $smarty->setConfigDir('/web/www.kutayzorlu.com/smarty/configs'); $smarty->assign('name', 'Ned'); $smarty->display('index.tpl'); ?> Create Template command line $> nano /web/www.kutayzorlu.com/smarty/templates/index.tpl Edit the index.tpl file with the following: index.tpl <html> <head> <title>Smarty</title> </head> <body> Hello, {$name}! </body> </html> http://www.kutayzorlu.com/myapp/index.php in our example. You should see the text "Hello Ned!" in your browser. PHP $smarty->testInstall(); |
Reference : Smarty Web Site